Skip to content

Commit

Permalink
boot: clear freeIndex for memory untypeds
Browse files Browse the repository at this point in the history
This clears freeIndex for memory untypeds created upon boot so that
it can be used for free space calculation right after boot. The param
for device untypeds is same as before.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
  • Loading branch information
yf13 committed Dec 19, 2024
1 parent ae077fd commit 45d72ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kernel/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ BOOT_CODE static bool_t provide_untyped_cap(
.isDevice = device_memory,
.padding = {0}
};
ut_cap = cap_untyped_cap_new(MAX_FREE_INDEX(size_bits),
ut_cap = cap_untyped_cap_new(device_memory ? MAX_FREE_INDEX(size_bits) : 0,
device_memory, size_bits, pptr);
ret = provide_cap(root_cnode_cap, ut_cap);
} else {
Expand Down

0 comments on commit 45d72ef

Please sign in to comment.