bug-grub
[Top][All Lists]
Advanced

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

Re: How is size of kernel found? What exactly do the memory numbers mean


From: Phil Frost
Subject: Re: How is size of kernel found? What exactly do the memory numbers mean?
Date: Fri, 25 Jan 2002 06:15:19 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221


Yoshinori K. Okuji wrote:

At Thu, 24 Jan 2002 22:58:08 -0600,
Phil Frost wrote:

gcc, ld, or 2 ELF specs that I looked at. An objdump -t of my kernel reveals that there is no _end symbol. Is it possible at all to obtain the size of the kernel?

Are you using your own linker script?


No, i'm using ld and gcc, all standard development tools. They are both straight from the debian packages. One thing to note is that I'm building a kernel, not a linux application, so I compile with -nostdinc which means that nothing, to my knowledge, gets defined automaticly. Even _start must be defined by me, as it is usually done by the default libraries.


Also, I am unable to find the exact meaning of the mem_lower and mem_upper members of the multiboot info passed to the kernel in EBX. On a four meg system, 639KB lower and 3072KB of upper is reported. 3072+639=3711, 3.62MB. Where did the other 385KB go?

It's ROM space used by BIOS.


this could be a defective BIOS, I highly doubt it. Do these memory numbers indicate unused RAM, after the loading of modules, excluding the IDT, BIOS data areas, and all else? Or, do they specify something else?

They just specify RAM. That exact meaning is BIOS-specific, I think.


I don't think it is, but if so, perhaps GRUB should contain better memory detection code. If you give your memory allocator numbers that "might" be right, you will surely get trouble. Having the code in GRUB would simplify things a lot, because for the OS to do it would require that a realmode portal is set up, which isn't as simple as making the calls in realmode at boot.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]