#
✕ nick:modwizcode
#asahi-dev · 2021-01-25 15:48
modwizcodeIt could be that due to some quirk of the way the emulated exynos uart is implemented it causes issues with qemu, I wouldn't doubt it.
#asahi-dev · 2021-01-25 15:47
modwizcodeIt seems like it might be a deeper qemu thing because I can see it spinning on the RX status register in qemu by enabling traces and it's getting cleared in both FIFO&non-FIFO paths meaning that everything has been "processed" the whole behavior is very strange and seems broken
#asahi-dev · 2021-01-25 15:46
modwizcodeAlthough if I send it a write that's at all bigger than the buffer it recieves no data but that could be a quirk of how netcat works for the simpler testing
#asahi-dev · 2021-01-25 15:46
modwizcodeLike I just tested enabling the fifo in uart_init in m1n1 and unlike before things seem to work almost as expected because the fifo code also reports to the normal status registers somewhat
#asahi-dev · 2021-01-25 15:45
modwizcodeanyway yeah those all use the FIFO and/or interrupts which have different behavior
#asahi-dev · 2021-01-25 15:45
modwizcodeoh patched linux
#asahi-dev · 2021-01-25 15:45
modwizcode(patched version?)
#asahi-dev · 2021-01-25 15:45
modwizcodeThose all enable the FIFO iirc (or properly use interrupts) which has completely different behavior
#asahi-dev · 2021-01-25 15:24
modwizcodeanyone have any experience with this? It's just a busy wait loop on the "RX present" register but it seems like there's some artificial delay in there I can't find. The TX path has no issue whatsoever
#asahi-dev · 2021-01-25 15:21
modwizcodeI can't find any particular reason for it to be so bad. It's not buffered well but it should not be creating nearly this much overhead.
#asahi-dev · 2021-01-25 15:21
modwizcodebit offtopic, but I've been working on the qemu support and I found yesterday a bug in the exynos uart driver. Fixing the bug stopped qemu from dropping incoming data when the fifo isn't enabled, but causes the RX loop to stall really really bad.
#asahi-dev · 2021-01-24 20:42
modwizcodeyou have to like find the link to the specific commit or something the one I found was orphened from all branches
#asahi-dev · 2021-01-24 20:41
modwizcodethere was some weirdness with the commits I think
#asahi-dev · 2021-01-24 20:10
modwizcodeYeah
#asahi-dev · 2021-01-24 19:49
modwizcodeyeah it would
#asahi-dev · 2021-01-24 19:40
modwizcodeI wish that had gone further though :/
#asahi-dev · 2021-01-24 19:40
modwizcodeYeah that's the one I read
#asahi-dev · 2021-01-24 19:17
modwizcodeI've looked at those but that didn't seem particularly relevant, what I saw mostly involved hacks to both qemu and the iOS kernel.
#asahi-dev · 2021-01-24 19:11
modwizcodenever_released: do you know of specific efforts to boot macos?
#asahi-dev · 2021-01-24 18:49
modwizcodeYeah probably
#asahi-dev · 2021-01-24 17:20
modwizcodeAnd if it is worth trying to do, should I base my code on an existing board? I wouldn't know what else to do but I can tell you for sure nothing should be based on that exynos board it's a mess and awful. At the very least I'd probably like to submit a patch to fix SMP bringup on non-linux ARM kernels because that issue is painful and doesn't seem challenging to solve at all.
#asahi-dev · 2021-01-24 17:18
modwizcodeI'm not sure what qemu upstreaming is like, does anyone know? Is it worth trying to do this right to get a potential M1 board upstreamed?
#asahi-dev · 2021-01-24 17:16
modwizcodeIt's pretty recognizable loop I think
#asahi-dev · 2021-01-24 17:16
modwizcodewhere the busy loop is
#asahi-dev · 2021-01-24 17:16
modwizcodeThey probably dumped rom somewhere
#asahi-dev · 2021-01-24 17:16
modwizcodeIt's generally super simple on arm from what I understand from all the other qemu smp stubs
#asahi-dev · 2021-01-24 17:15
modwizcodethe only bringup I was familiar with before is the godawful mess that x86 MP is
#asahi-dev · 2021-01-24 17:15
modwizcodeI have learned it's not while messing with learning aarch64 in prep for this experiment with the M1 emulation, I'm surprised actually how easy it is
#asahi-dev · 2021-01-24 17:15
modwizcodeYeah but then I can't poke at it in glorius detail
#asahi-dev · 2021-01-24 17:14
modwizcodeI hear correlium has that working. It would be super helpful if I had a real M1 mac someone donate one pls kthx
#asahi-dev · 2021-01-24 17:14
modwizcodeI would like to know how real SMP bringup is done on the M1 so I can replicate
#asahi-dev · 2021-01-24 17:13
modwizcodemost of the time I spent was on the MP stuff, since the board launches two cpus (I could have just changed this but for some reason this board also ignores command line options for cpu count I think) so I patched the code to keep the other cpu in a busy loop until I fixed it proper
#asahi-dev · 2021-01-24 17:13
modwizcodeAll of the changes I made need to be done right
#asahi-dev · 2021-01-24 17:13
modwizcodeoffsets wouldn't be doubled when relocating.
#asahi-dev · 2021-01-24 17:13
modwizcodeAnd I made a 2 line change to the linker script because I'm using qemus -kernel option to save time (loading the elf not the macho) and I needed to set the base address of the image to a ram address because otherwise qemu gets weird (I've noticed this before with my own kernels, qemu's boot handling for non-linux is complete crap at least on arm) so I had to manually set base to 0x0 so that the
#asahi-dev · 2021-01-24 17:11
modwizcodeI moved the serial peripheral (which is why I patched this specific board since it's the same UART) to the right address
#asahi-dev · 2021-01-24 17:11
modwizcodeSo I patched the exynos board that's already in there by forcing it to create cortex-a57 cores (it seems like that code ignores the CPU option), then patching the cortex-a9 mp private peripheral to not get mad if you use it with a non cortex-a9 core (all the other ones A11/A15 don't get mad)
#asahi-dev · 2021-01-24 17:10
modwizcodeI can do it right I'm just not super familiar with the qemu codebase and so I was trying to avoid writing a new board/machine definition out of the gate.
#asahi-dev · 2021-01-24 17:09
modwizcode(likewise for the qemu patches)
#asahi-dev · 2021-01-24 17:09
modwizcodeYeah I couldn't imagine another way and the way I got it working without patching is insane
#asahi-dev · 2021-01-24 17:08
modwizcodeI wonder what sven had to do, I couldn't see a way to avoid modifying the code of qemu but I was specific trying to avoid patching m1n1 whatsoever
#asahi-dev · 2021-01-24 17:08
modwizcodeYeah I heard
#asahi-dev · 2021-01-24 17:07
modwizcodeI got m1n1 (partially) running on qemu (not on apple silicon) by doing some very hacky stuff. I'm planning to hack support for generating the bootargs struct that m1n1 expects and then start working on an actual machine definition.
#asahi-dev · 2021-01-23 15:37
modwizcodegood news!
#asahi-dev · 2021-01-23 15:33
modwizcodeheh
#asahi-dev · 2021-01-23 15:33
modwizcodedamn
#asahi-dev · 2021-01-23 15:32
modwizcodeI forget, what does the Switch/Pixel C use, I have a semi-broken Pixel C laying around I wonder if I could repurpose it at some point.
#asahi-dev · 2021-01-23 15:32
modwizcodeoh
#asahi-dev · 2021-01-23 15:32
modwizcodeThe X1 isn't an in-house core?
#asahi-dev · 2021-01-23 15:31
modwizcodeInteresting

plus ›