From 21491514b3642a321ce65f2a07428f63c4d9feb5 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 8 Nov 2020 11:11:49 -0500 Subject: manual viewer, "swap colors" system call --- src/man/dev/kmemmap.pre | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/man/dev/kmemmap.pre (limited to 'src/man/dev/kmemmap.pre') diff --git a/src/man/dev/kmemmap.pre b/src/man/dev/kmemmap.pre new file mode 100644 index 0000000..73b4e09 --- /dev/null +++ b/src/man/dev/kmemmap.pre @@ -0,0 +1,34 @@ +\title{Portland Kernel Memory Map} + +This manual page describes the layout of the kernel area of memory. Unless you are doing kernel development, you do not need to know this. This is not guaranteed to remain backwards-compatible across versions. Unspecified memory under \color{07}0x0400.0000\color{0f} is reserved for future use. + +\color{0e}Passed from bootloader\color{0f} + +Starting at \color{07}0x0000.4000\color{0f} is information passed from the bootloader. + +\color{07}0x4000 byte:\color{0f} support flags +- \color{07}0x80:\color{0f} PCI support +- \color{07}0x40:\color{0f} PAE support +- The other flags are reserved. +\color{07}0x4001 byte:\color{0f} PCI's "hardware characteristics" byte +\color{07}0x4002 byte:\color{0f} PCI's minor version +\color{07}0x4003 byte:\color{0f} PCI's major version +\color{07}0x4004 byte:\color{0f} last PCI bus +\color{07}0x4006 word:\color{0f} length of BIOS's memory map + +From \color{07}0x0001.0000\color{0f} to \color{07}0x0001.ffff\color{0f} is the memory map from BIOS. + +\color{0e}Fixed kernel structures\color{0f} + +\color{07}0x0000.4f98 - 0x0000.4fff:\color{0f} the Task State Segment +\color{07}0x0000.5000 - 0x0000.5fff:\color{0f} identity page directory +\color{07}0x0004.0000 - 0x0005.ffff:\color{0f} a bitmap of allocated pages +\color{07}0x0040.0000 - 0x007f.ffff:\color{0f} page tables referenced by identity page directory + +\color{0e}Others\color{0f} + +\color{07}0x000a.0000 - 0x000f.0000\color{0f} and \color{07}0x00f0.0000 - 0x00ff.0000\color{0f} are assumed to be reserved by the motherboard for either memory-mapped hardware or BIOS. The standard VGA area is used as such, and the rest are avoided. + +The kernel is loaded with the text and data sections at \color{07}0x0003.0000 - 0x0003.7fff\color{0f}, and the bss at \color{07}0x0400.0000 - 0x07ff.7fff\color{0f}. \color{07}0x0003.8000 - 0x0003.ffff\color{0f} is used as a stack by the kernel, and whatever part of the bss area is unused is used as a sort of page-resolution "heap" for the kernel. + +Everything after \color{07}0x0800.0000\color{0f} that the BIOS indicates is available for use is used for user pages. \ No newline at end of file -- cgit v1.2.3