x86/boot.c: remove trailing padding block

'extra_bi_size' is meant to report the full size of all the bootinfo
blocks, but excluded the body size of trailing padding block in the
original implementation. Plus the padding is not necessary to exist.

Therefore, this fix removes the trailing padding block and initialises
`extra_bi_size` to 0 to make boot info consistent across architectures.

Signed-off-by: Terry Bai <tianyi.bai@unsw.edu.au>
This commit is contained in:
Terry Bai 2026-06-24 16:26:53 +10:00 committed by Julia
parent b161c3fe98
commit da39bd7884

View file

@ -104,7 +104,7 @@ BOOT_CODE bool_t init_sys_state(
cap_t it_vspace_cap;
cap_t it_ap_cap;
cap_t ipcbuf_cap;
word_t extra_bi_size = sizeof(seL4_BootInfoHeader);
word_t extra_bi_size = 0;
pptr_t extra_bi_offset = 0;
uint32_t tsc_freq;
create_frames_of_region_ret_t create_frames_ret;
@ -226,12 +226,6 @@ BOOT_CODE bool_t init_sys_state(
extra_bi_offset += 4;
}
/* provide a chunk for any leftover padding in the extended boot info */
seL4_BootInfoHeader padding_header;
padding_header.id = SEL4_BOOTINFO_HEADER_PADDING;
padding_header.len = (extra_bi_region.end - extra_bi_region.start) - extra_bi_offset;
*(seL4_BootInfoHeader *)(extra_bi_region.start + extra_bi_offset) = padding_header;
#ifdef CONFIG_KERNEL_MCS
/* set up sched control for each core */
init_sched_control(root_cnode_cap, CONFIG_MAX_NUM_NODES);