Damien Zammit, le dim. 13 févr. 2022 08:10:29 +0000, a ecrit: > +static void __boot > +biosmem_map_adjust_alignment(struct biosmem_map_entry *e) > +{ > + if (e->type & BIOSMEM_MASK_NARROW) { > + e->base_addr = vm_page_round (e->base_addr); > + e->length = vm_page_trunc (e->length); > + } else { > + e->base_addr = vm_page_trunc (e->base_addr); > + e->length = vm_page_round (e->length); > + } > +}
It's not so simple. Take for instance: base_addr = 0x200 length = 0x1000 You won't be aligning the length, while you should. It's the end of the range that you want to align, not the size. Samuel