Wednesday, 2019-11-20

*** tpb has joined #litex00:00
*** freemint has quit IRC00:31
*** freemint has joined #litex00:31
*** freemint has quit IRC00:55
*** freemint has joined #litex00:55
*** freemint has quit IRC01:30
*** freemint has joined #litex01:31
*** ambro718 has quit IRC01:37
*** rohitksingh has joined #litex02:16
*** CarlFK has quit IRC02:45
*** nrossi has joined #litex03:19
*** freemint has quit IRC04:51
*** sb0 has joined #litex07:45
*** rohitksingh has quit IRC09:48
*** rohitksingh has joined #litex09:50
*** sb0 has quit IRC12:09
*** freemint has joined #litex12:18
*** freemint has quit IRC12:55
*** freemint has joined #litex13:14
*** freeemint has joined #litex13:22
*** freemint has quit IRC13:22
somlowhat kernel version, and what tool was used with these patches: https://github.com/litex-hub/linux-on-litex-vexriscv/tree/master/buildroot/board/litex_vexriscv/patches/linux13:32
tpbTitle: linux-on-litex-vexriscv/buildroot/board/litex_vexriscv/patches/linux at master · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)13:33
somloI'm trying to apply them to a current kernel, and 'git am' says "Patch format detection failed"13:34
somlonevermind actual merge conflicts or anything :)13:34
*** freeemint has quit IRC13:37
*** freemint has joined #litex13:37
*** freemint has quit IRC13:39
*** freemint has joined #litex13:39
*** freemint has quit IRC13:54
*** freemint has joined #litex13:54
daveshahsomlo: kernel 5.0.13 according to the buildroot config14:00
daveshahI guess this is traditional patch style; whatever buildroot uses14:00
somlocan it handle additional patches generated using git-format-patch? (Because I'm about to send a PR adding a patch generated that way, and if that won't work, might as well not do it :)14:08
*** freemint has quit IRC14:09
*** freemint has joined #litex14:11
*** freemint has quit IRC14:11
*** freeemint has joined #litex14:11
*** freeemint has quit IRC14:13
somlohttps://github.com/litex-hub/linux-on-litex-vexriscv/pull/6014:15
tpbTitle: RFC: update liteeth driver to automatically calculate hwreg offsets by gsomlo · Pull Request #60 · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)14:15
*** freemint has joined #litex14:15
somloit's a hack on the liteeth driver to allow it to figure out its register offsets automatically, regardless of whether it's on a 32-bit or 64-bit kernel, and with a csr-data-width parameter passed in via DT (defaulting to 8, to keep it backward compatible)14:16
somlomy only issue is that the mmio-dw-bytes (csr data width expressed in bytes) property should be in the parent node (soc) in DT, as it applies to all mmio/csr registers, not just liteeth14:17
somlohaven't figured out yet how to do *that* cleanly, so any comments or hints that could shortcut my bumbling around would be much appreciated! :)14:18
*** freeemint has joined #litex14:20
*** freeemint has quit IRC14:20
*** freeemint has joined #litex14:20
*** freemint has quit IRC14:22
*** freemint has joined #litex14:24
*** rohitksingh has quit IRC14:35
*** freemint has quit IRC14:58
somlohmm, might be as simple as of_property_read_u32(pdev->dev.of_node->parent, "mmio-dw-bytes", &mmio_dw_bytes);15:10
somloi.e. just query the parent of the "mac" DT node... I'll give it a try, then respin the patch if that works :)15:10
*** freemint has joined #litex15:12
*** freemint has quit IRC16:02
*** freemint has joined #litex16:05
scanakciI am a little bit confused about UART_INTERRUPT macro.  I would like to use UART_POLLING (sounds easier) than UART_INTERRUPT. I changed libbase/uart.c and defined the UART_POLLING. When I run litex_sim, it gives me compilation error since UART_INTERRUPT is not defined in isr.c. If I do use uart.c as it is, it gives the same undefined UART_INTERRUPT error in uart.c.17:11
scanakciI run the rocket in standard mode to see where UART_INTERRUPT is defined. Apparently, it is in the generated folder in soc.h.  When I check the same file in the generated folder for Blackparrot simulation, I do not see UART_INTERRUPT macro. What is the proper way to control this Macro?17:15
*** freemint has quit IRC17:25
*** ambro718 has joined #litex17:26
somloscanakci: UART_INTERRUPT is just the interrupt pin number that's going to let your CPU know the UART needs some attention17:35
somlofrom there, it's just used by the software to figure out which handler to invoke, from the isr() routine in litex/soc/software/bios/isr.c17:36
somloI haven't thought about how I'd do polling with the UART, just wiring things up and adding the appropriate interrupt handler felt like the easier thing to do17:37
somlonow granted, rocket comes complete with a PLIC, no idea how Blackparrot handles interrupts...17:38
somlodepending on that, maybe looking at one of the 32bit cpu models (e.g. vexriscv) for inspiration on that might make more sense...17:38
somlomithro: thanks for the patchwork link, looks like for now they're trying to hardcode 8-bit register slices (a.k.a. LITEX_SUBREG_SIZE), so I added a comment about that :)17:39
*** kgugala has joined #litex17:40
somlokgugala: ping19:18
somlokgugala: I'm interested in finding a generic, csr-data-width agnostic solution for LiteX Linux-kernel MMIO support (re: https://lore.kernel.org/patchwork/patch/1143354/)19:20
tpbTitle: [v2,2/4] litex: add common LiteX header - Patchwork (at lore.kernel.org)19:20
somlohappy to brainstorm here or in the lkml thread :)19:21
*** freemint has joined #litex20:02
*** CarlFK has joined #litex20:31
*** freemint has quit IRC20:57
*** freemint has joined #litex20:59
*** nrossi has quit IRC21:32
*** rohitksingh has joined #litex22:17
*** rohitksingh has quit IRC22:33
*** rohitksingh has joined #litex22:36
scanakcisomlo: Thank you so much. As a first step, I want to run BIOS so I do not think I need to use UART anyways until we want to load linux image to DRAM (please correct me if it is wrong). If I can come to that point, I will utilize interrupts as you suggested. Does executing BIOS instructions from ROM cause any interrupts? I looked at BlackParrot and need to spend more time to handle interrupts for couple of reasons.22:59
scanakciFor now, if there is a chance that I can run BIOS by only using ROM (w/o any other memory) and without interrupt support; I would like to do that23:00
somloscanakci: it's been almost a year, but I remember being able to generate *output* from the BIOS, but I had to sort out interrupts before I could accept input from the keyboard. But as I said, it's getting hard to remember :)23:37
scanakcimakes sense. typing some commands in BIOS screen will require interrupt support but printing "hello from blackparrot processor" with Litex logo should not hopefully.23:41

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!