diff options
author | Hung-Te Lin <hungte@chromium.org> | 2020-07-28 10:59:00 +0800 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2020-08-12 02:54:28 +0000 |
commit | 45701fd96ea67cb3ee42c2cfd2bb663df4cda588 (patch) | |
tree | e253916226b9ac80014f388ca6c60d1b4409498d /src/mainboard/google/kukui/boardid.c | |
parent | a4cad368a2996645d2ffc71425f49b246b0340ad (diff) |
mb/google/kukui: revise per-device memory mapping table
In order to help identifying right DRAM info (especially in user space),
we want to unify the mapping table and do the device-specific mapping by
a virtual offset based on build config.
BUG=b:161768221,b:159301679
BRANCH=kukui
TEST=emerge-jacuzzi coreboot
Change-Id: If89bf18c48d263deb79df3e7a60c33bec000d8a3
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43987
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/kukui/boardid.c')
-rw-r--r-- | src/mainboard/google/kukui/boardid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mainboard/google/kukui/boardid.c b/src/mainboard/google/kukui/boardid.c index c6865d1a67..548f36bc9d 100644 --- a/src/mainboard/google/kukui/boardid.c +++ b/src/mainboard/google/kukui/boardid.c @@ -110,7 +110,10 @@ uint32_t ram_code(void) { static uint32_t cached_ram_code = BOARD_ID_INIT; - if (cached_ram_code == BOARD_ID_INIT) + if (cached_ram_code == BOARD_ID_INIT) { cached_ram_code = get_adc_index(RAM_ID_CHANNEL); + /* Model-specific offset - see sdram_configs.c for details. */ + cached_ram_code += CONFIG_BOARD_SDRAM_TABLE_OFFSET; + } return cached_ram_code; } |