#asahi-dev · 2021-05-04 11:00
marcanarnd: not a gdb stub, but still quite nice :)#asahi-dev · 2021-05-04 10:51
marcanhow's this for a cute hypervisor: https://mrcn.st/p/1Dm3b6BQ :>#asahi-dev · 2021-03-15 07:51
marcansven: also nice ringbuffer; I need something like that for a proper console, will probably extend it a bit#asahi-dev · 2021-03-15 07:49
marcanyou'd pretty much expect that, right? :>#asahi-dev · 2021-03-15 02:59
marcansven: I suspected that might happen. we should just ship the bitmap font, the conversion process is too fragile#asahi-dev · 2021-03-14 18:45
marcanI would only expect EfiBootServicesData for stuff marked `reusable`#asahi-dev · 2021-03-14 18:45
marcanwhich admittely is... strange#asahi-dev · 2021-03-14 18:45
marcansome confusion probably comes from here: https://github.com/devicetree-org/devicetree-specification/blob/master/source/chapter3-devicenodes.rst#reserved-memory-and-uefi#asahi-dev · 2021-03-14 18:20
marcanis there any known rationale for that behavior in u-boot?#asahi-dev · 2021-03-14 18:20
marcanlinux definitely treats them as reserved forever, so this seems inconsistent#asahi-dev · 2021-03-14 17:53
marcanthat seems... wrong#asahi-dev · 2021-03-14 17:27
marcankettenis: should be fixed now, sorry about that#asahi-dev · 2021-03-14 16:59
marcankettenis: whoops, I could've sworn I reserved all of m1n1 but I guess I didn't#asahi-dev · 2021-03-14 13:11
marcanalso ccache helps#asahi-dev · 2021-03-14 13:11
marcanparallelize those :D#asahi-dev · 2021-03-14 13:11
marcanyup#asahi-dev · 2021-03-14 12:37
marcanthanks!#asahi-dev · 2021-03-14 12:18
marcan(will look into this later, have some unrelated last-minute stuff going on today)#asahi-dev · 2021-03-14 12:18
marcanI'll write a version based on that#asahi-dev · 2021-03-14 12:17
marcansven: this problem will go away once we have mmiotrace, but for the time being since this is kind of a chicken-and-egg there, if you can just add a printf() to all the read32/write32 calls and run it and paste a dump somewhere, we can call that clean#asahi-dev · 2021-03-14 09:09
marcanper-target#asahi-dev · 2021-03-14 09:09
marcanadd some reentrance check or something#asahi-dev · 2021-03-14 09:09
marcanI bet I can handle that entirely within the console code#asahi-dev · 2021-03-14 02:39
marcan*from#asahi-dev · 2021-03-14 02:09
marcansame with the console, which will also cover the FB. I'll add a dispatcher or something and a function to let you turn console outputs on and off for performance#asahi-dev · 2021-03-14 02:08
marcanit just means making the uartproxy stuff into a state machine, which really only has to handle the command header (I can probably assume that once I get the magic command header in via an input, that I can block on the rest rom there)#asahi-dev · 2021-03-14 02:07
marcanbut get your USB backend merged; I'll refactor all of that to make it work like that#asahi-dev · 2021-03-14 02:06
marcansven: I want it to support both, in parallel. I was already thinking about that yesterday :-)#asahi-dev · 2021-03-13 16:23
marcan(that's why linux has the _relaxed versions)#asahi-dev · 2021-03-13 16:22
marcanmost reads/writes do not need barriers, so it doesn't make a whole lot of sense to stuff them into read32 and friends#asahi-dev · 2021-03-13 16:21
marcanlet's do them explicit, but make names like linux does (dma_wmb/rmb/mb)#asahi-dev · 2021-03-13 15:54
marcanyeah, picocom is my default#asahi-dev · 2021-03-12 20:05
marcankettenis: awesome, I'll give it a shot later!#asahi-dev · 2021-03-12 19:59
marcanI had this issue with my Glasgow UART; it got fixed increasing the on-device FIFO size (yay FPGA implementations)#asahi-dev · 2021-03-12 19:58
marcantimeouts *reading* data would indicate the o-droid isn't keeping up; timeouts *writing* data would mean the M1 isn't keeping up, which shouldn't really happen for memory writes given it's a tight read loop (but can happen if you e.g. trip an IRQ asynchronously and it spends some time printing out info)#asahi-dev · 2021-03-12 19:54
marcansven's USB code should fix that#asahi-dev · 2021-03-12 19:54
marcanunfortunately we don't have flow control, so this can happen :)#asahi-dev · 2021-03-12 19:54
marcanyou can try reducing the baud rate in setup.py (p.set_baud(1500000) etc) or commenting out that code; if that fixes it then it's probably something along those lines#asahi-dev · 2021-03-12 19:53
marcanperhaps data is being lost due to buffers getting full at some point?#asahi-dev · 2021-03-12 19:53
marcanthat's kind of odd; the read loop retries until it gets all the data, so a timeout means it got 0 bytes at some point#asahi-dev · 2021-03-12 19:29
marcankettenis: what timeout do you get? was this with another M1 as console?#asahi-dev · 2021-03-12 16:59
marcan(which was documented in the patch arnd and I wrote)#asahi-dev · 2021-03-12 16:59
marcanthis is the whole readl() vs readl_relaxed() thing#asahi-dev · 2021-03-12 16:58
marcanlook at what linux does :)#asahi-dev · 2021-03-12 16:58
marcansame with writes and oshst#asahi-dev · 2021-03-12 16:58
marcanyou need that between mmio and dma#asahi-dev · 2021-03-12 16:58
marcanthat's a dma barrier#asahi-dev · 2021-03-12 16:58
marcansven: yes, dmb oshld is exactly what you need there#asahi-dev · 2021-03-12 16:41
marcankettenis: open("dt.bin", "wb").write(readmem(ba.devtree - ba.virt_base + ba.phys_base, ba.devtree_size))#asahi-dev · 2021-03-12 16:40
marcanyeah, pretty much