From 06bb2113d9dee6a282fa596756941f6e28570969 Mon Sep 17 00:00:00 2001 From: Will Sowerbutts Date: Wed, 28 Dec 2016 17:26:06 +0000 Subject: [PATCH] Kernel binman: fix off-by-one error, allowing COMMONMEM to use the last byte of RAM (at address 0xFFFF). --- Kernel/tools/binman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/tools/binman.c b/Kernel/tools/binman.c index 72de486d..25dc4a18 100644 --- a/Kernel/tools/binman.c +++ b/Kernel/tools/binman.c @@ -109,9 +109,9 @@ int main(int argc, char *argv[]) ProcessMap(map); fclose(map); - if (s__COMMONMEM > 0xFFFF || s__COMMONMEM + l__COMMONMEM > 0xFFFF) { + if (s__COMMONMEM > 0xFFFF || s__COMMONMEM + l__COMMONMEM > 0x10000) { fprintf(stderr, "Move common down by at least %d bytes\n", - s__COMMONMEM + l__COMMONMEM - 0xFFFF); + s__COMMONMEM + l__COMMONMEM - 0x10000); exit(1); } -- 2.34.1