<flyback>
is it possible to use a old version of u-boot to load a 2nd newer version as a payload
<flyback>
nm
<flyback>
guess it doesn't make sense
<flyback>
this embedded powerpc board I guess needs a old version of u-boot that has a patch for initializing the onboard promise ide controller but it doesnt support newer linux kernel image format
jclsn100 has quit [Ping timeout: 260 seconds]
qschulz has quit [Read error: Connection reset by peer]
qschulz has joined #u-boot
jclsn100 has joined #u-boot
jclsn100 has quit [Ping timeout: 272 seconds]
jclsn100 has joined #u-boot
camus has joined #u-boot
jclsn100 has quit [Ping timeout: 260 seconds]
jclsn100 has joined #u-boot
jclsn100 has quit [Ping timeout: 260 seconds]
jclsn100 has joined #u-boot
jclsn100 has quit [Quit: Ping timeout (120 seconds)]
jclsn100 has joined #u-boot
jclsn100 has quit [Ping timeout: 246 seconds]
jclsn100 has joined #u-boot
sobkas has quit [Quit: sobkas]
thopiekar has quit [Ping timeout: 250 seconds]
thopiekar has joined #u-boot
jclsn100 has quit [Ping timeout: 252 seconds]
jclsn100 has joined #u-boot
jclsn100 has quit [Ping timeout: 272 seconds]
jclsn100 has joined #u-boot
jclsn100 has quit [Ping timeout: 272 seconds]
jclsn100 has joined #u-boot
jclsn100 has quit [Ping timeout: 260 seconds]
jclsn100 has joined #u-boot
vagrantc has quit [Quit: leaving]
jclsn100 has quit [Ping timeout: 260 seconds]
jclsn100 has joined #u-boot
m4t has quit [Quit: m4t]
jclsn100 has quit [Ping timeout: 246 seconds]
jclsn100 has joined #u-boot
apritzel has joined #u-boot
apritzel has quit [Ping timeout: 260 seconds]
sszy has joined #u-boot
sbach has quit [Read error: Connection reset by peer]
sbach has joined #u-boot
mckoan|away is now known as mckoan
adeepv has quit [Read error: Connection reset by peer]
<Guest97>
Hello, quick newbie question but is there a way to natively dump all registers values while in uboot with a specific command? Kind of what happens with the exception handler (cf. https://stackoverflow.com/q/71109958 , for example)
<rfs613>
Guest97: in general no, because the action of printing the values will involve executing code, which will modify the values in the CPU registers
<rfs613>
the reason the exception handler can print them, is because upon entry to exception, all the register values have been pushed to the stack. Then the function show_regs() picks those saved values and displays them.
<rfs613>
normally, if you want to inspect the registers while executing code, you either use JTAG hardware, or you run the whole thing in emulation (like qemu)
JoaoSchim has quit [Ping timeout: 245 seconds]
<Guest97>
That's what I ended up finding while researching my issue, but I'm working on actual hardware, and don't have any JTAG access
<Guest97>
What would be the best approach to dump register values at a specific time with such a setup?
<Guest97>
The approach that would modify these values as least as possible
<rfs613>
perhaps taking one step back, what are you trying to debug? problems in some assembly code?
<Guest97>
I'm trying to characterize hardware faults on a board, but don't have much experience in embedded development
<Guest97>
So I'm developing my test codes in uboot SPL (hooked right before run_main_loop() in common/board_r.c), and trying to understand the consequences of my faults
<rfs613>
to try and answer your question, an instruction like "push {r0-r12, lr}" (this is for arm32) would copy the current value of those 14 registers into the stack. Now they are snapshotted, so you could call a function like show_regs() to display the values (assuming it expects the same layout, we'd need to verify that).
<Guest97>
Okay, so I could simply add some inline assembly like this and use show_regs() to achieve what I'm trying to do? Even if this implies having a few values modified inbetween, I could keep in mind some "trust" percentage for these values
<Guest97>
Also I'm working on a RISC-V board, but I don't think this changes much about the methodology
<rfs613>
Guest97: you likely won't be able to snapshot *all* the registers exactly like a hardware exception would do. But you can probably get most of them. The trick is to get the stack layout exactly how show_regs() expects it to be... or write your own versionof show_regs that matches how you push registers on the stack.
<rfs613>
it also means modifying code and re-uploading each time you want to inspect registers... quite tedious
JoaoSchim has joined #u-boot
<Guest97>
So far that's my best lead, so I guess I'll try that to start with it. And thanks a lot for the clear explanation, I'll take a look at show_regs()
<rfs613>
ok, also see 'struct pt_regs' which shows what the expected stack layout is. There are of course differnet version of this for each cpu/architecture.
<rfs613>
for riscv seems to be defined in arch/riscv/include/asm/ptrace.h
<Guest97>
Yeah I just found it, thanks again
<rfs613>
out of curisity which board is it (if you are able to share this?) I would expect there to be jtag available somehow...
<rfs613>
I found the schematic for "Lichee_RV_V1.0" and this appears to show some multiplexed pins which have JTAG as one of their functions. But they appear to be using them for other functions like ethernet (RGMII) and SDCARD.
<Guest97>
Wait, does that mean it would be possible to enable JTAG thanks to some configuration while building my boot image?
<Guest97>
Okay I found the "PE Configure Register" in the D1 datasheet, that might allow to do such a thing, but I still have no clue if it's a viable approach
<rfs613>
I'm not sure if the schematic I was looking at matches up with the board you have. Your board doesn't seem like it has wired ethernet ports.
<rfs613>
but it is possible that some of those pins (page 5 of the document you linked) could be configured as JTAG.
<rfs613>
even though they don't show it in the document.
<Guest97>
Okay, I guess I'll try to dig a bit in this direction as well then, thanks again for the ideas
monstr has quit [Remote host closed the connection]
tnovotny has quit [Quit: Leaving]
JoaoSchim has quit [Remote host closed the connection]
JoaoSchim has joined #u-boot
hanetzer has joined #u-boot
<hanetzer>
ello. who should I speak to about mips64/cavium octeon boards?