Pure64 v0.5.0 - Manual
Pure64 currently works with the FAT16 file system. This file system was chosen because it is the most compatible between other OS's (Windows, Mac, Linux, etc).
Pure64 loads your software (OS kernel, Demo, etc) to memory address 0x0000000000100000 (The start of the second megabyte of RAM). Once your software is loaded into memory Pure64 will start to run it. At this point Pure64 is done and your software is in full control of the computer.
System Requirements:
A computer with a 64-bit compatible CPU
A FAT16 formatted hard drive
At least 2 MiB of RAM
How to load Pure64:
An example boot sector is available with Pure64. The only requirement is that Pure64 is loaded to 32-bit memory address 0x00008000.
Memory Map:
This memory map shows how physical memory looks after Pure64 is finished.
| Start Address | End Address | Size | Description |
| 0x0000000000000000 | 0x0000000000000FFF | 4 KiB | IDT - 256 descriptors (each descriptor is 16 bytes) |
| 0x0000000000001000 | 0x0000000000001FFF | 4 KiB | GDT - 256 descriptors (each descriptor is 16 bytes) |
| 0x0000000000002000 | 0x0000000000002FFF | 4 KiB | PML4 - 512 entries, first entry points to PDP at 0x3000 |
| 0x0000000000003000 | 0x0000000000003FFF | 4 KiB | PDP - 512 enties |
| 0x0000000000004000 | 0x0000000000007FFF | 16 KiB | Pure64 Data |
| 0x0000000000008000 | 0x000000000000FFFF | 32 KiB | Pure64 - After the OS is loaded and running this memory is free again |
| 0x0000000000010000 | 0x000000000004FFFF | 256 KiB | PD - Room to map 64 GiB |
| 0x0000000000050000 | 0x000000000009FFFF | 320 KiB | Free |
| 0x00000000000A0000 | 0x00000000000FFFFF | 384 KiB | ROM Area |
| | | | VGA mem at 0xA0000 (128 KiB) Color text starts at 0xB8000 |
| | | | Video BIOS at 0xC0000 (64 KiB) |
| | | | Motherboard BIOS at F0000 (64 KiB) |
| 0x0000000000100000 | 0xFFFFFFFFFFFFFFFF | 1+ MiB | Your software is loaded here |
When creating your Operating System or Demo you can use the sections marked free, however it is the safest to use memory above 1 MiB.
Information table:
Pure64 stores an information table in memory that contains various pieces of data about the computer before it passes control over to the software you want it to load.
The Pure64 information table is located at 0x0000000000005000 and ends at 0x00000000000057FF (2048 bytes).
| Memory Address | Variable Size | Name | Description |
| 0x5000 | 64-bit | ACPI | Address of the ACPI tables |
| 0x5008 | 32-bit | BSP_ID | APIC ID of the BSP |
| 0x5010 | 16-bit | CPUSPEED | Speed of the CPUs in MegaHertz (MHz) |
| 0x5012 | 16-bit | CORES_ACTIVE | The number of CPU cores that were activated in the system |
| 0x5014 | 16-bit | CORES_DETECT | The number of CPU cores that were detected in the system |
| 0x5016 - 0x501F | | | For future use |
| 0x5020 | 16-bit | RAMAMOUNT | Amount of system RAM in Mebibytes (MiB) |
| 0x5022 - 0x502F | | | For future use |
| 0x5030 | 8-bit | MBR | MBR Boot Flag. Set to 1 if the disk uses MBR, 0 if not |
| 0x5031 | 8-bit | IOAPIC_COUNT | Number of IO-APICs in the system |
| 0x5032 - 0x503F | | | For future use |
| 0x5040 | 32-bit | VIDEOBASE | Base memory address for video display, 0 if not configured |
| 0x5044 | 16-bit | VIDEOX | Video display width in Pixels |
| 0x5046 | 16-bit | VIDEOY | Video display height in Pixels |
| 0x5048 - 0x505F | | | For future use |
| 0x5060 | 64-bit | LAPIC | Local APIC address |
| 0x5068... | 64-bit | IOAPIC | IO-APIC addresses (based on IOAPIC_COUNT) |
| 0x5100... | 8-bit | APIC_ID | APIC ID's for valid CPU cores (based on CORES_ACTIVE) |
A copy of the E820 System Memory Map is stored at memory address 0x0000000000004000. Each E820 record is 24 bytes in length and the memory map is terminated by a blank record.
| Variable | Variable Size | Description |
| Starting Address | 64-bit | The starting address for this record |
| Length | 64-bit | The length of memory for this record |
| Memory Type | 32-bit | Type 1 is usable memory, Type 2 is not usable |
For more information on the E820 Memory Map:
OSDev wiki on E820
A copy of the VESA SuperVGA Mode Information is stored at memory address 0x0000000000005C00. A description of what is stored in the structure is available
here.