Javier Martín wrote:
Bit a bit, progress continues: I have some crappy UI semi-ready, to
improve on later, and I'm now battling with the INT13h handler to
perform the actual mapping - had to rescue the big old "Architecture
Programmer's Manual" in order to do PIC code without the amd64
rip-relative addressing. However, I haven't yet found a way to install
some kind of "hook" so that it will be called when the boot command is
issued, preferable just before calling grub_X_real_boot. However, I
didn't go to great lengths to find it... Anyone here willing to
enlighten me or should I find my own way through the darkness (again
¬¬)? I'd like to change/add the smallest amount of code possible, but
for the sake of modularity I prefer a pre-boot hook system rather than
a one-time solution.
Hi Javier,
There is no existing hook for this kind of stuff. So why not make one
pointer to boot area where you can register one?. Code would then check
if it is non-zero and call it before starting OS. Pointer would reside
on same asm module as low level boot code is to keep it close by and
helper on C-level to modify that pointer. You may want to support also
multiple callbacks some way.
Thanks,
Vesa Jääskeläinen
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel