From 8f3dd9424aaf67169053c62bd5218f7eb64ff6f9 Mon Sep 17 00:00:00 2001 From: Ian Seyler Date: Tue, 12 May 2026 13:41:40 -0400 Subject: [PATCH 1/2] jmp optimizations --- src/pure64.asm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pure64.asm b/src/pure64.asm index f466aa8..4508997 100644 --- a/src/pure64.asm +++ b/src/pure64.asm @@ -712,8 +712,7 @@ create_pdpe_high: stosq add rax, 0x00001000 ; 4K later (512 records x 8 bytes) dec ecx - cmp ecx, 0 - jne create_pdpe_high + jnz create_pdpe_high ; Create the High Page-Directory Entries (PDE). ; A single PDE can map 2MiB of RAM @@ -737,11 +736,8 @@ skipfirst4mb: pde_high: ; Create a 2MiB page stosq add rax, 0x00200000 ; Increment by 2MiB - cmp ecx, 0 - je pde_next_range dec ecx - cmp ecx, 0 - jne pde_high + jnz pde_high jmp pde_next_range pde_end: From 2c82c26a10963c06a56df4f7272a373562410107 Mon Sep 17 00:00:00 2001 From: Ian Seyler Date: Tue, 12 May 2026 18:37:36 -0400 Subject: [PATCH 2/2] Doc update --- docs/README.md | 2 +- src/sysvar.asm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 15413d8..8e028c9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -216,7 +216,7 @@ The Pure64 information table is located at `0x0000000000005000` and ends at `0x0 0x50E18-bitFLAG_X2APIC1 if X2APIC is supported 0x50E28-bitFLAG_BOOTMODE'B' if BIOS, 'U' for UEFI 0x50E3 - 0x50FF  For future use -0x5100 - 0x51FF8-bitAPIC_IDAPIC ID's for valid CPU cores (based on CORES_ACTIVE) +0x5100 - 0x51FF32-bitAPIC_IDAPIC ID's for valid CPU cores (based on CORES_ACTIVE) 0x5200 - 0x53FF  For future use 0x5400 - 0x55FF16 byte entriesPCIEPCIe bus data 0x5600 - 0x56FF16 byte entriesIOAPICI/O APIC addresses (based on IOAPIC_COUNT) diff --git a/src/sysvar.asm b/src/sysvar.asm index 4cfaad3..625b0d3 100644 --- a/src/sysvar.asm +++ b/src/sysvar.asm @@ -39,7 +39,7 @@ VBEModeInfoBlock: equ 0x0000000000005F00 ; 256 bytes ; DQ - Starting at offset 0, increments by 0x8 p_ACPITableAddress: equ SystemVariables + 0x00 p_HPET_CyclesPerUs: equ SystemVariables + 0x08 ; Precomputed HPET cycles per microsecond -p_LocalAPICAddress: equ SystemVariables + 0x10 +p_LocalAPICAddress: equ SystemVariables + 0x10 ; Address of the Local APIC (xAPIC) p_HPET_Address: equ SystemVariables + 0x28 sys_timer: equ SystemVariables + 0x30 p_EBDA: equ SystemVariables + 0x38