DEBUG:
Identify virt_to_phys() offset :
- Obtain 'working kernel'
- Somewhere in printk.c which wll print:
+ pr_err("log_buf = 0x%p, virt_to_phys(0x%llu)\n",
log_buf, virt_to_phys(log_buf));
- Subtract the physical from virtual
- I did this after finding both values above - Should have put it in
the code!
Then Use that offset : (0xffffff7fc0000000 for me YMMV) to convert virt
addresses:
- cat System.map | grep big_buffer
ffffff8009855c78 b big_buffer_index
ffffff8009855c80 b big_buffer
Thus: 0xffffff8009855c80 - 0xffffff7fc0000000 = 0x49855c80
- 'Soft reset' the board (push the reset button)
- Break into uboot
- Dump memory:
md.l 0x49855c80 256
49855c80: 6f423601 6e69746f 694c2067 2078756e .6Booting Linux
49855c90: 70206e6f 69737968 206c6163 20555043 on physical CPU
49855ca0: 30307830 30303030 30303030 78305b20 0x0000000000 [0x
49855cb0: 66303134 34333064 35010a5d 756e694c 410fd034]..5Linu
49855cc0: 65762078 6f697372 2e34206e 302e3431 x version 4.14.0
49855cd0: 6d72612d 722d3436 73656e65 642d7361 -arm64-renesas-d
49855ce0: 79747269 626b2820 68676e69 43406d61 irty (kbingham@C
49855cf0: 696b6f6f 6e6f4d65 72657473 67282029 ookieMonster) (g
49855d00: 76206363 69737265 35206e6f 302e342e cc version 5.4.0
49855d10: 31303220 30363036 55282039 746e7562 20160609 (Ubunt
49855d20: 694c2f75 6f72616e 342e3520 362d302e u/Linaro 5.4.0-6
49855d30: 6e756275 7e317574 302e3631 29342e34 ubuntu1~16.04.4)
49855d40: 35232029 4d532030 75542050 6f4e2065 ) #50 SMP Tue No
49855d50: 31322076 3a373120 343a3832 4d472031 v 21 17:28:41 GM
49855d60: 30322054 010a3731 72450a32 3a726f72 T 2017..2.Error:
49855d70: 766e6920 64696c61 76656420 20656369 invalid device
49855d80: 65657274 6f6c6220 74612062 79687020 tree blob at phy
49855d90: 61636973 6461206c 73657264 78302073 sical address 0x
49855da0: 30303030 30303030 30663834 30303030 0000000048f00000
49855db0: 69762820 61757472 6461206c 73657264 (virtual addres
49855dc0: 78302073 20202020 20202020 6e282020 s 0x (n
49855dd0: 296c6c75 68540a29 74642065 756d2062 ull)).The dtb mu
49855de0: 62207473 2d382065 65747962 696c6120 st be 8-byte ali
49855df0: 64656e67 646e6120 73756d20 6f6e2074 gned and must no
49855e00: 78652074 64656563 4d203220 6e692042 t exceed 2 MB in
49855e10: 7a697320 500a0a65 7361656c 68632065 size..Please ch
49855e20: 206b6365 72756f79 6f6f6220 616f6c74 eck your bootloa
49855e30: 2e726564 00000000 00000000 00000000 der.............
<trimmed>
1 file changed