load remaining boot1 sectors

This commit is contained in:
pantonshire committed 2024-07-14 10:06:18 +01:00
1 parent 76c6d5c355
commit 592826e8cd
4 files changed
+302 -47

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
%define BOOT0_LOADPOINT 0x7c00
%define BOOT1_LOADPOINT 0x8200
%define GLOBALS 0x7000
%define STACK_BASE GLOBALS
%define EBDA_START 0x080000
; boot0 base stack frame variable offsets / globals
; (we use the same offsets once we copy the variables to the globals section)
; -------------------------------------------------------------------------------------------------
; The boot drive number given to us by the BIOS.
%define BOOT_DRIVE 0x02
; Boot drive geometry
%define SECTORS_PER_TRACK 0x04
%define N_HEADS 0x06
; Starting LBA of the GPT partition entries array.
%define GPT_ENTRIES_START_LBA 0x08
; Number of GPT entries, saturated to 16 bits.
%define GPT_N_ENTRIES_16 0x0a
; Number of sectors to advance by once we've read every GPT entry in the current sector.
%define GPT_SECTOR_STRIDE 0x0c
; Number of bytes to advance by in the current sector once we've read a GPT entry.
%define GPT_BYTE_STRIDE 0x0e
; Number of GPT entries which can fit in a single sector.
%define GPT_ENTRIES_PER_SECTOR 0x10
%define GPT_CURRENT_ENTRY_IDX 0x12
%define GPT_SECTOR_ENTRY_IDX 0x14
%define GPT_SECTORS_LOADED 0x16
%define GPT_CURRENT_LBA 0x18
%define BOOT1_GPT_ENTRY_ADDR 0x1a