[syslinux] [syslinux:firmware] load_linux: dynamically calculate the cmdline region

Matt Fleming matt at console-pimps.org
Mon Jul 29 06:28:44 PDT 2013

On Fri, 26 Jul, at 09:49:28AM, H. Peter Anvin wrote:
> Hmm... this might constrain the heap excessively if the SMT_TERMINAL
> cutoff is at the wrong place (because there will be just enough SMT_FREE
> to fit.)  I'm wondering if we shouldn't use the highest of these two
> regions.
Could you give an example memory map where this would be a problem? I
not sure I understand what you mean. Perhaps something like,

     start       end      type
  0x090000  0x090400  SMT_FREE
  0x090400  0x09f000  SMT_TERMINAL


In which case, irrespective of their type, you're suggesting we just
want the highest usable address from these two regions?

> Now, for old kernels, there is an additional constraint, which is that
> the cmdline needs to be part of the same segment as the real mode code,
> so the above is incorrect for the case of 2.00 or 2.01 kernels loaded
> high, when the real mode code is loaded low... if we get an address
> above real_mode_base + 64K those kernels will fail.  2.02+ kernels do
> not have that limitation.

I don't understand the implications of loading the kernel high and real
mode code low, what does the location of the kernel have to do with the
cmdline? Allocating the cmdline within the same segment as the real mode
code makes sense though.

Matt Fleming, Intel Open Source Technology Center

More information about the Syslinux mailing list