#
✕ nick:marcan
#asahi-dev · 2022-08-29 18:22
marcanyes
#asahi-dev · 2022-08-29 18:21
marcanso it's two text regions, one for the apple stuff, one for everyone else's
#asahi-dev · 2022-08-29 18:21
marcanand there is an "AuxKC" that contains all third-party kexts, which is also pre-provisioned and that must happen in recovery mode
#asahi-dev · 2022-08-29 18:21
marcanexactly
#asahi-dev · 2022-08-29 18:21
marcanDmitrySharshakov[m]: it doesn't
#asahi-dev · 2022-08-29 18:17
marcanthey certainly complement each other, but they do make sense in isolation
#asahi-dev · 2022-08-29 18:17
marcansecureboot protects against physical attacks, lockdown protects against runtime attacks
#asahi-dev · 2022-08-29 18:16
marcanthey are different threat models
#asahi-dev · 2022-08-29 18:16
marcanit isn't
#asahi-dev · 2022-08-29 18:14
marcanit doesn't make sense to lock only part of it. the whole thing only makes sense from the premise that *all* of the kernel is locked down and the CPU is locked down so it can *only* execute from that region.
#asahi-dev · 2022-08-29 18:02
marcansleeps
#asahi-dev · 2022-08-29 18:01
marcanyou need something like that to get all the text regions to be continuous in physmem
#asahi-dev · 2022-08-29 18:00
marcannicolas17: loading modules at all is unlikely to work, the way Apple does things, all the modules are pre-linked and all the text sections combined and made contiguous
#asahi-dev · 2022-08-29 17:59
marcanbut ew
#asahi-dev · 2022-08-29 17:59
marcanthankfully there is no 32M region that overlaps user RAM and the CTRR region, so this only affects special-purpose memory
#asahi-dev · 2022-08-29 17:59
marcanI guess they implement CTRR in the MMU/TLB, and since they can't get the proper granularity if you use 32M pages, it just... forbids them in/overlapping the region
#asahi-dev · 2022-08-29 17:58
marcanin recent firmwares you can't use huge pages for lowmem, it throws up an address size fault (!)
#asahi-dev · 2022-08-29 17:58
marcanmaz: so yes, we have another architecture break here, lovely.
#asahi-dev · 2022-08-29 17:57
marcanapparently that's why she'd been getting faults trying to read GPU firmware for crash dumps... Apple started setting CTRR for the firmware region, and m1n1 uses huge pages when it can
#asahi-dev · 2022-08-29 17:55
marcanso given that little factoid, I'd consider it too broken to use in Linux
#asahi-dev · 2022-08-29 17:55
marcanalso, Lina told me the other day she figured out it breaks huge pages covering the read-only region, which is ridiculous
#asahi-dev · 2022-08-29 17:55
marcanbecause it can't work with modules
#asahi-dev · 2022-08-29 17:55
marcanbut that will never work for typical linux
#asahi-dev · 2022-08-29 17:54
marcanthat happens in CPU registers
#asahi-dev · 2022-08-29 17:52
marcan(just don't make it into a panic...)
#asahi-dev · 2022-08-29 17:51
marcanwe should implement that in linux some time, to catch mistakes
#asahi-dev · 2022-08-29 17:51
marcanand then any weirdness gets a panic
#asahi-dev · 2022-08-29 17:51
marcanalso macos is even pickier because it enables AMCC IRQs
#asahi-dev · 2022-08-29 17:51
marcananything that triggers a fault in the wrong place
#asahi-dev · 2022-08-29 17:51
marcanthere's lots of stupid stuff like that
#asahi-dev · 2022-08-29 17:51
marcanI mean on t8112 the soc crashes if you *read* the wrong mmio range so...
#asahi-dev · 2022-08-29 17:50
marcanheh
#asahi-dev · 2022-08-29 17:50
marcanand that probably triggers the watchdog
#asahi-dev · 2022-08-29 17:50
marcanif you do that, cio crashes
#asahi-dev · 2022-08-29 17:50
marcanoh of course
#asahi-dev · 2022-08-29 17:48
marcanor tmu
#asahi-dev · 2022-08-29 17:47
marcanthat's probably cio?
#asahi-dev · 2022-08-29 17:47
marcanlol
#asahi-dev · 2022-08-29 17:47
marcanthat just sounds like dwc3 gets confused
#asahi-dev · 2022-08-29 17:46
marcanso probably pretty dumb and stand alone
#asahi-dev · 2022-08-29 17:46
marcanit's the same usb2 phy block as the debug block
#asahi-dev · 2022-08-29 17:46
marcanof course, but I mean there's no mux
#asahi-dev · 2022-08-29 17:45
marcanthe HS lanes are connected directly to dwc3, right?
#asahi-dev · 2022-08-29 17:45
marcanyeah, lol
#asahi-dev · 2022-08-29 17:44
marcanit's a combined PIPE PHY
#asahi-dev · 2022-08-29 17:44
marcanDisplayPort, TB, USB3 are not separate PHYs
#asahi-dev · 2022-08-29 17:44
marcanand it is not a mux, it is a PIPE multi-phy and a bunch of stuff around it
#asahi-dev · 2022-08-29 17:44
marcanATC is exclusively about the SS lanes
#asahi-dev · 2022-08-29 17:44
marcanthe debug stuff is muxed by the type C controller chip and never uses the SS lanes
#asahi-dev · 2022-08-29 17:43
marcanthe debug stuff is unrelated

plus ›