Initialiser Procedure

Views 2176 Votes 0 2010.04.10 23:37:04
Stephanos *.26.166.80

Operating System IX, Initialiser Procedure

#000002, Stephanos S. Io, 10/04/2010, Rev 1.

 

1. Overall Procedure

i.      Save the address of the multi-boot header.

ii.     Sub-Procedure:IsLMSupported Check if the Long Mode is supported by the processor.

iii.   Sub-Procedure: IsKMLoaded Check if the kernel image is loaded as a module.

iv.     Sub-Procedure: RelocKernel Relocate the kernel image to the expected load address.

v.      Sub-Procedure: InitPaging Initialise the paging system.

vi.     Sub-Procedure: InitSOID Initialise the System Operating Information Descriptor (SOID).

vii.   Sub-Procedure: InitPPAT Initialise the Physical Page Allocation Table (PPAT).

viii. Enable the 64-bit mode.

ix.     Jump to the kernel.

2. Sub-Procedure: IsLMSupported

i.      Return the 29th bit of the CPUID at EAX 0x80000001.

3. Sub-Procedure: IsKMLoaded

i.      Return the value of the 3rd bit of the multi-boot header flags field.

4. Sub-Procedure: RelocKernel

i.      Move the kernel image at the multi-boot compatible boot loader provided module address to the expected address.

5. Sub-Procedure: InitPaging

i.      Calculate the 2-MB aligned maximum possible physical address.

ii.     Calculate the number of the required paging structures to map the whole physical address area into the virtual address area.

iii.   Calculate the base address of each table.

iv.     Map the physical pages into the page tables.

v.      Enable the Physical Address Extension (PAE) paging mode.

vi.     Initialise the CR3 PML4 table base address.

6. Sub-Procedure: InitSOID

i.      Initialise the SOID with the initialiser-provided basic system information.

7. Sub-Procedure: InitPPAT

i.      Initialise all PPAT entries with the unallocated value.

ii.     Mark all the reserved areas unallocatable based on the multi-boot information.

iii.   Mark all pre-mapped reserved areas unallocatable.

 


profile

Stephanos

2010.04.09 13:36:07
*.221.90.204

Operating System IX, Initialiser Procedure

#000002, Stephanos S. Io, 09/04/2010, Rev 0.

Attachment
profile

Stephanos

2010.04.10 23:37:04
*.26.166.80

Operating System IX, Initialiser Procedure

#000002, Stephanos S. Io, 10/04/2010, Rev 1.

Attachment