summaryrefslogtreecommitdiff
path: root/src/mainboard/google/storm
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-02-23 18:38:57 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-21 08:25:22 +0200
commit5a2718c2a96221bdbd446946164e5bbf7895ddc6 (patch)
treed98c46d5e3fa200eb72a91bd201b37877fd7df0d /src/mainboard/google/storm
parentbe7124ee1d5f42eee86485968374c312ef57d5a1 (diff)
storm: print uber-sbl information
Process information reported by uber-sbl: print out its version and RPM and KRAIT log contents. BRANCH=storm BUG=chrome-os-partner:30623 TEST=rebooted a storm device, checked out /sys/firmware/log after booting up Chrome OS: localhost ~ # head -29 /sys/firmware/log | tail -15 Uber-sbl version: @vbendeb-AAABANAZA Section 0 log: 0 :00:SBL1, Start 0 :00:SBL-RO Krait 2623 :00:SBL-RO Krait 0 :00:BB 4666 :00:BB 0 :00:sbl1_hw_init, Start 6130 :00:sbl1_hw_init, Delta 0 :00:SBL1, End 15372:00:SBL1, Delta Section 1 log: 0 :00:SBL-RO Krait, Start 0 :00:SBL-RO Krait, End 336 :00:SBL-RO Krait, Delta localhost ~ # Change-Id: I524dbb49f676046a43bfba26b31b2834c8d2769c Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: dcabca6eb87dcead0c9c33749ed76ac939d843c1 Original-Change-Id: Ic037f936ff2d09b0346fb5239094e7928dfd7620 Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/252830 Original-Reviewed-by: Varadarajan Narayanan <varada@qti.qualcomm.com> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Vadim Bendebury <vbendeb@gmail.com> Reviewed-on: http://review.coreboot.org/9843 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google/storm')
-rw-r--r--src/mainboard/google/storm/bootblock.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/mainboard/google/storm/bootblock.c b/src/mainboard/google/storm/bootblock.c
index cdc870ad2d..8313501eff 100644
--- a/src/mainboard/google/storm/bootblock.c
+++ b/src/mainboard/google/storm/bootblock.c
@@ -11,9 +11,51 @@
*/
#include <bootblock_common.h>
+#include <console/console.h>
+#include <symbols.h>
+
#include "mmu.h"
+#include <soc/usbl_if.h>
+
+static void dump_usbl_report(int section, sbl_ro_info *info)
+{
+ int i, num_log_entries;
+
+ num_log_entries = info->num_log_entries;
+ if (!num_log_entries)
+ return;
+
+ printk(BIOS_INFO, " Section %d log:\n", section);
+ for (i = 0; i < num_log_entries; i++)
+ printk(BIOS_INFO, " %-5d:%2.2x:%.*s\n",
+ info->log[i].time_stamp,
+ info->log[i].type,
+ sizeof(info->log[i].msg),
+ info->log[i].msg);
+}
void bootblock_mainboard_init(void)
{
+ int i;
+
setup_mmu(DRAM_NOT_INITIALIZED);
+
+ if (((uintptr_t)maskrom_param < (uintptr_t)&_sram) ||
+ ((uintptr_t)maskrom_param > (uintptr_t)&_esram)) {
+ printk(BIOS_INFO, "No uber-sbl parameter detected\n");
+ return;
+ }
+
+ /* Is maskrom parameter address set to a sensible value? */
+ if ((maskrom_param->start_magic != UBER_SBL_SHARED_INFO_START_MAGIC) ||
+ (maskrom_param->end_magic != UBER_SBL_SHARED_INFO_END_MAGIC)) {
+
+ printk(BIOS_INFO, "Uber-sbl: invalid magic!\n");
+ } else {
+ printk(BIOS_INFO, "Uber-sbl version: %s\n",
+ maskrom_param->version);
+
+ for (i = 0; i < maskrom_param->num; i++)
+ dump_usbl_report(i, &maskrom_param->info[i]);
+ }
}