[SeaBIOS] Help with 16bit and 32bitFlat

Ian Campbell ijc at hellion.org.uk
Thu Oct 20 08:33:42 CEST 2011


On Wed, 2011-10-19 at 20:25 -0400, Kevin O'Connor wrote:
> 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?

I thought that, apart from the entry points and some special cases,
SeaBIOS mostly ran in 32-bit mode. Have I just misunderstood?

> 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
> 
> _______________________________________________
> SeaBIOS mailing list
> SeaBIOS at seabios.org
> http://www.seabios.org/mailman/listinfo/seabios
> 

-- 
Ian Campbell


Q:	Why do the police always travel in threes?
A:	One to do the reading, one to do the writing, and the other keeps
	an eye on the two intellectuals.




More information about the SeaBIOS mailing list