#
✕ nick:marcan
#asahi-dev · 2023-01-16 15:58
marcanSMC doesn't know the difference
#asahi-dev · 2023-01-16 15:58
marcanif the HID events work while the thing is running there's no reason they'd stop working during s2idle
#asahi-dev · 2023-01-16 15:57
marcanremember this isn't real idle
#asahi-dev · 2023-01-16 15:57
marcanthese are standard SMC events
#asahi-dev · 2023-01-16 15:57
marcannot really
#asahi-dev · 2023-01-16 15:57
marcanno idea :p
#asahi-dev · 2023-01-16 15:57
marcanI think there is some general wakeup source control we could implement, not sure if there is a mechanism to outright pick specific HID events though
#asahi-dev · 2023-01-16 15:56
marcancorrect
#asahi-dev · 2023-01-16 15:55
marcanit just considers the power button and lid open as unconditional resume events
#asahi-dev · 2023-01-16 15:55
marcanpovik: it's hardcoded in the SMC driver :p
#asahi-dev · 2023-01-16 15:51
marcanyeah, pretty sure it's the idrom thing or whatever they call it
#asahi-dev · 2023-01-16 15:51
marcanso it'd be identifying the TB device connected, not the PCIe device behind it
#asahi-dev · 2023-01-16 15:50
marcandoesn't thunderbolt have its own enumeration at the thunderbolt level?
#asahi-dev · 2023-01-16 15:49
marcannice :D
#asahi-dev · 2023-01-16 15:45
marcannice :)
#asahi-dev · 2023-01-16 15:39
marcanchadmed: tested wake on lid open on j314 too, works fine
#asahi-dev · 2023-01-16 15:38
marcanthey probably don't actually enable it?
#asahi-dev · 2023-01-16 15:37
marcanIIRC it was designed in but unpopulated in the original m1 series, but it looks like they actually started populating it in m1pro/max unless the ADT lies
#asahi-dev · 2023-01-16 15:37
marcannah, I think it was a discrete part in the schematics
#asahi-dev · 2023-01-16 15:36
marcaninterestingly so does the m1 studio... which makes me wonder, but I wouldn't put it past apple to put an accelerometer in a desktop
#asahi-dev · 2023-01-16 15:35
marcanpovik: j314/j316/j493 have accel/gyro nodes under aop
#asahi-dev · 2023-01-16 15:32
marcanI've seen it in some ADTs I think
#asahi-dev · 2023-01-16 15:32
marcanpovik: I think it might be populated on at least some models
#asahi-dev · 2023-01-16 15:31
marcanthe installer can just build a uboot-subset initramfs and tack it on at install time, update-m1n1 can do the same at update time
#asahi-dev · 2023-01-16 15:31
marcanyeah
#asahi-dev · 2023-01-16 15:31
marcanand since m1n1 will uncompress the initramfs for us (if compressed) you don't need to care about that either
#asahi-dev · 2023-01-16 15:30
marcanat that point parsing it is just parsing some hex numbers and looking for the filename you want
#asahi-dev · 2023-01-16 15:30
marcanwe can skip hardlink support for u-boot (I can at least guarantee we either never omit file contents or duplicate them for u-boot archives if it ever becomes necessary)
#asahi-dev · 2023-01-16 15:28
marcankettenis: see driver-api/early-userspace/buffer-format.rst for a formal spec of the specific variant we care about
#asahi-dev · 2023-01-16 15:27
marcancpio is really dumb
#asahi-dev · 2023-01-16 15:27
marcanwould be nice if we taught u-boot how to minimally parse cpio (it's a very dumb format, and specifically only the version Linux understands) so we can just give it a subsetted vendorfw.cpio with just the components it needs (USB for now) and avoid a totally divergent mechanism
#asahi-dev · 2023-01-16 15:26
marcanIIRC it's just a /chosen property with the address/size
#asahi-dev · 2023-01-16 15:26
marcaninitramfs would be easiest because we already have that functionality in and it mirrors how it works for linux
#asahi-dev · 2023-01-16 15:25
marcancan u-boot do anything useful with an initramfs passed to it?
#asahi-dev · 2023-01-16 15:25
marcankettenis: right, can we pass it to u-boot directly? it wouldn't be hard to append it to the m1n1 image (e.g. as a ramdisk) as part of the install process / m1n1 update
#asahi-dev · 2023-01-16 15:25
marcanAIUI they play dead and time out a bunch of things, so best case it slows everything down, worst case it triggers badness
#asahi-dev · 2023-01-16 15:24
marcankettenis: saw that, was going to mention we should probably blacklist the asmedia controllers until we support the firmware loading, and we need to talk about how to pass the firmware to u-boot
#asahi-dev · 2023-01-16 15:22
marcanif it doesn't work on some machines I'd like to know :p
#asahi-dev · 2023-01-16 15:22
marcan(using the SMC event)
#asahi-dev · 2023-01-16 15:21
marcanwake on lid works perfectly fine
#asahi-dev · 2023-01-16 15:21
marcan< chadmed> not under linux no <- what yes it does
#asahi-dev · 2023-01-16 15:19
marcangoing into deep idle should power gate individual cores or the whole cluster if all cores are in that state, which will save all the leakage current
#asahi-dev · 2023-01-16 15:19
marcanthe major reason why we have power usage proportional to pstate is probably just leakage current that comes with the higher voltage, not the actual frequency
#asahi-dev · 2023-01-16 15:18
marcan(and everything remains powered)
#asahi-dev · 2023-01-16 15:18
marcanI think what happens is the cores shut down their clocks when you do that but not the cluster uncore
#asahi-dev · 2023-01-16 15:17
marcanwe aren't spinning lol
#asahi-dev · 2023-01-16 15:17
marcanchadmed: the cores don't "freewheel", they do go into idle, just not deep idle
#asahi-dev · 2023-01-16 15:16
marcanmaybe AOP is in charge during normal idle and the AP programs the beacons for full standalone mode on transition to actual shutdown?
#asahi-dev · 2023-01-16 15:16
marcanhowever I don't know what happens during normal idle, clearly not that
#asahi-dev · 2023-01-16 15:16
marcan< sven> like, the sane way to do this is to have the AP pre-program the find my beacons in the BT chip and then put the BT chip to sleep. <- this is exactly how it works or at least how it worked at some point, for iPhones when they *shut down*

plus ›