[SeaBIOS] [PATCH 0/9] Misc boot related cleanups
Gleb Natapov
gleb at redhat.com
Thu Dec 30 20:31:56 CET 2010
On Thu, Dec 30, 2010 at 01:56:28PM -0500, Kevin O'Connor wrote:
> On Thu, Dec 30, 2010 at 07:55:27PM +0200, Gleb Natapov wrote:
> > On Thu, Dec 30, 2010 at 12:20:17PM -0500, Kevin O'Connor wrote:
> > > On Thu, Dec 30, 2010 at 08:01:15AM +0200, Gleb Natapov wrote:
> > > > For me it looks more complicated (may be because I am more familiar with
> > > > my own code ;))
> > > The basic idea is to completely build the search string in the
> > > bootprio_find_X() function and then have it call find_prio() to return
> > > the priority.
> > I understand the code, I just don't see why this is easier.
>
> It does seem a little more compact to me. Shrug - it's probably
> because I'm more familiar with my code. :-)
>
Probably :) FWIW I ran a guest with your patch and it works for me.
> >Your code
> > also uses a lot of stack is this OK?
>
> It's ~600 bytes - since the code runs in 32-bit flat mode, it
> shouldn't be a problem. (The closest limit would be each "thread"
> stack of 4K.)
>
> There's a tool to try and scan stack usage (it's for the 16-bit code,
> but it can also run on the 32bit code):
>
> objdump -m i386 -M suffix -d out/rom.o | tools/checkstack.py | less
>
> Nothing is close to 4k.
>
OK.
> >It also assumes that device path is
> > no greater then 256 bytes long. With multiple bridges we can go over
> > this limit.
>
> Assuming each bridge takes 15 bytes to describe, one would need around
> 12 layers of bridges before this was an issue. I don't think that's
> realistic.
>
Each node consist of name at address. IIRC name can be max 32 bytes.
Address is unlimited but the longest address I can think of is 64bit
integer written in hex, this is 16 bites more. On a PC we have very
limited number of possible devices and none with such long names and
deep nesting, so probably this is not the big issue.
--
Gleb.
More information about the SeaBIOS
mailing list