ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
yuyichao has quit [Ping timeout: 481 seconds]
bisko has joined #asahi-dev
al3xtjames6 has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
al3xtjames has quit [Ping timeout: 480 seconds]
al3xtjames6 is now known as al3xtjames
<marcan> alright, I should get some sleep...
turo has joined #asahi-dev
<winter> probably a good idea yeah
turo has quit []
turo_ has joined #asahi-dev
bisko has joined #asahi-dev
kameks has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
chadmed has joined #asahi-dev
kita99 has quit [Ping timeout: 480 seconds]
Kalissaac[m] has joined #asahi-dev
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #asahi-dev
doggkruse has joined #asahi-dev
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
doggkruse has quit [Read error: Connection reset by peer]
kov has quit [Quit: Coyote finally caught me]
phiologe has joined #asahi-dev
dirbaio has joined #asahi-dev
bisko has joined #asahi-dev
silverocean[m] has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
Denver has joined #asahi-dev
yuyichao has joined #asahi-dev
bisko has joined #asahi-dev
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Denver has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
doggkruse has joined #asahi-dev
doggkruse has quit []
doggkruse has joined #asahi-dev
bisko has joined #asahi-dev
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<Glanzmann> marcan: Here is the wiki page to install Debian, if you want to link it https://alx.sh/w/Debian
Denver has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Glanzmann has quit [Quit: leaving]
Denver has joined #asahi-dev
Glanzmann has joined #asahi-dev
<Glanzmann> marcan: With the new asahi kernel the 'rcu' hangs are gone. Well done.
Skirmisher has joined #asahi-dev
<Glanzmann> marcan: But I have no sound output anylonger on the air. Rebooted two times, no luck, knobs are on.
<chadmed> yeah the DT disables audio
<chadmed> because we dont want people exploding their machines
<Dcow[m]1> isn't jack should be still enabled?
<Glanzmann> chadmed: I'm talking about the jack, not the spakers.
<brentr123[m]> Glanzmann: Pro user over here
<brentr123[m]> Headphones ain’t working
<Glanzmann> brentr123[m]: Are you on the 2020 13" pro?
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Denver has joined #asahi-dev
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Denver has joined #asahi-dev
bisko has joined #asahi-dev
Denver has quit []
Denver has joined #asahi-dev
Denver has quit []
bisko has quit [Ping timeout: 480 seconds]
Denver has joined #asahi-dev
Denver has quit []
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-dev
Denver has joined #asahi-dev
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Denver has joined #asahi-dev
the_lanetly_052 has joined #asahi-dev
ntfls^ has joined #asahi-dev
ntfls^ has quit [Remote host closed the connection]
aratuk has joined #asahi-dev
aratuk has quit [Remote host closed the connection]
aratuk has joined #asahi-dev
merry has joined #asahi-dev
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Denver has joined #asahi-dev
bisko has joined #asahi-dev
aratuk has quit [Remote host closed the connection]
aratuk has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
aratuk has quit [Remote host closed the connection]
aratuk has joined #asahi-dev
aratuk has quit [Remote host closed the connection]
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
<spokv[m]> New to this project...wanted to help add camera support. Could this be helpful as starting point: https://github.com/patjak/facetimehd
bisko has joined #asahi-dev
__nick__ has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
kov has joined #asahi-dev
bisko has joined #asahi-dev
Denver has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bisko has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
<spokv[m]> any one?
<chadmed> no one can really answer for sure unless its tested
<j`ey> spokv[m]: the first thing is finding out how the camera is actually connected
<j`ey> I dont think it's PCIe for the m1?
<spokv[m]> just need any comment on the concept: extracting apple's firmware and using module driver
<spokv[m]> j`ey: i'll look to find out more
luca020400 has joined #asahi-dev
<Jamie[m]1> pretty sure it uses the integrated ISP in the M1 chip
<jannau> it might be helpful on the macbook air/pro 13" as those might still use the same sensor. the pcie driver will not be useful, the camera is very likely connected via csi directly to the SoC
luca020400 has quit [Quit: bye!]
luca020400 has joined #asahi-dev
<spokv[m]> is there any way to confirm this?
luca020400 has quit []
luca020400 has joined #asahi-dev
bisko has joined #asahi-dev
<spokv[m]> will it be the right approach to find the macos driver (hopefully it is not bundled with a lot of other things) and wrap it with kernel module?
<sven> no
<j`ey> you can use m1n1 to trace what macOS does
<sven> the right approach is to figure out what macOS does, then understand how the hardware works and then write a Linux driver
<jannau> no, we don't use any mac os binaries. the right approach is to understand how the hardware works and then write suppport for it
m6wiq has joined #asahi-dev
luca020400 has quit [Quit: bye!]
luca020400 has joined #asahi-dev
luca020400 has left #asahi-dev [#asahi-dev]
<spokv[m]> ok. understood. is it documented somewhere how to trace macos while triggering some HW?
<spokv[m]> so it reverse all the way, it seems....
bisko has quit [Ping timeout: 480 seconds]
__nick__ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit []
<spokv[m]> if there are simpler tasks that i can help just to get into things it will be great 😀
___nick___ has joined #asahi-dev
<marcan> j`ey: it's MIPI CSI and ISP handles all of that, pretty sure
<marcan> so the right approach is to trace ISP communications and see how that works
<marcan> probably not much of a beginner project though :-)
<marcan> the good thing is I bet that interface is very high level
<marcan> i.e. "give me a raw image/jpeg photo" style, not dealing with low level sensor details
<spokv[m]> I have knowledge on mipi CSI, just need the technical of tracing ISP common for the headstart
<spokv[m]> Com
<marcan> you probably won't have to deal with anything related to MIPI CSI itself
<marcan> I bet that's all abstracted out by ISP firmware
<marcan> see https://github.com/AsahiLinux/docs/wiki/SW:Hypervisor for the tracing, though that's a bit outdated
<marcan> the article isn't very clear but you don't need a development kernel
<j`ey> and 12.3 tracing is broken currently
<marcan> is it?
<j`ey> 21:01:51 < jannau> panic(cpu 1 caller 0xfffffe00137df064): phystokv: illegal PA: 0x10003654000; phys base 0x10015bf0000, size 0x7b701c000 @arm_vm_init.c:379
<j`ey> 21:02:47 < jannau> 0x10003654000 is inside the SEP firmware, 0x40000 below BootArgs
<Jamie[m]1> (and also confirmed by someone else in #asahi-re)
luca020400 has joined #asahi-dev
<sven> still early WIP, make sure to also merge https://github.com/AsahiLinux/m1n1/pull/170 into m1n1 if you want to try it
<sven> also please boot with tp_printk trace_event=appletypecphy:*
kameks has quit [Ping timeout: 480 seconds]
luca020400 has quit [Quit: bye!]
luca020400 has joined #asahi-dev
<spokv[m]> Do I need to use your pull/170 into m1n1 to be able to use it as hypervisor for ISP trace?
<Jamie[m]1> no, that’s for usb 3
BitcoinCandyWarrior has joined #asahi-dev
riker77 has quit [Quit: Quitting IRC - gone for good...]
PaterTemporalis has joined #asahi-dev
kameks has joined #asahi-dev
<marcan> j`ey: sounds like something about how SEPFW is mapped changed, I'll have to take a look
<marcan> ohh I get it, it's pointing to SEPFW inside the host, not guest, isn't it?
<marcan> looks like I'm doing something wrong there
<marcan> should be easy to fix
<marcan> and while I'm at it support .bin in the HV
<marcan> will take a look monday if nobody else does
roxfan2 has quit [Ping timeout: 480 seconds]
<spokv[m]> If there is a way to start looking at ISP traces I'll start working on it.
chadmed has quit [Remote host closed the connection]
<spokv[m]> Sorry for pushing, but I know that with the right guidance I can, for sure, contribute.
<marcan> just give me a few days to get my things together and fix the hypervisor please :)
<marcan> I'm a bit exhausted and have non-Asahi things coming up I really should be paying a bit of attention to
<marcan> I'll write up a proper dev guide after that
<spokv[m]> Great, I here for this great project. Take care.
m6wiq1 has joined #asahi-dev
m6wiq has quit [Ping timeout: 480 seconds]
riker77 has joined #asahi-dev
<jannau> 12.3 ADT gained /chosen/memory-map/preoslog which is ignored by hv.py
<marcan> re the 4TB U-Boot issue someone mentioned, is it possible u-boot is just broken on >2T drives? that's the 2**32 x 512-byte sector limit. these drives use 4K sectors though...
<j`ey> how do I properly get a u64 property with fdt_getprop, I think Im getting endian issues?
<marcan> uhh
<marcan> static int disk_read(__u32 block, __u32 nr_blocks, void *buf)
<jannau> j`ey: there's fdt64_to_cpu
<kettenis> marcan: that would not suprise me
<marcan> I don't like this
<marcan> I suspect the FAT32 driver in u-boot has a problem here
<j`ey> jannau: thanks
<marcan> though those are offsets within the partition
<marcan> so that should be OK
<kettenis> I'll fix it if someone sends me a mac with 4TB of storage ;)
roxfan has joined #asahi-dev
<jannau> preoslog seems to be iboot log. it has some interesting strings
<jannau> Hit enter or '1' to break into the iBootStage1 command prompt", "End of iBootStage1 serial output"
<marcan> neat
MajorBiscuit has joined #asahi-dev
MajorBiscuit has quit []
<kettenis> but that doesn't actually make it out on the serial port is it?
<marcan> nope
<marcan> also >iBootStage1
<marcan> I keep telling people it's that, not LLB :p
<jannau> at least not on the external facing one
<marcan> at least not on *that* external facing one
<marcan> quite likely it goes out via dockchannel which ought to be muxed into that magic debug usb thing...
<marcan> but no idea what that protocol looks like
m6wiq1 has quit []
<marcan> yeah, confirmed the 4T issue
<tpw_rules> marcan: from talking to the 4T guy it seemed the nvme disk detection completely failed. it didn't show up in the list of nvme devices and no partitions were found. i don't think it was just an issue reading the filesystem?
<marcan> m1n1 chainloads itself properly though, so obviously it's not a problem at the low level
<sven> alright, SART bindings: do we want the apple,sart2 and apple,sart3 generics there?
<marcan> sart3?
<marcan> ah right, this was 2/3?
MajorBiscuit has joined #asahi-dev
<sven> yeah
<sven> sart1 is even older
<marcan> yeah let's have them
<sven> 1 -> 2 -> 3 is always about adding more paddr space
<marcan> I get the feeling sart3 is going to stick around
<sven> yeah
<j`ey> marcan: can m1n1 as a hv modify the FDT that the m1n1 as a guest sees?
<marcan> no
<marcan> it's built into it
<j`ey> ah
<sven> actually, let me figure out how long sart2 was used
<j`ey> marcan: what about the adt?
<sven> oh, also, apple sometimes calls SART coastguard for some reason
<marcan> j`ey: adt yes
<marcan> I suspect the u-boot EFI code
<marcan> part_test_efi just checks the PMBR... why on earth?
<marcan> maybe there isn't even a PMBR on these huge drives? since MBR doesn't work on them at all
<marcan> why on earth would you check for EFI partitions by looking for... not EFI...
<jannau> macos 12.3 HV fixed
<sven> how much address space does the pro/max support again? 42bit?
<marcan> yeah
<sven> alright, SART1 was 36 bit address space and filter entry length 24 bit then. SART2 just increased the filter entry size to 36 bit. SART3 pushed both to 42 bit.
MajorBiscuit has quit [Quit: WeeChat 3.4]
Major_Biscuit has joined #asahi-dev
Major_Biscuit has quit []
Major_Biscuit has joined #asahi-dev
<sven> huh, looks like SARTv2 might actually be a A14 / M1 exclusive thing
<marcan> we can drop the generic for that then
<sven> so "t8103-sart" but "t6000-sart", "sart2"?
<marcan> yeah
<marcan> so nvme is indeed broken in uboot, interesting
<sven> *sart3 actually
<sven> meh, i guess it'll be yak shaved on the ML anyway ;)
<sven> kettenis: does openbsd or u-boot care about the sart compatible already?
<j`ey> oh, adt can only set existing properties it seems like
<marcan> huh, nvme doesn't even try to probe?
<marcan> j`ey: python can change anything
<kettenis> sven: no
<marcan> kettenis: is it possible I'm not seeing nvme init because it happens too early?
<marcan> I tried to enable the debug uart stuff but it didn't make a difference
<marcan> like I don't even see it trying to probe
<jannau> even after `nvme scan`? should be done by the default boot script though
<marcan> "nvme scan" fails on RTKit stuff
<marcan> but I don't see it being run automatically
<marcan> which makes me thing it just fails to reinit
<kettenis> marcan: u-boot initializes devices on-demand
<kettenis> so nvme shouldn't get initialized until the built-in boot scripts run
<jannau> repeated nvme scan works for me
<marcan> yeah but what if the first one fails?
<marcan> also wait, does it not do nvme init if it doesn't have the ESP partuuid set?
<jannau> on j314c with 2TB
<jannau> yes, nvme is skipped if no partuuid is set
<kettenis> I think jannau's script does indeed skip nvme completely if the partuuid isn't set
<spokv[m]> > macos 12.3 HV fixed
<spokv[m]> Can I pull it from m1n1 main repo and use it?
<jannau> spokv[m]: not yet, you need the change in https://github.com/AsahiLinux/m1n1/pull/172
<marcan> ok, yeah
<marcan> it just fails in RTKit then
<marcan> let's see
<kettenis> jannau: I was going to ask some questions about whether that is really what we want before merging that diff ;)
<marcan> I have a feeling I know what this is...
<marcan> lol it just times out
<marcan> 100ms is not enough for these big drives
<marcan> sigh
<marcan> that was dumb
<kettenis> heh
<kettenis> something to be said for getting developers the biggest and baddest configs ;)
<kettenis> assuming it is a small change, maybe it can still be sneaked into the official u-boot release
<sven> i assume we're all happy with "apple,tXXXX-nvme-ans2", "apple,nvme-ans2"?
<kettenis> I'd be terribly unhappy if you change that at this point
<marcan> yeah, fixed and deployed
<marcan> building new images
<marcan> kettenis: it's in the releng branch
<sven> alright, "apple,tXXXX-nvme-ans2", "apple,nvme-ans2" it is then
<marcan> I just changed the timeout to 1s...
<sven> the one thing i'm still unhappy about is this mystery lock required around command submission (but not for me!): https://github.com/AsahiLinux/linux/blob/asahi/drivers/nvme/host/apple.c#L329
<jannau> kettenis: I'm not quite sure about that either. the idea was to prefer usb "rescue" partitions if the matched ESP can't be used
<marcan> I think it does make sense to me, but I don't have a very strong opinion here
MZG[m] has joined #asahi-dev
<marcan> it might make sense to just *prefer* USB partitions but still alow a local last resort random ESP boot
<jannau> it allows that manually and prints the required command
<kettenis> for testing I would prefer if I can still just chainload u-boot
<kettenis> so I want to play with that a bit, but not this weekend
<kettenis> concerts tonight and tomorrow
rikkaa has joined #asahi-dev
<jannau> I have no strong opinion on what should happen when the matched partuuid boot fails
<marcan> uploading new images...
<sven> ~95% done with what i'll submit for nvme, https://github.com/AsahiLinux/linux/commits/nvme-rfc
<sven> j`ey: ^--
<ChaosPrincess> nitpick: https://github.com/AsahiLinux/linux/commit/2d0facf8880ca5923316307e5b65116ee257c739 line 16 in apple,sart.yaml lost an 's'
<sven> that's obviously just a spelling mistake for reviewer #2 to catch ;p
<sven> thanks, fixed!
<tpw_rules> is kernel patch reviewer #2 the same as academic paper reviewer #2?
<sven> probably. my joke was a reference to the academic ones i had to suffer through though! :)
m6wiq has joined #asahi-dev
<tpw_rules> marcan: have you been able to verify that the timeout increase fixes the issue?
<marcan> yes
<marcan> I was waiting for the install to finish on this machine before tweeting, it just did :)
<marcan> silly me skipped the M1 Max test because other folks tested on it (and it's ~identical to the Pro), but I didn't think of the SSD creeping up as a difference again
bisko has joined #asahi-dev
bisko has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
Nspace has quit []
Nspace has joined #asahi-dev
herbas has joined #asahi-dev
bisko has quit [Quit: Textual IRC Client: www.textualapp.com]
kameks has quit [Ping timeout: 480 seconds]
nyanpasu64 has joined #asahi-dev
herbas has quit [Remote host closed the connection]
wxllow[m] has joined #asahi-dev
wxllow[m] is now known as willow[m]
Denver has joined #asahi-dev
Denver has quit []
___nick___ has quit []
___nick___ has joined #asahi-dev
___nick___ has quit []
___nick___ has joined #asahi-dev
PaterTemporalis has quit [Ping timeout: 480 seconds]
mattebullet[m] has joined #asahi-dev
doggkruse has quit [Quit: Textual IRC Client: www.textualapp.com]
doggkruse has joined #asahi-dev
doggkruse has quit [Read error: Connection reset by peer]
the_lanetly_052 has quit [Ping timeout: 480 seconds]
doggkruse has joined #asahi-dev
Simonx22 has joined #asahi-dev
<winter> for the m1n1 PKGBUILD, where is the pacman hook that handles install?
<jannau> marcan: you just pushed the tag and not the branch
<jannau> not sure if update-grub is called automatically except from the first-boot script
<marcan> jannau: fixed ,thanks
FarukAydn[m] has joined #asahi-dev
<Glanzmann> marcan: Any idea what that is? https://pbot.rmdir.de/u/tzBA4iiashZaCHW--yJhXg
r0ni has joined #asahi-dev
kevans91 has joined #asahi-dev
rikkaa has quit [Quit: Connection closed for inactivity]
___nick___ has quit [Ping timeout: 480 seconds]
weems_ has quit [Quit: Connection closed for inactivity]
FilipJeretina[m] has joined #asahi-dev
msteffen has joined #asahi-dev
jeffmiw has joined #asahi-dev
nicolas17 has joined #asahi-dev
Major_Biscuit has quit [Ping timeout: 480 seconds]