diff options
author | Michał Żygowski <michal.zygowski@3mdeb.com> | 2021-05-05 09:52:59 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-05-06 14:38:04 +0000 |
commit | 88a0ce6e11601678ec8d8f6a87c4881b810cb5df (patch) | |
tree | 8c24446e2104a47176ce896adeef1dde114b3300 /src/drivers/lenovo/hybrid_graphics | |
parent | 9c9844922cf410b375047dfe1a191623f5d06699 (diff) |
nb/amd/{agesa,pi}: Avoid overflows during DRAM calculation
Do not use get_dram_base_mask to calculate system DRAM limits. Shift
operation around values operating on base and mask were causing
overflows and thus incorrect system DRAM limit. Another function
returning base and limit in KiB has been developed to avoid data loss.
Keep DRAM high base and limit in calculations only for Trinity where
the physical CPU address bits is 48. Although it is almost impossible
to have a non-zero value there, the platform would have to support
nearly 256GB of RAM.
TEST=boot PC Engines apu1 2GB, apu2 4GB and apu3 2GB and boot Debian
with Linux 4.14
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I3b5c1df96c308ff50c8de104e213219a98f25e10
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52922
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers/lenovo/hybrid_graphics')
0 files changed, 0 insertions, 0 deletions