[Etherboot-developers] Relocation problems
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Michael B. <mb...@fe...> - 2003-05-23 00:36:52
|
I'm having big problems getting the UNDI driver to work with relocation. An UNDI API call that works fine when the Etherboot code is in base memory fails when called with the *exact* same parameters (i.e. all the real-mode segment:offset addresses are the same) if the Etherboot code has been relocated out of base memory. This is the very first UNDI API call: the one that installs the UNDI driver into base memory (the base memory having been allocated using allot_base_memory()). The problem is not intrinsic to -DRELOCATE; I have tried compiling with -DRELOCATE and an edited version of core/relocate.c that forces the relocation target address to be the original address (i.e. no move). This works, proving that there is no problematic code included by -DRELOCATE. The Etherboot UNDI driver itself is -DRELOCATE-agnostic; the only call that cares about relocation (undi_transmit()) sorts itself out at run-time rather than compile-time and, in any case, it's not even getting that far. I am certain that the correct parameters are being passed to the UNDI API routine. Within the "10: .code16" section of a real-mode call, are there any registers (other than %ss and %sp) that need to be preserved in order for the return from real mode to function correctly? Any other ideas very welcome; I've run out. Michael |