mb/qemu/fw_cfg: Fix return code check for fw_cfg_e820_select()
Change-Id: I22b9eb6ead37dbba6807d145468843bd01c94c84 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43445 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
ef59c93f77
commit
d2245d890b
|
@ -118,7 +118,7 @@ uintptr_t fw_cfg_tolud(void)
|
|||
uint64_t top = 0;
|
||||
uint32_t size = 0, pos = 0;
|
||||
|
||||
if (fw_cfg_e820_select(&size)) {
|
||||
if (fw_cfg_e820_select(&size) == 0) {
|
||||
while (!fw_cfg_e820_read(&e, &size, &pos)) {
|
||||
uint64_t limit = e.address + e.length;
|
||||
if (e.type == 1 && limit < 4ULL * GiB && limit > top)
|
||||
|
|
Loading…
Reference in New Issue