#
…

2021-02-14

00:01DarthCloud has quit [Remote host closed the connection]
00:05DarthCloud has joined #asahi-dev
00:20amw has joined #asahi-dev
00:24amw has quit [Ping timeout: 240 seconds]
00:58amw has joined #asahi-dev
01:03amw has quit [Ping timeout: 272 seconds]
01:19amw has joined #asahi-dev
01:25thestr4ng3r has quit [Read error: Connection reset by peer]
01:26thestr4ng3r has joined #asahi-dev
01:39thestr4ng3r has quit [Read error: Connection reset by peer]
01:39thestr4ng3r has joined #asahi-dev
03:15phiologe has quit [Ping timeout: 264 seconds]
03:15phiologe has joined #asahi-dev
03:20brosenz[m] has joined #asahi-dev
03:49ransom has joined #asahi-dev
03:53Bluerise has quit [Ping timeout: 268 seconds]
04:00_whitelogger has joined #asahi-dev
04:10Bluerise has joined #asahi-dev
04:17Bluerise has quit [Ping timeout: 240 seconds]
04:30cshbicos has joined #asahi-dev
04:43cshbicos has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
04:49ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:12_whitelogger has joined #asahi-dev
06:43ransom has joined #asahi-dev
07:30ransom_ has joined #asahi-dev
07:31ransom has quit [Ping timeout: 240 seconds]
07:41maximus64I updated system register dump wiki page with Darwin dump and Firestom while running m1n1
07:57_whitelogger has joined #asahi-dev
08:07ransom_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:12maor26 has joined #asahi-dev
08:36amw has quit [Ping timeout: 256 seconds]
08:40hir0 has joined #asahi-dev
08:51amw has joined #asahi-dev
08:54maximus64here is the bits that is difference bettwen darwin and m1n1: https://termbin.com/tgx8
08:55maximus64there is alot more diff but I only include the one that we have bit field definition for
08:56maximus64darwin have more chicken/kill bit set that look interesting
08:57marcanmaximus64: which darwin version is this?
08:57marcanit is possible they added more chicken bits since the one I looked at
08:57maximus64let me check
08:57marcanalso, which core?
08:57marcansince the chicken bits are different for p/e
08:57maximus64I dump all 8 core for darwin
08:58marcanother than the HID bits, all the other differences are expected
08:59maximus64Darwin version is 20.3.0 XNU: 7195.81.3~1
09:00TellowKrinkle[m] has quit [Quit: Idle for 30+ days]
09:00maximus64m1n1 side I cheat and dump only first core of each clusters
09:13maximus64all the HID difference is for the Firestorm. I notice that EHID -> Icestorm HID -> Firestorm. E probably mean efficiency heh
09:15maximus64ahh that already mention in the wiki page
09:20maximus64also interesting bit is that some registers fire MSR exception trap when try to read in darwin but no exeception when read in m1n1. Maybe it is security registers that got lock
09:25amw has quit [Ping timeout: 240 seconds]
09:33hir0 has quit [Quit: hir0]
09:52Bluerise has joined #asahi-dev
10:09VinDuv has joined #asahi-dev
10:16maor26 has quit [Remote host closed the connection]
10:17amw has joined #asahi-dev
10:17maor26 has joined #asahi-dev
10:37leah2 has quit [Ping timeout: 272 seconds]
10:49leah2 has joined #asahi-dev
11:34amw has quit [Ping timeout: 256 seconds]
12:00vimal has quit [Ping timeout: 240 seconds]
12:42DarthCloud has quit [Remote host closed the connection]
12:42DarthCloud has joined #asahi-dev
13:02grumble has quit [Quit: ACCORDING TO ALL KNOWN LAWS OF AVIATION THERE IS NO WAY A BEE SHOULD BE ABLE TO FLY ITS WINGS ARE TOO SMALL TO GET ITS FAT LITTLE BODY OFF THE GROUND THE BEE OF COURSE FLIES ANYWAY BECAUSE BEES DON'T CARE WHAT HUMANS THINK IS IMPOSSIBLE]
13:10grumble has joined #asahi-dev
13:31VinDuv has quit [Quit: Leaving.]
14:29Necrosporus has quit [Read error: Connection reset by peer]
14:30Necrosporus has joined #asahi-dev
14:36riker77 has quit [Ping timeout: 264 seconds]
15:02riker77 has joined #asahi-dev
15:46modwizcodeThat's... interesting
15:47modwizcodeI've been wondering how much to emulate the chicken bit registers. I think some of them I'll have to emulate for real (Fast IPIs) the rest probably need minor emulator so I can get "read as written" which requires handler support in QEMU I think
15:49marcanmodwizcode: fast IPIs are not chicken bits
15:49marcanyou do not need to emulate any chicken bits at all
15:50marcanjust have those registers as dumb memory
15:50marcanyou do need to emulate the Apple vendor-specific registers that have functions that matter :)
15:50modwizcodeokay I guess that's more semantics. It's part of a register that has some chicken bits isn't it? Or maybe just my confusion
15:51marcanHIDx are chicken bits
15:51marcanand pretty much only chicken bits
15:51marcanIPIs have their own registers not mixed with everything else
15:52modwizcodeIdk how much you know about qemu but given what you know about the core, do you think it will end up being best to put those register defs in their own "apple core" specific CPU handling file? Or just stuff them in with the 64-bit core types?
15:53marcanI don't know the codebase, but I'm guessing apple stuff should probably be implemented in separate files
15:53marcanregister defs too
15:53modwizcodeI'm trying to not couple things to the "M1" code (as I refer to the SoC device complex) since I'm assuming that future SoC's will potentially be different enough to merit their own distinct SoC
15:54modwizcodeBut there's very little convention for this.
15:54modwizcodein fact there's hardly any convention for anything in qemu. even file names are randomly distributed between "-" seperators and "_"
15:55modwizcodeThe biggest issue I've encountered was with working on AIC. There's no proper way to sanely define core local aliases.
15:56modwizcodeThe sanest way is to abuse the thread local "current_cpu" variable and hope that the mmio access is from the same thread (which seems to be always true for now but it's a hack). Defining core local memory maps is possible, but then the peripheral can't control the mapping fully so the code ends up all over the place.
15:58modwizcodemarcan: have you played with the USB controllers at all? I'm probably going to throw a dwc3 peripheral at the right address and export it in the device tree, hopefully I don't need to add apple specific quirks.
15:58marcanthere's a whole PHY init thing that needs to happen, which is outside the generic dwc3 part
15:59modwizcodeI have no experience with USB stuff directly, is that something kind of standard, but vendor specific?
16:01Bluerisethat's vendor specific
16:01Bluerisebut if it's for qemu, the phy shouldn't matter
16:01BlueriseI mean, you should know that Apple will be touching a few phy registers, but for a virtualized dwc3, the phy doesn't really exist
16:02modwizcodeThe point of my work on emulation is partially to allow as indistinguishable from hardware as is reasonably possible
16:03modwizcodeAt least until I'm aware of exactly what can be relaxed.
16:04modwizcodeIt would be pointless to just emulate enough for Linux to work since there's already plenty of non-apple ARM64 platforms in QEMU.
16:04modwizcodeI agree though that it will likely be stubs
16:04marcanyou can't really emulate phy stuff, because it's analog
16:05marcanbut you would have to emulate it enough that the OS can init it
16:05marcani.e. handle any status/busy bits and things like that
16:05modwizcodeQEMU->CXXRTL+SPICE ;p
16:05marcandid you ver see the frankenstein thing I did to make IOS LLE emulation in dolphin work?
16:06marcanrunning bootmii under dolphin :p
16:06modwizcodeI think I tried to look at that once but I don't know if I really dug in enough
16:06modwizcodeor was that you throwing dolphin+skyeye together?
16:06marcanyeah, that
16:06modwizcodeyeah I don't think you ever actually fully discussed that anywhere
16:07modwizcodeI looked for more info anyway ;)
16:07marcanIIRC I did post the code at some point
16:07modwizcodeYou posted the skyeye stuff eventually but that was about it
16:07marcanand some dolphin devs have used it AIUI
16:07modwizcodeYeah I think so. I follow some random IOS emulation related issue still on the github
16:07modwizcodeI should finish my documentation of some of the OS primitives in IOS
16:07modwizcodeit's a pretty neat little minimal threading system
16:08marcanthe sad part was that you couldn't really make dolphin+skyeye "generically useful"
16:09modwizcodeI can think of a lot of reasons but what was the practical issue there?
16:10marcanmy code did "proper" IPC bridging, which works for IOS and BootMii, but since skyeye can't actually boot full IOS (no USB/WiFi, I had patches in to disable those drivers) you couldn't actually use it to boot wii apps
16:10marcanfor dolphin dev, what people did was use hybrid LLE+HLE, where only the things IOS under skyeye could handle were passed through
16:10marcanbut that implies the Nintendo IPC usage model
16:10marcanwhich is different (and much worse) than the one BootMii uses
16:11modwizcodeYeah I uh thought it was weird
16:11marcanso, can't have it both ways, unless you go about trying to autodetect what's on either side, and that way lies madness
16:11modwizcodeI was trying to figure out if (besides the doorbell interrupts) the IPC couldn't have just basically used normal memory lol
16:12marcanit could've, as long as you put the pointers in separate cache lines
16:12modwizcodeRight because they're not coherent
16:12marcan(or just have both sides always use uncached accesses)
16:12modwizcodeyeah I guess that just works too
16:13marcanmy ring buffer thing was much nicer though :)
16:13marcanyou know why I designed it like that?
16:13marcanit had to be as fast as possible
16:13marcanbecause before we discovered AHBPROT, this was going to be a backend for linux
16:13marcanlinux was literally doing IPC calls for every readl() and writel() into those devices
16:13marcane.g. EHCI
16:14marcanand it *worked*
16:14marcanI had it down to nanoseconds for posted writes
16:14marcanand like a microsecond or less for reads IIRC
16:14modwizcodeI would have said screw it and just ended up implementing a poor copy of high level IPC like IOS does
16:14marcanyeah but then what, implement high level drivers in linux?
16:14modwizcodeI guess yeayh
16:15tmlindheh i like the idea of using interrupt-names to specify the timer role :) that issue has been bugging many folks..
16:16marcanyeah, dummy irqs are pretty terrible :)
16:16marcanand it's fully backwards compatible!
16:16marcannot forwards though, but well, not like it matters for a new soc
16:17marcanwell, it's forwards compatible for dts that *don't* plan on skipping interrupts
16:17tmlindyeah let's hope robher likes that solution too
16:17marcanI don't see why not, it's the whole point of interrupt-names, right?
16:18tmlindright, all the earlier suggested solutions have been trying to add new timer specific properties
16:18marcanthis one seemed... rather obvious to me
16:18tmlindwell interrupt-names does not help with clocksource timers with no interrupts, but that's another story, and usually there are only few of those
16:20marcanyeah, this one seems particularly well suited to the arm timers because they're weird in that they're architected into the CPU, but the IRQs are platform dependent
16:20marcanwhich is a very weird arrangement
16:21modwizcodeIt is quite strange
16:22marcanwhat apple did almost makes more sense here; they're tightly coupled into FIQ...
16:22marcannow if only they'd added some freaking status/mask registers
16:22marcan*that* is ridiculous
16:22modwizcodein qemu most of the time it seems that they end up fed into the IRQ controller which then feed back out IRQ and FIQ lines for each CPU. At least GIC can I think remap them however you please, although I know little about the GIC.
16:22modwizcodeI thought you found a bit that helped with that marcan
16:22marcanonly masks for the *guest* timers
16:23marcanthe HV timers have no masks, and nothing anywhere has status bits
16:23marcanoh yeah, not sure if I mentioned, but this thing apparently has a standard-ish vGIC
16:23marcanwith its maintenance interrupt hardwired... to *IRQ*
16:23marcanin parallel with AIC.
16:23modwizcodebut just the vGIC I assume not the rest of it?
16:23marcanyeah, just the virtualization part
16:24modwizcodewell that's probably definitely the easiest way to solve that issue
16:24modwizcodeI don't look forward to figuring out how to make that work
16:24marcanI was talking with maz about this, Linux should be able to use it pretty easily
16:24modwizcodemeans I have to read the docs for the v3 GIC I think
16:24marcanwell, you don't have to care until you try to emulate virtualization
16:25modwizcodeand maybe figure out if I can seperate the vGIC code enough, I wonder if it's easiest to just replicate enough to work in the AIC part
16:25Bluerise has quit [Quit: brb]
16:28modwizcodeI assume though that it means that there's a parallel interrupt controller driver for a GIC (or at least running under a vGIC) so that macOS can be emulated.
16:40Necrosporus has quit [Ping timeout: 256 seconds]
16:44VinDuv has joined #asahi-dev
17:32Necrosporus has joined #asahi-dev
18:08jannau10_AnyesS3!17
18:18kettenistime for a new password!
18:29KindOne has quit [Ping timeout: 272 seconds]
18:37KindOne has joined #asahi-dev
18:44luca020400when you think the screen is locked and you type the password.
18:46dhewgfocus follows mouse is good at that too
18:48luca020400I leaked my github password because of focus. so yeah
18:55leah2 has quit [Ping timeout: 272 seconds]
18:56ransom has joined #asahi-dev
18:57ransom has quit [Client Quit]
19:23tarzeauok, and did anything land in there yet?
19:23j`eynot yet
19:23j`eyand from the sounds of it, it wont for a while. since it's too late for 5.12, so 5.13 will be the first point at which it can get in
19:23tarzeausome parts would also land in drivers/ i guess?
19:24tarzeauah right, had it star'ed, but forgot the watch button
19:31leah2 has joined #asahi-dev
19:33VinDuv has quit [Read error: Connection reset by peer]
19:33VinDuv has joined #asahi-dev
19:50zkrx has quit [Ping timeout: 240 seconds]
19:54zkrx has joined #asahi-dev
20:40vup has quit [Ping timeout: 246 seconds]
20:41anuejn has quit [Ping timeout: 272 seconds]
20:48leah2 has quit [Ping timeout: 264 seconds]
20:55anuejn has joined #asahi-dev
20:55vup has joined #asahi-dev
21:40VinDuv has quit [Quit: Leaving.]
21:55eta has quit [Quit: we're here, we're queer, connection reset by peer]
21:56eta has joined #asahi-dev
22:31leah2 has joined #asahi-dev
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-dev
23:02amw has joined #asahi-dev
…