Dne 12. 04. 22 v 0:04 Peter Stuge napsal(a):
I propose that coreboot tables are a good alternative - fight me! :)

Challenge accepted. They aren't because they are defined with ABI/compiler:

- 64-bit data type alignment is different in 32-bit ABI (4 bytes) and different in 64-bit ABI (8 bytes). Not even sure how the other ABIs got this.

- CB structures like framebuffer struct are not padded to the size compiler 
likes.

 The "packed" attribute would be bit dangerous because then compiler might
complain like "error: taking address of packed member of 'struct cb_framebuffer' may result in an unaligned pointer value [-Werror=address-of-packed-member]"

Alternatively one could add "pad[2]" member to the end to the fb structure to fix this, but maybe this will break some payloads which don't check the ->size
of specific tag...

Anyway, hope this illustrates the problem a bit.

Thanks,
Rudolf

_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to