X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcensus;a=blobdiff_plain;f=src%2Fboot%2Fboot2.s;h=719f37e99549e7dbc249344f83170e4dc4a631f8;hp=2a163e1f650923be53a4d3a3cb8cf93e4d5694a2;hb=77450ffb9190c6aa2a04bc23792a143b5886e459;hpb=a6507838a569762ec92493bfcb422e7dbc2cfae9 diff --git a/src/boot/boot2.s b/src/boot/boot2.s index 2a163e1..719f37e 100644 --- a/src/boot/boot2.s +++ b/src/boot/boot2.s @@ -615,16 +615,20 @@ e820_looptop: cmp $0x534d4150, %eax jnz e820_fail + # skip areas starting above 4GB as we won't be able to use them + cmpl $0, 4(%edi) + jnz e820_skip + + # only care for type 1 (usable ram), otherwise ignore + cmpl $1, 16(%edi) + jnz e820_skip + mov buffer, %eax mov $boot_mem_map, %esi mov boot_mem_map_size, %ebp # again, that's [ebp * 8 + esi] mov %eax, (%esi,%ebp,8) - # only care for type 1 (usable ram), otherwise ignore - cmpl $1, 16(%edi) - jnz e820_skip - # skip areas with 0 size (also clamp size to 4gb) # test high 32bits cmpl $0, 12(%edi)