#
✕ nick:modwizcode
#asahi · 2021-02-07 16:29
modwizcodeIt doesn't have EL3
#asahi · 2021-02-07 16:28
modwizcodeBut I saw a patch to linux about emulating it or something weird. Didn't fully parse the code out to figure it out
#asahi · 2021-02-07 16:28
modwizcodebut the M1 doesn't have PSCI...
#asahi · 2021-02-07 16:28
modwizcodeThere was a mention of it on the mailing list
#asahi · 2021-02-07 16:27
modwizcodeyeah
#asahi · 2021-02-07 16:26
modwizcodeWhat was the deal with alternate SMP startup methods on linux?
#asahi · 2021-02-07 16:12
modwizcodeI've been meaning to look into how suspend-to-ram is implemented.
#asahi · 2021-02-07 15:49
modwizcodeWell that's probably ideal for my needs then
#asahi · 2021-02-07 15:48
modwizcode(if it was ever mapped in)
#asahi · 2021-02-07 15:48
modwizcodeLike is ROM mapped at 0 or is that kind of thing pulled out of the address space after startup
#asahi · 2021-02-07 15:48
modwizcodeDo we know anything besides what the dev tree tells us about memory map?
#asahi · 2021-02-07 15:46
modwizcodethat's simple of courase
#asahi · 2021-02-07 15:46
modwizcodeOhhhh
#asahi · 2021-02-07 15:46
modwizcodeOh it can check
#asahi · 2021-02-07 15:46
modwizcodeThat's kind of strange though, how would you handle that inconsitency with the heuristic? Wouldn't you have to assume it lost state in case it did?
#asahi · 2021-02-07 15:45
modwizcodeInteresting
#asahi · 2021-02-07 15:44
modwizcodeyes on clearing the bit or yes about the registers
#asahi · 2021-02-07 15:44
modwizcodeDoes retention WFI only keep PC/SP and no other registers?
#asahi · 2021-02-07 15:43
modwizcodedoes clearing the bits in the turn on register turn them off
#asahi · 2021-02-07 15:43
modwizcodeTurning off CPUs is what I was going to ask about
#asahi · 2021-02-07 15:41
modwizcodeI emulated a (slightly wrong) but functional copy of something doing that but I still had to hack up the code in M1N1 a bit, but I get SMP startup. Linux breaks though I think I need to connect all of the cores timer's to their FIQ inputs not just one of the cores.
#asahi · 2021-02-07 15:40
modwizcodeQuestion about SMP startup, from M1N1's code it seems that there's some sort of power management control interface and there's a register you can write to set the reset vectors for each core, and another two registers for poking the cores to start, and a third that maybe ungates the IRQs is that accurate?
#asahi · 2021-02-06 17:00
modwizcodeheh I like the idea of Nvidia having "nada" as their stock ticker :p
#asahi · 2021-02-06 16:55
modwizcodeAAPLM1CPUState :)
#asahi · 2021-02-06 16:53
modwizcodeAAPL is annoying because it is fairly unreadable if you try to use it in variable names. I made the cpu core defs use AAPL since I did those changes after the linux patches were posted but I think I'm going to change them back (all the identifiers I use use apple).
#asahi · 2021-02-06 15:51
modwizcodeMy mistake I thought it reported translation issues with a seperate MMU tag but I must be remembering something else
#asahi · 2021-02-06 15:51
modwizcodeOkay we're good then
#asahi · 2021-02-06 15:50
modwizcodePrefetch abort
#asahi · 2021-02-06 15:50
modwizcodeYeah hopefully they're nothing. ?I thought it reported MMU stuff different though
#asahi · 2021-02-06 15:49
modwizcodeI don't usually boot with IRQ spew on because it's an awful mess, especially if serial console comes up
#asahi · 2021-02-06 15:48
modwizcodelet me try to grab a copy
#asahi · 2021-02-06 15:48
modwizcodethere was something else though hang on
#asahi · 2021-02-06 15:48
modwizcodeHmm okay those might not be relevant then
#asahi · 2021-02-06 15:48
modwizcodemarcan: btw in qemu if I enable interrupt reporting sometimes I see data aborts from linux after boot, they stop once the thing is booted.
#asahi · 2021-02-06 15:35
modwizcodeor an older version
#asahi · 2021-02-06 15:35
modwizcodenote that for that code to work you need to use either a patched version of m1n1 which bypasses some SMP bits that I still haven't gotten around to implementing.
#asahi · 2021-02-06 15:34
modwizcodeAlso due to licensing concerns I haven't used the register names list from M1N1 but I probably should. I'm trying to put everything I'm doing under MIT even though generally QEMU is GPLv2+, but I think M1N1 is mostly MIT
#asahi · 2021-02-06 15:33
modwizcodeSome of which are quite outdated :p
#asahi · 2021-02-06 15:32
modwizcodeIt's pretty messy, I'm publishing stuff without pretty much any cleanup. I have a lot of verbose comments to remember my thoughts on various things for fixup
#asahi · 2021-02-06 15:32
modwizcodehttps://github.com/modwizcode/qemu/tree/add_M1_test
#asahi · 2021-02-06 15:32
modwizcodeIt's been public for awhile now
#asahi · 2021-02-06 15:32
modwizcodeThe real question is if this code gets called in a locked context or not which happily I can't easily figure out
#asahi · 2021-02-06 15:31
modwizcodeI still need to figure out a not terrible path for handling the per-cpu state. For now I use a terrible hack that's definitely only safe for a single processor and even then probably not safe
#asahi · 2021-02-06 15:30
modwizcodeI could have probably figured that out if I reread them I guess
#asahi · 2021-02-06 15:30
modwizcodeYeah I think it wasn't clear that reading the reason = is acked and not that "irq is acked at some point"
#asahi · 2021-02-06 15:30
modwizcodeThere's a lot of interactions that aren't obvious between the components.
#asahi · 2021-02-06 15:29
modwizcodeIn simplicity sometimes lies unexpected complexity :)
#asahi · 2021-02-06 15:29
modwizcodeIt might not have been clear
#asahi · 2021-02-06 15:29
modwizcodeUhh
#asahi · 2021-02-06 15:29
modwizcodeOkay I need to document that and implement that

plus ›