#
…

2022-06-03

01:33mrkajetanp has joined #asahi-re
01:39mrkajetanp_ has quit [Ping timeout: 480 seconds]
02:35yuyichao_ has joined #asahi-re
02:35yuyichao has quit [Read error: Connection reset by peer]
02:48phiologe has joined #asahi-re
02:52PhilippvK has quit [Ping timeout: 480 seconds]
04:31yuyichao_ has quit [Quit: Konversation terminated!]
04:32the_lanetly_052___ has joined #asahi-re
05:14bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:15chadmed has quit [Read error: Connection reset by peer]
06:15chadmed has joined #asahi-re
06:32bisko has joined #asahi-re
06:40bisko has quit [Read error: Connection reset by peer]
06:42bisko has joined #asahi-re
06:43bisko has quit []
06:58chadmed has quit [Remote host closed the connection]
07:00chadmed has joined #asahi-re
14:08ayedaemon[m] has joined #asahi-re
14:25the_lanetly_052___ has quit [Ping timeout: 480 seconds]
14:42the_lanetly_052___ has joined #asahi-re
16:00chadmed has quit [Ping timeout: 480 seconds]
16:01chadmed has joined #asahi-re
16:06nergzd723 has joined #asahi-re
16:14nergzd723Let me know if this is not a correct room for questions like that
16:32marcannergzd723: I forget how we figured out the offset, maybe that came from corellium? Either way nowadays we'd be using the hypervisor to find things like that, but I imagine that won't work on A7/A8 era devices.
16:33j`eynergzd723: you could maybe look back at some of the streams to see..
16:47nergzd723where can I find the streams?
16:50jannauhas to be stream from january 2021, fortunately there's a date in the title
16:51nergzd723thank you :)
16:52marcanI think it did come from corellium though
16:52nergzd723marcan: I think corellium has a different offset
16:53marcanthey might compute it differently but it has to hit the same register to work
16:53jannauit started off as absolute value 0x23b754000L
16:53marcanIIRC they had the cluster/core stuff wrong
16:54marcanand I initially didn't understand what the second bit set did (then I realized it had to do with enabling system-level stuff for the core, e.g. IRQs don't work without it)
16:55nergzd723They also appear to be doing something with Coresight register, is that not relevant to M1?
16:55marcancorellium do a lot of stuff that isn't relevant to anything or outright wrong
16:56marcanhence why I avoid trying to look at their code; it has caused several people much confusion
16:56AdryzzOLEDEdition[m]they just need it to boot, not to work well
16:56nergzd723teir drivers are usually a mess...
16:57AdryzzOLEDEdition[m] is now known as AdryzzOLEDEdition[m]1
16:57marcanAdryzzOLEDEdition[m]: they just need their hypervisor to convince iOS to boot, not to actually emulate the hardware as it actually functions
16:58nergzd723the sad thing about A7/A8 is that they have an older generation of NAND controller, newer devices use pcie for storage.
16:58marcanthat sounds painful...
16:58marcanno ANS taking care of that I guess?
16:58nergzd723what is ANS?
16:58marcanthe NAND controller
16:59nergzd723not sure about it
16:59marcanif you end up having to implement the FTL in software, I wish you luck...
17:00nergzd723well, it would be a long way to NAND for sure
17:00nergzd723Right now I'm trying to convince USB to work, but it won't work properly
17:00nergzd723did you get USB on M1?
17:01marcandon't those devices use dwc2?
17:01marcanM1 uses dwc3
17:01nergzd723yes, mine is using dwc2
17:01nergzd723interesting
17:01marcandifferent hardware then, you'll have to adapt the driver or write your own
17:01marcanI mean in m1n1
17:01marcanlinux has a dwc2 driver
17:03nergzd723well, the current state of affairs is that Linux driver probes, detects cable("new full/high-speed device..."), but on PCs side I also see "new full/high speed device..." but then "device doesn't accept address ..."
17:04marcanthat sounds like Linux is treating it as a *host* port, not a *device* port
17:04nergzd723The host controller on PC tries to power cycle it and do other things, but it doesn't succeed
17:04marcanyou need to put it in gadget mode
17:04nergzd723Yeah - I suspect as much
17:04marcanright now it sounds like you have two hosts trying to talk to each other and falsely detecting each other as a full/high speed device for whatever reason
17:04nergzd723I don't think it's supposed to announce new connections if it's acting as a peripheral
17:04marcanit isn't
17:04marcannot like that
17:05nergzd723but I only enabled DWC2_PERIPHERAL only, and some gadget configuration is applied, so I assume it must be in peripheral mode
17:05nergzd723needs more guesswork I guess
17:05nergzd723g_ether iirc
17:06marcanthere's also the lightning controller involved, Tristar or whatever, right?
17:06marcanon those devices
17:07marcanthough I think that should boot in device mode for DFU to work, if the AP doesn't tell it to do anything special
17:07nergzd723I'm very happy it ended up working in any case, spent too much time on figuring out the bootloader doesn't load kernel fully...
17:07marcandoes the AIC driver work without changes?
17:07nergzd723must be configured, Pongo (bootloader) also uses USB
17:08nergzd723marcan: some CPU registers don't exist on A8, so konradybcio and me hacked it a bit
17:08nergzd723uncore one and one of fiq ones I think
17:09marcansure, but the AIC side itself works fine?
17:09marcannot the FIQ side
17:10nergzd723SYS_IMP_APL_IPI_SR_EL1 and SYS_IMP_APL_UPMCR0_EL1
17:10nergzd723marcan: yep, works fine for USB controller
17:10nergzd723it uses AIC_IRQ
17:11nergzd723didn't get to test i2c/spi, I guess USB first
17:11marcanthe SYS_IMP_APL_IPI_SR_EL1 thing is a bug at this point, the static_branch_likely(&use_fast_ipi) should be moved outside that if so it doesn't even try to touch that register if Fast IPIs are not in use
17:11marcanthen it won't try to use them for <8103
17:12marcanthe uncore one, yeah, I guess that needs its own test/compatible check
17:12marcangood to hear AIC really did stay compatible
17:12marcanrobher was complaining about me introducing AIC2 right after AIC1 :p
17:12nergzd723also, there's no EL2 on A7/A8 :)
17:12marcanyeah, thought so
17:13nergzd723And the path with timer FIQ returned -ENOENT
17:13j`eynergzd723: so just EL3/1/0?
17:14nergzd723DARTs probe fine too by the way
17:14marcanthat's good news too
17:14nergzd723can't know if they work though...
17:14marcanUSB isn't using the DART?
17:15nergzd723there are also half reg DARTs, which is fun
17:15nergzd7230x2000 size in ADT instead of 0x4000 for most others
17:15nergzd723no, USB isn't
17:15nergzd723the apcie one is one of halved ones
17:15nergzd723so that must be fun
17:16nergzd723that's about it, I guess, thanks for your advises :)
17:19marcanI think the normal DARTs only have like 0x300 bytes worth of registers, so 0x2000 vs 0x4000 doesn't sounds like it necessarily means anything
17:20marcanmost things are 16K aligned due to the page size only
17:21nergzd723That's good to know :)
17:27bisko has joined #asahi-re
17:34bisko has quit [Read error: Connection reset by peer]
18:52js_veg has joined #asahi-re
19:47MajorBiscuit has joined #asahi-re
20:05MajorBiscuit has quit [Quit: WeeChat 3.5]
21:03nicolas17 has joined #asahi-re
21:22ariasystem[m] has joined #asahi-re
21:57amarioguy has joined #asahi-re
…