[syslinux:firmware] mem: fix regression in recent memscan changes

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Jul 23 23:51:03 PDT 2013


Commit-ID:  33c4ab1b6b4d68a88d3c263bd28edd94b9864a0e
Gitweb:     http://www.syslinux.org/commit/33c4ab1b6b4d68a88d3c263bd28edd94b9864a0e
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Tue, 23 Jul 2013 21:49:05 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 23 Jul 2013 21:57:42 +0100

mem: fix regression in recent memscan changes

A thinko in commit a1331f8d ("memscan: pass enum syslinux_memmap_types
around") causes many machines not to boot because the expression
"!SMT_FREE" always evaluates to "false", regardless of the value of
'type', which means that mem_init() may use reserved memory regions for
general allocation.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 core/mem/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/mem/init.c b/core/mem/init.c
index c8aa96b..dc28de0 100644
--- a/core/mem/init.c
+++ b/core/mem/init.c
@@ -22,7 +22,7 @@ int scan_highmem_area(void *data, addr_t start, addr_t len,
 	dprintf("start = %x, len = %x, type = %d", start, len, type);
 
 	if (start < 0x100000 || start > E820_MEM_MAX
-			     || !SMT_FREE)
+			     || type != SMT_FREE)
 		return 0;
 
 	if (start < __com32.cs_memsize) {


More information about the Syslinux-commits mailing list