Cr50: bootloader: display config bits at boot

We support two FPGA images with the same firmware. To meet
timing, one image has support for USB but at the cost of reducing
the crypto multiplier to 8x8. The other image has full crypto but
no USB support.

This change displays the FPGA configuration at boot, in addition
to the FPGA image version.

BUG=b:25350751
BRANCH=none
TEST=make buildall, manual

Boot it and watch the console. You should see something like
this:

  cr50 bootloader, 20151118_73026@80895, +USB, 8x8 crypto
  Valid image found at 0x00044000, jumping

Change-Id: I0e5de453fcd1714fcbb170bf4364747b1e7ba894
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/314824
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
This commit is contained in:
Bill Richardson
2015-11-30 15:15:30 -08:00
committed by chrome-bot
parent cef0fdb90e
commit 7f6862e5e0

View File

@@ -63,9 +63,13 @@ int main(void)
{
init_trng();
uart_init();
debug_printf("\n\n%s bootloader, %8u_%u@%u\n",
debug_printf("\n\n%s bootloader, %8u_%u@%u, %sUSB, %s crypto\n",
STRINGIFY(BOARD), GREG32(SWDP, BUILD_DATE),
GREG32(SWDP, BUILD_TIME), GREG32(SWDP, P4_LAST_SYNC));
GREG32(SWDP, BUILD_TIME), GREG32(SWDP, P4_LAST_SYNC),
(GREG32(SWDP, FPGA_CONFIG) &
GC_CONST_SWDP_FPGA_CONFIG_USB_8X8CRYPTO) ? "" : "no ",
(GREG32(SWDP, FPGA_CONFIG) &
GC_CONST_SWDP_FPGA_CONFIG_NOUSB_CRYPTO) ? "full" : "8x8");
unlockFlashForRW();
/* Trying RW A only for now */