<lschmid>
so I am currently trying to enable earlyprintk but I do not seem to be getting any output from the kernel still
ungeskriptet has joined #linux-sunxi
Sensu_Be1 has quit [Ping timeout: 480 seconds]
ungeskriptet has quit [Ping timeout: 480 seconds]
paulk-bis has quit []
paulk has joined #linux-sunxi
ungeskriptet has joined #linux-sunxi
warpme has joined #linux-sunxi
apritzel has joined #linux-sunxi
ungeskriptet has quit [Ping timeout: 480 seconds]
<apritzel>
Hi lschmid, seems like IRC works this time ;-) I just realised that the address for UART3 is 0x2500c00 (not ...c000)
<apritzel>
for the virtual address: I regularly forget the details, but try 0xfe000c00
ungeskriptet has joined #linux-sunxi
<apritzel>
I am on the run now, but will try to send you my looks-like-a-kernel hello world later, for more diagnostics
<dlan>
in order to send msg to this channel, need a registered user first.. lesson learned before
<lschmid>
apritzel I've configured it like this now: CONFIG_DEBUG_LL=y, CONFIG_DEBUG_LL_UART_8250=y, CONFIG_DEBUG_LL_INCLUDE="debug/8250.S", CONFIG_DEBUG_UART_PHYS=0x02500C00, CONFIG_DEBUG_UART_VIRT=0xfe000c00, CONFIG_DEBUG_UART_8250_SHIFT=2 but am not getting anything from the uart. I'll await your hello world kernel for further testing
Schimsalabim has quit [Ping timeout: 480 seconds]
ungeskriptet has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
<lschmid>
dlan, yes that took a while to figure out. The oftc webchat is also very helpful in not showing the "unregistered" message unless you click on the status page
Schimsalabim has joined #linux-sunxi
ungeskriptet has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined #linux-sunxi
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
ungeskriptet has quit [Ping timeout: 480 seconds]
ungeskriptet has joined #linux-sunxi
warpme has quit []
apritzel has joined #linux-sunxi
<apritzel>
lschmid: so thing here should say hello, then dump the DTB on UART3, tested on my MangpoPi MQ-R: https://paste.c-net.org/GiantUnkind
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
<apritzel>
if you don't see that, then it's probably something wrong on the U-Boot side, if that works, it's the kernel to blame
Schimsalabim has quit [Read error: Connection reset by peer]
<lschmid>
apritzel i think it's u-boot then... Still only starting kernel and then nothing. But i had sprinkled some printf's into uboot and saw that it got right up to kernel_entry(0, machid, r2); in bootm.c
Schimsalabim has joined #linux-sunxi
<apritzel>
what's your kernel load address?
<lschmid>
The standard loadaddr, u-boot says its "Kernel image @ 0x42000000 [ 0x000000 - 0x010000 ]"
<lschmid>
apritzel: looks the same to me except that u-boot has my fdt at 42df6000 and of course that mine isn't doing stuff after "Starting kernel ..."
apritzel has joined #linux-sunxi
<lschmid>
apritzel: correction, we're getting to "secure_ram_addr(_do_nonsec_entry)(kernel_entry, 0, machid, r2);" and hanging after. Is this to do with the secure SRAM you talked about?
<apritzel>
lschmid: mmh, interesting, that's indeed a difference: normally "secure" SRAM A2, where U-Boot puts the PSCI handler, is still accessible even from non-secure world, but that changes with the secure boot fuse burnt
Schimsalabim has quit [Ping timeout: 480 seconds]
<lschmid>
So, if I understand correctly. U-Boot places the PSCI handler in SRAM A2. Bootm then uses "armv7_init_nonsec" to drop it's privileges and then "_do_nonsec_entry" cannot work anymore because it is in SRAM A2 (or the call to "smc")?
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
<apritzel>
that code is somewhat confusing, and I was wondering about that as well, but I think it's still in secure state after armv7_init_nonsec() returns, it's the SMC in _do_nonsec_entry() that does the transition
<apritzel>
or rather the "movs pc, lr" at the end of the secure monitor
gsz has quit [Ping timeout: 480 seconds]
<apritzel>
and it should return to the location in ip, which is r0 in _do_nonsec_entry(), which is entry_non_secure(), which should be normal non-secure code
<apritzel>
lschmid: you can maybe try to dump the addresses, to see if something is in the wrong section
<lschmid>
At runtime or? And what exactly do we want to see
<apritzel>
yes, at runtime, the addresses of those functions called. Functions in the secure section should have a distinct address
<apritzel>
but wait...
<apritzel>
I just see that the T113 does not seem to have secure SRAM at all?
<lschmid>
I did have a look just now at the datasheet and I do indeed not find a reference to "SRAM A2"
<apritzel>
CONFIG_ARMV7_SECURE_BASE is not set, so secure_ram_addr() just returns its argument unchanged
<lschmid>
Indeed what the address dump just told me. "_do_nonsec_entry: 47fc40a0", "resolved addr: 47fc40a0"
<apritzel>
maybe some of the other addresses end up getting mangled, like the address of the monitor vectors?
<lschmid>
Where would those usually be found at?
<apritzel>
lschmid: do you still have some non-secure board around, to compare between the two?
<lschmid>
Sure, I only fused two and only one died while doing so
<lschmid>
apritzel: what do you want me to compare?
apritzel has quit [Ping timeout: 480 seconds]
sdfgsdfs has joined #linux-sunxi
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined #linux-sunxi
lschmid has quit [Quit: Leaving]
ungeskriptet has quit [Remote host closed the connection]
ungeskriptet has joined #linux-sunxi
apritzel has joined #linux-sunxi
ftg has joined #linux-sunxi
ungeskriptet_ has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
cnxsoft has quit []
cnxsoft has joined #linux-sunxi
ungeskriptet has quit [Ping timeout: 480 seconds]
cnxsoft has quit [Ping timeout: 480 seconds]
dsimic is now known as Guest23345
dsimic has joined #linux-sunxi
Guest23345 has quit [Ping timeout: 480 seconds]
MasterR3C0RD is now known as Guest23349
MasterR3C0RD has joined #linux-sunxi
Guest23349 has quit [Ping timeout: 480 seconds]
Sensu_Be1 has joined #linux-sunxi
Sensu_Bean has quit [Read error: Connection reset by peer]
ungeskriptet_ has quit [Remote host closed the connection]
ungeskriptet has joined #linux-sunxi
Sensu_Bean has joined #linux-sunxi
Sensu_Be1 has quit [Ping timeout: 480 seconds]
Sensu_Be1 has joined #linux-sunxi
Sensu_Bean has quit [Read error: Connection reset by peer]
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
Sensu_Bean has joined #linux-sunxi
Sensu_Be1 has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
sdfgsdfs has quit [Remote host closed the connection]
sdfgsdfs has joined #linux-sunxi
hazardchem has quit [Read error: Connection reset by peer]
hazardchem has joined #linux-sunxi
lschmid has joined #linux-sunxi
gsz has joined #linux-sunxi
<lschmid>
apritzel: I have the same bootloader now running on both my boards, one signed the other unsigned. From what I can see they are doing the same until I try to boot e.g. the Linux Kernel or even try to start the efishell. Also the "_do_nonsec_entry" seems to be at the same address
bpye_ has joined #linux-sunxi
bpye has quit [Ping timeout: 480 seconds]
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
<lschmid>
I also did some more digging on the fused board. As far as I can tell the code that sets the vector table is getting called and the br calls in the table seem to point to valid code.
lschmid has quit [Quit: Leaving]
hazardchem has quit [Read error: Connection reset by peer]
hazardchem has joined #linux-sunxi
Sensu_Be1 has joined #linux-sunxi
Sensu_Bean has quit [Read error: Connection reset by peer]