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 <dwmw2@infradead.org>
1 file changed
tree: 34eaadf4905d616870674ccdf98050affd7b0a3d
  1. docs/
  2. scripts/
  3. src/
  4. vgasrc/
  5. .gitignore
  6. COPYING
  7. COPYING.LESSER
  8. Makefile
  9. README