IRC logs for #openrisc Sunday, 2017-04-09

--- Log opened Sun Apr 09 00:00:21 2017
mithroshorne_: How does the MMU and the memory mapped IO stuff interact?00:46
_franck_shorne_: I was pretty sure single stepping worked before01:44
mithroI've broken my gdb in some way01:54
mithro(Or maybe my QEMU) it seems to think my execution point is always the starting address...01:54
mithroI was running gdb instead of or1k-elf-gdb :-(02:06
_franck_shorne_: breakpoint->type is set in gdb_breakpoint_watchpoint_packet. My be we should move debug_reg_list[OR1K_DEBUG_REG_DSR] |= OR1K_DSR_TE to or1k_add_breakpoint. And, in or1k_remove_breakpoint, if there is no breakpoint anymore, deassert OR1K_DSR_TE.02:07
mithroDoes anyone have a gdb script to dump the itlb/dtlb?02:15
mithroAny idea why "l.lbz r7,4(r6)" is causing two data loads? One for addr r6+4 and one for just addr 403:16
mithroThe temporary stores are in an area which doesn't have anything backing it...03:27
mithroWhich means you read zero...03:27
psychotr1peis there an assemly quick guide of sorts for the OR1200 or mor1kx?04:19
mithroI've been using the full guide at file:///usr/local/google/home/tansell/Downloads/openrisc-arch-1.1-rev0.pdf04:56
shorne__franck_: maybe it only worked after hitting a breakpoint?05:23
shorne__franck_: I posted this patch for the fix..
shorne_mithro: not sure how different the mmu ops are between actual memory and io05:26
shorne_I dont really like reading the patches on gerrit, another place i put the openocd patches is here:
shorne_mithro: yeah, we store the state during exceptions into temp memory arround 0-0x10005:47
mithroshorne_: Yeah - I've hacked around it for now05:47
shorne_There is a patch to move it to shadow registers (I am planning for next qemu and linux patches)05:47
shorne_if you are interested:05:48
shorne_  qemu: - implement the shadow registers (just a hack for now)05:50
shorne_ linux: - use shadow regsiters for exceptions05:51
shorne_but... I am not sure I will make next kernel merge window05:51
shorne_mithro: do you think you would want to cleanup and post your "relocatable physical memory" kernel patches when done?05:52
mithroshorne_: Most definitely05:52
shorne_I think it would be good to have05:52
mithroNo timeline though05:53
mithroThis code seems to have optimised away call_console_drivers06:02
mithrowell, I'm getting pretty far now06:08
mithroshorne_: we would like to get drivers and everything upstream06:14
mithroshorne_: So - I was wondering about that comment in the page table miss stuff07:36
mithroshorne_: I'm using this approach ->07:40
mithroshorne_: I basically jump to the virtual space at the same time as enabling the mmus which means we only have to deal with virtual space07:40
mithroYay - lx-dmesg works now...08:16
shorne_mithro: I see, is _after_enable_mmu actually in virtual space?10:12
shorne_it looks like not, but it could be10:13
mithroThe j is going to virtual space10:13
shorne_wouldn't _after_enable_mmu: be something like 0x00002xxx?10:15
mithroshorne_: it's 0xc0002xxx10:17
shorne_oh, I see10:19
-!- shorne_ is now known as shorne10:19
mithroI'm just stepping through the kernel setting up it's real page table now10:22
shornethat will work well then10:22
mithroGot all the way to uart init before discovering that I was still using the boot handlers10:22
shorneyeah, they get replaced10:23
mithroIs there a way to make qemu just halt on a bad memory read/write location rather then segfault/stop10:23
shorneI haven't worked on that code at all really.  But I figure once you are in virtual address space most of the stuff will work fine a lot is not arch specific10:23
shorneI dont know, maybe use a conditional watchpoint?10:24
shorneI dont know if its possible, but something like address >0cfffffff10:24
shorneyou can do masks on watchpoints, if you know generally where it might cause access10:26
shorneoh, making lots of progress10:27
shorneGot to go to bed now, early morning10:28
mithroHave a good night10:29
mithroTrying to figure out this self modifying code at the moment10:30
mithroThe trick is that l.j is opcode zero10:44
mithroSomething is broken in the page tables11:31
_franck_J ##asm-fr16:40
mithroshorne: any tips for debugging the page tables? It appears they are getting a virtual address when they should be getting a physical one.20:47
mithroI'm pretty sure the issue is in the initial page tables setup which is mapping the ram20:48
mithroBut I could be wrong20:48
--- Log closed Mon Apr 10 00:00:23 2017

Generated by 2.15.2 by Marius Gedminas - find it at!