#asahi-dev · 2021-03-08 19:45
marcanI mean it's what macvdmtool does :)#asahi-dev · 2021-03-08 18:34
marcansven: by the way, we can put the type C port into serial mode from software too; that would let a pixel-style serial cable work ootb, no fancy PD stuff needed. I should implement that in m1n1 with some trivial i2c stuff...#asahi-dev · 2021-03-08 17:44
marcanso... not a priority right now#asahi-dev · 2021-03-08 17:44
marcanwhich needs further talk about non-HVC non-SMC PSCI#asahi-dev · 2021-03-08 17:44
marcanbut if we do need full sleep, that implies moving away from spin-tables to... something#asahi-dev · 2021-03-08 17:43
marcan:)#asahi-dev · 2021-03-08 17:43
marcanI guess we'll find out if we chainload it with rvbar pointing to the wrong thing and it all still works#asahi-dev · 2021-03-08 17:43
marcanI don't even know if macos uses full sleep#asahi-dev · 2021-03-08 17:43
marcanso, until I hook up a power meter to these things and get numbers out, I won't care#asahi-dev · 2021-03-08 17:43
marcanmodern SoCs are really good at that#asahi-dev · 2021-03-08 17:43
marcanfine-grained sleep might do all we care about#asahi-dev · 2021-03-08 17:43
marcanI'm not convinced full system sleep is useful yet#asahi-dev · 2021-03-08 17:42
marcanbut newer ones can#asahi-dev · 2021-03-08 17:42
marcanbecause we have retention sleep; it was definitely needed on older CPUs that couldn't powergate without starting there#asahi-dev · 2021-03-08 17:42
marcanbut basically, I'm not going to care about that until I prove to myself that there are *any* worthwhile power management gains to be had from mechanisms that require that#asahi-dev · 2021-03-08 17:42
marcaniBoot2#asahi-dev · 2021-03-08 17:42
marcanyes#asahi-dev · 2021-03-08 17:42
marcanthe whole virtual thing with mach-os is all a lie#asahi-dev · 2021-03-08 17:41
marcaneverything is physical#asahi-dev · 2021-03-08 17:41
marcanphysical#asahi-dev · 2021-03-08 17:41
marcanand it is locked, so it's stuck there (all the other CPU ones are writable)#asahi-dev · 2021-03-08 17:40
marcanit's a hideous hack.#asahi-dev · 2021-03-08 17:40
marcanseriously, that is how they implemented it.#asahi-dev · 2021-03-08 17:40
marcanthe cpu0 RVBAR points to... the beginning of the page mach-o entrypoint is in.#asahi-dev · 2021-03-08 17:40
marcanwe'll see#asahi-dev · 2021-03-08 17:40
marcanbut I don't even know yet if we will *ever* care about that tbh#asahi-dev · 2021-03-08 17:40
marcanbut one reason to do 3) is once we start caring about that sleep mode stuff, normal m1n1 chainloads will break it, which is bad for development#asahi-dev · 2021-03-08 17:39
marcanbut yeah, no reason for that not to work#asahi-dev · 2021-03-08 17:39
marcancute, never tried it#asahi-dev · 2021-03-08 17:38
marcanand yeah, a priori I'm just going to do this in the python for now#asahi-dev · 2021-03-08 17:37
marcanI don't really care about 3, because my plan is to virtualize darwin anyway, and for that I'd hook the whole CPU spinup business anyway#asahi-dev · 2021-03-08 17:37
marcan3) it needs to do all this in a staging area, then run a trampoline that copies it all *on top* of where m1n1 used to be. this is required for the CPU0 reset vector stuff to work, though I bet if we don't do it we're fine as long as the system doesn't go into full sleep#asahi-dev · 2021-03-08 17:36
marcan2) it needs to know how to move and re-create the bootargs structures and probably tweak some things in the ADT#asahi-dev · 2021-03-08 17:36
marcan1) it needs to support the mach-o stuff that darwin needs (there is some relocation stuff etc)#asahi-dev · 2021-03-08 17:36
marcanwell, three#asahi-dev · 2021-03-08 17:36
marcanbut two things are needed to make it work with darwin#asahi-dev · 2021-03-08 17:35
marcanthe old dumb copy and jump thing is no more, now it does proper mach-o parsing#asahi-dev · 2021-03-08 17:35
marcanmodwizcode: it needs to be extended#asahi-dev · 2021-03-08 08:07
marcancool :)#asahi-dev · 2021-03-08 07:56
marcanand dart even#asahi-dev · 2021-03-08 07:56
marcanif we're quick we might be able to get in clock/power into the same merge window#asahi-dev · 2021-03-08 07:55
marcanyeah, I'll be looking into that side next, once this progress report is done and I wrap up the v3 patch feedback#asahi-dev · 2021-03-08 07:54
marcanthough if I get my way with the hypervisor, *that* might also just be a linux earlycon by default (I can implement ARM semihosting probably...)#asahi-dev · 2021-03-08 07:53
marcannah, let's leave things up. this might become a linux earlycon.#asahi-dev · 2021-03-08 07:52
marcancool#asahi-dev · 2021-03-08 07:46
marcanso a mmiotrace streaming (without blocking other than on usb buffers) over dwc would be a very nice setup#asahi-dev · 2021-03-08 07:45
marcanone very important feature of dwc is that it will be synchronous / has flow control - right now we don't have that with serial, which makes certain things unreliable#asahi-dev · 2021-03-08 07:43
marcansven: ^#asahi-dev · 2021-03-08 07:43
marcanjust... throwing ideas out there#asahi-dev · 2021-03-08 07:43
marcanbut I have this vague idea that I want to make the proxy loop callable from exception handlers, and then we can write exception handlers in python - and then that also means we can have a hypervisor with hooks in python, a la that hilarious ps3 thing we did with the bootrom