#
…

2021-04-12

00:02klaus has joined #asahi
00:05macc24 has quit [Ping timeout: 260 seconds]
00:07troseman_ has left #asahi ["Leaving"]
00:07artemist has quit [Ping timeout: 260 seconds]
00:08artemist has joined #asahi
00:10troseman has joined #asahi
00:13troseman has quit [Client Quit]
00:14troseman has joined #asahi
00:16troseman has quit [Client Quit]
00:16troseman has joined #asahi
00:22troseman has quit [Quit: Leaving]
00:22troseman has joined #asahi
00:25troseman has quit [Client Quit]
00:26klaus has quit [Ping timeout: 260 seconds]
00:26troseman has joined #asahi
00:39odmir has quit [Remote host closed the connection]
00:39klaus has joined #asahi
00:40odmir has joined #asahi
00:44odmir has quit [Ping timeout: 246 seconds]
00:48klaus has quit [Ping timeout: 252 seconds]
01:11odmir has joined #asahi
01:22klaus has joined #asahi
01:31klaus has quit [Ping timeout: 260 seconds]
01:45odmir has quit [Ping timeout: 240 seconds]
01:48troseman has quit [Ping timeout: 252 seconds]
02:01klaus has joined #asahi
02:01inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
02:10klaus has quit [Ping timeout: 240 seconds]
02:13inglor has joined #asahi
02:22klaus has joined #asahi
02:26klaus has quit [Ping timeout: 240 seconds]
02:38klaus has joined #asahi
02:46klaus has quit [Ping timeout: 252 seconds]
02:56phiologe has quit [Ping timeout: 250 seconds]
02:58phiologe has joined #asahi
03:07klaus has joined #asahi
03:07marvin24 has quit [Ping timeout: 245 seconds]
03:07marvin24 has joined #asahi
03:11klaus has quit [Ping timeout: 240 seconds]
03:12mxw39 has joined #asahi
03:24klaus has joined #asahi
03:32klaus has quit [Ping timeout: 240 seconds]
03:56klaus has joined #asahi
04:04klaus has quit [Ping timeout: 240 seconds]
04:15j`ey_ has joined #asahi
04:15lewurm_ has joined #asahi
04:16klaus has joined #asahi
04:20Jaehyuk[m] has quit [*.net *.split]
04:20ewlsh[m] has quit [*.net *.split]
04:20mofux[m] has quit [*.net *.split]
04:20m1kr0[m] has quit [*.net *.split]
04:20fstokesman[m] has quit [*.net *.split]
04:20meiji163[m] has quit [*.net *.split]
04:20izzyisles[m] has quit [*.net *.split]
04:20pipcet[m] has quit [*.net *.split]
04:20noc0lour1 has quit [*.net *.split]
04:20winocm has quit [*.net *.split]
04:20nickray has quit [*.net *.split]
04:20foxlet has quit [*.net *.split]
04:20fridtjof[m] has quit [*.net *.split]
04:20Chainsaw has quit [*.net *.split]
04:20j`ey has quit [*.net *.split]
04:20lewurm has quit [*.net *.split]
04:21klaus has quit [Ping timeout: 246 seconds]
04:26Chainsaw has joined #asahi
04:33klaus has joined #asahi
04:38fridtjof[m] has joined #asahi
04:38winocm has joined #asahi
04:39ewlsh[m] has joined #asahi
04:39fstokesman[m] has joined #asahi
04:39Jaehyuk[m] has joined #asahi
04:39meiji163[m] has joined #asahi
04:39pipcet[m] has joined #asahi
04:39mofux[m] has joined #asahi
04:39izzyisles[m] has joined #asahi
04:39m1kr0[m] has joined #asahi
04:40foxlet has joined #asahi
04:41nickray has joined #asahi
04:41noc0lour1 has joined #asahi
04:42klaus has quit [Ping timeout: 252 seconds]
05:19klaus has joined #asahi
05:25mxw39 has quit [Quit: Konversation terminated!]
05:26mxw39 has joined #asahi
05:27klaus has quit [Ping timeout: 240 seconds]
05:29VinDuv has joined #asahi
05:37mxw39 has quit [Quit: Konversation terminated!]
05:38mxw39 has joined #asahi
05:41klaus has joined #asahi
05:45klaus has quit [Ping timeout: 240 seconds]
06:12ephe_meral1 has joined #asahi
06:12the-mentor3 has quit [Quit: The Lounge - https://thelounge.chat]
06:13klaus has joined #asahi
06:15the-mentor3 has joined #asahi
06:20klaus has quit [Ping timeout: 246 seconds]
06:26M1f4a9[m] has joined #asahi
06:27VinDuv has quit [Quit: Leaving.]
06:33klaus has joined #asahi
06:37klaus has quit [Ping timeout: 240 seconds]
06:43mxw39 has quit [Quit: Konversation terminated!]
06:44mxw39 has joined #asahi
06:51klaus has joined #asahi
07:28vimal has quit [Ping timeout: 260 seconds]
07:29j`ey_ is now known as j`ey
07:29j`ey has quit [Changing host]
07:29j`ey has joined #asahi
07:35vimal has joined #asahi
08:07Namidairo has quit [Ping timeout: 265 seconds]
08:09Namidairo has joined #asahi
08:18marcanI think the driver needs a few patches, but that's about it
09:00wagood[m] has quit [Quit: Idle for 30+ days]
09:19arndagreed, the corellium patch doesn't look too bad as a start. Someone could probably just split it up into logical changes and add a changelog text after figuring out what the changes are in fact needed for. The maintainers might want some things to be handled differently, but most of it is rather straightforward
09:21kettenis_passing the mac address in the device tree should probably be done a bit differently
09:22kettenis_the standard way to do it would be to have a mac-address ptoperty on the device tree node for the pci device
09:24kettenis_the (wired) ethernet device needs that too
09:26arndkettenis_: my reading of the driver is that the mac address is stored in the nvram of the PCI device
09:26arndin that case I think it is best to leave it in the driver and not try to access the PCI device from the boot loader just to pass the address through DT
09:27arndunless the ethernet driver also wants to read the mac address from the wireless device, in which case using the boot loader would help avoid an inter-dependency between two otherwise unrelated pci network drivers
09:28kettenis_apple doesn't store the mac address in nvram/eeprom/otp
09:28jaalsa has joined #asahi
09:28kettenis_all mini's will end up with 00:10:18:00:00:00 as their mac address for the wired interface
09:30kettenis_the "real" mac address is stored in the ADT
09:30arndkettenis_: for both ethernet and wireless, or just the former?
09:32kettenis_well 00:10:18:00:00:00 for ethernet
09:33kettenis_not sure what the "default" address is for the wifi
09:34kettenis_00:10:18 is the OUI for Broadcom
09:35raster has joined #asahi
09:41kettenis_related to the wifi; it seems power to the wifi device is controlled by the SMC
09:49kettenis_if it isn't powered on, it simply doesn't show up as a PCIe device
09:53marcando we have a standard binding for passing macs, or is that a device-specific thing still?
09:54kettenis_standard binding
09:54marcanI guess it still needs to be handled in the driver though, right?
09:54marcanshould be an easy patch though
09:54kettenis_it is a bit awkward for pci devices though sine you need to (partly) describe the pci hierarchy
09:55marcanyeah, I've seen that on some dts IIRC
09:55kettenis_something that's normally not needed for pcie
09:55kettenis_not sure how this works for drivers in linux
09:56kettenis_but OpenBSD does indeed need driver modifications
09:56macc24 has joined #asahi
09:56kettenis_bge(4) already has that though since Sun did something similar with theur onboard broadcom ethernet
10:03luca020400 has quit [Quit: WeeChat 3.1]
10:05luca020400 has joined #asahi
10:33tmlindhmm i can't find the link to view the adt files.. wasn't there some pseudo-translated url for those to look at?
10:36tmlindheh with pseudo-translated i mean adt to dts translation, not url translation naturally
10:53Chainsaw has quit [Remote host closed the connection]
11:12kettenis_ah, the linux tg3 driver calls eth_platform_get_mac_address()
11:12kettenis_so that should take care of fetching the mac address from the device tree
11:12_rjeffman is now known as rjeffman
11:36tmlindah i found the adt link i was looking for: http://csgraf.de/tmp2/m1.json
11:37tmlindi think that was from #armlinux channel few months ago, helps to keep notes.. but could not find the notes earlier
11:37tmlindshould that be linked somewhere on the wiki if not already there?
11:40arndkettenis_: it looks like arch/sparc still emulates the idprom from the m68k sun3 days, while everybody else uses the ibm-style local-mac-address property. ADT (in the link that tmlind cited) apparently contains a local-map-address property but it contains the "macaddr/wifiaddr,syscfg/WMac/6,zeroes/6" string instead of of actual address
11:40arndDoes Apple's bootloader replace that with the actual value before passing it to the OS?
11:42kettenis_and indeed, local-mac-address is the right property
11:45tmlindfyi, i recall local-mac-address also depends on having ethernet aliases to work properly, might be worht checking if that still is the case
11:46tmlindhmm maybe that was actually u-boot limitation, not sure
11:46kettenis_that's for u-boot
11:46kettenis_but an alias will make life easier for m1n1 as well
11:52arndkettenis_: interestingly, the ethernet device in adt encodes the local-mac-address property in the same place that Linux would look for it, in /arm-io/apcie/pci-bridge2/lan-1gb/local-mac-address, but the wireless device has a device in /arm-io/apcie/pci-bridge0/wlan/ withouto such a property, and another device in /arm-io/wlan that has a few properties including local-mac-address but no registers
11:55kettenis_yeah, the way the wifi/buetooth is integrated is strange
11:56kettenis_I wonder if Apple has it somehow hooked up to the SMC via a side-channel to do some sort of active standby
11:56arndI also see that /arm-io/uart2 has a "wlan-debug" child node with a "wlan.uart.baudrate = <0x2f8e7a>" property. I wonder if that is used for debugging the wlan firmware, or if there is a hidden debug mode that exposes a console over wlan
11:57arndhas anyone tried talking to uart2 at that baud rate?
12:04sveniirc I couldn't attach it while running Mac OS (resource busy) and there was nothing when using linux but that might just be because I didn't bring up pcie or the wifi module
12:11Chainsaw has joined #asahi
12:28marcantmlind: adt to dts translation is not possible in the general sense, because there is not enough information in the format
12:29marcanproperty values are just bytes, and the endinanness is different, so you can't know what needs to be flipped
12:30tmlindmarcan: yeah the "raw data" view in the m1.json link above is handy though :)
12:36marcanI've been using shiz's dt.py, which spits out this format: https://mrcn.st/p/t1926QWh
12:43Shiznote that dt.py also does implement a to-dts
12:43Shizbut marcan's caveats also apply there
12:43Shizspecifically for int values
12:44marcanwould be nice to start building up a high-level schema to do this properly. not for actual conversion, but to get nice pretty-printed versions, and for diffing / dealing with newer devices
12:55Chainsaw has quit [Remote host closed the connection]
13:03tmlindthanks for the link
13:23sorear[macos capabilities question] does rosetta 2 support any kind of system/hypervisor emulation, or do you have to use non-M1-specific emulators like qemu for that
13:25sorearmore generally curious if anyone here has long-term emulation plans. I am acutely aware of qemu's architectural limitations from my time with riscv but I'm not sure what could be done about them beyond tech demos
13:35delrothemulation of what?
13:36arndsorear: HdkR is working on https://github.com/FEX-Emu/FEX for emulating x86 user space, you can find him on #armlinux. It requires x86 or arm64 hosts today, but I'm fairly sure porting to rv64 would be possible, given how similar it is to aarch64
13:38sorearmy experience is rv64-on-x86, which might be a better match for x86-on-M1 since you're not emulating flags (one of the least pleasant parts of TCG)
13:45marcansorear: no system stuff AIUI, only userspace
13:45marcanqemu does work
13:46marcanI do wonder how many of the M1 Rosetta-isms we can expose on Linux sanely
13:47marcanTSO should be easy; that just requires flipping a bit in ACTLR_EL1 (which does mean we need to save it on context switches or whatever, but that shouldn't be a big deal since it *is* at least a standard register)
13:48marcanAF/PF and the SSE stuff is ickier; those rely on Apple-proprietary registers which again would become part of architectural state, and I'm not sure how much hate we would get for trying to introduce those into process context
13:48marcansame with AMX
13:48marcan(maz: thoughts?)
13:51mazmarcan: I'm pretty sure you will get a huge push-back on exposing TSO to userspace in any shape or form. it's like SVE, only far worse because there is no architecture to write against.
13:52choozy has joined #asahi
13:53mazmarcan: you'd have to abstract it behind some "strongly ordered" API. overall , this doesn't fit the architecture, nor its direction of travel.
13:57odmir has joined #asahi
14:01odmir has quit [Ping timeout: 240 seconds]
14:04marcanmaz: wouldn't it just be a prctl? that's where all the other related crap is
14:04sorearnon-standard architectural state is a huge developing problem on the riscv side, opportunity for a common solution
14:04marcansomething like PR_SET_MEMORY_MODEL
14:06sorearsurely this has come up at least once for mips or sparc, maybe powerpc
14:08marcanI mean, is there significant reason not to expose it? it would seem like a fairly minimal patch, and decent x86 emulation is a significant benefit
14:09marcanif ARM isn't working on anything along those lines, well, they should be :)
14:09marcanand AIUI there are ARM cores that unconditionally guarantee TSO and under those the API could just always return that
14:11sorearriscv also needs a solution for "32-bit hwcap is not a scalable way to handle vendor extensions and requiring procfs isn't great"
14:16mazmarcan: what ARM comes up with or not is only one side of the problem. adding non-architectural stuff in a userspace visible way is not something anyone will consider lightly. If you want to run TSO, flip the bit from the bootloader and be done with it.
14:18mazdisclaimer: I don't give a rat's arse about x86 emulation.
14:35bendoin_ is now known as bendoin
14:57artemist has quit [Quit: artemist]
15:30Chainsaw has joined #asahi
16:24ephe_meral1 has quit [Ping timeout: 240 seconds]
16:27hir0 has joined #asahi
16:27ephe_meral1 has joined #asahi
17:19VinDuv has joined #asahi
17:58taziden has quit [Ping timeout: 250 seconds]
18:03taziden has joined #asahi
18:34radex has joined #asahi
18:46hir0 has quit [Ping timeout: 252 seconds]
19:08jeffmiw has joined #asahi
19:09jeffmiw_ has joined #asahi
19:09jeffmiw has quit [Read error: Connection reset by peer]
19:17jeffmiw_ has quit [Remote host closed the connection]
19:22jeffmiw has joined #asahi
19:23kendfinger has joined #asahi
19:25jeffmiw has quit [Remote host closed the connection]
20:02ephe_meral1 has quit [Ping timeout: 268 seconds]
20:10jeffmiw has joined #asahi
20:10jeffmiw has quit [Client Quit]
20:11jeffmiw has joined #asahi
20:36h_ro[m] has joined #asahi
20:54kettenis_ has quit [Ping timeout: 265 seconds]
20:56kettenis_ has joined #asahi
21:00VinDuv has quit [Quit: Leaving.]
21:01raster has quit [Quit: Gettin' stinky!]
21:08inglor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
21:13jeffmiwtrying to boot the linux kernel in EL1 while running m1n1 as EM2 hypervisor, I'm hitting an instruction abort because of a translation fault level 0 on the first instruction after the ERET from el1_call in exception_asm.s
21:14jeffmiwI'm not clear about this level 0, is it the exception level or the translation level ? I'm a bit confused here ...
21:19j`eytranslation level
21:20jeffmiwhumm and how is controled the translation level 0 ? TTBR are for stage 1
21:26inglor has joined #asahi
21:28jeffmiwok, I found its definition in armv8 figure D5-9, thanks j`ey
21:29vlixa has quit [Remote host closed the connection]
21:33choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
21:42vlixa has joined #asahi
21:44kettenis_ has quit [Ping timeout: 240 seconds]
21:46kettenis_ has joined #asahi
22:15jixbo has joined #asahi
22:40HeN has quit [Quit: Connection closed for inactivity]
22:41rjeffman has quit [Ping timeout: 260 seconds]
23:12jixbo has quit [Quit: jixbo]
…