#
✕ nick:sven
#asahi-dev · 2021-03-06 10:41
sven*worst
#asahi-dev · 2021-03-06 10:41
svennot a big difference, so worse case that's just a quirk in dwc3 then
#asahi-dev · 2021-03-06 10:41
sven tunable-host 00 00 00 00 08 00 00 00 00 70 00 00 00 70 00 00 |.........p...p..|
#asahi-dev · 2021-03-06 10:41
sven tunable-device 00 00 00 00 08 00 00 00 00 70 00 00 00 00 00 00 |.........p......|
#asahi-dev · 2021-03-06 10:41
svenfor usb there are different ones for device vs. host mode though. let me see if there are more cases where the tunables depend on some decision the kernel would make
#asahi-dev · 2021-03-06 10:38
svenyeah, i think we should definitely apply any tunables we can before we jump to the bsd/linux/whatever kernel
#asahi-dev · 2021-03-06 10:32
svenokay. so that means we essentially need to do this in m1n1
#asahi-dev · 2021-03-06 10:27
svenhrm, i feel like we should take care of the tunables in either m1n1 or u-boot if possible
#asahi-dev · 2021-03-06 10:25
svenoh, duh, that makes sense :)
#asahi-dev · 2021-03-06 10:24
svenfor linux we could just extract the addresses of these clocks from apple's device tree and put them into the regular linux device tree
#asahi-dev · 2021-03-06 10:22
sveni guess calling pmgr_adt_clocks_enable with /arm-io/{apcie,apciec0,apciec1,dart-apcie0,dart-apcie1} or so should bring up those clocks i guess
#asahi-dev · 2021-03-06 10:18
svenwe could probably enable the pcie clock. haven't looked into tunables yet
#asahi-dev · 2021-03-06 10:12
svenwith one small weirdness that i haven't been able to figure out: clocks can be aliased to other clocks but sometimes such a chain leads to nowhere
#asahi-dev · 2021-03-06 10:12
svenhttps://github.com/AsahiLinux/m1n1/pull/34 adds support to enable clocks from device tree entires
#asahi-dev · 2021-03-04 13:54
svenwon't be the last yak ;)
#asahi-dev · 2021-03-04 13:53
svenI'll probably have some time this weekend to fix that fb console and maybe bring up usb gadget in m1n1
#asahi-dev · 2021-03-04 13:53
svensounds useful :-)
#asahi-dev · 2021-03-04 13:50
svennice.
#asahi-dev · 2021-03-04 13:49
svenit feels like some pages are deliberately trying to obfuscate what's going on
#asahi-dev · 2021-03-04 13:49
svenyeah :(
#asahi-dev · 2021-03-04 13:48
sventhat's a *much* better explanation that what I found in the arm manual
#asahi-dev · 2021-03-04 13:48
svenah, nice.
#asahi-dev · 2021-03-04 13:45
svenI'd really like to understand what all these different things do but didn't have any time yet
#asahi-dev · 2021-03-04 13:45
svenalright, why? :D
#asahi-dev · 2021-03-04 13:44
svenerm, are you sure? :D
#asahi-dev · 2021-02-23 12:21
svenand it turns out that there's some high speed flush going on when all domains/masters are selected. the busy bit never appears but the flush/invalidation clearly happens
#asahi-dev · 2021-02-23 12:20
svenbit 3 doesn't seem to matter afaict
#asahi-dev · 2021-02-23 12:20
svenpretty sure that setting bit 7 = write protect
#asahi-dev · 2021-02-23 12:20
svenokay, no, I'm just an idiot. turns out that commenting out the TLB flush command is not a great idea
#asahi-dev · 2021-02-22 07:50
svenhrm, weird. setting bit 7 reliably triggers write protect errors. not setting bit 3 sometimes triggers them together with an unknown bit in the error status register
#asahi-dev · 2021-02-22 07:18
svensomehow both bit 7 and bit 3 seem to be related to write protection
#asahi-dev · 2021-02-22 07:17
svenmaybe :/
#asahi-dev · 2021-02-22 07:17
svenand 0x8 actually is "allow writes"
#asahi-dev · 2021-02-21 13:03
svenwhile setting bit 7 in pages it expects to read works just fine
#asahi-dev · 2021-02-21 13:03
svenbut setting bit 7 in pages the usb drd expects to write to trigger an error
#asahi-dev · 2021-02-21 13:03
svenone of them has to be set, the other one seems to be completely ignored
#asahi-dev · 2021-02-21 13:02
svenbased on playing with the hardware those bits don't matter all too much :)
#asahi-dev · 2021-02-21 12:41
svenlooks like bit 7 in the dart ptes sets a page to read-only
#asahi-dev · 2021-02-20 22:22
svenI couldn't get the usb dart to enter bypass mode either (well, that or I messed my ugly hacks to the dwc3 code in linux up)
#asahi-dev · 2021-02-20 22:21
svennice :)
#asahi-dev · 2021-02-20 16:51
svenmodwizcode: yeah, dunno. I'm probably not going to spend any more time on that SMMU for now since it's only used for three devices
#asahi-dev · 2021-02-20 16:51
svenwould be useful to have that working on m1 Macs to see how Mac OS configured some MMIO ranges
#asahi-dev · 2021-02-20 16:50
svenah, nice
#asahi-dev · 2021-02-20 10:04
svenI'm just gonna use a vm I think :D
#asahi-dev · 2021-02-20 09:34
svendhewg: yeah, and after that another error appeared :-(
#asahi-dev · 2021-02-20 09:21
svenand yeah, that's the first error I got when trying this on Mac OS as well
#asahi-dev · 2021-02-20 09:20
svenI'm not talking about existing signed kexts, I'm wondering if anyone has already written something like this :-)
#asahi-dev · 2021-02-20 09:08
svensure, I'm just wondering if that already exists
#asahi-dev · 2021-02-20 08:49
svenand I assume there's no simple way to just cross-compile the Linux kernel on Mac OS without using a VM?
#asahi-dev · 2021-02-20 08:48
svenso.. is there a kext or something that would allow be to dump MMIO ranges from within Mac OS?

plus ›