marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
neunon has quit [Quit: ZNC 1.8.2 - https://znc.in]
neunon has joined #asahi
bsandro has joined #asahi
raster has joined #asahi
furkan has quit [Ping timeout: 258 seconds]
furkan has joined #asahi
inglor has joined #asahi
alvaro_fe has quit [Ping timeout: 272 seconds]
alvaro_fe has joined #asahi
raster has quit [Quit: Gettin' stinky!]
affieuk[m] has joined #asahi
bsandro has quit [Quit: leaving]
<davidrysk[m]> is GXF an Apple-specific ISA feature?
robinp has quit [Read error: Connection reset by peer]
robinp has joined #asahi
inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
inglor has joined #asahi
PhilippvK_ has quit [Ping timeout: 260 seconds]
phiologe has joined #asahi
Tokamak has joined #asahi
rafaelmartins has left #asahi ["https://rgm.io/"]
rafaelmartins has joined #asahi
marvin24 has quit [Ping timeout: 260 seconds]
marvin24 has joined #asahi
<modwizcode> Annnd I built a second kernel from the same sources and that one won't boot (or at least print out) anything at all... very strange.
<modwizcode> Apple breaks ARM spec it seems (if you trust the comment in qemu). Some of their extra registers use bits that are supposed to essentially form an access mask and it would require EL3 access but of course that's not the case.
<modwizcode> I have to patch out that access check so that it doesn't complain when I add the cp registers.
Tokamak_ has joined #asahi
Tokamak has quit [Ping timeout: 264 seconds]
Tokamak has joined #asahi
Tokamak_ has quit [Ping timeout: 246 seconds]
marvin24 has quit [Ping timeout: 240 seconds]
marvin24 has joined #asahi
x4m3 has quit [Ping timeout: 240 seconds]
Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VinDuv has joined #asahi
ephe_meral has joined #asahi
modmuss50 has quit [Ping timeout: 260 seconds]
brinly has quit [Ping timeout: 260 seconds]
modmuss50 has joined #asahi
brinly has joined #asahi
robher has quit [Ping timeout: 260 seconds]
diddledan has quit [Ping timeout: 260 seconds]
narmstrong has quit [Ping timeout: 260 seconds]
robher has joined #asahi
narmstrong has joined #asahi
diddledan has joined #asahi
mndza has joined #asahi
VinDuv has quit [Quit: Leaving.]
ephe_meral has quit [Ping timeout: 240 seconds]
ephe_meral has joined #asahi
_whitelogger has joined #asahi
ephe_meral has quit [Ping timeout: 264 seconds]
<phiologe> modwizcode: I am about to try out your qemu patch soon but my crappy 7 years old MBP compiles soooooo slow.
furkan has quit [Ping timeout: 272 seconds]
chuskywalker has joined #asahi
irl25519 has joined #asahi
furkan has joined #asahi
acelogic has quit [Remote host closed the connection]
acelogic has joined #asahi
irl25519 has quit [Quit: irl25519]
dstzd has quit [Quit: ZNC - https://znc.in]
acelogic has quit [Ping timeout: 240 seconds]
a3541 has joined #asahi
ephe_meral has joined #asahi
<never_released> davidrysk[m]: Yes
<never_released> modwizcode: registers that require EL3 are accessible from EL2 when EL3 isn't implemented
<never_released> you do not have to implement EL3 or EL2 in the Arm ARM
<marcan> never_released: adhoc signed binaries now work in 1TR in the latest 11.2
<marcan> you were saying about apple locking 1TR down? :)
<marcan> Shiz: this is your cue to start poking more at Apple boot policy related APIs if you're up to it; if we can put together an end to end installer from 1TR this is definitely the way to go
<never_released> marcan: nice!
<never_released> this solves the problem
<never_released> marcan: remember, the BootPolicy APIs have entitlements required to access them
<never_released> check if you have those (you probably don't)
<marcan> good point, need to look into that
thestr4ng3r has joined #asahi
<never_released> marcan: RIP about the kernel libs
<never_released> > LDFLAGS_KERNEL_ONLY += -rdynamic -Wl,-force_load,$(KDKROOT)/System/Library/KernelSupport/lib$(CURRENT_MACHINE_CONFIG).os.$(CURRENT_KERNEL_CONFIG).a
<never_released> they moved them to the KDK
<never_released> enjoy the single release with them being APSL
amw has quit [Ping timeout: 264 seconds]
<marcan> well, beats nothing
<marcan> is this a new release?
<never_released> marcan: yep
<never_released> not visible in directory view
<never_released> was done in a sneaky way
<marcan> lol
<marcan> I mean, at least this makes *some* sense
<marcan> it's stupid, but at least shows *intent*
<marcan> also xnu-7195.60.75/doc/pac.md disappeared
<marcan> because of course documentation is bad :)
<j`ey> these releases are so weird, I wonder if they make sense internally
<marcan> looks like they also added __APRR_SUPPORTED__ to the censor filter
<marcan> all those blocks are gone now
<never_released> think that's temporary
<marcan> __APSTS_SUPPORTED__ too
<marcan> I get the feeling they're trying to censor out all the nonstandard CPU features
<marcan> it smells like ARM is involved somehow
<never_released> yup
<never_released> I can bet that it's because of Arm, not AAPL
<never_released> maybe the Raspberry Pi target is to ensure that it always works on conventional Arm too
<marcan> I wonder
<marcan> lol, I tried messing with the bputil codesignature, but it's built against arm64e which is apparently limited to apple-signed stuff, so that flat out breaks everything anyway (kernel refuses to load it)
furkan has quit [Ping timeout: 240 seconds]
<never_released> marcan: patch the ISA to arm64
<never_released> instead of arm64e
<never_released> arm64e = PAC on, you don't need PAC on here :P
<marcan> yeah
raster has joined #asahi
CDFH has quit [Quit: That's it, I quit]
CDFH has joined #asahi
<marcan> and yeah, bputil doesn't work without the entitlements
<marcan> so the next question is how much can we do by shelling out to existing Apple binaries
x56 has quit [Quit: Ծ-Ծ]
mndza has quit [Read error: Connection reset by peer]
<marcan> specifically, installation-related stuff
<marcan> once they properly support booting/importing external macOS installs from external HDDs we should be fine
mndza has joined #asahi
x56 has joined #asahi
<never_released> marcan: the question is how they organise that
<never_released> are the user accounts staged to SEP in that case on first boot
<never_released> or on blessing
ephe_meral has quit [Ping timeout: 264 seconds]
<marcan> never_released: should be on blessing, otherwise that sounds like potentially problematic (boot an external OS and let it adopt users itself? dodgy...)
<marcan> I'm going to do some tests with external storage
<marcan> but I think this doesn't work yet :)
a3541 has quit [Ping timeout: 240 seconds]
<never_released> marcan: boot from external storage works already, but does it work when you bless an install from elsewhere today?
<never_released> (it should)
<marcan> that's what I mean, blessing an install from another machine
<marcan> which is what we care about
<never_released> I don't see why it wouldn't work
furkan has joined #asahi
ephe_meral has joined #asahi
irl25519 has joined #asahi
irl25519 has quit [Remote host closed the connection]
<Shiz> marcan: sure
<marcan> Shiz: given the entitlements stuff it's not clear we can use it anyway, but I want to know how it works :)
BaughnLogBot has quit [Ping timeout: 260 seconds]
BaughnLogBot has joined #asahi
Namidairo has quit [Ping timeout: 240 seconds]
<davidrysk[m]> just so you all know, Apple has been known to yank improperly redacted source releases in the past
<Shiz> get it while it's hot etc
ephe_meral has quit [Ping timeout: 265 seconds]
acelogic has joined #asahi
<davidrysk[m]> I'm concerned that we will run into the following issues: (1) Apple's performance relies heavily on these "Apple-isms"; (2) Overall security relies heavily on these "Apple-isms", e.g. without using them we are open to Spectre-like attacks
<marcan> I doubt it
<marcan> e.g. it seems they have *specific* Spectre mitigations but Linux already has generic ones
<modwizcode> speaKing of spectre like attacks, ARM has some interesting barriers to just block speculation in the ISA. They seem real difficult to use correctly though
<marcan> re (1), for userspace software there is no magic, plain ARM compute is plain ARM compute
<davidrysk[m]> I'm thinking in the direction of how expensive context switches might be
<marcan> I doubt there's some kind of massive gain to be had there by using special sauce
<marcan> I mean I'm sure they have "little things"
<marcan> e.g. optimizations for objc use cases
<marcan> but it's not going to make linux terrible if we don't use them
<marcan> the CPUs *are* good
<modwizcode> It would be neat to figure out those features though.
<davidrysk[m]> btw they haven't yet released the kdk for xnu-7195.81.3
<davidrysk[m]> I'm surprised they posted the tarball at all (even with hidden url)
<marcan> modwizcode: certainly
<marcan> but some things we also just won't be able to use out of practicality
<marcan> e.g. anything that requires recompiling all userland
<davidrysk[m]> what kind of stuff would require recompiling all userland?
<segher> not using x86 anymore
<marcan> well, integrating custom instructions deeply, if we actually found something useful
<davidrysk[m]> AMX2 is the main one that would be useful, and even there, Apple only uses it in their optimized blas/lapack implementations
<jix> given that even apple's public toolchains don't support any of that AFAICT... I doubt there would be a need for that
<davidrysk[m]> memory compression... probably would be something added to a variant of the zram driver
<modwizcode> I find it interesting how many different varients of matrix and vector enhancements to instruction sets have been made
<segher> marcan: and "deeply" sounds lessmlikely than it is... if you simply have some new insn that compilers can use usefully, you already get close to 100% of programs using it
<davidrysk[m]> the only thing I can think of that comes close to recompiling userland would be PAC, but Linux has an implementation of the general/standard bits of PAC, and I am hoping (though not certain) that the Apple-specific stuff can be avoided or used entirely in kernel space
<jix> segher: the REed AMX docs (linked in #asahi-re) mention that moving data between AMX and the main processor is very slow. To me it seem that would make automated compiler use (or even using it at all in most general purpose code) quite difficult
<segher> i was answering the general question :-)
<diddledan> I'll be curious when we get that far whether the 2 screen limitation is enforced via macOS or if it is a physical limitation of the m1 chip
<segher> "what kind of stuff would require recompiling all userland?"
<segher> anything that uses any new instruction will not run on older hardware
<jix> segher: sure, I was just hoping you'd tell me that I'm totally wrong in something like that being difficult for a compiler to use and I'd learn something ;)
<marcan> diddledan: almost certainly a physical limitation
<segher> i suppose there *is* a way to trap and emulate those on any arm implementation, it is so very useful, but who knows
<marcan> number of display controllers is a hardwre thing
<diddledan> gotcha
<segher> jix: i don't really know what AMX is :-)
<diddledan> that is my only real downside of my MBA :-)
<j`ey> diddledan: I cant even get my 1 monitor to work D:
<diddledan> aw, dang
<jix> segher: neither do I, but I was thinking of a set of vector/matrix instructions that are encoded inline like normal instructions, but execute on a separate core with its own cache etc (that's the impression I get from the REed docs but I might be totally wrong)
<marcan> fwiw, apparently the internal devicename for the M1 is just H13G
<marcan> which means A14X
<marcan> i.e. lineage-wise "it's just a tablet cpu"
<modwizcode> two code names is the best code names
<marcan> which explains some of the limitations
<modwizcode> The M1 has a lot of aspects that seemed a bit rushed I think?
<marcan> I'm guessing what Apple did was decide to beef up their latest tablet silicon enough they could stuff it in Macs and look good
<marcan> but it's not really a well-rounded Mac chip yet
<marcan> hence the 16GB limitation, two thunderbolt ports, two displays, etc
<diddledan> I wonder if the future chips will fix some of the oddities that we've encountered so far, like nGnRE being a black hole
<j`ey> marcan: which makes the next one seem even more exciting
<marcan> yeah
<modwizcode> I saw something that made me wonder if the DTK was just basically a repurposed iPad CPU
<marcan> it was
<marcan> that is well known
<modwizcode> oh I didn't realize that was known
<marcan> "A12X" they called it...
<marcan> er A12Z
<marcan> A12X was the iPad chip
<krbtgt> for the low end macs it's fine
<marcan> both are H11G/Aruba internally
<krbtgt> it's a tablet CPU but a really good one
<davidrysk[m]> A12Z was the iPad chip for the early-2020 iPad
<davidrysk[m]> A12Z is A12X with the binned GPU core unlocked and I believe slightly higher clocks
<krbtgt> i'm curious what desktop (or even higher wattage mobile) oriented silicon will look like
<modwizcode> marcan: Any ideas why I might get a decrompession error trying to load the kernel? I wanted to ask what your config was because my first one booted and got page faults and a second one with only a different config won't boot at all
<marcan> ah right, both were iPad chips
<krbtgt> a12z is basically just binning
<marcan> modwizcode: corrupted data or some kind of allocation issue?
<modwizcode> I guess that's more of a -dev topic anyway
<modwizcode> All I can think of is that this config is less lightweight so it's probably using more memory
<modwizcode> but I changed my memory layout so it can't overlay anythin
<j`ey> modwizcode: what was the config changes between the two?
<segher> jix: ah, their convolution stuff
<segher> "for ai"
<modwizcode> j`ey: nothing meaningful sadly I did a diff
<modwizcode> I forgot to do defconfig on the first one before reconfiguring
<jix> segher: I think AMX is what they use for their BLAS implementation... not sure if it is the same as their "AI" stuff, but I guess if not it's probably similar in that respect
<modwizcode> It's different according to the people reversing it. That AI stuff is it's own accelerator
<marcan> yeah, the neural engine is another thing
<arnd> segher: https://gist.github.com/dougallj/7a75a3be1ec69ca550e7c36dc75e0d6f, TL;DR essentially a vector FMA unit to speed up 8x8 DGEMM or 16x16 SGEMM matrix operations
<arnd> I tried to get it working inside of a linux guest running in qemu/hvf, but the instruction to enable it gives invalid-opcode in a VM
<segher> jix: it is SP float only, so useless for almost all BLAS stuff
<jix> segher: doesn't look like it is SP float only
<segher> also brainfloat, and maybe some HP
<davidrysk[m]> then how are they using it in their blas and related libs?
zkrx has quit [Ping timeout: 246 seconds]
<segher> davidrysk: i do not know. i simply say that afaik the apple thing does not do DP float
<segher> maybe it does though... that would be quite surprising
<segher> (needs about six times as much hardware, and has double the latency)
<jix> segher: are we looking at the same thing? (what arnd linked)
<arnd> It looks like ANE (apple neural engine) is bfloat16 and float32, while AMX is int16/float32/float64
<arnd> ANE seems to be its own processor core with shared memory, while AMX is the instruction set extension for the CPU itself and operates on vector registers
<jix> but from that description it also seems that AMX does have a separate load/store path (with loading stuff into AMX that is in main core L1 cache being slower than when it isn't) which was the reason I brought it up in the first place regarding potential difficulties in compilers targeting those instructions
<arnd> jix: do you have any idea how many AMX units there are? I have this suspicion that it's less than one per core, possibly only one of them in total, which would explain why it's slow to copy through L1 cache, and why it needs an explicit enable/disable instruction
zkrx has joined #asahi
<jix> arnd: nope, the only thing I did re AMX is having a quick look at the doc you linked
<jix> but yeah I've been wondering the same thing
<jix> I think the enable/disable might be more to make context switches cheaper if the AMX state isn't used though
<arnd> ${coworker} who has used AMX in the past says they only run single-threaded applications
<arnd> the context switch is definitely part of it, saving >4KB of state is expensive
<jix> even if there are fewer AMX cores than cpu cores, I'd expect them to have enough registers to store state for all cores... it would seem really awkward to ensure that at most one core is actually running an AMX using thread
<arnd> right
x4m3 has joined #asahi
<segher> jix: no, i cannot keep up with the backscroll here... i didn't see arnd even! hi arnd!
Tokamak has joined #asahi
<segher> so ah, one TLA and another
irl25519 has joined #asahi
daniel[m]7 has joined #asahi
<segher> jix, arnd: so AMX is for training neural nets, and ANE is for running them, it seems
<arnd> yes, pretty much, though ${coworker} uses it for running neural nets, as they are dealing with relatively small matrices
<arnd> they got a 3x improvement just by changing from blis to Apple's blas replacement
irl25519 has quit [Quit: irl25519]
<arnd> with some hope of getting even more out of it using hand-written code specific to the application.
jsseidel2 has joined #asahi
jsseidel2 has left #asahi ["WeeChat 1.9.1"]
<segher> the very nasty thing about such accelerators (like MMA on Power) is that they implicitly change operation order, so they only can work with -ffast-math or similar
irl25519 has joined #asahi
<segher> the nasty thing is that many algos very much *depend* on operation order
<segher> so your choice often is "extra fast code, or correct code"
irl25519 has quit [Quit: irl25519]
irl25519 has joined #asahi
irl25519 has quit [Client Quit]
<davidrysk[m]> arnd: fwiw scipy yanked out support for apple's blas replacement a while ago due to apple bugs that they refused to fix at the time
<davidrysk[m]> Apple has since fixed said bugs
<davidrysk[m]> (or am I thinking of numpy, heh)
<arnd> the testing was done with a locally patched numpy
AnCaRioN has quit [Quit: The Lounge - https://thelounge.chat]
VinDuv has joined #asahi
AnCaRioN has joined #asahi
<davidrysk[m]> arnd: I was going to do testing and maybe propose they reintegrate the features, but numpy isn't passing my tests on macOS ARM
<davidrysk[m]> I can DM if you want
irl25519 has joined #asahi
irl25519 has quit [Quit: irl25519]
irl25519 has joined #asahi
Bastian[m] has quit [Ping timeout: 244 seconds]
ewlsh[m] has quit [Ping timeout: 244 seconds]
bakk[m] has quit [Ping timeout: 244 seconds]
ldhacker[m] has quit [Ping timeout: 244 seconds]
fridtjof[m] has quit [Ping timeout: 244 seconds]
Eighth_Doctor has quit [Ping timeout: 244 seconds]
Alice[m] has quit [Ping timeout: 244 seconds]
ponikrf[m] has quit [Ping timeout: 244 seconds]
wolf511[m] has quit [Ping timeout: 244 seconds]
ronyrus[m] has quit [Ping timeout: 244 seconds]
fried_dede[m] has quit [Ping timeout: 244 seconds]
d_u_f_f[m] has quit [Ping timeout: 244 seconds]
tr0[m] has quit [Ping timeout: 244 seconds]
jinen[m] has quit [Ping timeout: 244 seconds]
svenpeter has quit [Ping timeout: 244 seconds]
coinquest[m] has quit [Ping timeout: 244 seconds]
m1kr0[m] has quit [Ping timeout: 244 seconds]
Bublik has quit [Read error: Connection reset by peer]
Bublik has joined #asahi
ldhacker[m] has joined #asahi
coinquest[m] has joined #asahi
tr0[m] has joined #asahi
d_u_f_f[m] has joined #asahi
ponikrf[m] has joined #asahi
fried_dede[m] has joined #asahi
Alice[m] has joined #asahi
svenpeter has joined #asahi
ronyrus[m] has joined #asahi
jinen[m] has joined #asahi
wolf511[m] has joined #asahi
m1kr0[m] has joined #asahi
ewlsh[m] has joined #asahi
bakk[m] has joined #asahi
Bastian[m] has joined #asahi
fridtjof[m] has joined #asahi
Eighth_Doctor has joined #asahi
irl25519 has quit [Quit: irl25519]
<davidrysk[m]> marcan: 11.2 is released
<davidrysk[m]> same build as RC3
<davidrysk[m]> still no KDK
TheJollyRoger has quit [Remote host closed the connection]
TheJollyRoger has joined #asahi
gurmble has joined #asahi
grumble has quit [Ping timeout: 606 seconds]
gurmble is now known as grumble
mndza has quit [Ping timeout: 240 seconds]
irl25519 has joined #asahi
irl25519 has quit [Client Quit]
irl25519 has joined #asahi
irl25519 has quit [Client Quit]
the-mentor8 has joined #asahi
thresh has quit [Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world]
thresh has joined #asahi
the-mentor has quit [Ping timeout: 260 seconds]
the-mentor8 is now known as the-mentor
loruu has joined #asahi
zkrx has quit [Ping timeout: 264 seconds]
ewlsh[m] has quit [*.net *.split]
delroth[m] has quit [*.net *.split]
botoxparty[m] has quit [*.net *.split]
foxlet has quit [*.net *.split]
rootspring[m] has quit [*.net *.split]
reispflanze[m] has quit [*.net *.split]
dsads[m] has quit [*.net *.split]
ashton314[m] has quit [*.net *.split]
brentr123[m] has quit [*.net *.split]
lev[m]1 has quit [*.net *.split]
smist08[m] has quit [*.net *.split]
davidrysk[m] has quit [*.net *.split]
skillfulman23[m] has quit [*.net *.split]
dancer[m] has quit [*.net *.split]
noneucat has quit [*.net *.split]
bylaws has quit [*.net *.split]
loru has quit [*.net *.split]
Tokamak has quit [Ping timeout: 244 seconds]
Tokamak has joined #asahi
foxlet has joined #asahi
bylaws has joined #asahi
davidrysk[m] has joined #asahi
rootspring[m] has joined #asahi
ewlsh[m] has joined #asahi
noneucat has joined #asahi
dancer[m] has joined #asahi
lev[m]1 has joined #asahi
ashton314[m] has joined #asahi
zkrx has joined #asahi
dsads[m] has joined #asahi
delroth[m] has joined #asahi
brentr123[m] has joined #asahi
botoxparty[m] has joined #asahi
skillfulman23[m] has joined #asahi
smist08[m] has joined #asahi
reispflanze[m] has joined #asahi
amw has joined #asahi
djhworld has quit [Quit: The Lounge - https://thelounge.chat]
djhworld has joined #asahi
djhworld has quit [Client Quit]
djhworld has joined #asahi
bsandro has joined #asahi
the-mentor has quit [Ping timeout: 240 seconds]
the-mentor has joined #asahi
zkrx has quit [Ping timeout: 264 seconds]
raster has quit [Quit: Gettin' stinky!]
amw has quit [Ping timeout: 246 seconds]
VinDuv has quit [Quit: Leaving.]
zkrx has joined #asahi
amw has joined #asahi
chuskywalker has quit [Quit: Leaving]
<brentr123[m]> so kind of off topic but still related m1 macs, anyone know why some installed applications just straight up don't have their notifications detected? for example with this app(element) the notifications are missing from system preferences, and the in app settings are on for it
<roxfan> #asahi-offtopic
<roxfan> or whatever the channel is for macs
<roxfan> looks like there's ##mac and #macosx
irl25519 has joined #asahi
choozy has joined #asahi
irl25519 has quit [Quit: irl25519]