#
…

2021-02-09

00:04brandas has joined #asahi
00:07marcannever_released: probably because they have bugs that write to bad MMIO or stuff like that :p
00:08marcananyway, the L2C status registers neatly tell you where nGnRE is allowed and where not
00:08marcanjust replying to the mailing list about this, but the valid ranges are
00:08marcan0x400000000 - 0x4ffffffff
00:08marcan0x580000000 - 0x67fffffff
00:08marcan0x6a0000000 - 0x6ffffffff
00:08marcanwhich is as you'd expect (PCIe)
00:24kettenisinteresting, so 1G of mmio space for the TB4 PCIe controllers and 1.5G (512M + 1G) for the "normal" PCIe controller
00:51marcan4G for the TB4 ones
00:51marcanthe ranges are different - 512M + 1G for the "normal" PCIe controller, and 2G + 1G + 1G for the TB4 ones
00:52marcanwhich does kind of make sense given the usage
00:52marcanthe TB ones also have more features (piodma?)
00:54marcanpresumably one of those 1G windows is the IO space?
00:55kettenisah, yes, I probably should get some zzz
00:56kettenismanaged to get the xhci(4) on the pcie bus to do DMA in u-boot
00:57kettenisbut there is still something wrong as commands from the CPU to the controller time out
00:58marcanI'll allocate some time this week to bringing up the pcie stuff in m1n1, and try it out (and also dwc3).
00:58marcanremind me again, do you have a serial interface?
00:59marcandamn, the testing cycle must suck
00:59marcantyping out the 1TR commands by hand too? :)
00:59kettenisBluerise sent me one but it got stuck in a snowstorm
00:59marcanah, I see
00:59kettenisI use the curl trick
01:00marcanyeah, but you still need to type curl :)
01:00marcanI automated the whole reboot-enter 1TR-pull up termina-type command thing when I first brought this up, using a keyboard emulator and the reboot USB-PD command
01:01marcananyway, I'll send you a proper serial adapter too, once those are built, if you want
01:02kettenisheh, that'd be great
01:03kettenisme and a soldering iron don't get along very well
01:05marcancool, count on one :)
01:08kettenisbtw, if you have m1n1 bring up pcie, I can ditch pretty much all of the corellium code I'm now using ;)
01:09marcanyeah, that's the plan :)
01:09marcanmodulo pcie, have you tried chaining through m1n1, now that it supports payloads?
01:10marcanstill kind of blind though, I need to add an fbcon
01:11kettenisnot yet; planning on giving that a go once the serial adapter arrives
01:11marcanlet me know how it goes :)
01:11kettenisanyway, zzz time here
01:11marcangood night!
01:21Raqbit has quit [Quit: Ping timeout (120 seconds)]
01:22Raqbit has joined #asahi
01:50m42uko has quit [Ping timeout: 246 seconds]
02:01m42uko has joined #asahi
02:13bdju has quit [Ping timeout: 276 seconds]
02:14bdju has joined #asahi
03:00raster has quit [Quit: Gettin' stinky!]
03:21phiologe has quit [Ping timeout: 258 seconds]
03:21phiologe has joined #asahi
03:26r1fl has quit [Read error: Connection reset by peer]
03:26austriancoder has quit [Read error: Connection reset by peer]
03:26arnd has quit [Read error: Connection reset by peer]
03:27doof has quit [Read error: Connection reset by peer]
03:28r1fl has joined #asahi
03:28arnd has joined #asahi
03:29austriancoder has joined #asahi
03:31doof has joined #asahi
04:18user1tt[m] has joined #asahi
04:59robinp_ has joined #asahi
05:02marvin24 has quit [Ping timeout: 258 seconds]
05:02m1kr0[m] is now known as zvtu[m]
05:02marvin24 has joined #asahi
05:03robinp has quit [Ping timeout: 264 seconds]
05:07acelogic has quit [Ping timeout: 256 seconds]
05:10odmir_ has quit [Remote host closed the connection]
05:13odmir has joined #asahi
05:17odmir has quit [Ping timeout: 240 seconds]
05:27_whitelogger has joined #asahi
05:49jaXvi has quit [Ping timeout: 265 seconds]
05:55jaXvi has joined #asahi
06:11BaughnLogBot has quit [Ping timeout: 240 seconds]
06:12BaughnLogBot has joined #asahi
06:27acelogic has joined #asahi
06:27VinDuv has joined #asahi
07:05mndza has joined #asahi
07:07TheJollyRoger has quit [Remote host closed the connection]
07:08TheJollyRoger has joined #asahi
07:10TheJollyRoger has quit [Remote host closed the connection]
07:11TheJollyRoger has joined #asahi
07:15Necrosporus has joined #asahi
07:30VinDuv has quit [Quit: Leaving.]
07:41acelogic has quit [Ping timeout: 272 seconds]
07:57cdesai has quit [Remote host closed the connection]
07:58cdesai has joined #asahi
08:08klaus has joined #asahi
08:09bdju has quit [Quit: Reconnecting]
08:09bdju has joined #asahi
08:19amw has quit [Ping timeout: 256 seconds]
08:23Foxboron has quit [Ping timeout: 265 seconds]
08:23NecrosporusI'm wondering why marcan 's bootlogs look like failed initrd init (dropping to busybox). Did you reproduce the results of other team who put a full desktop in place yet?
08:37dottedmagBecause that's what's initrd he uses contains: a shell.
08:37cdesai has quit [Remote host closed the connection]
08:39cdesai has joined #asahi
08:45NecrosporusYeah, of course. I was wondering why there is no bootlog from a full-fledged distro
08:50l0bara has quit []
08:56vimal has quit [Remote host closed the connection]
09:00Icewind[m] has quit [Quit: Idle for 30+ days]
09:00alexx2[m] has quit [Quit: Idle for 30+ days]
09:00CamdenB[m] has quit [Quit: Idle for 30+ days]
09:00shawnj2[m] has quit [Quit: Idle for 30+ days]
09:00os[m] has quit [Quit: Idle for 30+ days]
09:00lev[m]1 has quit [Quit: Idle for 30+ days]
09:08Foxboron has joined #asahi
09:12GlanzmannNecrosporus: corelliumhq has a full fledged distro. https://corellium.com/blog/linux-m1
09:12GlanzmannNecrosporus: I reproduced building m1n1 and boot a kernel, but I miss the serial cable, so I could not use the bash. Also my initrd did not work.
09:13GlanzmannNecrosporus: corelliumhq has more drivers as of now but hopefully we get more drivers soon.
09:14NecrosporusGlanzmann, well, perhaps you can use another M1 machine for serial
09:22neunon has quit [Quit: ZNC 1.8.2 - https://znc.in]
09:23neunon has joined #asahi
09:39GlanzmannNecrosporus: still in the mail.
09:40j`eyNecrosporus: there's no bootlog from a distro, cos theres no distro!
09:40Glanzmannj`ey: But with the corelliumhq you can already have an almost usable desktop. Just sound, GPU and palm detection is missing.
09:41Necrosporusdid anybody post a serial bootlog of unmodified macOS on M1 yet (except changing nvram to enable verbose boot)?
09:41GlanzmannBut I tried the CPU is fast enough to render a 4K 60 FPS video in software.
09:42j`eyGlanzmann: right, just saying what marc-an did
09:46marcannever_released: my initramfs contains *only* busybox
09:46marcaner, Necrosporus
09:48marcanGlanzmann: corellium are porting drivers from their secret kernel that they've been developing for a year+ without publishing it
09:48marcanI'm trying to put together something upstreamable, which means going slowly
09:48marcantheir first demo just had what I have right now, plus USB, then they stuck a USB flash drive/keyboard/mouse/ethernet adaptor in there and presto, "fully usable distro"
09:50NecrosporusThough it doesn't look good when you need to plug external ethernet while having internal one
09:50marcanthey have pcie now, so I assume internal works now
09:51marcanif you actually look at what they've been working on though, it's all easy drivers :-)
09:51NecrosporusIs it generic eth on mac?
09:51marcanit's some broadcom chip
09:51marcanlinux should have a driver already
09:52NecrosporusThey could have tried to use their silicon for that too
09:52NecrosporusI'm wondering, is Apple cool enough to make a device using only their own chips/components?
09:52marcanthat's not really practical
09:53NecrosporusBut it has bragging point
09:53marcanbragging is not how companies are run
09:53NecrosporusDepending which companies.
09:53marcanokay, corellium might ;)
09:53marcanapple doesn't work like that though
09:53NecrosporusThough you are right, of course, but Apple is relying on bragging a lot too
09:54j`eyit would be a lot of effort, and what would be the benefit?
09:54marcanthey roll their own stuff when nobody else does it well
09:54NecrosporusLike "We have the fastest CPU in the world"
09:54NecrosporusBut it actually isn't
09:54marcanthat's just marketing, every company does that
09:54marcan"fastest phone"
09:54marcan"biggest phone"
09:55NecrosporusHm... duck tape a phone to a space rocket
09:55NecrosporusThat'll be fastest phone
09:55marcanjust hire elon musk
09:56NecrosporusHow does M1 in mini perform compared to whatever chip is in high end latest iphone/ipad?
09:56Bublik has quit [Ping timeout: 272 seconds]
09:58vimal has joined #asahi
09:58marcanthey use the same cores
09:58Bublik has joined #asahi
09:58NecrosporusAlso interesting question, is it possible to take iOS from iPhone and put it on M1, theoretically? I mean it will perhaps be illegal, and most likely hard, given the source isn't available
09:58marcanso presumably, pretty similar per core, per clock
09:59marcanyou do realize iOS apps already run on the M1 under macOS, right?
09:59marcaniOS is just macOS with different frameworks
09:59marcaniOS *already* runs on M1 for most intents and purposes, officially
09:59bkeroHow different is that from the A78 reference design?
09:59marcanbkero: ?
09:59NecrosporusBut should be easier than reverse, given M1 allows to run arbitrary kernel
10:00bkeroIt's all ARM license derivative, yes?
10:00marcanapple's cores are not ARM
10:00marcanthey have nothing to do with ARM cores
10:00bkeroSo they're not licensing the architecture from ARM?
10:00marcanthey're licensing the *architecture*. they are not licensing the *microarchitecture*.
10:00Necrosporusmarcan, maybe you want to run iOS as it is to test stuff, or like duck tape miniM1 to a sensor display and get a makeshift iPad
10:00marcanthat means it just runs the same instructions
10:01marcan(mostly, they broke the spec in several ways)
10:01bkeroThey're not licensing the ASIC layout? Are you sure?
10:01bkeroWell, the base ASIC layout that they then modify
10:01marcanit's custom
10:01marcanthey hired a whole silicon design team for this
10:01NecrosporusThey use ARM ISA but not ARM design
10:01bkeroThat's hard to believe, even with a whole silicon design team.
10:01marcanthat is a fact
10:02NecrosporusBut why they can't have their own ISA?
10:02bgb has joined #asahi
10:02marcanbecause that would not be compatible with ARM
10:02NecrosporusYeah, but... why is it important?
10:02NecrosporusiPhone didn't even have to run on ARM
10:02marcanbecause otherwise old apps won't run
10:02marcaniPhone started on ARM
10:02marcanApple didn't start doing their own silicon until later
10:03marcanthe original iPhone ran on a Samsung chip
10:03marcanan Exynos if you will
10:03NecrosporusWell, yeah, it's easier to use their existing design in new role then make a new one from scratch
10:03NecrosporusI still have a chromebook with Exynos
10:03JTLNecrosporus: On a related note. I wonder how differnt the iOS "runtime" on M1 is from the iOS userland running on iPhone
10:04marcanthey do license silicon IP from other companies - peripherals from DesignWare and such, and possibly also bits of things from ARM like AHB/AXI/etc, things tightly associated with the foundry like fuse cells, etc
10:04bkeroand TrustZone
10:04marcanno, they only use a tiny bit of TrustZone
10:04bkeroand Imagination
10:04marcanApple cores do not implement EL3
10:04marcanand they only license patents from Imagination
10:04marcannot designs
10:05marcanotherwise they wouldn't have tried to stop doing that and then had the lawyers fight over it
10:05marcanthat would never fly if they were still using Imagination silicon IP
10:05bkeroWeren't they using PowerVR for a long time?
10:05marcanso for all intents and purposes they license from Imagination as much as they license from ARM: patents
10:05marcanyes, but not any more
10:05marcanthe GPU is also custom now
10:05marcanthe ISA is completely different from Imagination from what I understand
10:06marcanImagination just has a pile of patents on stuff like TBDR and specific they want to keep to remain compatible, like some Imagination-specific formats
10:06marcanso they keep paying them for that
10:06bkeroThe layout between those architectures is fairly similar from what I understand. Accelerated tile-based blitting.
10:06marcanyes, hence, patents
10:06marcannot silicon IP
10:06marcantile-based deferred rendering
10:06NecrosporusRegarding ISA, does it make difference, whenever it's ARM, MIPS, RISC-V, SH4 or whatever? Or the CPUs are going to perform about the same, given they got equally qualified team of designers?
10:07marcanthe ISA matters, ask Intel and AMD why the M1 just beat them at performance per watt and is a wider execution pipeline than any x86 ever made
10:07bkeroAsk anybody who's ever re-compiled any ARM binary with NEON support
10:07marcan(hint: it's because x86 is exponentially difficult to decode in parallel)
10:07NecrosporusHow about non-x86 ISAs?
10:08marcannobody uses anything else
10:08marcanthere are very good reasons to stick to popular ISAs
10:08NecrosporusARM, MIPS, SPARC, RISC-V, SH4
10:08marcanand with the entire Android world running on ARM, it would be somewhat silly to switch to something else
10:08mazfrom ARM, they licence the architecture, not patents.
10:08marcanmaz: the reason they have to do that is the architecture is patented
10:08marcanthat's the form of IP protection architectures have
10:09NecrosporusBut suppose some really big corporation wanted to release the best possible CPU, disregarding compatibility concerns altogether.
10:09bkeroAlso why we need defensive patent pools around RISC-V. Ignoring the patent system doesn't work out well.
10:09mazmarcan: sure, just wanted to be precise.
10:09NecrosporusWould ARM be the best ISA out of existing ones?
10:09bkeroNecrosporus: Intel and ARM are both leaking rumors about using their chip layouts with an ARM ISA
10:10marcanARM is pretty good
10:10j`eybkero: *AMD?
10:10marcanI'm not sure if it's the best, but it's pretty good
10:10Necrosporusbetter than MIPS?
10:10bkeroSorry, AMD, yes
10:10marcanit's more modern than MIPS, so almost certainly yes
10:10marcan(arm64 I mean)
10:10bkeroBest in terms of performance, not openness.
10:10NecrosporusThere is MIPS64, isn't it?
10:10marcanyes, but it's much older
10:10arndarm64 is basically an improved version of mips64
10:11marcanthe PS2 was MIPS64
10:11NecrosporusHm... OK, what other 64-bit ISAs we have besides those three?
10:11arndit's much closer to that than to arm32 (unlike mips32 vs mips64, which are very similar)
10:11marcanthat's a game console released in 2000
10:11bkeroItanium
10:11bkeroVarious incarnations of PPC
10:12bkerocell if you consider that different than PPC
10:12arndriscv64 is in the same closely related family as mips64 and arm64, all based on the same lessons learned
10:12marcancell's PPEs are just xbox PPC cores with some stuff ripped out :)
10:12marcan(the microsoft-proprietary SIMD)
10:12marcanopinions on riscv... vary
10:13arndsparc, power, parisc, alpha and many others are in the wider risc family but not as close to the mips64/arm64/riscv64 set
10:13marcanas to whether it's really on the same level as arm of design or not
10:13marcanI get the feeling it's been rushed quite a bit
10:13bkeroIt has the potential to be
10:13bkerowithout ARM's 10% fee on your sale price
10:13bkeroGood enough for disk controllers
10:13marcanit's good enough for a lot of things
10:13marcanbut that's not the same as "as good as ARM"
10:14marcanit's unclear what the long-term results will be, we shall see
10:14marcanit'll certainly be great to steal a lot of ARM's thunder in the microcontroller/deep-embedded market
10:14marcanespecially since chinese companies will jump on it, so will everyone else who just wants a random side core (like nvidia did)
10:14arndfro the most part, I'd say risc-v is just lacking the software ecosystem that arm has, but that is a matter of time
10:15marcanbut could risc-v compete with, say, the M1 in that class? I wouldn't make that assumption. maybe yes, maybe no.
10:15bkeroI do fear that riscv isn't keeping up with standardizing the platform between vendors as well as Linaro did for ARM.
10:15bkeroBut maybe ARM platform requirements did all the hard work of implementing devicetree
10:16kettenisthe hard work was done for powerpc
10:16marcanarm32 predated devicetrees by a bunch, didn't it? that era was hell, with the board init code
10:17marcanopenfirmware is where all that started
10:17marcannot sure exactly around when arm32 started adopting dt in linux
10:17kettenisand sun before that
10:17bkerodevicetree was meant to heal that fragmentation
10:17arndmarcan: if apple were to change the base isa from arm to riscv, my guess would be that it wouldn't perform all that differently. better in some areas (mainly code density), worse in some areas, and not competitive for anything that doesn't have a ratified extension yet
10:17arndmarcan: we started using dt in linux-3.0
10:17marcanwoah, later than I thought
10:17bkerobetter for Apple's bottom line: no 10% fee to ARM
10:18arndmid-2011, after a few years of debate
10:18bkero(or whatever % they negotiated)
10:18marcanwait really?
10:18marcanwhen did I port linux to the starlet? that was DT already
10:18marcanoh, that was 2015. I guess it was that let when I got bored.
10:19never_releasedmarcan: yes, when device tree came to Linux
10:19never_releasedfor arm systems, Windows devices with UEFI + ACPI on Arm were shipping since ages
10:20arndpowerpc had been converted to dt-only a few years earlier, and when Linaro formed we assumed we could easily do the same thing on Arm. It turned out that going from three SoC vendors to 70 SoC vendors and from a simple networking SoC to a Cortex-A9 class mobile phone SoC made it somehwat harder
10:20bkerowith custom UEFI executables including ntldr
10:20bkerofor almost each platform
10:20marcanOpen Firmware existed since, what, 1994?
10:20never_releasedWindows RT was shipping in 2012, with support for TI, NVIDIA and Qualcomm SoCs
10:20never_releasedif it wasn't locked down out of the box...
10:20never_releasedI ended up releasing a Secure Boot bug for unlocking those in 2016
10:21never_releasedwhich was a bit too late :)
10:21bkeroProbably useful with a gimpy Surface RT
10:21bkero*for someone with a
10:21never_releasedbkero: what's annoying is that linux does *not* support ACPI for 32-bit arm
10:21arndDEC Shark with StrongARM110 shipped with Open Firmware in the 1990s, but is equally irrelevant as Windows RT
10:22bkeronever_released: Linux has a hard time supporting ACPI at all. Then again ACPI was meant to be portable but wasn't really implemented that way by vendors.
10:22never_releasedit's a nicer option than device tree though
10:22marcanACPI is a joke; one of my first Linux patches was a workaround for broken ACPI tables in my laptop at the time
10:22bkeroI've decompiled my ACPI program and seen how many times it checks for Windows strings for its functionality. It's...disappointing.
10:22marcannobody implements it properly
10:23kettenisthe acpi standard is hopelessly ambiguous
10:23never_releasedmarcan: and device tree isn't stable like it should be, so you can't really ship it in firmware
10:23marcanalso Linux broke the ACPI backlight method on the iMac I'm typing this on at some point... and I wouldn't be surprised if it's the firmware's fault
10:23marcanI should bisect that at some point
10:23never_releasedlike... fields still change the whole time
10:23marcansomewhere between 5.6 and 5.9 it broke
10:23never_releasedin an incompatible way
10:23diddledanI seem to recall reading that Linux often (always?) tells the ACPI code that it's actually Windows because the special cases for !Windows are never tested
10:23never_releasedI reboot w/ a new kernel to find broken Ethernet
10:23bkerodiddledan: can confirm
10:23diddledanby the vendors*
10:23never_releasedthen have to reflash a newer DTB
10:24never_releasedalmost reliably so
10:24bkeroexcept that my Thinkpad actually checks for Linux too...which is odd since no Linux distro actually does that.
10:24ketteniswe have our own aml interpreter in OpenBSD and I'm seeing issues all the time where AML makes assumptions that aren't justified by the language in the standard
10:24bkeroNo clue what that ACPI code does
10:24never_releasedbkero: on arm, think that everyone in Linux land just reports acpi_osi=Linux
10:24never_releasedon x86, yeah... Linux pretends to be windows
10:25arndnever_released: you can totally ship a dtb in firmware and we will make sure it stays as stable as ACPI. We do suffer from incompatible changes in DT, but I would definitely reject a patch that breaks a shipping system that used to work
10:25bkeronever_released: I don't know if I have any ARM boards that actually implement ACPI.
10:25arndbkero: you can't support arbitrary board with ACPI because there are no driver bindings
10:26never_releasedbkero: I have three such systems, but one of which ACPI support is provided as experimental
10:26never_releasedby the manufacturer
10:26bkeroarnd: some boards attempt to support it
10:26never_releasedSystemReady SR requires ACPI only
10:26arndthe way it works on PCs is that you end up device drivers that have a table looking up the machine name to find what the settings should be
10:26diddledancaveat: I am a noob with low level stuff.. with that said, I have never understood the reasoning for choosing acpi vs dt and vice versa
10:26arndwhich is arguably worse than what we had before DT
10:26never_releasedbkero: basically the rules for SystemReady ES are: you can ship just ACPI or DT, not both.
10:27never_releasedso if you want Windows to ever run
10:27never_releasednot a choice.
10:27bkeroI don't run non-free software so that's not been something I would care to deal with.
10:27arndand of course, on a PC, you only really have on platform to worry about
10:27never_releasedbkero: lots of people care
10:27never_releasedsame for VMWare ESXi
10:27never_releaseddon't have ACPI? it won't run
10:27bkeroor you fake out the ACPI calls
10:28never_releasedit's an unrealistic task
10:28never_releasedto convert between both
10:28bkeropretty sure Clover does just that
10:28never_releasedbkero: macOS on x86 just uses ACPI
10:28bkeropretty sure Clover does just fakes out ACPI calls
10:28never_releasedit patches some stuff
10:29never_releasedbut it's still ACPI.
10:29marcandiddledan: dt is a lot simpler and more general than ACPI. it's just telling you what hardware you have
10:29bkeroI never claimed it wasn't?
10:29marcanACPI is code
10:29never_releasedand the device names are utterly incompatible between both, you'd need a huge lookup table
10:29never_releasedamong other things
10:30bkeroor a text file that you hand the kernel on boot that describes the hardware
10:30never_releasedhmmm? you want yet another abstraction? bkero
10:30diddledanso DT is "just" a well-defined memory structure that lists everything and then it's up to the OS to talk to the devices without an intermediary (where ACPI might intercept stuff)?
10:30never_releasedwe already have both ACPI and DT, no need for a third
10:30bkerouhh, pretty sure that's how devicetree works
10:30never_releaseddiddledan: DT just describes yet
10:31diddledanthat does sound simpler :-)
10:31never_releasedwhereas ACPI can embed bytecode
10:31never_releasednotably to implement some platform-independent features or to workaround hardware quirks
10:32bkeroor more commonly to implement platform-dependent features
10:32bkerowhich Linux then has to quirks-patch around
10:33bkeroSee also: Linux advertising itself as Windows to APCI
10:33marcanACPI rarely "implements" anything; more commonly it's just a random pile of hacks and throw-at-the-wall copypasta that happen to work on windows because they were tested there
10:34bkeroIt does implement interfaces to lower-level hardware features unavailable to the general system. Like which sleep states to advertise and trigger.
10:34marcanI was (half) joking
10:34marcanbut even that stuff is often more broken than not
10:34* bkeroglares at his Thinkpad which originally didn't support S3 suspend-to-RAM because Microsoft convinced Lenovo that Connected Standby would be the future.
10:34marcane.g. I have a laptop where the SSD of all things stays warm in sleep mode
10:34never_releasedbkero: Connected Standby **is** the way ahead
10:34marcanpretty sure that's ACPI's fault
10:34never_releasedand is what every arm system does anyway
10:35bkeronever_released: that's debatable
10:35never_releasedS0ix does things that I'd expect from a computer
10:35never_releasedlike waking up when there's a phone call
10:35bkeromarcan: it's the same thing with the SD card reader on like 4 year's worth of thinkpads.
10:35never_releasedor a notification
10:36never_releasedgood luck having those with S3
10:36bkeroI don't think that's what most people would expect from a computer. Or in many cases even want.
10:36kettenistypical PC ACPI code just triggers an SMI and lets the firmware handle the request in SMM mode
10:37never_releasedlots of ppl expect that nowadays, imagine having the Skype app open for example, bkero
10:37never_releasedyour laptop has the screen closed
10:37never_releasedyou still want it to ring on a call
10:37never_releasedlike... any phone?
10:37marcanSMM is another problem with ACPI/x86
10:37marcanand one thing I'm very glad does not exist on M1
10:38bkeroMy laptop also isn't a phone
10:38marcanI actually have a chance at getting decent realtime latencies on these things
10:38never_releasedbkero: doesn't change that lots of ppl want those features
10:38bylaws<never_released "or a notification"> Android handles this by waking up every minute
10:38bkeronever_released: Once again that's just your opinion
10:38never_releasedand you can't have both S3 and S0ix enabled at the same time
10:38never_releasedso guess which one gets prioritised
10:39maor26 has joined #asahi
10:39bylawsAnd waking up every minute massacres all the benefits sleep has
10:40never_releasedmarcan: yeah, Apple removed EL3 on Apple A10 onwards, and didn't bring it back so far
10:40marcangood riddance too
10:40never_releasedthe problem is that PSCI and such are written against systems supporting EL3
10:40marcanit was always a terrible idea for security, and it hurts other things
10:40marcanyeah, that's ARM's fault for pushing TrustZone
10:40never_releasedyou can't be compliant with SystemReady _and_ not implement EL3 at the same time
10:41marcanthough I don't really care about EL3 as long as it literally only executes code when called, for PSCI and such
10:41marcanthe problem is when vendors throw other junk in there, like they do with SMM
10:41marcanI heard about some Intel system that had >1k SMIs per second to work around bugs in their xHCI controller
10:41marcanit's insane
10:41kettenisdunno, having an open source firmware in EL3 that abstracts some of the platform specifics makes sense to me
10:42marcanif it's open source it's fine
10:42never_releasedkettenis: "open-source"
10:42marcanthe problem is when it's part of the vendorblob
10:42JTL> 10:34 <@marcan> e.g. I have a laptop where the SSD of all things stays warm in sleep mode
10:42never_releasednot the case for 99.99%
10:42JTLOn older MacbookPros that use M.2 with a custom connector, there are reports that non Apple brand SSDs (used with chineseium adapter) cause sleep and reboot issues due to presumably power saving not working "properly"
10:42JTLbut I digress
10:42never_releasedand even if it's OSS you can't replace it in most cases
10:42never_releasedbecause of systems w/ DRM on
10:42marcanyou can't give vendors the power to unilaterally schedule their code or they will abuse it, every time
10:43never_released(w/ part of the DRM implementation being in EL3)
10:43marcanwell again that's just part of the ridiculousness of TrustZone
10:43marcanwhich is a fundamentally broken model anyway
10:43bkeromarcan: if you want nightmares check out the debugging on this beauty https://bugzilla.kernel.org/show_bug.cgi?id=109051
10:43marcanthere is no way to implement TrustZone securely in a sane system
10:43marcanthat's why Apple doesn't use it
10:43never_releasedmarcan: Apple has kernel patch protection Apple A7-A9, which is especially cute (uses TrustZone)
10:43never_releasedit either traps interrupts _or_ disables NEON
10:43bkerospeaking of broken security enclaves, lol
10:44never_releasedalways ensures that it runs from time to time
10:44never_releasedthen periodically does check if the kernel isn't tampered with
10:44marcanyes, that was cute
10:44marcanbut I'm talking about trying to treat TrustZone as a secure enclave
10:44marcanjust ask intel about SGX
10:45marcanthere is no way to securely do that unless you put half of your kernel in EL3
10:45marcanincluding all power/memory/bus/etc control
10:45marcanand then that will have bugs
10:45marcanand you're back to square 1
10:45never_releasedmarcan: what Intel ended up doing there... was disabling voltage control
10:45marcanmodern SoCs are hard to get right enough as it is, trying to share a CPU with secure code is double madness
10:46never_releasedyou can no longer undervolt
10:46never_releasedon Intel laptops
10:46marcanas far as I'm concerned there are two companies who know how to do SoC silicon security
10:46marcanApple, and Microsoft
10:46bkeroPretty sure those MSR registers are locked down by individual vendors
10:46marcaneveryone else doesn't have the slightest clue
10:46JTLmarcan: I can't wait for someone to misinterpret your EL3 comment and say "I'll put Linux in EL3 lol"
10:46never_releasedbkero: was locked down in the reference FW, with OEMs asked to disable it through an FW update
10:46marcanbkero: have you *seen* the TRM for a modern SoC?
10:46marcanthere are always a million knobs EL2/1 can turn to cause madness
10:47marcannobody ships systems with *all of that* abstracted out behind EL3
10:47never_releasedNVIDIA uses separate Falcon cores for security stuff
10:47JTLmarcan: about SoC silicon security, have any thoughts on the Titan chips in recent Pixels?
10:47bkeromarcan: Just what Intel provides publicly for some 8th gen core stuff
10:47marcannever_released: for *some* security stuff
10:47marcanand then they have bugs
10:47marcannvidia is on the That Key Recovery Exploit hall of fame
10:47marcanjust like nintendo, NXP, and almost every other silicon vendor
10:48JTLwell it's not on the same die as the SoC, so part of my question was a misnomer
10:48marcana separate chip is much better
10:48never_releasedJetson is fun because you have access to all of those
10:48marcanbut I don't know about the Titan implementation specifically
10:48JTLThank you
10:48never_releasedthey've secured the platform more and more with time
10:48never_releasedmarcan: separate chip outright is worse
10:48never_releasedas you can control the communication between the two
10:48marcanthat is trivial to secure with a key exchange
10:49never_releasednah, you can't trust the implementer on the SoC side to do that properly
10:49marcantrusting them to have some key fuses is *much* better than trusting them to implement a whole secure enclave properly
10:49never_releasedMicrosoft Pluton is provided as licensable IP for that reason
10:49marcanit is strictly better
10:49never_released(next gen TPM)
10:49marcanthis is why I said Microsoft know what they're doing
10:49marcanall that stuff came out of the xbox team
10:50bkeroI'm not sure I would trust Apple after that release showing how to undervolt to compromise the security enclave
10:50marcanthose guys know what they're doing because MS hired all the xbox 360 hackers
10:50marcanbut you still need to get power/voltage glitching right, and that is nontrivial on an SoC
10:50marcan*protection
10:50diddledanhow's that conversation go? "you broke into our console. now fix it, kthxbai" :-p
10:50marcancheckra1n is just a bootrom exploit
10:50bkeroIt's non-trivial if you have to desolder and get access to BGA pins, that's true
10:50never_releasedmarcan: and SEPROM :P
10:51never_releasedSEP is hacked by checkra1n nowadays
10:51marcanbkero: meanwhile on nvidias you just glitch the thing?
10:51marcanthat's how the TX1 bootrom was dumped
10:51JTLmarcan: From what I gather. Google made a big deal about "wanting" to open source the Titan M firmware in PR posts at Pixel 3 launch, and only crickets came from them for a while, then they annouced the OpenTitan project that *can* run what they consider a "secure HSM/TPM on an FPGA" for prototyping, but I don't know how much it has in common with the Titan M.
10:51* JTLsigh
10:51never_releasedyeah X1 wasn't that hardened
10:51bkeromarcan: so what's the difference?
10:52marcanthe difference is people spent like a decade looking at apple bootroms before finding that bug
10:52marcanwhile the nvidia bootrom thing was found independently by every team that looked at it in like 30 minutes
10:52never_releasedhas been floating around since a while
10:52never_releasedbefore release
10:52marcannever_released: X1 was an unchecked memcpy in the usb stack
10:52marcanit does not get any more stupid than that
10:53marcanthat's like literally the first thing you look for
10:53marcangrep for memcpy and stare at the USB stack
10:53marcancheckra1n was a much more subtle thing with confused state
10:53bkeroSpecifically this was checkm8, not checkra1n
10:54marcancheckra1n is the implementation of checkm8
10:54bkeroIt's just a use-after-free
10:54marcanyes, but getting there requires quite a subtle sequence of operations, it's not obvious
10:55marcanthose are much harder to find than memcpy(buf, usb_buf, wLength)
10:55never_releasedmarcan: meanwhile Apple A8 was even more crazy
10:55never_releasedit did *not* check in the SEPROM if the memory range was locked
10:55never_releasedso that early AP code exec = you own the SEP too
10:56never_releasedeveryone has their fair share of mistakes there
10:56marcanyeah but apple are trying to push things in the right direction
10:56marcannvidia... lol
10:56never_releasedyou just saw the X1
10:57marcanwe both know about all the custom mitigations in apple's cores
10:57never_releasedback in that era, their UEFI variable protection mechanism implemented in EL3 was a meme too
10:57never_releasedbut they rewrote that properly for Xavier onwards
10:57marcanI don't know about nvidia's newer stuff
10:58marcanbut apple has been on the right path much longer than them
10:58never_releasedApple also made their fair share of mistakes
10:58never_releasedyou don't get this right the first time
10:58marcanyes, like everyone else, but you can do better or worse at learning
10:58bkeroIt seems kind of funny to say Apple was on the right path considering they didn't implement secureboot for how long?
10:59marcane.g. Microsoft got it all hilariously wrong with the xbox original, then they learned *fast* with 360
10:59marcanand even better with the xbone
10:59bkeroand then their secureboot key got leaked
10:59never_releasedbkero: Secure Boot _policy_
11:00never_releasedand then MS didn't check in DBX that the policies were revoked or not
11:00never_releasedthe way that it was worked around afterwards was quite ingenious
11:00never_releasedbut didn't work everywhere/did actually brick some systems
11:00marcannote that I am *specifically* talking about MS's xbox division here, and the recent Pluton stuff
11:00never_releasedCurrentPolicy has to become an authenticated variable
11:00marcanI make no claims of MS's security in other fields
11:00never_releasedw/ a new variable for Secure Boot policies
11:00never_releasedXbox Scorpio onwards also switched away from custom to UEFI
11:01never_releasedfor boot firmware
11:01marcanthey don't start off in UEFI
11:01never_releasedmarcan: was switched to UEFI
11:01marcanI highly doubt they regressed to plain old vanilla UEFI boot
11:01marcanthey have custom security cores for a reason
11:01never_releasedit's a customised UEFI yes
11:01never_releasedbut still UEFI
11:02never_releasedon xbox one, was fully custom without UEFI in the boot chain at all
11:02bkeroWhat UEFI isn't customized?
11:02marcanit doesn't matter if there is UEFI in the boot chain
11:02marcanwhat matters is how the secureboot stuff is implemented, and what the attack surfaces are
11:02never_releasedit's an UEFI FW with an oddball XboxPkg inside
11:03never_releasedand a custom Secure Boot implementation of course instead of relying on UEFI SB
11:03marcanif the thing still boots off of a side core running not-UEFI security firmware then the UEFI bits are irrelevant here
11:04never_releasedmarcan: like BPMP? or AMD PSP? or?
11:04marcanlike BPMP except actually secure
11:05never_releasedBPMP is much better off nowadays, a security review happened in the meantime :P (but ofc, Tegra X1+ isn't exactly the most secure SoC ever)
11:05marcana security review happened, too late :)
11:05marcanand you don't change company culture around this this fast
11:06marcanapple has been hiring serious security people for a while now, and actually listens to them
11:06never_releasednot all of them I can guarantee you
11:06marcanmore than nvidia ;)
11:06never_releasedotherwise iBoot would have been decrypted since ages
11:06never_releasedbattle still ongoing, they're tone deaf on some things
11:06marcanobscurity does not imply lack of security
11:07never_releasedobscurity also doesn't help
11:07marcanbut I *guarantee* nobody competent audited the X1 ROM, because anyone competent would've found *that* thing
11:07never_releasedbecause so far
11:08marcanobscurity always helps
11:08never_releasedany iBoot release ever built for A7-A13 is decrypted
11:08marcanit's why X1 took months to break, instead of 30 minutes
11:08marcanyou certainly shouldn't rely on it, but it absolutely helps
11:10sirn has quit [Ping timeout: 240 seconds]
11:11sirn has joined #asahi
11:12alvaro_fe has quit [Ping timeout: 240 seconds]
11:12gabiruh has quit [Quit: ZNC 1.7.5 - https://znc.in]
11:13alvaro_fe has joined #asahi
11:17gabiruh has joined #asahi
11:22phiologe has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
11:24phiologe has joined #asahi
11:58raster has joined #asahi
12:09sirn has quit [Read error: Connection reset by peer]
12:10sirn has joined #asahi
12:36bgb has quit [Ping timeout: 240 seconds]
12:42ephe_meral has joined #asahi
12:42ephe_meral has quit [Client Quit]
12:43ephe_meral has joined #asahi
12:48bgb has joined #asahi
12:58r1fl has quit [Read error: Connection reset by peer]
12:59r1fl has joined #asahi
13:02bgb has quit [Ping timeout: 240 seconds]
13:04amw has joined #asahi
13:06raster has quit [Remote host closed the connection]
13:06thestr4ng3r has quit [Ping timeout: 264 seconds]
13:07raster has joined #asahi
13:09amw has quit [Ping timeout: 265 seconds]
13:12thestr4ng3r has joined #asahi
13:21bgb has joined #asahi
13:22Bublik has quit [Quit: Bublik]
13:24Bublik has joined #asahi
13:35Bublik has quit [Quit: Bublik]
13:37bgb has quit [Ping timeout: 240 seconds]
13:50bgb has joined #asahi
13:52davidrysk[m]How were the post-checkm8 iBoot releases decrypted? Private vulns?
13:54marshmallowdavidrysk[m]: blackbird?
13:54bgb has quit [Ping timeout: 240 seconds]
13:59MoxZ_ has joined #asahi
14:10choozy has joined #asahi
14:20bgb has joined #asahi
14:25bgb has quit [Ping timeout: 258 seconds]
14:38bgb has joined #asahi
14:43bgb has quit [Ping timeout: 265 seconds]
14:46bgb has joined #asahi
14:51bgb has quit [Ping timeout: 264 seconds]
15:02bgb has joined #asahi
15:03ephe_meral has quit [Ping timeout: 240 seconds]
15:07never_releaseddavidrysk[m]: yes
15:12ephe_meral has joined #asahi
15:21bgb has quit [Ping timeout: 264 seconds]
15:21ephe_meral has quit [Ping timeout: 256 seconds]
15:22ephe_meral has joined #asahi
15:29ephe_meral has quit [Quit: WeeChat 2.9]
15:30ephe_meral has joined #asahi
15:34bgb has joined #asahi
15:38bgb has quit [Ping timeout: 240 seconds]
15:43vimal has quit [Quit: Leaving]
15:47odmir has joined #asahi
15:50vimal has joined #asahi
15:52bgb has joined #asahi
15:57bgb has quit [Ping timeout: 265 seconds]
15:58choozy has quit [Ping timeout: 258 seconds]
16:09bgb has joined #asahi
16:15modwizcodemarcan: wait you ported linux to the starlet? why lmao, you didn't publish it anywhere I saw? (I dove way too far into the wii stuff and now it's just sitting around waiting for a blog post)
16:17modwizcodeSpeaking of firmwares, I think that I started liking risc-v a lot less when they decided to push a bunch of stuff to the SBI, which seemed kind of not great
16:28bgb has quit [Ping timeout: 256 seconds]
16:42bgb has joined #asahi
16:45radex|m[m] has joined #asahi
16:46bgb has quit [Ping timeout: 256 seconds]
16:48radex has joined #asahi
16:51ephe_meral has quit [Ping timeout: 240 seconds]
16:55choozy has joined #asahi
17:06klaus has quit [Quit: Textual IRC Client: www.textualapp.com]
17:14bgb has joined #asahi
17:19bgb has quit [Ping timeout: 264 seconds]
17:41VinDuv has joined #asahi
17:41marcanmodwizcode: I dunno, I was bored one evening, it's not like it was serious
17:41marcanI only wrote the irq and timer drivers
17:44bgb has joined #asahi
17:49bgb has quit [Ping timeout: 264 seconds]
18:01Tokamak has joined #asahi
18:14odmir has quit [Remote host closed the connection]
18:15bgb has joined #asahi
18:20bgb has quit [Ping timeout: 272 seconds]
18:20modwizcodeThat's not what i thought you meant
18:31bgb has joined #asahi
18:36bgb has quit [Ping timeout: 240 seconds]
18:47bgb has joined #asahi
18:52bgb has quit [Ping timeout: 240 seconds]
18:52ky0ko has joined #asahi
18:59jannau has quit [Quit: GNU screen buffer overflow reachable from irssi]
19:00jannau has joined #asahi
19:03mndza has quit [Ping timeout: 256 seconds]
19:04bgb has joined #asahi
19:08bgb has quit [Ping timeout: 246 seconds]
19:20bgb has joined #asahi
19:25bgb has quit [Ping timeout: 272 seconds]
19:37bgb has joined #asahi
19:41bgb has quit [Ping timeout: 265 seconds]
19:54bgb has joined #asahi
19:59bgb has quit [Ping timeout: 246 seconds]
20:11bgb has joined #asahi
20:16bgb has quit [Ping timeout: 264 seconds]
20:29ephe_meral has joined #asahi
20:29bgb has joined #asahi
20:34bgb has quit [Ping timeout: 258 seconds]
20:38ephe_meral has quit [Ping timeout: 272 seconds]
20:39yrlf has quit [Quit: Ping timeout (120 seconds)]
20:39yrlf has joined #asahi
20:39stemnic has quit [Quit: Ping timeout (120 seconds)]
20:39stemnic has joined #asahi
20:48bgb has joined #asahi
20:53bgb has quit [Ping timeout: 272 seconds]
21:06bgb has joined #asahi
21:10bgb has quit [Ping timeout: 240 seconds]
21:17TheJollyRoger has quit [Remote host closed the connection]
21:18TheJollyRoger has joined #asahi
21:21gabiruh has quit [Quit: ZNC 1.7.5 - https://znc.in]
21:21gabiruh has joined #asahi
21:24bgb has joined #asahi
21:28bgb has quit [Ping timeout: 246 seconds]
21:33VinDuv has quit [Quit: Leaving.]
21:33acelogic has joined #asahi
21:36gabiruh has quit [Quit: ZNC 1.7.5 - https://znc.in]
21:36gabiruh has joined #asahi
21:40bgb has joined #asahi
21:44bgb has quit [Ping timeout: 246 seconds]
21:53amw has joined #asahi
21:56bgb has joined #asahi
22:00bgb has quit [Ping timeout: 272 seconds]
22:03choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
22:06odmir has joined #asahi
22:07odmir has quit [Read error: Connection reset by peer]
22:07odmir has joined #asahi
22:09raster has quit [Quit: Gettin' stinky!]
22:13bgb has joined #asahi
22:17bgb has quit [Ping timeout: 240 seconds]
22:25rbenua has quit [Quit: leaving]
22:31bgb has joined #asahi
22:35bgb has quit [Ping timeout: 240 seconds]
22:47bgb has joined #asahi
22:52bgb has quit [Ping timeout: 264 seconds]
23:03bgb has joined #asahi
23:08bgb has quit [Ping timeout: 240 seconds]
23:12rbenua has joined #asahi
23:22bgb has joined #asahi
23:23raster has joined #asahi
23:26bgb has quit [Ping timeout: 240 seconds]
23:34maor26 has quit [Ping timeout: 256 seconds]
23:39bgb has joined #asahi
23:43bgb has quit [Ping timeout: 256 seconds]
23:55bgb has joined #asahi
23:59kettenisÃmade some progress on u-boot
…