Monday, 2020-06-22

*** tpb has joined #litex00:00
*** _whitelogger has quit IRC00:30
*** _whitelogger has joined #litex00:32
*** Skip has quit IRC00:47
*** futarisIRCcloud has quit IRC02:03
*** Degi has quit IRC02:08
*** Degi has joined #litex02:09
*** futarisIRCcloud has joined #litex03:24
*** _whitelogger has quit IRC04:00
*** _whitelogger has joined #litex04:02
*** _whitelogger has quit IRC04:24
*** _whitelogger has joined #litex04:26
*** st-gourichon-fid has joined #litex05:44
*** _whitelogger has quit IRC07:00
*** _whitelogger has joined #litex07:02
benh__florent_: how did you simulate ? it works for me13:58
benh_(the stack issue)13:58
benh__florent_: do you have the sram set to 0x2000 (8Kb) ?13:58
benh_KB rather13:58
benh_there *is* a bug in my code but I'm surprised it affects you :)13:59
benh__florent_: also what gcc / binutils are you using ? (actually respond on github, easier that way, I'm off to bed, I'll have a look tomorrow)14:02
_florent_benh_: i just tested your proposed fix and it works in simulation: https://github.com/enjoy-digital/litex/commit/5b2f9c244dd71d2896f2bfca9a61c91f49f0251e15:20
tpbTitle: cores/cpu/microwatt: revert setup stack and fix missing subi %r1,%r1… · enjoy-digital/litex@5b2f9c2 · GitHub (at github.com)15:20
*** Skip has joined #litex15:56
*** CarlFK has quit IRC16:41
somlo_florent_: I just diff-ed current master against 860ac1e2, and there are no sdcard related gateware changes18:45
somlothat's the commit where I can still boot from sdcard (with litesdcard, slowly)18:45
somloso it's clearly a software bug we're still chasing18:45
_florent_somlo: i also just started looking at this :)18:46
somloI built 860ac1e2 over the weekend, and got it to load and run `boot.bin` from sdcard successfully (it took a *long* time to load, but it worked)18:47
somloso (given the current litesdcard gateware) the breakage is somewhere in software; although the generic fatfs stuff seems to work fine for spi-sdcard18:48
_florent_somlo: i got linux booting from sdcard with litesdcard, unfortunately github seems to be down so i can't push, the changes are: https://hastebin.com/epuhapulud.cs19:41
tpbTitle: hastebin (at hastebin.com)19:41
_florent_somlo: can you do a test?19:42
*** CarlFK has joined #litex19:48
keesjwhy the flush cpu caches (line 62 of the hastbin?)19:50
_florent_that's the next thing to investigate :)19:51
keesjdoes all data go through the cache?19:51
somlo_florent_: building now, will report back once I have it running. BTW, shouldn't we factor out busy_wait_us() (there's one in both spisdcard.c and in sdcard.c, and they look the same to me)20:04
Skip_florent_: I've responded to https://github.com/enjoy-digital/liteeth/issues/38.  Even with with_hw_init_reset = false the Ethernet core still requires the rst_n pad and still drives it.  Is that expected?20:28
SkipI tested with a current liteeth, but I didn't update anything else. Perhaps that's part of the problem?20:29
somlo_florent_: besides the possibly duplicated `busy_wait_us()`, that patch does make it work for me (nexys4ddr, rocket)20:54
*** st-gourichon-fid has quit IRC21:01
*** st-gourichon-fid has joined #litex21:03
*** st-gourichon-fid has quit IRC21:11
*** Skip has quit IRC21:51
*** Skip has joined #litex22:04
benh__florent_: somlo another "issue" is normally on power, the first 0x4000 of memory are exception vectors...22:12
benh_something we need to "fix" if we ever going to have Linux working, we'll need DRAM at 022:13
benh_and "ideally" we need to keep that space free for vector in the bios in case it takes interrupts22:13
benh_on "standalone" microwatt I have a control bit SW can use to select whether DRAM or block RAM is down at 0 but for flash, I'm thinking of adding a microwatt specific extension to allow the core to find its exceptions at f* instead of 0 during boot22:14
zypdoes it matter whether it's DRAM or block ram at 0 as long as it's writable?22:21
benh_in theory no, but it would need to be more than 8K for Linux I think22:23
benh_and it would force us to use CONFIG_RELOCATABLE which is unfortunate22:24
benh_The kernel on powerpc likes just sitting at 0 and having RAM onwards from there22:24
benh_it *can* run from elsewhere but it's a bit more messy (and includes some runtime overhead)22:24
zypokay, fair, I'm used to thinking from a bare metal perspective where things are a bit more flexible in regards to what goes where22:28
somlobenh_: you can have a custom memory map for your CPU; Rocket wants the first 0x10000000 for its own "internal" SoC (the plic, and other stuff defined in chisel)22:28
zypI guess it should be easy enough to tell litex to put dram at 022:29
somlohttps://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/rocket/core.py#L7922:29
tpbTitle: litex/core.py at master · enjoy-digital/litex · GitHub (at github.com)22:29
somloso on Rocket the init address is 0x10000000, as far as LiteX is concerned, and I make sure to compile Rocket to jump there after it's done with its own internal initialization22:30
benh_right, I don't think it's hard, I was just thinking out loud :-)22:30
benh_we might need some trickery if we want to have sane exception vectors while running from BIOS before the OS boots22:30
zypby the way, how well does litex support memory maps >4G currently?22:34
zypthe ecp5 board I'm working on got a sodimm socket that you can put an 8GB stick into (or 16GB if you can find one)22:36
somlozyp: I moved main_ram to 0x80000000 with nothing else above it so that RAM can grow contiguously with the availability of larger amounts22:38
somlobut I never had access to anything with more than 1G (the trellisboard), so what would *actually* happen is untested, afaik22:39
somloto be precise, I moved main_ram to 0x80000000 for *Rocket*22:39
zypwill be fun to see when I finish the board :)22:40
somlo_florent_, keesj: on rocket it works fine even with the `flush_cpu_dcache()` call23:09
somloI'm wondering if on some CPUs the sdcard read/write sram buffers are marked cacheable, and then whatever hardware writes to them gets ignored by the CPU?23:10
somlo* even *without* the `flush_cpu_dcache()` call (i.e., with that line commented out)23:11
somlogetting tired of staring at this monitor, gotta go through my evening shut-down routine, catch y'all tomorrow :)23:11
benh_somlo: I could support up to 52 bits of physical address with microwatt :)23:14
somlobenh_: I'm fairly certain I can have > 32 on Rocket as well, I'm just too lazy to think about it in the absence of a board I can test on :)23:49

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!