csm: Sanitise alignment constraint in Legacy16GetTableAddress
The alignment constraint is defined in the CSM specifications as "Bit mapped. First non-zero bit from the right is the alignment." Use __fls() to sanitise the alignment given that definition, since passing a non-power-of-two alignment to _malloc() isn't going to work well. And cope with being passed zero, which was happening for the E820 table allocation from EDK2. Signed-off-by: David Woodhouse <email@example.com>
Welcome to the SeaBIOS project! This project implements an X86 legacy
bios that is built with standard GNU tools.
Please see build and developer information at:
For the impatient, SeaBIOS is built for QEMU and tested on QEMU with:
qemu -bios out/bios.bin
SeaBIOS can be configured with kconfig. To change the default
configuration one can run "make menuconfig" prior to running "make".
For other types of builds, and for more detailed developer
documentation, please see the online documentation listed above.