[Prev][Next][Index][Thread]
RE: x86 physical memory probe?
> From: "Alastair Reid" <reid@cs.utah.edu>
> Subject: RE: x86 physical memory probe?
> Date: Mon, 27 Nov 2000 13:23:05 -0700
>
> I think the answer is that the multiboot standard says that the kernel
> will be started with a direct memory map so oskit kernels just assume it
> is so. Likewise, the size of the memory is passed to oskit kernels in
> the multiboot_info structure.
>
> So the code to set the memory map and determine how much memory we have
> ought to be in the boot loaders. (Unfortunately, I don't have the code
> handy at the moment so I can't point you at a specific instance or check
> whether they, in turn, assume something about their state when they are
> started by the BIOS, by PXE or whatever.)
Correct. For example, look at boot/bsd/main.c.
/* Add memory information */
boot_info->flags |= MULTIBOOT_MEMORY;
boot_info->mem_upper = phys_mem_upper;
boot_info->mem_lower = phys_mem_lower;
boot_info is a structure passed from the boot adaptor to the kernel.
phys_mem_lower and phys_mem_upper are determined by asking the bios.
The boot_info structure allows for more complicated memory layouts, as on
the Shark where memory is made up of non contiguous chunks,
Lbs
References: