MonkOS  v0.1
A simple 64-bit operating system (x86_64)
kmem.h File Reference

Kernel physical (and virtual) memory map. More...

Go to the source code of this file.

Macros

#define KMEM_IDT   0x00001000
 
#define KMEM_ISR_TABLE   0x00002000
 
#define KMEM_ISR_THUNKS   0x00002800
 
#define KMEM_GDT   0x00003000
 
#define KMEM_TSS   0x00003100
 
#define KMEM_GLOBALS   0x00003200
 
#define KMEM_BOOT_PAGETABLE   0x00010000
 
#define KMEM_BOOT_PAGETABLE_LOADED   0x00014000
 
#define KMEM_BOOT_PAGETABLE_END   0x00020000
 
#define KMEM_KERNEL_PAGETABLE   0x00020000
 
#define KMEM_KERNEL_PAGETABLE_END   0x00070000
 
#define KMEM_TABLE_BIOS   0x00070000
 
#define KMEM_STACK_NMI_BOTTOM   0x0008a000
 
#define KMEM_STACK_NMI_TOP   0x0008c000
 
#define KMEM_STACK_DF_BOTTOM   0x0008c000
 
#define KMEM_STACK_DF_TOP   0x0008e000
 
#define KMEM_STACK_MC_BOTTOM   0x0008e000
 
#define KMEM_STACK_MC_TOP   0x00090000
 
#define KMEM_EXTENDED_BIOS   0x0009f800
 
#define KMEM_VIDEO   0x000a0000
 
#define KMEM_SYSTEM_ROM   0x000c0000
 
#define KMEM_STACK_INTERRUPT_BOTTOM   0x00100000
 
#define KMEM_STACK_INTERRUPT_TOP   0x00200000
 
#define KMEM_STACK_KERNEL_BOTTOM   0x00200000
 
#define KMEM_STACK_KERNEL_TOP   0x00300000
 
#define KMEM_KERNEL_IMAGE   0x00300000
 
#define KMEM_KERNEL_ENTRYPOINT   0x00301000
 
#define KMEM_KERNEL_IMAGE_END   0x00a00000
 
#define KMEM_EXTENDED_BIOS_SIZE   0x00000800
 
#define KMEM_VIDEO_SIZE   0x00020000
 
#define KMEM_SYSTEM_ROM_SIZE   0x00040000
 
#define KMEM_KERNEL_PAGETABLE_SIZE   0x00050000
 

Functions

void kmem_init (pagetable_t *pt)
 Using the contents of the physical memory map, identity map all physical memory into the kernel's page table. More...
 

Detailed Description

Kernel physical (and virtual) memory map.

Definition in file kmem.h.

Macro Definition Documentation

#define KMEM_IDT   0x00001000

Definition at line 13 of file kmem.h.

#define KMEM_ISR_TABLE   0x00002000

Definition at line 14 of file kmem.h.

#define KMEM_ISR_THUNKS   0x00002800

Definition at line 15 of file kmem.h.

#define KMEM_GDT   0x00003000

Definition at line 16 of file kmem.h.

#define KMEM_TSS   0x00003100

Definition at line 17 of file kmem.h.

#define KMEM_GLOBALS   0x00003200

Definition at line 18 of file kmem.h.

#define KMEM_BOOT_PAGETABLE   0x00010000

Definition at line 19 of file kmem.h.

Referenced by acpi_init().

#define KMEM_BOOT_PAGETABLE_LOADED   0x00014000

Definition at line 20 of file kmem.h.

Referenced by acpi_init().

#define KMEM_BOOT_PAGETABLE_END   0x00020000

Definition at line 21 of file kmem.h.

Referenced by acpi_init().

#define KMEM_KERNEL_PAGETABLE   0x00020000

Definition at line 22 of file kmem.h.

Referenced by kmem_init().

#define KMEM_KERNEL_PAGETABLE_END   0x00070000

Definition at line 23 of file kmem.h.

Referenced by kmem_init().

#define KMEM_TABLE_BIOS   0x00070000

Definition at line 24 of file kmem.h.

#define KMEM_STACK_NMI_BOTTOM   0x0008a000

Definition at line 25 of file kmem.h.

#define KMEM_STACK_NMI_TOP   0x0008c000

Definition at line 26 of file kmem.h.

#define KMEM_STACK_DF_BOTTOM   0x0008c000

Definition at line 27 of file kmem.h.

#define KMEM_STACK_DF_TOP   0x0008e000

Definition at line 28 of file kmem.h.

#define KMEM_STACK_MC_BOTTOM   0x0008e000

Definition at line 29 of file kmem.h.

#define KMEM_STACK_MC_TOP   0x00090000

Definition at line 30 of file kmem.h.

#define KMEM_EXTENDED_BIOS   0x0009f800

Definition at line 31 of file kmem.h.

Referenced by acpi_init().

#define KMEM_VIDEO   0x000a0000

Definition at line 32 of file kmem.h.

Referenced by pmap_init().

#define KMEM_SYSTEM_ROM   0x000c0000

Definition at line 33 of file kmem.h.

Referenced by acpi_init().

#define KMEM_STACK_INTERRUPT_BOTTOM   0x00100000

Definition at line 34 of file kmem.h.

#define KMEM_STACK_INTERRUPT_TOP   0x00200000

Definition at line 35 of file kmem.h.

#define KMEM_STACK_KERNEL_BOTTOM   0x00200000

Definition at line 36 of file kmem.h.

#define KMEM_STACK_KERNEL_TOP   0x00300000

Definition at line 37 of file kmem.h.

#define KMEM_KERNEL_IMAGE   0x00300000

Definition at line 38 of file kmem.h.

#define KMEM_KERNEL_ENTRYPOINT   0x00301000

Definition at line 39 of file kmem.h.

#define KMEM_KERNEL_IMAGE_END   0x00a00000

Definition at line 40 of file kmem.h.

Referenced by pmap_init().

#define KMEM_EXTENDED_BIOS_SIZE   0x00000800

Definition at line 42 of file kmem.h.

Referenced by acpi_init().

#define KMEM_VIDEO_SIZE   0x00020000

Definition at line 43 of file kmem.h.

Referenced by pmap_init().

#define KMEM_SYSTEM_ROM_SIZE   0x00040000

Definition at line 44 of file kmem.h.

Referenced by acpi_init().

#define KMEM_KERNEL_PAGETABLE_SIZE   0x00050000

Definition at line 45 of file kmem.h.

Referenced by kmem_init().

Function Documentation

void kmem_init ( pagetable_t pt)

Using the contents of the physical memory map, identity map all physical memory into the kernel's page table.

Parameters
[in,out]ptThe pagetable structure to hold a description of the kernel's page table.

Definition at line 189 of file kmem.c.

Referenced by page_init().