add extra debug print of BRAM BOOT address
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 2 Jan 2022 15:56:26 +0000 (15:56 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 2 Jan 2022 15:56:26 +0000 (15:56 +0000)
litedram/gen-src/sdram_init/main.c

index 36f3d06d888d4ee49994a94b9eb2fbf9b4d5d73d..12714c748d9ed7312222471bc5b07cb72f92a0a6 100644 (file)
@@ -270,6 +270,8 @@ uint64_t main(void)
        if (ftr & SYS_REG_INFO_HAS_BRAM) {
                val = readq(SYSCON_BASE + SYS_REG_BRAMINFO) & SYS_REG_BRAMINFO_SIZE_MASK;
                printf("          BRAM: %ld KB\n", val / 1024);
+        val = readq(SYSCON_BASE + SYS_REG_BRAM_BOOTADDR);
+               printf("     BOOT ADDR: 0x%lx\n", val);
        }
        if (ftr & SYS_REG_INFO_HAS_DRAM) {
                val = readq(SYSCON_BASE + SYS_REG_DRAMINFO) & SYS_REG_DRAMINFO_SIZE_MASK;
@@ -297,7 +299,7 @@ uint64_t main(void)
        if (ftr & SYS_REG_INFO_HAS_BRAM) {
         // allow a jump to a config-specified address (just like DRAM can)
         val = readq(SYSCON_BASE + SYS_REG_BRAM_BOOTADDR);
-               printf("Booting from BRAM at %lx...\n", val);
+               printf("Booting from BRAM at 0x%lx...\n", val);
                return val;
        }
        if (try_flash) {