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
_franck_shorne_: http://www.juliusbaxter.net/openrisc-irc/%23openrisc.2014-12-20.log.html01:45
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
mithroGah02:06
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
mithroOh03:27
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.. http://openocd.zylin.com/#/c/4094/05:24
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: https://github.com/stffrdhrn/openocd/commit/6312596cd73c2b7b8a8949a9de814098f8fdf77f05:29
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: https://github.com/stffrdhrn/qemu/commit/8fab22f7dc93116c0d5283a7cab3a202c00b2f61 - implement the shadow registers (just a hack for now)05:50
shorne_ linux: https://github.com/stffrdhrn/linux/commit/19b1237da5efd7333c30ffaeb063b964d63aea6d - 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
mithrohttp://paste.debian.net/926689/06:08
mithrobblr06: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_: https://github.com/mithro/HDMI2USB-misoc-linux/blob/edd416193fe9992cb9a512f325bc1e49f6aa673e/arch/openrisc/kernel/head.S#L573-L58907: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
mithroYes10: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
mithrohttps://www.irccloud.com/pastebin/YH3B8Rkj/10: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
mithrohttps://github.com/mithro/HDMI2USB-misoc-linux/blob/edd416193fe9992cb9a512f325bc1e49f6aa673e/arch/openrisc/mm/init.c#L164-L18410:32
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 irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!