From b45ee48c90b98fd3766110a79297e9a43d7abbc2 Mon Sep 17 00:00:00 2001 From: pantonshire Date: Sun, 7 Jul 2024 17:56:45 +0100 Subject: [PATCH] treat partition end lba as inclusive --- boot0.s | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boot0.s b/boot0.s index 4da92bd..92523d0 100644 --- a/boot0.s +++ b/boot0.s @@ -247,12 +247,12 @@ STAGE2_GPT_ENTRY_ADDR equ 0x1a ; Load partition LBA end. mov ecx, [si + 0x28] mov edx, [si + 0x2c] - ; Assert that the end LBA is greater than the start LBA, so we have at least one sector to load. - ; TODO: is the end LBA inclusive? + ; Assert that the end LBA is greater than or equal to the start LBA, so we have at least one + ; sector to load (end LBA is inclusive). or edx, edx jnz .stage2_end_lba_ok cmp eax, ecx - jae .panic + ja .panic .stage2_end_lba_ok: mov bx, 0x8200