diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-04-11 20:58:38 +0200 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-04-11 21:05:47 +0200 |
commit | 8b90c1f407b4f4aa3802858e23aa90d7dfbe17ad (patch) | |
tree | 4080e975e33df6f3c57ff5f3486f97923c9bbbe3 /stage2/mmap.asm | |
parent | a6669e496e46ef89673103b3330226c7d0201a1a (diff) | |
download | cuddles-8b90c1f407b4f4aa3802858e23aa90d7dfbe17ad.tar.xz |
bootinfo struct
Diffstat (limited to 'stage2/mmap.asm')
-rw-r--r-- | stage2/mmap.asm | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/stage2/mmap.asm b/stage2/mmap.asm index 72f188a..b719f84 100644 --- a/stage2/mmap.asm +++ b/stage2/mmap.asm @@ -6,6 +6,7 @@ mmap: xor ebx, ebx ; counter for interrupt mov di, MEMMAP + xor esi, esi ; number of regions .loop: ; issue an INT 0x15, EAX = 0xE820 interrupt @@ -17,32 +18,19 @@ mmap: cmp eax, MAPMAGIC ; detect failure jne .fail - cmp dword[di+16], 1 - ; jne .next - - cmp dword[di+4], 0 - jne .keep - - cmp dword[di+0], 0x100000 - jb .next - -.keep: - mov dword[di+20], 0 + inc esi add di, 24 -.next: cmp ebx, 0 jne .loop mov dword[di+0], 0 mov dword[di+4], 0 - ;mov ax, di - ;sub ax, MEMMAP - ;xor dx, dx - ;mov bx, 24 - ;div bx - ;mov [MEMMAPCNT], ax + mov dword[bootinfo.mmap_len+0], esi + mov dword[bootinfo.mmap_len+4], 0 + mov dword[bootinfo.mmap_ptr+0], MEMMAP + mov dword[bootinfo.mmap_ptr+4], 0 ret |