diff options
author | Andrei Warkentin <awarkentin@vmware.com> | 2020-03-04 22:31:10 +0000 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2020-03-05 14:50:32 +0100 |
commit | d1406c6411ef92d33f6eeb4b98e14242c2ad5061 (patch) | |
tree | 5c94b5339d760e83875f3713d3369a611b417555 | |
parent | dac18ca517819a2116158c3a0b692eb14e297af5 (diff) |
Platform/RaspberryPi/Drivers/ConfigDxe: fix bug in 3GB RAM logic
The original change*** used positive logic (PcdPi4GBEnabled), while the
upstreamed change uses negative logic (PcdRamLimitTo3GB), which
requires an additional condition, or it blows up on 1GiB and 2GiB boards.
Tested on 2GB and 4GB boards (with limiting and without)
*** https://github.com/pftf/edk2-platforms/\
commit/968451beb7c9302517098abf72f7e42b57a0e024
Signed-off-by: Andrei Warkentin <awarkentin@vmware.com>
Reviewed-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
-rw-r--r-- | Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index ccac8daa..b4b13b67 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -288,7 +288,8 @@ ApplyVariables ( DEBUG ((DEBUG_INFO, "Current CPU speed is %uHz\n", Rate));
}
- if (mModelFamily >= 4 && PcdGet32 (PcdRamLimitTo3GB) == 0) {
+ if (mModelFamily >= 4 && PcdGet32 (PcdRamMoreThan3GB) != 0 &&
+ PcdGet32 (PcdRamLimitTo3GB) == 0) {
/*
* Similar to how we compute the > 3 GB RAM segment's size in PlatformLib/
* RaspberryPiMem.c, with some overlap protection for the Bcm2xxx register
|