tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: x86 bootstrap features



On Wed, Sep 25, 2019 at 02:53:44PM +0300, Andreas Gustafsson wrote:
> Michael van Elst wrote:
> > This assumes that code and data segment is the same and assigns
> > the following 64k block to the stack. We switch to protected
> > mode soon after, but the memory layout seems to stay the same.
> > Maybe changing to
> > 
> > 	addw	$0x2001, %ax
> > 
> > is all that is needed.
> 
> I guess we also need to bump these definitions in the Makefile?
> 
>   SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x30000

That even looks wrong now. The start address aligns with the
stack area so that heap and stack grow into each other, but the
limit is beyond the stack top.


But

revision 1.6
date: 2011-03-18 18:46:26 +0100;  author: jakllsch;  state: Exp;  lines: +8 -6;
Automatically adjust pxeboot(8) stack based on the end of .bss, like is
already done in biosboot.S for boot(8).
(The heap location will need to be adjusted if pxeboot expands much more.)

confirms that the heap needs to be adjusted too. :)


Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index