#
…

2021-03-08

00:22choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:19phiologe has joined #asahi-dev
01:19PhilippvK has quit [Read error: Connection reset by peer]
03:45_whitelogger has joined #asahi-dev
03:48phiologe has quit [Ping timeout: 260 seconds]
03:48phiologe has joined #asahi-dev
05:43odmir has joined #asahi-dev
05:48odmir has quit [Ping timeout: 276 seconds]
06:30VinDuv has joined #asahi-dev
06:31svenTTY> usb-dwc3@0x502280000: unhandled EP 00 event: XferComplete (0x01), buffer: 80 06 00 01 00 00 40 00 ......@.
07:28VinDuv has quit [Quit: Leaving.]
07:38marcanvery nice :D
07:39marcanbtw, we shouldn't need the tunables for this, right?
07:39marcanI'm thinking it's worth treating tunable application as a kboot thing, and keep m1n1 usage of dwc from doing that
07:40marcan(among other things, because I intend to boot darwin from m1n1, and I don't want to do anything unnecessary - same reason we don't bring up SMP by default until needed)
07:40marcanso like m1n1 can be logically divided into two stages, what it does for itself (which is along the lines of how iBoot would work), and what it does to boot a devicetree-land OS (which in this case involves all that kboot stuff, and also tunables)
07:42marcanI kind of want to make this dwc thing work for the hypervisor, because that will provide much better bandwidth for mmiotrace. though I'm also considering doing it a different way, where I keep a ring buffer in RAM and fetch it from darwin itself.
07:42marcanneed to run some experiments...
07:43marcanbut 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
07:43marcanjust... throwing ideas out there
07:45marcanone 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
07:46marcanso a mmiotrace streaming (without blocking other than on usb buffers) over dwc would be a very nice setup
07:50svenmarcan: yeah, no tunables required. it works just fine without
07:50sventhe only thing it needs it the phy bringup
07:53sveni bring up the clocks,dart,etc. of course but i can either shut these done again or just leave them as-is like iboot does
07:53marcannah, let's leave things up. this might become a linux earlycon.
07:54marcanthough if I get my way with the hypervisor, *that* might also just be a linux earlycon by default (I can implement ARM semihosting probably...)
07:55sventhat reminds me.. i need to clean up this linux dart thingy i wrote. that+phy bringup in m1n1 is enough to make linux' usb serial gadget working
07:55marcanyeah, I'll be looking into that side next, once this progress report is done and I wrap up the v3 patch feedback
07:56marcanif we're quick we might be able to get in clock/power into the same merge window
07:56marcanand dart even
07:57svenoh, i have something very dumb and simple for clock/power as well.
07:57sveni'll have to do real work right now, but i can push the current WIP somewhere this evening
08:18vimal has quit [Ping timeout: 260 seconds]
08:34mxw39 has quit [Quit: Konversation terminated!]
08:35vimal has joined #asahi-dev
09:00josiahmendes[m] has quit [Quit: Idle for 30+ days]
09:00mofux[m] has quit [Quit: Idle for 30+ days]
09:02mofux[m] has joined #asahi-dev
09:21zkrx has quit [Ping timeout: 245 seconds]
09:49zkrx has joined #asahi-dev
10:53vimal has quit [Quit: Leaving]
11:52jaalsa has quit [Quit: jaalsa]
11:52jaalsa has joined #asahi-dev
13:57odmir has joined #asahi-dev
13:57lethalbit has quit [Read error: Connection reset by peer]
13:59lethalbit has joined #asahi-dev
14:42vimal has joined #asahi-dev
15:44never_released has joined #asahi-dev
15:44never_released has quit [Changing host]
15:45Hetflik[m] has joined #asahi-dev
16:00ldhacker[m] has quit [Quit: Idle for 30+ days]
16:36zkrx has quit [Ping timeout: 245 seconds]
16:56modwizcode has quit [Ping timeout: 246 seconds]
17:00vimal has quit [Ping timeout: 246 seconds]
17:01zkrx has joined #asahi-dev
17:03modwizcode has joined #asahi-dev
17:13modwizcodemarcan: does making m1n1 boot darwin imply adding mach-o loading to m1n1? (I can never track down the early boot files in the xnu source dump so I don't quite remember how much it needs)
17:15modwizcodeMaybe you're just going to use your python script and flesh it out enough to load darwin?
17:19vimal has joined #asahi-dev
17:23kettenischainloading macho files already works
17:23modwizcodeit does not if you do not load m1n1 correctly
17:24modwizcodeWhat I meant is that concatenated m1n1 + kernel does not work without loading it correctly
17:25modwizcodeI care about that because faking a concatenated image by dynamically loading the -kernel and -initrd qemu parameters after m1n1 allows hassle free boot straight into the kernel
17:26svenpeterIirc m1n1’s macho chain loading is somewhat limited to only chain loading another m1n1
17:27modwizcodeYeah it's very minimal, and all the logic is currently in the python script, if it was in C I would have just included it into qemu with appropriate licensing
17:35marcanmodwizcode: it needs to be extended
17:35marcanthe old dumb copy and jump thing is no more, now it does proper mach-o parsing
17:36marcanbut two things are needed to make it work with darwin
17:36marcanwell, three
17:36marcan1) it needs to support the mach-o stuff that darwin needs (there is some relocation stuff etc)
17:36marcan2) it needs to know how to move and re-create the bootargs structures and probably tweak some things in the ADT
17:37marcan3) 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
17:37marcanI 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
17:38marcanand yeah, a priori I'm just going to do this in the python for now
17:39kettenisit happily loads my preloader-m1 + u-boot image
17:39marcancute, never tried it
17:39marcanbut yeah, no reason for that not to work
17:39ketteniswhich is cool since it will help me transition away from preloader-m1
17:39modwizcodeyeah so I'm going to have to do something qemu side then to get what I want
17:40modwizcodewhat's the deal with #3 there? Where does the cpu0 reset vector point?
17:40marcanbut 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
17:40marcanbut I don't even know yet if we will *ever* care about that tbh
17:40marcanwe'll see
17:40marcanthe cpu0 RVBAR points to... the beginning of the page mach-o entrypoint is in.
17:40marcanseriously, that is how they implemented it.
17:40marcanit's a hideous hack.
17:41marcanand it is locked, so it's stuck there (all the other CPU ones are writable)
17:41modwizcodepossibly dumb question but is it set to the physical address or the virtual address?
17:41marcanphysical
17:41modwizcodehas to be physical right?
17:41marcaneverything is physical
17:42marcanthe whole virtual thing with mach-os is all a lie
17:42j`eymarcan: thats set by iboot right? cpu0 RVBAR
17:42marcanbut 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
17:42modwizcodethat's what I thought, but I figured that iBoot could temporarily init the MMU then shut it down...
17:42modwizcodeYou don't think full sleep is useful?
17:42marcanbecause we have retention sleep; it was definitely needed on older CPUs that couldn't powergate without starting there
17:42marcanbut newer ones can
17:43marcanI'm not convinced full system sleep is useful yet
17:43marcanfine-grained sleep might do all we care about
17:43marcanmodern SoCs are really good at that
17:43marcanso, until I hook up a power meter to these things and get numbers out, I won't care
17:43marcanI don't even know if macos uses full sleep
17:43kettenisif even Intel can pull that off...
17:43marcanI guess we'll find out if we chainload it with rvbar pointing to the wrong thing and it all still works
17:44marcanbut if we do need full sleep, that implies moving away from spin-tables to... something
17:44marcanwhich needs further talk about non-HVC non-SMC PSCI
17:44marcanso... not a priority right now
17:57VinDuv has joined #asahi-dev
18:05mxw39 has joined #asahi-dev
18:34marcansven: 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...
18:52aratuk has joined #asahi-dev
18:54aratuk has quit [Remote host closed the connection]
19:28KindTwo has joined #asahi-dev
19:31KindOne has quit [Ping timeout: 272 seconds]
19:31KindTwo is now known as KindOne
19:38svenmarcan: hah, nice!
19:38sventhat sounds useful :-)
19:45marcanI mean it's what macvdmtool does :)
19:45marcanbut tbh at this point I'm more interested in the CDC ACM version
19:49svenyeah, yeah, getting there :P
20:31choozy has joined #asahi-dev
20:41aratuk has joined #asahi-dev
20:45aratuk has quit [Ping timeout: 245 seconds]
22:00amw has joined #asahi-dev
22:03eta has quit [Ping timeout: 245 seconds]
22:07artemist has quit [Ping timeout: 240 seconds]
22:09VinDuv has quit [Quit: Leaving.]
22:12eta has joined #asahi-dev
23:48choozy has quit [Remote host closed the connection]
23:49richbridger has quit [Quit: Leaving]
23:50richbridger has joined #asahi-dev
…