#
…

2021-05-14

00:09hewwo362 has joined #asahi
00:21odmir has joined #asahi
00:26odmir has quit [Ping timeout: 268 seconds]
00:29hewwo362 has quit [Quit: Connection closed]
00:58odmir has joined #asahi
01:02odmir has quit [Ping timeout: 240 seconds]
01:30marcanartemist: (modulo when they go and break betas, but yes, for release versions :))
01:31marcan(don't use a macos beta as your iBoot/firmware bundle for a Linux install long-term)
01:46maknho_ has joined #asahi
01:48maknho has quit [Ping timeout: 246 seconds]
01:57KindOne has quit [Ping timeout: 260 seconds]
02:23m0drobert is now known as modrobert
02:41phiologe has quit [Ping timeout: 276 seconds]
02:41phiologe has joined #asahi
02:41artemist has quit [Ping timeout: 276 seconds]
02:52KindOne has joined #asahi
03:06jeffmiw has joined #asahi
03:11jeffmiw has quit [Ping timeout: 252 seconds]
03:17aquijoule_ has joined #asahi
03:20richbridger has quit [Ping timeout: 268 seconds]
03:30Bublik has joined #asahi
03:32Bublik_ has quit [Ping timeout: 260 seconds]
03:36marvin24 has quit [Ping timeout: 245 seconds]
03:36marvin24 has joined #asahi
04:28KindOne has quit [Ping timeout: 265 seconds]
04:53maknho_ has quit [Ping timeout: 252 seconds]
04:56maknho_ has joined #asahi
04:56adamcstephens9 has joined #asahi
04:58adamcstephens has quit [Ping timeout: 240 seconds]
04:58adamcstephens9 is now known as adamcstephens
05:00phiologe has quit [Ping timeout: 250 seconds]
05:04phiologe has joined #asahi
05:11VinDuv has joined #asahi
05:55pugguu[m]artemist: thanks
05:55pugguu[m]Guess its timma do a update
08:14raster has joined #asahi
08:32m42uko has quit [Ping timeout: 260 seconds]
08:37rkjnsn[m] has quit [Ping timeout: 245 seconds]
08:37Serentty has quit [Ping timeout: 245 seconds]
08:37PixelyIon[m] has quit [Ping timeout: 245 seconds]
08:37notafile has quit [Ping timeout: 245 seconds]
08:37pipcet[m] has quit [Ping timeout: 245 seconds]
08:37brentr123[m] has quit [Ping timeout: 245 seconds]
08:37ewlsh[m] has quit [Ping timeout: 245 seconds]
08:37dtantono[m] has quit [Ping timeout: 245 seconds]
08:37LucasTorrobaHenn has quit [Ping timeout: 245 seconds]
08:38noc0lour1 has quit [Ping timeout: 245 seconds]
08:38PthariensFlame[m has quit [Ping timeout: 245 seconds]
08:38Linkin1Park[m] has quit [Ping timeout: 245 seconds]
08:38ywest1280[m] has quit [Ping timeout: 245 seconds]
08:38rkjnsn[m] has joined #asahi
08:39Serentty has joined #asahi
08:39PixelyIon[m] has joined #asahi
08:40pipcet[m] has joined #asahi
08:40brentr123[m] has joined #asahi
08:40ewlsh[m] has joined #asahi
08:41ywest1280[m] has joined #asahi
08:43notafile has joined #asahi
08:45dtantono[m] has joined #asahi
08:45LucasTorrobaHenn has joined #asahi
08:48vimal has quit [Quit: Leaving]
08:48noc0lour1 has joined #asahi
08:48PthariensFlame[m has joined #asahi
08:49Linkin1Park[m] has joined #asahi
09:00ywest1280[m] has quit [Quit: Idle for 30+ days]
09:01raster has quit [Ping timeout: 240 seconds]
09:19raster has joined #asahi
10:05jeffmiw has joined #asahi
10:06raster has quit [Ping timeout: 252 seconds]
10:09jeffmiw has quit [Ping timeout: 246 seconds]
10:11maknho_ has quit [Ping timeout: 252 seconds]
10:13maknho_ has joined #asahi
11:03raster has joined #asahi
11:14svenmarcan: soo... how do we call the SPRR register that unlocks bits in SPRR_PERM_EL0 after it has been locked down but which can only be written from EL1? :D (SPRR_UNK2_EL1)
11:15raster has quit [Ping timeout: 252 seconds]
11:19pipcet[m]I got a very minimal mmiotracer working using the stolen-core approach. Probably not too interesting, the HV is much better, but if anyone needs an mmiotrace right this very second, it might help :-)
11:30TheJollyRoger has quit [Ping timeout: 240 seconds]
11:31mechpilotace has quit [Quit: WeeChat 2.8]
11:31TheJollyRoger has joined #asahi
11:33raster has joined #asahi
11:33svenalright, so apparently this DAPF block sometimes sits behind the DART (i.e. device -> DART -> DAPF -> memory) and it's just a very simple address filter
11:34svenit has 16 filters which each have a 0x40 byte long config space. first u32 seems to be configuration, second u32 seems to select the SID and then there are two u64s which are probably start and end pointers
11:34svenno idea why that exists since they can already do all that filtering inside the DART itself
11:35sveni still have to figure out the exact bits inside the config register though, maybe they are doing something special to the memory range
11:36mazsven: unless dart and DAPF can be controlled by separate entities (kernel vs hypervsor)
11:36mazsven: a poor-man stage-2.
11:38svenoh.. good point.
11:38TheJollyRoger has quit [Ping timeout: 240 seconds]
11:39pipcet[m]so it might prevent you from writing to the page tables when the dart is in pass-through mode?
11:41sveni'm starting to think that one of the pass-through bits i found in the DART space is actually "DAPF bypass mode"
11:41mazpipcet[m]: among other things. but it implicitly assumes that memory isn't badly fragmented (which isn't usually true)
11:42pipcet[m]maz: might be true for the kernel page tables.
11:42svenand maybe, just maybe, DAPF allows to set memory attributes
11:42svenconfig: 0x10300, sid: 01, from 022b45c000 to 022b45c003
11:42svenconfig: 0x10100, sid: 01, from 0800c80000 to 0800d23fff
11:42sventhat's from the ADT. first one should be RAM, second one should be MMIO
11:42pipcet[m]but if there's a bit to by-pass DAPF it might be something else entriely.
11:44pipcet[m](that's arm-io/dart-ne/mapper-ane/pio-range)
11:44pipcet[m] * (that's arm-io/dart-ane/mapper-ane/pio-range)
11:46sventhe end of the range looks strange though
11:46pipcet[m]it's just a one-word range?
11:48pipcet[m]from the ADT, there might be another one at 0x23b70c000 - 0x23b70c033, which seems even weirder?
11:49svenmaybe i can finally abuse the AES engine to look into the device address space now
11:49sventhere's a DAPF that's not inside the device tree just after the sio dart
11:49raster has quit [Ping timeout: 240 seconds]
11:55klaus has quit [Quit: leaving]
11:57klaus has joined #asahi
11:57raster has joined #asahi
12:07TheJollyRoger has joined #asahi
12:07Raqbit has quit [Ping timeout: 260 seconds]
12:11Raqbit has joined #asahi
12:11TheJollyRoger has quit [Ping timeout: 240 seconds]
12:21raster- has joined #asahi
12:22tarzeau_can mortals already boot asahilinux somehow (without extra hardware)?
12:22raster has quit [Ping timeout: 240 seconds]
12:23tarzeau_i get i can download https://github.com/AsahiLinux/m1n1 build it and start a linux arm64 kernel?
12:24tarzeau_ah need serial usb
12:25pipcet[m]just standard USB-C <-> USB-A works now
12:25tarzeau_but requires a second machine or terminal... and someting like screen /dev/ttyS0
12:26tarzeau_i'm fine waiting to have something on the local screen
12:27pipcet[m]you'll get a logo right away, but having the second machine to chain-load the kernel is really handy. But, again, no special cable required. I don't own one.
12:27tarzeau_the logo, and what about a local console?
12:27jannauusb cdc acm doesn't work for the kernel though. the framebuffer works, input requires usb support in the kernel
12:28tarzeau_ahhh i can use an usb-c to usb-a to another linux computer and that as terminal
12:28jannauor support for the laptop keyboards
12:28inglor has quit [Ping timeout: 252 seconds]
12:28inglor has joined #asahi
12:29pipcet[m]tarzeau: well, you can also chainload the corellium kernel if you just want to see whether it works on your machine, but that's not asahi linux.
12:29tarzeau_jannau: yes!
12:30jannauyes, but that doesn't work for the kernel yet. marcan is working on a minimal hypervisor which will provide a virtual uart to a second cdc acm interface
12:30tarzeau_pipcet[m]: guess i'll be waiting
12:31tarzeau_what i never understood is how people use linux in a vm like qemu, virtualbox or parallels. i couldn't get any to work
12:32j`eyon m1?
12:32j`eydid you build qemu with the required patches?
12:33tarzeau_openemu and dosbox work though
12:33marcansven: SPRR_PERM_MASK_EL1?
12:33jannauthe resulting system is not that useful as there is no storage or network support. i.e. you can boot a kernel and initramfs
12:33tarzeau_j`ey: nope i wasn't able to build qemu i think, and virtualbox isn't even available. parallels i got that special beta, but nothing with debian nor ubuntu
12:33tarzeau_jannau: ah, pointless
12:33j`eytarzeau_: well, uh, you building qemu with patches, just worked for me
12:34jannautarzeau_: patched qemu works fine for me since december
12:34tarzeau_j`ey: current maaster? and where to find the patches?
12:34marcanjannau: the hypervisor can do stupid serial emulation right now which should work for earlycon, I'll improve it to not be that stupid soon so it can serve as proper vserial
12:34marcanwas going to work on that and mmiotrace today, but emergencies took over my day...
12:34raster- has quit [Quit: Gettin' stinky!]
12:35jannaumarcan: I'm working on using a second cdc interface as vuart
12:35j`eymarcan: where is the serial emulation?
12:35raster has joined #asahi
12:35marcantarzeau_: https://mac.getutm.app/ works on macos
12:35svenmarcan: i suspect that there will be another one for the EL1 perms though
12:35marcanj`ey: there's a commented out #self.p.hv_map_vuart(0x2_35200000) in hv.py
12:35marcansven: accessible from.. EL2?
12:35sveni'd guess s
12:35j`eymarcan: thx
12:35tarzeau_marcan: thanks for the pointer. /me tries
12:36marcansven: and you mean not like the VHE stuff?
12:36marcanlike something that unlocks EL1 perms?
12:37marcansven: I would bet DAPF is for GXF
12:37marcanGXF needs to protect itself from DMA
12:38marcanthe kernel would be dealing with DARTs, no?
12:38marcanor does GXF also handle DART paging?
12:38sveni'm pretty sure PPL also handles DART paging
12:38marcanthen yeah, shittyhv?
12:39marcanwould require guests to have contiguous RAM though...
12:39marcanand no paging
12:39marcanseems kind of lame
12:39svenit's weird
12:39TheJollyRoger has joined #asahi
12:39sveni'm fighting against the AES engine to see if i can make it work there
12:41pipcet[m]sven: does dart handle read-only/read-write permissions? maybe it's for that?
12:42roxfan has quit [Remote host closed the connection]
12:42svendart handles that
12:47svenmarcan: (3,6,15,3,0) can unlock bits in PERM_EL0 and (3,6,15,3,1) can unlock bits in PERM_EL1
12:48svenboth writable until the lock bit is set in SPRR_CONFIG
12:49svenso... SPRR_EL0_PERM_MASK_EL1 and SPRR_EL1_PERM_MASK_EL1? :D
12:50marcanjust EL0_MASK I guess, too long otherwise?
12:50Eighth_Doctor is now known as Conan_Kudo
12:50marcanthough EL1 should be EL2 in EL2 mode because VHE
12:50Conan_Kudo is now known as Eighth_Doctor
12:50marcanwhich is just confusing as heck
12:50svenyes :/
12:51svenugh.. this is going to be seriously confusing
12:52marcanso how about SPRR_SELF_MASK_ and SPRR_LOWER_MASK_
12:52marcanor even just SPRR_UMASK_ and SPRR_PMASK_
12:52marcansince we already have UXN and PXN as de facto names for EL0 and "whoever is above"
12:53marcanthough Apple likes to use KERN for the key stuff
12:53marcanso KMASK works too
12:53svenoh dear, there's also a mask for el2 i think
12:53marcanyeah but that's just SPRR_KMASK_EL2 then
12:54sven(which is useless because VHE, but still)
12:54sven(erm. no. i'm just confused)
12:54marcanSPRR_KMASK_EL2 _EL1 _EL12 and SPRR_UMASK_EL1 (and _EL2 and _EL12 iff that one is split)
12:55svenyeah, that sounds the least confusing
12:56marcanbbl, dinner
12:59m42uko has joined #asahi
13:33vimal has joined #asahi
13:37VinDuv has quit [Quit: Leaving.]
13:40vimal has quit [Quit: Leaving]
13:41roxfan has joined #asahi
13:56VinDuv has joined #asahi
14:13robinp has joined #asahi
15:53luca020400 has quit [Ping timeout: 250 seconds]
15:54luca020400 has joined #asahi
15:57marcanpipcet[m]: if you want quick and dirty mmiotrace, all you need is
15:57marcan(on top of the thing I just pushed to support reg-reg offset mode for loads/stores)
15:58marcanthat gets it to a point... where it loads a floating point register from mmio (yes, really)
15:58marcanso I guess I'm goingt to have to add emulation for that
16:04Bublik has quit [Ping timeout: 252 seconds]
16:07artemist has joined #asahi
16:29svenpeterWhich device exposes a float in its MMIO region? :D
16:37j`eysvenpeter: the suspense is killing me!
16:44marcansven: not sure, pushing a dynamic ADT reg lookup thing into the yak shaving pile for tomorrow
16:44marcanfor now though I just bypassed those ranges, and also removed the PCIe nodes from the DT corresponding to the type C port the HV owns (xnu really didn't like dangling phandle refs)
16:45marcanand now we're back at pmgr kills me, except due to flushing issues I don't see the final mmio poke, so the next yak shave push is to add a flush function to the dwc code, but also while I'm at it I might as well look into doing the serial port properly... then emulate that properly...
16:45marcan(also fixed some bugs in hv_vm)
17:01roxfanreal float or just a vector reg?
17:08jeffmiw has joined #asahi
17:08marcannot sure, I only looked at the load :)
17:12snalty has quit [Quit: ZNC 1.8.2 - https://znc.in]
17:13jeffmiw has quit [Ping timeout: 268 seconds]
17:15snalty has joined #asahi
17:35pipcet[m]marcan: cool, I'll have a look tomorrow. For now, I've got some mmiotraces to look through :-)
17:41pipcet[m]svenpeter: the SMC puts floats in the MMIO region, but I wouldn't have thought those were actually loaded as floats.
17:44jannaumarcan: I started adding a second acm interface for the virtual uart. not working yet
18:40VinDuv has quit [Quit: Leaving.]
18:41VinDuv has joined #asahi
19:34TomJepp has quit [Ping timeout: 260 seconds]
20:06pugguu[m]When is next stream
20:07pugguu[m]Or better yet how long will it be so i know when to watch the replay so i can skim through it
20:07pugguu[m]As i useally do
20:11j`eypugguu[m]: i would guess in the next few days, there was meant to be one today, but life got in the way
20:42KindOne has joined #asahi
20:51pugguu[m]j`ey: okay thanks
20:51pugguu[m]Was just curious cus i had been waiting all day for it lmao
20:52pugguu[m]Wondering what was going on
21:24choozy has joined #asahi
21:32raster has quit [Quit: Gettin' stinky!]
21:38mixfix41 has quit [Ping timeout: 258 seconds]
21:43TomJepp has joined #asahi
21:57raster has joined #asahi
21:59VinDuv has quit [Quit: Leaving.]
22:06raster has quit [Quit: Gettin' stinky!]
22:43modrobert has quit [Read error: Connection reset by peer]
22:43m0drobert has joined #asahi
23:08taziden has quit [Ping timeout: 260 seconds]
23:09choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:11maknho_ has quit [Ping timeout: 252 seconds]
23:12taziden has joined #asahi
…