Skip to content

Commit 2a36320

Browse files
committed
Align kernel size up to 512 boundary instead of loading one block extra
Might fix phil-opp/blog_os#409.
1 parent 59e9a7e commit 2a36320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/second_stage.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ load_kernel_from_disk:
3030

3131
# block count
3232
mov ecx, _kib_kernel_size
33+
add ecx, 511 # align up
3334
shr ecx, 9
34-
add ecx, 1
3535

3636
load_next_kernel_block_from_disk:
3737
# load block from disk

0 commit comments

Comments
 (0)