From f06b08a60fe49784c197929b46e22fdb0e1dbbf3 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 9 Oct 2015 16:42:21 +0200 Subject: [PATCH] Change macbook air to use a pre-dumped SPD. MBA has a soldered RAM without SPD, so you need to use stored SPD. Change-Id: I0205e6c65ccbfe7764c12c815e60801a3c3623a5 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/11841 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/mainboard/apple/macbookair4_2/Makefile.inc | 4 ++++ .../apple/macbookair4_2/early_southbridge.c | 15 ++++++++++----- src/mainboard/apple/macbookair4_2/spd.bin | Bin 0 -> 1024 bytes 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 src/mainboard/apple/macbookair4_2/spd.bin diff --git a/src/mainboard/apple/macbookair4_2/Makefile.inc b/src/mainboard/apple/macbookair4_2/Makefile.inc index 6064cea986..555581cc4d 100644 --- a/src/mainboard/apple/macbookair4_2/Makefile.inc +++ b/src/mainboard/apple/macbookair4_2/Makefile.inc @@ -1,3 +1,7 @@ romstage-y += early_southbridge.c romstage-y += gpio.c ramstage-y += gnvs.c + +cbfs-files-y += spd.bin +spd.bin-file := spd.bin +spd.bin-type := spd diff --git a/src/mainboard/apple/macbookair4_2/early_southbridge.c b/src/mainboard/apple/macbookair4_2/early_southbridge.c index e1b667d54d..576262d601 100644 --- a/src/mainboard/apple/macbookair4_2/early_southbridge.c +++ b/src/mainboard/apple/macbookair4_2/early_southbridge.c @@ -15,6 +15,7 @@ #include "southbridge/intel/bd82x6x/gpio.h" #include #include +#include void pch_enable_lpc(void) { @@ -51,11 +52,15 @@ const struct southbridge_usb_port mainboard_usb_ports[] = { { 1, 0, -1 }, }; -/* FIXME: Put proper SPD map here. */ void mainboard_get_spd(spd_raw_data *spd) { - read_spd(&spd[0], 0x50); - read_spd(&spd[1], 0x51); - read_spd(&spd[2], 0x52); - read_spd(&spd[3], 0x53); + void *spd_file; + size_t spd_file_len = 0; + spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, + &spd_file_len); + if (spd_file && spd_file_len >= 1024) { + int i; + for (i = 0; i < 4; i++) + memcpy(&spd[i], spd_file + 256 * i, 128); + } } diff --git a/src/mainboard/apple/macbookair4_2/spd.bin b/src/mainboard/apple/macbookair4_2/spd.bin new file mode 100644 index 0000000000000000000000000000000000000000..6e2738ff21c1a04ed7a314275ff496f0f965a213 GIT binary patch literal 1024 zcmbOv$j!{mz`)2H#K^(Jpumt*kzB_K~odP5{36{GUB4S`9c M@lV?T9^|G20Cw07c>n+a literal 0 HcmV?d00001