[SeaBIOS] Help with 16bit and 32bitFlat

Kevin O'Connor kevin at koconnor.net
Thu Oct 20 02:25:40 CEST 2011


On Wed, Oct 19, 2011 at 04:08:06PM +0900, Daniel Castro wrote:
> Hello,
> 
> I am trying to add a process_op in block.c for Xen, yet the linker
> throws an error for out rom16, yet my code will only run in 32Bit
> FLAT.
> The specific error is undefined referece to process_xen_op (my
> function defined elsewhere) Here is the make output:

The disk access code is called from 16bit mode, and thus it needs to
be compiled in 16bit mode.  The link errors you are seeing are there
to force a build error (instead of failing mysterously at run time).

What does your driver do that requires 32bit mode?

The ahci driver has to access some memory addresses above 1 meg to
work properly and so it uses the pci_readl/writel() functions which
trampoline to/from 32bit mode to acomplish this.  If you need to do
something similar, you could use that as a model.

-Kevin



More information about the SeaBIOS mailing list