commit | 6e56ed129c9782ba050a5fbfbf4ac12335b230f7 | [log] [tgz] |
---|---|---|
author | David Woodhouse <dwmw2@infradead.org> | Thu Jun 13 16:25:13 2019 +0100 |
committer | Kevin O'Connor <kevin@koconnor.net> | Tue Jun 18 18:42:19 2019 -0400 |
tree | 34eaadf4905d616870674ccdf98050affd7b0a3d | |
parent | 85137fb5f2dfa5f83e9e340ca881c634ae14d4e9 [diff] |
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>