Rockbox Development > Starting Development and Compiling
Beginning steps in kernel disassembly and analysis
dconrad:
--- Quote from: amachronic on June 27, 2021, 02:28:30 PM ---Hmm, if your DRAM contents are stable the issue might be elsewhere. I suspected DRAM because it's something very early on and not tested on your HW configuration. The only other DRAM-related thing which comes to mind is the addressing bits REG_DDRC_REMAPn, so you might try to confirm that the address mapping works by loop over all memory in the SPL like this:--
--- Code: ---void spl_main(void)
{
/* Basic hardware init */
init();
uint32_t* ptr = (uint32_t*)0xa0000000;
unsigned count = 32 * 1024 * 1024 / 4;
for(unsigned i = 0; i < count; ++i)
*ptr++ = i;
return;
}
--- End code ---
then grab the memory contents in 1M chunks...
--- Code: ---usbboot -v -c x1000 --addr 0xa0000000 --length 1048576 --upload mem00.bin
usbboot -v -c x1000 --addr 0xa0100000 --length 1048576 --upload mem01.bin
...
usbboot -v -c x1000 --addr 0xa1f00000 --length 1048576 --upload mem31.bin
cat mem*.bin > memory.bin
--- End code ---
then spin up a quick program to go over memory.bin and verify that every word in memory got written with the intended value.
--- End quote ---
Oh, you might be on to something here! If I understand the for loop correctly, we're going to write increasing values to every 8th address for 31 1024 blocks. However, I get an interesting pattern where it starts at 00 01 00 00, gets to ff 01 00 00, then does 00 01 00 00 - ff 01 00 00, then moves on to 00 03 00 00 - ff 03 00 00, so on and so forth... I think this might actually be indicative of a problem - is that right?
--- Code: ---[root@localhost ingenic_tools]# ./usbboot -v -c x1000 -1 ../../build-erosqnative-boot/spl.erosq
Opening USB device a108:1000
Issue SET_DATA_ADDRESS 0xf4001000
Transfer 3596 bytes from host to device
Issue PROGRAM_START1 0xf4001800
[root@localhost ingenic_tools]# ./usbboot -v -c x1000 --addr 0xa0000000 --length 1048576 --upload mem00.bin
Opening USB device a108:1000
Issue SET_DATA_ADDRESS 0xa0000000
Issue SET_DATA_LENGTH 0x100000
[root@localhost ingenic_tools]# hexedit mem00.bin
00000000 00 01 00 00 01 01 00 00 02 01 00 00 03 01 00 00 04 01 00 00 05 01 00 00 06 01 00 00 07 01 00 00 ................................
00000020 08 01 00 00 09 01 00 00 0A 01 00 00 0B 01 00 00 0C 01 00 00 0D 01 00 00 0E 01 00 00 0F 01 00 00 ................................
00000040 10 01 00 00 11 01 00 00 12 01 00 00 13 01 00 00 14 01 00 00 15 01 00 00 16 01 00 00 17 01 00 00 ................................
00000060 18 01 00 00 19 01 00 00 1A 01 00 00 1B 01 00 00 1C 01 00 00 1D 01 00 00 1E 01 00 00 1F 01 00 00 ................................
00000080 20 01 00 00 21 01 00 00 22 01 00 00 23 01 00 00 24 01 00 00 25 01 00 00 26 01 00 00 27 01 00 00 ...!..."...#...$...%...&...'...
000000A0 28 01 00 00 29 01 00 00 2A 01 00 00 2B 01 00 00 2C 01 00 00 2D 01 00 00 2E 01 00 00 2F 01 00 00 (...)...*...+...,...-......./...
000000C0 30 01 00 00 31 01 00 00 32 01 00 00 33 01 00 00 34 01 00 00 35 01 00 00 36 01 00 00 37 01 00 00 0...1...2...3...4...5...6...7...
000000E0 38 01 00 00 39 01 00 00 3A 01 00 00 3B 01 00 00 3C 01 00 00 3D 01 00 00 3E 01 00 00 3F 01 00 00 8...9...:...;...<...=...>...?...
00000100 40 01 00 00 41 01 00 00 42 01 00 00 43 01 00 00 44 01 00 00 45 01 00 00 46 01 00 00 47 01 00 00 @...A...B...C...D...E...F...G...
00000120 48 01 00 00 49 01 00 00 4A 01 00 00 4B 01 00 00 4C 01 00 00 4D 01 00 00 4E 01 00 00 4F 01 00 00 H...I...J...K...L...M...N...O...
00000140 50 01 00 00 51 01 00 00 52 01 00 00 53 01 00 00 54 01 00 00 55 01 00 00 56 01 00 00 57 01 00 00 P...Q...R...S...T...U...V...W...
00000160 58 01 00 00 59 01 00 00 5A 01 00 00 5B 01 00 00 5C 01 00 00 5D 01 00 00 5E 01 00 00 5F 01 00 00 X...Y...Z...[...\...]...^..._...
00000180 60 01 00 00 61 01 00 00 62 01 00 00 63 01 00 00 64 01 00 00 65 01 00 00 66 01 00 00 67 01 00 00 `...a...b...c...d...e...f...g...
000001A0 68 01 00 00 69 01 00 00 6A 01 00 00 6B 01 00 00 6C 01 00 00 6D 01 00 00 6E 01 00 00 6F 01 00 00 h...i...j...k...l...m...n...o...
000001C0 70 01 00 00 71 01 00 00 72 01 00 00 73 01 00 00 74 01 00 00 75 01 00 00 76 01 00 00 77 01 00 00 p...q...r...s...t...u...v...w...
000001E0 78 01 00 00 79 01 00 00 7A 01 00 00 7B 01 00 00 7C 01 00 00 7D 01 00 00 7E 01 00 00 7F 01 00 00 x...y...z...{...|...}...~.......
00000200 80 01 00 00 81 01 00 00 82 01 00 00 83 01 00 00 84 01 00 00 85 01 00 00 86 01 00 00 87 01 00 00 ................................
00000220 88 01 00 00 89 01 00 00 8A 01 00 00 8B 01 00 00 8C 01 00 00 8D 01 00 00 8E 01 00 00 8F 01 00 00 ................................
00000240 90 01 00 00 91 01 00 00 92 01 00 00 93 01 00 00 94 01 00 00 95 01 00 00 96 01 00 00 97 01 00 00 ................................
00000260 98 01 00 00 99 01 00 00 9A 01 00 00 9B 01 00 00 9C 01 00 00 9D 01 00 00 9E 01 00 00 9F 01 00 00 ................................
00000280 A0 01 00 00 A1 01 00 00 A2 01 00 00 A3 01 00 00 A4 01 00 00 A5 01 00 00 A6 01 00 00 A7 01 00 00 ................................
000002A0 A8 01 00 00 A9 01 00 00 AA 01 00 00 AB 01 00 00 AC 01 00 00 AD 01 00 00 AE 01 00 00 AF 01 00 00 ................................
000002C0 B0 01 00 00 B1 01 00 00 B2 01 00 00 B3 01 00 00 B4 01 00 00 B5 01 00 00 B6 01 00 00 B7 01 00 00 ................................
000002E0 B8 01 00 00 B9 01 00 00 BA 01 00 00 BB 01 00 00 BC 01 00 00 BD 01 00 00 BE 01 00 00 BF 01 00 00 ................................
00000300 C0 01 00 00 C1 01 00 00 C2 01 00 00 C3 01 00 00 C4 01 00 00 C5 01 00 00 C6 01 00 00 C7 01 00 00 ................................
00000320 C8 01 00 00 C9 01 00 00 CA 01 00 00 CB 01 00 00 CC 01 00 00 CD 01 00 00 CE 01 00 00 CF 01 00 00 ................................
00000340 D0 01 00 00 D1 01 00 00 D2 01 00 00 D3 01 00 00 D4 01 00 00 D5 01 00 00 D6 01 00 00 D7 01 00 00 ................................
00000360 D8 01 00 00 D9 01 00 00 DA 01 00 00 DB 01 00 00 DC 01 00 00 DD 01 00 00 DE 01 00 00 DF 01 00 00 ................................
00000380 E0 01 00 00 E1 01 00 00 E2 01 00 00 E3 01 00 00 E4 01 00 00 E5 01 00 00 E6 01 00 00 E7 01 00 00 ................................
000003A0 E8 01 00 00 E9 01 00 00 EA 01 00 00 EB 01 00 00 EC 01 00 00 ED 01 00 00 EE 01 00 00 EF 01 00 00 ................................
000003C0 F0 01 00 00 F1 01 00 00 F2 01 00 00 F3 01 00 00 F4 01 00 00 F5 01 00 00 F6 01 00 00 F7 01 00 00 ................................
000003E0 F8 01 00 00 F9 01 00 00 FA 01 00 00 FB 01 00 00 FC 01 00 00 FD 01 00 00 FE 01 00 00 FF 01 00 00 ................................
00000400 00 01 00 00 01 01 00 00 02 01 00 00 03 01 00 00 04 01 00 00 05 01 00 00 06 01 00 00 07 01 00 00 ................................
00000420 08 01 00 00 09 01 00 00 0A 01 00 00 0B 01 00 00 0C 01 00 00 0D 01 00 00 0E 01 00 00 0F 01 00 00 ................................
00000440 10 01 00 00 11 01 00 00 12 01 00 00 13 01 00 00 14 01 00 00 15 01 00 00 16 01 00 00 17 01 00 00 ................................
00000460 18 01 00 00 19 01 00 00 1A 01 00 00 1B 01 00 00 1C 01 00 00 1D 01 00 00 1E 01 00 00 1F 01 00 00 ................................
00000480 20 01 00 00 21 01 00 00 22 01 00 00 23 01 00 00 24 01 00 00 25 01 00 00 26 01 00 00 27 01 00 00 ...!..."...#...$...%...&...'...
000004A0 28 01 00 00 29 01 00 00 2A 01 00 00 2B 01 00 00 2C 01 00 00 2D 01 00 00 2E 01 00 00 2F 01 00 00 (...)...*...+...,...-......./...
000004C0 30 01 00 00 31 01 00 00 32 01 00 00 33 01 00 00 34 01 00 00 35 01 00 00 36 01 00 00 37 01 00 00 0...1...2...3...4...5...6...7...
000004E0 38 01 00 00 39 01 00 00 3A 01 00 00 3B 01 00 00 3C 01 00 00 3D 01 00 00 3E 01 00 00 3F 01 00 00 8...9...:...;...<...=...>...?...
00000500 40 01 00 00 41 01 00 00 42 01 00 00 43 01 00 00 44 01 00 00 45 01 00 00 46 01 00 00 47 01 00 00 @...A...B...C...D...E...F...G...
00000520 48 01 00 00 49 01 00 00 4A 01 00 00 4B 01 00 00 4C 01 00 00 4D 01 00 00 4E 01 00 00 4F 01 00 00 H...I...J...K...L...M...N...O...
00000540 50 01 00 00 51 01 00 00 52 01 00 00 53 01 00 00 54 01 00 00 55 01 00 00 56 01 00 00 57 01 00 00 P...Q...R...S...T...U...V...W...
00000560 58 01 00 00 59 01 00 00 5A 01 00 00 5B 01 00 00 5C 01 00 00 5D 01 00 00 5E 01 00 00 5F 01 00 00 X...Y...Z...[...\...]...^..._...
00000580 60 01 00 00 61 01 00 00 62 01 00 00 63 01 00 00 64 01 00 00 65 01 00 00 66 01 00 00 67 01 00 00 `...a...b...c...d...e...f...g...
000005A0 68 01 00 00 69 01 00 00 6A 01 00 00 6B 01 00 00 6C 01 00 00 6D 01 00 00 6E 01 00 00 6F 01 00 00 h...i...j...k...l...m...n...o...
000005C0 70 01 00 00 71 01 00 00 72 01 00 00 73 01 00 00 74 01 00 00 75 01 00 00 76 01 00 00 77 01 00 00 p...q...r...s...t...u...v...w...
000005E0 78 01 00 00 79 01 00 00 7A 01 00 00 7B 01 00 00 7C 01 00 00 7D 01 00 00 7E 01 00 00 7F 01 00 00 x...y...z...{...|...}...~.......
00000600 80 01 00 00 81 01 00 00 82 01 00 00 83 01 00 00 84 01 00 00 85 01 00 00 86 01 00 00 87 01 00 00 ................................
00000620 88 01 00 00 89 01 00 00 8A 01 00 00 8B 01 00 00 8C 01 00 00 8D 01 00 00 8E 01 00 00 8F 01 00 00 ................................
00000640 90 01 00 00 91 01 00 00 92 01 00 00 93 01 00 00 94 01 00 00 95 01 00 00 96 01 00 00 97 01 00 00 ................................
00000660 98 01 00 00 99 01 00 00 9A 01 00 00 9B 01 00 00 9C 01 00 00 9D 01 00 00 9E 01 00 00 9F 01 00 00 ................................
00000680 A0 01 00 00 A1 01 00 00 A2 01 00 00 A3 01 00 00 A4 01 00 00 A5 01 00 00 A6 01 00 00 A7 01 00 00 ................................
000006A0 A8 01 00 00 A9 01 00 00 AA 01 00 00 AB 01 00 00 AC 01 00 00 AD 01 00 00 AE 01 00 00 AF 01 00 00 ................................
000006C0 B0 01 00 00 B1 01 00 00 B2 01 00 00 B3 01 00 00 B4 01 00 00 B5 01 00 00 B6 01 00 00 B7 01 00 00 ................................
000006E0 B8 01 00 00 B9 01 00 00 BA 01 00 00 BB 01 00 00 BC 01 00 00 BD 01 00 00 BE 01 00 00 BF 01 00 00 ................................
00000700 C0 01 00 00 C1 01 00 00 C2 01 00 00 C3 01 00 00 C4 01 00 00 C5 01 00 00 C6 01 00 00 C7 01 00 00 ................................
00000720 C8 01 00 00 C9 01 00 00 CA 01 00 00 CB 01 00 00 CC 01 00 00 CD 01 00 00 CE 01 00 00 CF 01 00 00 ................................
00000740 D0 01 00 00 D1 01 00 00 D2 01 00 00 D3 01 00 00 D4 01 00 00 D5 01 00 00 D6 01 00 00 D7 01 00 00 ................................
00000760 D8 01 00 00 D9 01 00 00 DA 01 00 00 DB 01 00 00 DC 01 00 00 DD 01 00 00 DE 01 00 00 DF 01 00 00 ................................
00000780 E0 01 00 00 E1 01 00 00 E2 01 00 00 E3 01 00 00 E4 01 00 00 E5 01 00 00 E6 01 00 00 E7 01 00 00 ................................
000007A0 E8 01 00 00 E9 01 00 00 EA 01 00 00 EB 01 00 00 EC 01 00 00 ED 01 00 00 EE 01 00 00 EF 01 00 00 ................................
000007C0 F0 01 00 00 F1 01 00 00 F2 01 00 00 F3 01 00 00 F4 01 00 00 F5 01 00 00 F6 01 00 00 F7 01 00 00 ................................
000007E0 F8 01 00 00 F9 01 00 00 FA 01 00 00 FB 01 00 00 FC 01 00 00 FD 01 00 00 FE 01 00 00 FF 01 00 00 ................................
00000800 00 03 00 00 01 03 00 00 02 03 00 00 03 03 00 00 04 03 00 00 05 03 00 00 06 03 00 00 07 03 00 00 ................................
00000820 08 03 00 00 09 03 00 00 0A 03 00 00 0B 03 00 00 0C 03 00 00 0D 03 00 00 0E 03 00 00 0F 03 00 00 ................................
00000840 10 03 00 00 11 03 00 00 12 03 00 00 13 03 00 00 14 03 00 00 15 03 00 00 16 03 00 00 17 03 00 00 ................................
00000860 18 03 00 00 19 03 00 00 1A 03 00 00 1B 03 00 00 1C 03 00 00 1D 03 00 00 1E 03 00 00 1F 03 00 00 ................................
00000880 20 03 00 00 21 03 00 00 22 03 00 00 23 03 00 00 24 03 00 00 25 03 00 00 26 03 00 00 27 03 00 00 ...!..."...#...$...%...&...'...
000008A0 28 03 00 00 29 03 00 00 2A 03 00 00 2B 03 00 00 2C 03 00 00 2D 03 00 00 2E 03 00 00 2F 03 00 00 (...)...*...+...,...-......./...
000008C0 30 03 00 00 31 03 00 00 32 03 00 00 33 03 00 00 34 03 00 00 35 03 00 00 36 03 00 00 37 03 00 00 0...1...2...3...4...5...6...7...
000008E0 38 03 00 00 39 03 00 00 3A 03 00 00 3B 03 00 00 3C 03 00 00 3D 03 00 00 3E 03 00 00 3F 03 00 00 8...9...:...;...<...=...>...?...
00000900 40 03 00 00 41 03 00 00 42 03 00 00 43 03 00 00 44 03 00 00 45 03 00 00 46 03 00 00 47 03 00 00 @...A...B...C...D...E...F...G...
00000920 48 03 00 00 49 03 00 00 4A 03 00 00 4B 03 00 00 4C 03 00 00 4D 03 00 00 4E 03 00 00 4F 03 00 00 H...I...J...K...L...M...N...O...
00000940 50 03 00 00 51 03 00 00 52 03 00 00 53 03 00 00 54 03 00 00 55 03 00 00 56 03 00 00 57 03 00 00 P...Q...R...S...T...U...V...W...
00000960 58 03 00 00 59 03 00 00 5A 03 00 00 5B 03 00 00 5C 03 00 00 5D 03 00 00 5E 03 00 00 5F 03 00 00 X...Y...Z...[...\...]...^..._...
00000980 60 03 00 00 61 03 00 00 62 03 00 00 63 03 00 00 64 03 00 00 65 03 00 00 66 03 00 00 67 03 00 00 `...a...b...c...d...e...f...g...
000009A0 68 03 00 00 69 03 00 00 6A 03 00 00 6B 03 00 00 6C 03 00 00 6D 03 00 00 6E 03 00 00 6F 03 00 00 h...i...j...k...l...m...n...o...
000009C0 70 03 00 00 71 03 00 00 72 03 00 00 73 03 00 00 74 03 00 00 75 03 00 00 76 03 00 00 77 03 00 00 p...q...r...s...t...u...v...w...
000009E0 78 03 00 00 79 03 00 00 7A 03 00 00 7B 03 00 00 7C 03 00 00 7D 03 00 00 7E 03 00 00 7F 03 00 00 x...y...z...{...|...}...~.......
00000A00 80 03 00 00 81 03 00 00 82 03 00 00 83 03 00 00 84 03 00 00 85 03 00 00 86 03 00 00 87 03 00 00 ................................
00000A20 88 03 00 00 89 03 00 00 8A 03 00 00 8B 03 00 00 8C 03 00 00 8D 03 00 00 8E 03 00 00 8F 03 00 00 ................................
00000A40 90 03 00 00 91 03 00 00 92 03 00 00 93 03 00 00 94 03 00 00 95 03 00 00 96 03 00 00 97 03 00 00 ................................
00000A60 98 03 00 00 99 03 00 00 9A 03 00 00 9B 03 00 00 9C 03 00 00 9D 03 00 00 9E 03 00 00 9F 03 00 00 ................................
00000A80 A0 03 00 00 A1 03 00 00 A2 03 00 00 A3 03 00 00 A4 03 00 00 A5 03 00 00 A6 03 00 00 A7 03 00 00 ................................
00000AA0 A8 03 00 00 A9 03 00 00 AA 03 00 00 AB 03 00 00 AC 03 00 00 AD 03 00 00 AE 03 00 00 AF 03 00 00 ................................
00000AC0 B0 03 00 00 B1 03 00 00 B2 03 00 00 B3 03 00 00 B4 03 00 00 B5 03 00 00 B6 03 00 00 B7 03 00 00 ................................
00000AE0 B8 03 00 00 B9 03 00 00 BA 03 00 00 BB 03 00 00 BC 03 00 00 BD 03 00 00 BE 03 00 00 BF 03 00 00 ................................
00000B00 C0 03 00 00 C1 03 00 00 C2 03 00 00 C3 03 00 00 C4 03 00 00 C5 03 00 00 C6 03 00 00 C7 03 00 00 ................................
00000B20 C8 03 00 00 C9 03 00 00 CA 03 00 00 CB 03 00 00 CC 03 00 00 CD 03 00 00 CE 03 00 00 CF 03 00 00 ................................
00000B40 D0 03 00 00 D1 03 00 00 D2 03 00 00 D3 03 00 00 D4 03 00 00 D5 03 00 00 D6 03 00 00 D7 03 00 00 ................................
00000B60 D8 03 00 00 D9 03 00 00 DA 03 00 00 DB 03 00 00 DC 03 00 00 DD 03 00 00 DE 03 00 00 DF 03 00 00 ................................
00000B80 E0 03 00 00 E1 03 00 00 E2 03 00 00 E3 03 00 00 E4 03 00 00 E5 03 00 00 E6 03 00 00 E7 03 00 00 ................................
00000BA0 E8 03 00 00 E9 03 00 00 EA 03 00 00 EB 03 00 00 EC 03 00 00 ED 03 00 00 EE 03 00 00 EF 03 00 00 ................................
00000BC0 F0 03 00 00 F1 03 00 00 F2 03 00 00 F3 03 00 00 F4 03 00 00 F5 03 00 00 F6 03 00 00 F7 03 00 00 ................................
00000BE0 F8 03 00 00 F9 03 00 00 FA 03 00 00 FB 03 00 00 FC 03 00 00 FD 03 00 00 FE 03 00 00 FF 03 00 00 ................................
00000C00 00 03 00 00 01 03 00 00 02 03 00 00 03 03 00 00 04 03 00 00 05 03 00 00 06 03 00 00 07 03 00 00 ................................
00000C20 08 03 00 00 09 03 00 00 0A 03 00 00 0B 03 00 00 0C 03 00 00 0D 03 00 00 0E 03 00 00 0F 03 00 00 ................................
00000C40 10 03 00 00 11 03 00 00 12 03 00 00 13 03 00 00 14 03 00 00 15 03 00 00 16 03 00 00 17 03 00 00 ................................
00000C60 18 03 00 00 19 03 00 00 1A 03 00 00 1B 03 00 00 1C 03 00 00 1D 03 00 00 1E 03 00 00 1F 03 00 00 ................................
00000C80 20 03 00 00 21 03 00 00 22 03 00 00 23 03 00 00 24 03 00 00 25 03 00 00 26 03 00 00 27 03 00 00 ...!..."...#...$...%...&...'...
00000CA0 28 03 00 00 29 03 00 00 2A 03 00 00 2B 03 00 00 2C 03 00 00 2D 03 00 00 2E 03 00 00 2F 03 00 00 (...)...*...+...,...-......./...
00000CC0 30 03 00 00 31 03 00 00 32 03 00 00 33 03 00 00 34 03 00 00 35 03 00 00 36 03 00 00 37 03 00 00 0...1...2...3...4...5...6...7...
00000CE0 38 03 00 00 39 03 00 00 3A 03 00 00 3B 03 00 00 3C 03 00 00 3D 03 00 00 3E 03 00 00 3F 03 00 00 8...9...:...;...<...=...>...?...
00000D00 40 03 00 00 41 03 00 00 42 03 00 00 43 03 00 00 44 03 00 00 45 03 00 00 46 03 00 00 47 03 00 00 @...A...B...C...D...E...F...G...
00000D20 48 03 00 00 49 03 00 00 4A 03 00 00 4B 03 00 00 4C 03 00 00 4D 03 00 00 4E 03 00 00 4F 03 00 00 H...I...J...K...L...M...N...O...
00000D40 50 03 00 00 51 03 00 00 52 03 00 00 53 03 00 00 54 03 00 00 55 03 00 00 56 03 00 00 57 03 00 00 P...Q...R...S...T...U...V...W...
00000D60 58 03 00 00 59 03 00 00 5A 03 00 00 5B 03 00 00 5C 03 00 00 5D 03 00 00 5E 03 00 00 5F 03 00 00 X...Y...Z...[...\...]...^..._...
--- End code ---
So on and so forth... Almost as if it's writing 00 00 00 00 - ff 00 00 00 00, overwriting it with 00 01 00 00 - ff 01 00 00, before moving on to the actual next block for 00 02 00 00 (and overwriting that then, too). - No wait, that's not quite right...
(I did try changing the unsigned types to explicitly uint32_t too, no change.)
edi1:
--- Quote ---0x2c2c2c2c is most definitely the value pointed to by smart_config.write_gram_cmd. 0x2c is the standard write_memory_start command of MIPI DCS, used to initiate writing data to the LCD controller's framebuffer RAM. It's not fb_videomode.flag.
In the M3K kernel sources the init_pixclock member is dropped vs. the YuanhuanLiang repo. That's probably why your fb_videomode struct is too big. Maybe you should check the M3K sources for other structs that seem "wrong", it's possible that the Eros Q is using sources similar to the M3K's. (A reminder that your source won't necessarily line up with the binary!)
So with this in mind, jzfb stuff looks lined up right to me:
Code:
805147ac = bitfield
clkply_active_rising=1
newcfg_fmt_conv=1
others=0
(this is standard fare, nothing exotic)
805147b8 = smart_config.bus_width
805147c0 = smart_config.length_data_table
805147c4 = smart_config.data_table
Also a look at this
Code:
805147a4 00 uint:1 0h pinmd:1
805147a4 00 uint:1 0h pixclk_falli
805147a4 00 uint:1 0h data_enable_
805147a5 00 00 00 00 00 smart_co field_0x1d
That start address 805147a5 is almost certainly wrong. The alignment of the struct is at least 4 bytes and struct alignment = maximum alignment of any member. Plus, the first member must be aligned wrong because enums seem to be ints under the descargar kmspico gratis used (an implementation detail which I haven't bothered to verify but seems to be true).
Weirdly, Ghidra doesn't align structs by default -- in the lower right corner of the struct editor is an unobtrusive "Align" checkbox. Checking that will make Ghidra insert the correct padding to follow C alignment rules (afaict). It seems Ghidra defaults to "packed" alignment by default... it confused me for a couple hours too. :o
In this particular case I think I can say with certainty the alignment is wrong -- but in general, you would need to check the generated code to see if the compiler emitted code to access aligned addresses or unaligned addresses. The lw/sw instructions to load/store a word require 4 byte aligned addresses, whereas to access an improperly aligned word, the compiler would need to generate different instructions -- in the case of MIPS the instructions used would depend on the ISA version targeted, IIRC the older versions don't have any unaligned load/store instructions.
Quote from: dconrad on June 19, 2021, 10:38:06 PM
I have a suspicion that the jzfb_platform_data struct is actually the one outlined in arch/mips/xburst/soc-x1000/include/mach/jzfb.h, could this be true?
That's my assumption. Sure, it's defined in other parts of the xburst tree for other SoCs, but this is an X1000 kernel... where else would it be defined?
--- End quote ---
Hi
You can reconfigurate kernel with:
zcat /proc/config.gz > .config
Navigation
[0] Message Index
[*] Previous page
Go to full version