#
✕ nick:chaos_princess
#asahi-dev · 2026-04-11 21:21
chaos_princessif you look at the pmp v2 driver, you will see how the "pmp-reporting-entry" drivers just delegate to "pmp-reporting". You should do something like that, but in your case you have just 2 drivers instead of 3 like for v2
#asahi-dev · 2026-04-11 21:19
chaos_princessin your case you want your driver for "entry" devices to call a function on your main driver, that will in turn send a rtkit message
#asahi-dev · 2026-04-11 21:18
chaos_princessmy "rust for init, c for actual communication" split works because the rtkit and sram parts of pmp are effectively independent
#asahi-dev · 2026-04-11 21:17
chaos_princessnot sure why you want to reinit in c
#asahi-dev · 2026-04-11 19:08
chaos_princessthe .data in struct of_device_id is just whatever model-specific data the driver wants to have. i store it in apple_pmp_report.offsets, and then use it to calculate the addresses to read/write, such as here https://github.com/AsahiLinux/linux/blob/asahi-wip/drivers/pmdomain/apple/pmp-report.c#L110
#asahi-dev · 2026-04-11 19:03
chaos_princessjust offsets into said shared memory area that the driver and PMP use. v2-exclusive stuff.
#asahi-dev · 2026-04-11 18:55
chaos_princessso, some nodes in the dt have "power-domains" that links to another device (pmp-report-entry in v2's case). if those are set, then before using the device, linux powers it on using the genpd callbacks https://github.com/AsahiLinux/linux/blob/asahi-wip/drivers/pmdomain/apple/pmp-report.c#L166
#asahi-dev · 2026-04-11 18:51
chaos_princessi don't. v2 no longer sends messages for that but instead has a bitmap in shared memory. https://github.com/AsahiLinux/linux/blob/asahi-wip/drivers/pmdomain/apple/pmp-report.c#L114
#asahi-dev · 2026-04-11 13:34
chaos_princessit is already sent to ml
#asahi-dev · 2026-04-11 11:01
chaos_princessno, i've had both kde connect and the scanning ui open while playing audio and had no noticeable issues
#asahi-dev · 2026-04-10 13:22
chaos_princessthe same way as v2 does with the reg/pio-ranges split
#asahi-dev · 2026-04-10 13:22
chaos_princessuse regions for things that you touch directly, and stuff the things that you only need to send over to firmware into a different property
#asahi-dev · 2026-04-10 13:21
chaos_princessno, don't do it like that
#asahi-dev · 2026-04-10 13:20
chaos_princessuse io_request_by_name https://github.com/AsahiLinux/linux/blob/asahi-wip/drivers/soc/apple/pmp.rs#L116
#asahi-dev · 2026-04-10 13:11
chaos_princesshttps://github.com/AsahiLinux/linux/blob/asahi-wip/drivers/soc/apple/pmp.rs#L196
#asahi-dev · 2026-04-10 13:10
chaos_princessthere isn't one (yet?)
#asahi-dev · 2026-04-09 17:45
chaos_princessand wasn't first the asc?
#asahi-dev · 2026-04-09 17:45
chaos_princessidk what the third is
#asahi-dev · 2026-04-09 17:41
chaos_princessv1 or v2?
#asahi-dev · 2026-04-09 15:45
chaos_princessbut you don't really have a choice, if you need to power something up while atomic
#asahi-dev · 2026-04-09 15:42
chaos_princesseasier to use from an atomic context
#asahi-dev · 2026-04-09 15:41
chaos_princess(there is logic to it)
#asahi-dev · 2026-04-09 15:40
chaos_princessrtkit is only used for initialization there
#asahi-dev · 2026-04-09 15:40
chaos_princessyes, that is the one, but for pmp v2 they use a shared sram area instead of talking over rtkit
#asahi-dev · 2026-04-09 15:39
chaos_princessfor v1 you don't need a pmp-reporting node, just hang the pmp-report-entry nodes off the pmp node
#asahi-dev · 2026-04-09 15:38
chaos_princessat least in t6000, pmp is controlled both via the pmp node and via reg 41 in pmgr node
#asahi-dev · 2026-04-09 15:38
chaos_princessv2-specific nonsense.
#asahi-dev · 2026-04-09 15:34
chaos_princesseven t600X specific, it is not there on t8112
#asahi-dev · 2026-04-09 15:34
chaos_princessand you shouldn't care about pio-ranges, that is v2 specific
#asahi-dev · 2026-04-09 15:32
chaos_princessyes
#asahi-dev · 2026-04-09 15:31
chaos_princessas that is two Mx Max glued together
#asahi-dev · 2026-04-09 15:31
chaos_princessfor t600x there is a complicated setup to avoid copy-paste for Mx Ultra
#asahi-dev · 2026-04-09 15:29
chaos_princessair is j313 iirc
#asahi-dev · 2026-04-09 15:29
chaos_princessthe "i" at the end means "include", it is pulled from other dts files
#asahi-dev · 2026-04-09 15:29
chaos_princesst8103.dtsi is for everything that uses the vanilla m1
#asahi-dev · 2026-04-09 15:27
chaos_princessfor t8103 darts it is "AIC_IRQ number-from-adt-here IRQ_TYPE_LEVEL_HIGH"
#asahi-dev · 2026-04-09 15:25
chaos_princessdart sends interrupts on violations and some other things. just copy the number from adt
#asahi-dev · 2026-04-09 15:24
chaos_princesswhich ones, for the asc mailbox?
#asahi-dev · 2026-04-09 15:23
chaos_princess(that took me an embarrassing amount of time to figure out)
#asahi-dev · 2026-04-09 15:23
chaos_princessyou probably also don't need to subtract one
#asahi-dev · 2026-04-09 15:20
chaos_princessas that uses the pmgr ids
#asahi-dev · 2026-04-09 15:20
chaos_princessbut those are inapplicable for v1
#asahi-dev · 2026-04-09 15:20
chaos_princesshttps://github.com/asahilinux/m1n1/blob/main/proxyclient/tools/pmp_assist.py#L33
#asahi-dev · 2026-04-09 12:21
chaos_princessyes
#asahi-dev · 2026-04-09 12:15
chaos_princesslook at how everything else in t8103.dtsi is done
#asahi-dev · 2026-04-09 12:15
chaos_princessno, those are put into dts files
#asahi-dev · 2026-04-09 11:21
chaos_princessyes. look at how gpu/aop/pmp v2 drivers use "device properties"
#asahi-dev · 2026-04-09 11:20
chaos_princessuse m1n1's kboot.c to copy data from adt to fdt
#asahi-dev · 2026-04-09 11:20
chaos_princessyou don't. neither from rust nor c.
#asahi-dev · 2026-04-09 11:18
chaos_princessin m1n1?

plus ›