From 60b87c44774d799699ca50989f283f833ca54da7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Thu, 6 Feb 2020 19:40:42 -0700 Subject: [PATCH] Make more adjustments to padding to match padding from before MBR change --- x86_64/disk.asm | 17 ++++++++++------- x86_64/partitions.asm | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/x86_64/disk.asm b/x86_64/disk.asm index 19b949c..1ef4cc3 100644 --- a/x86_64/disk.asm +++ b/x86_64/disk.asm @@ -10,7 +10,7 @@ startup_start: %ifdef ARCH_x86_64 %include "startup-x86_64.asm" %endif -align BLOCK_SIZE, db 0 +align 512, db 0 startup_end: %ifdef KERNEL @@ -18,13 +18,16 @@ startup_end: %defstr KERNEL_STR %[KERNEL] incbin KERNEL_STR .end: - align BLOCK_SIZE, db 0 + align 512, db 0 %else + align BLOCK_SIZE, db 0 %ifdef FILESYSTEM - filesystem: - %defstr FILESYSTEM_STR %[FILESYSTEM] - incbin FILESYSTEM_STR - .end: - align BLOCK_SIZE, db 0 + filesystem: + %defstr FILESYSTEM_STR %[FILESYSTEM] + incbin FILESYSTEM_STR + .end: + align BLOCK_SIZE, db 0 + %else + filesystem: %endif %endif diff --git a/x86_64/partitions.asm b/x86_64/partitions.asm index af91dfe..ba7c241 100644 --- a/x86_64/partitions.asm +++ b/x86_64/partitions.asm @@ -29,6 +29,6 @@ find_redoxfs_partition: .notfound: mov si, .no_partition_found_msg call print - mov eax, (startup_end - boot) / 512 + mov eax, (filesystem - boot) / 512 ret .no_partition_found_msg: db "No MBR partition with type 0x83 found", 0xA, 0xD, 0 -- GitLab