diff options
author | Helge Deller <deller@gmx.de> | 2016-10-08 21:50:20 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2016-10-08 21:50:20 +0200 |
commit | 70bd7a9a41e318c0575755a78c4d18ad97495c47 (patch) | |
tree | 580ddd5f01fc8ed5d11f768076fb534fb58cb61c | |
parent | 8e69492732442e45960ccd42bef186531e1ae14a (diff) | |
download | palo-70bd7a9a41e318c0575755a78c4d18ad97495c47.tar.gz |
Unbreak loading Linux kernels bigger than 16 MB
Fix typo in PHYS() macro, which prevents the palo ipl boot loader
to load kernels into memory regions which are above 16 MB.
I noticed this bug, because of the test_rhashtable.c built-in kernel
testcase. The old palo boot loader crashed/stopped while trying to load
the linux kernel whith CONFIG_TEST_RHASHTABLE=y (built-in).
Here is the palo output before this change:
Entry 00100000 first 00100000 n 5
Segment 0 load 00100000 size 415968 mediaptr 0x1000
Segment 1 load 00166000 size 108928 mediaptr 0x67000
Segment 2 load 00200000 size 10786768 mediaptr 0x82000
Segment 3 load 00c4a000 size 3549016 mediaptr 0xacc000
Segment 4 load 00000000 size 17939000 mediaptr 0xe2f000
Notice the load address (zero) for segment #4.
And here is the new palo output, with which palo sucessfully
can boot the kernel:
Entry 00100000 first 00100000 n 5
Segment 0 load 00100000 size 411512 mediaptr 0x1000
Segment 1 load 00165000 size 108928 mediaptr 0x66000
Segment 2 load 00200000 size 10782104 mediaptr 0x81000
Segment 3 load 00c49000 size 3545848 mediaptr 0xaca000
Segment 4 load 01000000 size 1938744 mediaptr 0xe2c000
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | lib/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common.h b/lib/common.h index 53d620c..48b45ec 100644 --- a/lib/common.h +++ b/lib/common.h @@ -75,7 +75,7 @@ void *pa_memcpy(void *dest, const void *src, unsigned n); #define GB (1024 * 1024 * 1024) /* assume kernel will always be loaded into the "lower" physical memory */ -#define PHYS(virtual) ((virtual) & 0x00ffffff) +#define PHYS(virtual) ((virtual) & 0x0fffffff) /* This struct is placed at the start of the boot loader executable. The * "magic" number is the assembly-language branch needed to skip over the |