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 AddressEnd AddressSizeDescription
0x00000000000000000x0000000000000FFF4 KiBIDT - 256 descriptors (each descriptor is 16 bytes)
0x00000000000010000x0000000000001FFF4 KiBGDT - 256 descriptors (each descriptor is 16 bytes)
0x00000000000020000x0000000000002FFF4 KiBPML4 - 512 entries, first entry points to PDP at 0x3000
0x00000000000030000x0000000000003FFF4 KiBPDP - 512 enties
0x00000000000040000x0000000000007FFF16 KiBPure64 Data
0x00000000000080000x000000000000FFFF32 KiBPure64 - After the OS is loaded and running this memory is free again
0x00000000000100000x000000000004FFFF256 KiBPD - Room to map 64 GiB
0x00000000000500000x000000000009FFFF320 KiBFree
0x00000000000A00000x00000000000FFFFF384 KiBROM Area
   VGA mem at 0xA0000 (128 KiB) Color text starts at 0xB8000
   Video BIOS at 0xC0000 (64 KiB)
   Motherboard BIOS at F0000 (64 KiB)
0x00000000001000000xFFFFFFFFFFFFFFFF1+ MiBYour 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 AddressVariable SizeNameDescription
0x500064-bitACPIAddress of the ACPI tables
0x500832-bitBSP_IDAPIC ID of the BSP
0x501016-bitCPUSPEEDSpeed of the CPUs in MegaHertz (MHz)
0x501216-bitCORES_ACTIVEThe number of CPU cores that were activated in the system
0x501416-bitCORES_DETECTThe number of CPU cores that were detected in the system
0x5016 - 0x501F  For future use
0x502016-bitRAMAMOUNTAmount of system RAM in Mebibytes (MiB)
0x5022 - 0x502F  For future use
0x50308-bitMBRMBR Boot Flag. Set to 1 if the disk uses MBR, 0 if not
0x50318-bitIOAPIC_COUNTNumber of IO-APICs in the system
0x5032 - 0x503F  For future use
0x504032-bitVIDEOBASEBase memory address for video display, 0 if not configured
0x504416-bitVIDEOXVideo display width in Pixels
0x504616-bitVIDEOYVideo display height in Pixels
0x5048 - 0x505F  For future use
0x506064-bitLAPICLocal APIC address
0x5068...64-bitIOAPICIO-APIC addresses (based on IOAPIC_COUNT)
0x5100...8-bitAPIC_IDAPIC 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.

VariableVariable SizeDescription
Starting Address64-bitThe starting address for this record
Length64-bitThe length of memory for this record
Memory Type32-bitType 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.