#
…

2021-02-11

00:14acelogic2 has quit [Ping timeout: 272 seconds]
00:16odmir has quit [Remote host closed the connection]
00:17odmir has joined #asahi-dev
01:02acelogic has joined #asahi-dev
03:18phiologe has quit [Ping timeout: 258 seconds]
03:19phiologe has joined #asahi-dev
03:46acelogic has quit [Ping timeout: 240 seconds]
03:50robinp has joined #asahi-dev
05:07acelogic has joined #asahi-dev
05:23BOXn has joined #asahi-dev
05:27linux-superman has joined #asahi-dev
05:28BOXn has left #asahi-dev ["Leaving"]
05:28will1 has joined #asahi-dev
05:40linux-supermaniLinux OS 2 is released and it is based on Debian 10 Stable! https://ilinuxos.com
06:06linux-superman has left #asahi-dev [#asahi-dev]
06:12suskun has joined #asahi-dev
06:12suskun has quit [Remote host closed the connection]
06:28VinDuv has joined #asahi-dev
06:59VinDuv has quit [Quit: Leaving.]
07:03maor26 has joined #asahi-dev
08:21roxfan2 has joined #asahi-dev
08:22roxfan has quit [Ping timeout: 265 seconds]
08:24rwhitbyyoutube notified me
08:25jn__another asahi dev stream?
08:25rwhitbyyep, on now. linux upstreaming feedback
08:38jn__marcan: the vendor prefix patch needs its comment adjusted, since "apple," isn't the old prefix
09:00ConeOfAttack[m] has quit [Quit: Idle for 30+ days]
09:00wolf511[m] has quit [Quit: Idle for 30+ days]
09:00botoxparty[m] has quit [Quit: Idle for 30+ days]
09:00khronokernel[m] has quit [Quit: Idle for 30+ days]
09:01tarzeaurwhitby: i'm interested in the linux upstreaming feedback, where to read about it?
09:02rwhitbythe youtube link is two lines above your question ...
09:03tarzeaui'm listening to the youtube link, but it just shows coding stuff, nothing about upstreaming feedback?
09:03dhewgsee the bottom for the thread entries
09:05zkrx has quit [Ping timeout: 256 seconds]
09:21zkrx has joined #asahi-dev
09:32qyousef has quit [Ping timeout: 272 seconds]
09:33qyousef has joined #asahi-dev
09:39Mary_ has quit [Quit: Bye!]
09:41Mary_ has joined #asahi-dev
10:34XeR has quit [Remote host closed the connection]
10:45XeR has joined #asahi-dev
11:13rwhitby has quit [Ping timeout: 264 seconds]
11:13rwhitby has joined #asahi-dev
11:14acelogic has quit [Ping timeout: 256 seconds]
11:23brandas has quit [Ping timeout: 272 seconds]
11:23brandas_ has joined #asahi-dev
12:06hir0 has joined #asahi-dev
12:36baryluk has quit [Quit: server kernel update. will be back]
12:39awordnot has quit [Ping timeout: 246 seconds]
14:23tmlindhi all, in case anybody is wondering how to use the corellium kernel wlan patch, it gets mac from otp and there's also a custom script in their ubuntu image that's needed
14:23tmlindthe kernel patch alone is not enough
14:24maor26 has quit [Read error: Connection reset by peer]
14:24tmlindthe related userspace script is wifistart, i think it was in /usr/bin
14:25tmlindit reads some proc entries and writes them to the wlan driver
14:51acelogic has joined #asahi-dev
14:56Glanzmanntmlind: I have not looked at it, but you need a fat partition and copy the firmwar to it.
14:56GlanzmannI assume that this fat partition is mounted and the firmware for the broadcom wifi is retrieved.
14:56maor26 has joined #asahi-dev
14:56GlanzmannFor me it worked out of the box.
14:57GlanzmannBut I had to do increase the partition 100MB was not enough because the firmware is 150 MB so I did a 1 GB partition, but that's it.
15:45imobilis has quit [Quit: bye]
15:46imobilis has joined #asahi-dev
16:30danilonc has quit [Quit: WeeChat 1.9.1]
16:31danilonc has joined #asahi-dev
16:31danilonc has joined #asahi-dev
16:31danilonc has quit [Changing host]
16:31danilonc has quit [Client Quit]
16:32danilonc has joined #asahi-dev
16:35danilonc has quit [Client Quit]
16:36danilonc has joined #asahi-dev
16:36danilonc has quit [Client Quit]
16:37danilonc has joined #asahi-dev
16:42tmlindGlanzmann: ok, for me the interface did not get started without the script as no mac was found
16:43tmlindalso for me the ubuntu image created broken firmware symlinks with the same script
16:45tmlindthe kernel .config from /proc/config.gz seems to be the ubuntu distro .config, so far no luck booting with just enableing simple-framebuffer and apple options with m1ni
16:48danilonc has quit [Disconnected by services]
16:49danilonc_ has joined #asahi-dev
16:53danilonc has joined #asahi-dev
16:53danilonc_ has quit [Client Quit]
17:20awordnot has joined #asahi-dev
17:27kettenis has quit [Quit: leaving]
17:29kettenis has joined #asahi-dev
17:29marcanI don't think we can really support the corellium kernel/distro here
17:30marcanI have no idea what they're doing and whatever was just discussed sounds... quite horrible.
17:31hir0 has quit [Quit: hir0]
17:38VinDuv has joined #asahi-dev
17:56kettenisFWIW U-Boot is exclusively nGnRnE device mappings for devices it seems
17:57marcanthat's good to know
17:57marcanso we would probably be fine for that, *except* for the double mapping potentially causing issues
18:00kettenisyes, the core might spontaniously combust if you do that
18:15Glanzmanntmlind: If you follow the guide, it works. SO basically reduce apfs container, create two new partitions, one with 16GB, one with 1 GB
18:15Glanzmannthan you dd the raspberry pie image on the 16 GB one.
18:16Glanzmannon the 1 GB you copy the firmware from macos.
18:16GlanzmannThan you boot into 1 true recovery and install the kernel.
18:16GlanzmannAnd it works.
18:16marcanGlanzmann: I think #asahi-offtopic is probably a better place to discuss this
18:17GlanzmannWill switch channels, btw. good work on the v2 patch series today. ;-) I look forward to get it merged upstream.
18:17marcanthanks :)
18:18marcanhope I can send it tomorrow, and then if this moves forward well we should be able to increase our parallellism.
18:18GlanzmannDHL says my serial console arrives today, don't believe it becauase it is still 600km away, but we will see.
18:18marcanaswesome
18:19modwizcodeSo on ARM there's the VIRT timers, which at first I thought were like "if (virtualized) { return VIRT_TIMER_REG; } else { return PHYS_TIMER_REG; }" but that's not at all how that seems to work?
18:19kettenisthe package Bluerise sent me arrived today so I hope to have some sort of serial console tonight
18:20marcanmodwizcode: it's.... complicated.
18:20marcanthere are 4 timers.
18:20Glanzmannmarcan: Perfect. Btw. I read some things on IRC or you said it, That some of the I/O devices is directly connected to the memory bus without PCIe inbetween, is that true or did I misunderstand something?
18:20modwizcodeIt seems like they can work that way if you have a specific enhanced virtualization flag (which I expect everything has), but it doesn't seem that's how they're intended to be used? Or rather they don't redirect.
18:20marcanHV-phys, HV-virt, guest-phys, guest-virt.
18:21marcanGlanzmann: only PCIe devices are on PCIe
18:21marcanlike, physical PCIe devices
18:21marcan(and thunderbolt)
18:21modwizcodeBut like from what I can tell if you read phys you either get a trap (without extension) or virt (maybe?) (with extension?)
18:21marcanyou're probably thinking of my comments about how corellium faked a PCIe bus instead of adding non-PCIe support to nvme
18:21modwizcodeif you read virt it shouldn't need to do that either way. But you have to intentionally be needing virt
18:22marcanyeah the NVMe is not PCIe
18:22Glanzmannokay, so on x86 we have physical memory, we have the legacy io bus and we have pcie lines, so how is it on m1?
18:22marcanon x86 we have.... lots of things.
18:23marcanthis isn't really about physical connections, it's about how you find devices
18:24GlanzmannI see. On x86 that would be the acpi tables?
18:24marcanon x86 there's ACPI, there's PCI(e), there's legacy ISA PnP stuff we should avoid talking about, there's semi-fixed stuff like firmware, and there's a pile of one-off junk like the local APICs
18:25marcanon arm64 there's basically devicetree or ACPI, depending on the system, and PCI(e)
18:25GlanzmannI see. And the devices are accessiable, like on x86 via the physical address space?
18:25GlanzmannOkay. So we need to look at the device tree to find out the offsets of the devices.
18:26GlanzmannWhich you probably already did.
18:26marcanthe "problem" is that the Linux NVMe driver does not support devicetree, because this is the first device ever that has NVMe that *isn't* PCIe
18:26j`eyGlanzmann: thats how we get UART address etc
18:26marcanand the solution is to just add support for that, just like every other device type that has to support both
18:26modwizcodeThat's going to be a seperate patch though right?
18:26marcane.g. USB xHCI supports both, so you can have PCI USB3.0 adapter cards, and built-in USB 3.0 support in ARM SoCs
18:26marcanand both work fine
18:27marcancorellium are... doing weird hacky stuff, and for some reason they decided to just make up a fake PCIe bus so the linux NVMe driver would "find" the NVMe device
18:27marcanI don't know what made them think that was a good idea
18:27kettenisbtw the mini has both: PCIe xHCI and "platform" xHCI ;)
18:27marcanlike they wrote a driver for a PCIe controller that doesn't exist, that just returns static data for everything
18:28marcankettenis: I thought it was dwc3, which isn't xHCI? or is it?
18:28GlanzmannProbably the fastest thing. But now I get a little bit of idea how it works.
18:28modwizcodeThey probably did that the same reason I wrote hacky bindings in qemu. It worked
18:28kettenisthe "host" part of dwc3 is xHCI
18:28arndI have started patching the name pci driver to separate out some of the pci dependencies, but its not done yet
18:28marcanah, that explains why I could've sworn I saw xHCI somewhere nested under that
18:28marcanthat's very good to know
18:28arnds/name/nvme/
18:28mjg59Years ago Intel were talking about what turned into Moorestown and wanted to know how it should expose SoC devices and Linus said "Just make it look like PCI"
18:29marcanarnd: oh cool!
18:29mjg59So we ended up with something that looked almost entirely unlike PCI
18:29modwizcodeSo it's his fault :p
18:29mjg59So there's precedent here!
18:29marcanI mean if you *actually* have embedded PCI devices that's fine
18:29marcanthat's how every x86 SoC works
18:29marcanlike any Ryzen etc
18:29mjg59These were very much not PCI
18:30modwizcodeA lot of platform devices do seem exposed as fake PCI devices. Which if it's enough faked to respond properly to the PCI driver stack then whatever it probably saves code.
18:30mjg59arch/x86/pci/intel_mid_pci.c
18:31marcanI mean they aren't "fake"
18:31marcanPCI doesn't have to be a physical bus
18:31marcananything that looks like PCI to software is PCI for all intents and purposes
18:31marcanit might even have real PCI lines inside the SoC for all we know, though that would admittedly be silly
18:31arndA lot of the server arm chips are like that as well: close enough to pci to almost make it work but then need some pci vendor/device id specific quirks
18:31modwizcodeI meant fake as in it probably isn't actually ever sending real PCIe transactions
18:32modwizcodealthough for all I know it might
18:32marcanI would expect quite a few embedded PCI devices to be actually implemented as PCIe at the TLP level or so
18:32marcanbecause people will buy IP cores with all that crap baked in
18:32marcanso you throw away the PHY and glue it to a "real" PCI controller otherwise
18:32modwizcodeyeahhhh I guess that would make sense
18:32marcanat least I bet that's common
18:33modwizcodeLots of people do that kind of thing with AXI although that's admittedly a bit different, still ends up with things like routing a memory controller to AXI only to immediately send it to another IP block to unwrap AXI.
18:34GlanzmannAnd thunderbolt is also PCIe so probably 4 lanes v4? And they use the same physical connector as usb-c?
18:34marcanTB is not PCIe
18:34arndVia Wondermedia SoCs had Via network and gpu components with existing PCI drivers, and their BSP also faked a bus. Those were likely real PCI devices,just without the host portion
18:34marcanTB is a packet switched MPLS-like network
18:34modwizcodeTB just tunnels PCIe TLP right?
18:34marcanyou then *tunnel* PCIe over TB
18:34GlanzmannI see. wow.
18:35modwizcodeI'm amazed that works at all honestly
18:35hir0 has joined #asahi-dev
18:35marcanit often doesn't
18:35marcanjust ask whitequark
18:35modwizcodeOh believe me I have
18:35marcanI fully expect to be dragging her in here once I get to those cursed controllers, because there is no way they aren't cursed
18:35marcanOTOH, this might be the first TB device in existence where we actually have to deal with all the low level stuff
18:36marcanfor better or for worse
18:36marcanquite possibly for better, in the long run
18:36modwizcodeIs it the first TB device in existance with a non Intel derived controller?
18:36marcanbut I guess we'll see
18:36marcanI think so!
18:36modwizcodeI thought that all existing designs were IP licensed so this is the first I've heard
18:36marcanthe chips on the board are just redrivers
18:36marcandoesn't everything else literally use intel chips?
18:36modwizcode(which is why they all have the same weird bugs!)
18:36modwizcodeI think it was a licensening requirement
18:36marcanlike other than redrivers is there even any non-intel TB silicon?
18:37modwizcodeThey wouldn't let you use non-intel silicon even if you wanted to I think
18:37marcanthough I guess with USB4 that will change
18:37modwizcodeEven after opening up TB3 I think there were still issues with being forced to use Intel controllers
18:37marcanthe whole ecosystem is so bizarre
18:37marcanlike those TB host port PCIe cards that "only work on compatible motherboards" with intel CPUs
18:38marcanexcept you short two pins on the connector on the side and they work anywhere
18:38modwizcodeHuuuuh I was not aware of that lol
18:38marcanyeak ask wq about that one too
18:38modwizcode"the engineers wanted to use them for something else"
18:38opticronthat's just hateful
18:38GlanzmannAnd the docking stations for example from lenovo are also thunderbolt aren't they?
18:38marcanthen there was that Sony docking station that used *light peak*
18:38modwizcodeIt very much reads as "marketing said we had to make this not work, but I have an AMD computer" or something lol
18:38marcanoptical TB
18:39modwizcodethat would have been terrible but it sounds so futuristic and cool
18:39modwizcodeTB was supposed to support both still but I think only those weird corning cables exist
18:40marcanthe original standard used USB connectors
18:40modwizcodeI'd love to know just how hard it was to make those optical TB3 cables though
18:40marcanwith the optical fibers in the plastic area
18:40marcanthat is what sony used
18:40modwizcodeThat's cursed
18:40marcanand since I guess nobody cares by now: google actually prototyped using that format for datacenter optical ethernet at some point
18:40modwizcodeActually that will probably be the next upgrade to USB-C, a fiber but only in some cables ;)
18:40marcanI saw photos of testing racks
18:40marcandon't think it was ever deployed though
18:41marcanAIUI they used the same optical transceivers as light peak, but with ethernet over them
18:41hir0They must have been chunky cables to get the optical adapters in them
18:41modwizcodeWas that before GbE fiber specs came out?
18:41marcanno, it's just that those connectors are cheap and robust, much more than typical datacenter optical stuff
18:41marcanso it would've made sense for intra-rack ethernet
18:41marcanmachine to TOR switch
18:41modwizcodeI mean I've handled more than a few optical fiber cablely things, they're not *that* fragile
18:41marcanbut now they just use copper for that
18:42modwizcode(the datacenter ones not the plastic ones)
18:42marcanhir0: the cables are just plain fiber
18:42marcanyeah, but the light peak stuff ought to have been cheaper and more robust
18:42marcanespecially wrt junk on the connectors and such
18:42modwizcodeIt was supposed to be plastic fiber based I think
18:42modwizcodeThe problem is of course power
18:42marcanwell in a datacenter you don't need that
18:43hir0So where do they do the electrical -> optical conversion then? Is it something like an SFP adapter?
18:43modwizcodewell but that wasn't the point of light peak tho
18:43modwizcodeIt would be in the SFP yes
18:43marcanhir0: in the switch
18:43marcanand the ethernet cards
18:43Glanzmannmarcan: I see. I also that makes most sense, using coper instead of fibre for short distance.
18:43marcanmodwizcode: it wasn't SFP
18:43marcanthat's the point
18:43marcanit was custom hardware with a pile of "USB" ports
18:44modwizcodeI figured they just used an SFP with a special port
18:44marcanSFP would make it unlikely to be cost effective, plus IIRC the transceivers Intel was using were a different aspect ratio anyway
18:44Glanzmannmarcan: Does that mean google uses RJ45?
18:45marcanGlanzmann: no
18:45marcanthey kind of look like SIM card slots, but oversized
18:45modwizcodethose are some truly tiny fiber optic cables in those
18:46GlanzmannI see. But that is not in production, is it?
18:46modwizcodeThe board layout on those cards looks really nice
18:46marcanI saw test racks with it, but I don't *think* they ever actually deployed it
18:46davidrysk[m]Intel did all this publicity saying they were “opening” TBT but I never saw anything indicating that they did, at least until USB4
18:47modwizcodeI'm assuming they let the publicity out before the lawyers actually finished hammering out the details
18:47GlanzmannBtw. did I read that correctly, that macbook air support usb otg support?
18:47davidrysk[m]And the USB4 spec has a lot of “don’t modify these fields or TBT3 compatibility won’t work” more-or-less
18:47modwizcodeAnd AMD systems with TB are still rare if not nonexistant.
18:47marcanhttps://www.wired.com/2012/09/pluto-switch/ this is the kind of stuff google actually uses (that's old but you get the idea)
18:48brandas has joined #asahi-dev
18:48marcan(those are not SFPs)
18:49modwizcodecertainly not
18:49davidrysk[m]There’s a couple of AMD boards that use cards with Intel controllers, apparently whitequark knows how to “hotwire” those controllers to work in more places
18:49marcanIIRC it's some iPass variant
18:49marcani.e. same connector line as external SAS
18:49marcanthose are pretty popular for this kind of stuff
18:49modwizcodeEveryone loves a new connector
18:49tmlindi guess there's no device info regs populated for the fake pci devices on the interconnect related regs around the devices at all?
18:49modwizcodeThere's no fake pci on the M1
18:50marcantmlind: ?
18:50marcanyeah there is nothing like that
18:50marcananyway, this isn't a difficult problem to solve
18:50marcantons of devices have pcie and dt bindings
18:51marcanthere is an obvious correct solution here (broadly, minutiae aside); it doesn't really need much more discussion
18:52Glanzmannmarcan: What is dt?
18:52brandas_ has quit [Ping timeout: 264 seconds]
18:52marcandevicetree
18:52modwizcodedevice tree
18:52GlanzmannAh device tree.
18:52* marcanswitches to calling it of to confuse people more
18:52GlanzmannYeah, so it bastically just another way to populate the offset for the I/O devices.
18:54GlanzmannBtw, have you already figured out with all devices are directly connected to the physical device tree (physical address space) or if there are more bridges. I heard already the keyboard is on antoher bus, what about audio and the camera?
18:54modwizcodeDoes reading the AIC "reason" reg mask IPIs automatically or are they masked immediately? If so do you know if it masks only IPIs from the initial IPI it's handling or all of them?
18:54marcanbroadly speaking, the things the bindings have to deal with are mapping registers, registering IRQs, configuration details, power management stuff, and DMA related things, and for dt and SoC devices in general, usually power/clock controls
18:54marcanmodwizcode: reading reason does
18:54marcanit masks whatever it reports
18:54marcanthat's the whole pattern in AIC, reading reason gives you *one* thing and masks *that* thing
18:55roxfan2 is now known as roxfan
18:55GlanzmannAnd about the IO MMU (Dart) does the m1 really need it? Can you do DMA over usb4/thunderbolt?
18:55modwizcodeWith IPIs it doesn't tell you the sender though does it?
18:55marcanthe sender isn't recorded anywhere
18:56marcanfor starters I'm going to look into m1n1 putting all the DARTs into bypass, we'll add support for that when we get there
18:56marcanthat is a blocker for TB support, I refuse to do it without an IOMMU
18:56marcanand *may* be a blocker for graphics depending on how that's implemented, security/process context wise
18:56marcanbut we should have it by then anyway
18:56marcanfor basic USB/internal-PCIe/NVMe bringup we don't need it
18:56marcancertainly nothing the bootloaders need to care about, at least at this stage
18:56GlanzmannDo you guys have any thunderbolt devices?
18:57marcanI have a test card
18:57marcanthat intel devkit thing with a PCIe slot
18:57modwizcodeI think the confusion is that the register in linux that's IPI_SEND you originally called FLAG_SET and IPI_ACK was FLAG_CLEAR, but in reality you write the other bit in the ACK reg, so it's not like SET/CLEAR
18:57GlanzmannI thought about buying a network card, but have not done so.
18:57marcanmodwizcode: yeah, I had that wrong originally
18:57marcanthat's why the linux names changed
18:57marcanneed to update the doc, feel free to edit it
18:57modwizcodeI was going to update the doc after I verified things further with you/emulation
18:57modwizcodeThe other bits (besides the self bit) in the ACK register are unused then?
18:58marcanas far as I can tell, yes
18:58modwizcodeor just unknown at least
18:58marcanprobably unused
18:58marcanit's w1c so you can't prove they're unused :p
18:58marcanbut that's a pretty sensible assumption to make
19:01Glanzmannmarcan: Are you still building the custom usb cable, or do you drop it after you can just use two macs?
19:01marcannext week
19:01marcanI just had too many distractions this week, what with the v1 feedback and misc experiments
19:03modwizcodeWish I had a Mac to work on stuff, probably for the best though. I have enough distractions
19:04Glanzmannmodwizcode: If you wish, I can set mine up so that you can access it remotely.
19:05Glanzmannmodwizcode: Were are you located?
19:08modwizcodeI mean at the moment I think that would be premature. I have a lot on my plate. I suspect it'd be better overall to do something like testing of features that marcan implements.
19:10marcanand I should get some sleep :)
19:10Glanzmannmarcan: Yes, or wait 2 more hours and stay aware.
19:10GlanzmannHave a good morning sleep.
20:08hir0 has quit [Quit: hir0]
20:54leah2 has quit [Ping timeout: 260 seconds]
20:55leah2 has joined #asahi-dev
21:10kettenis has quit [Quit: leaving]
21:10brandas has quit [Quit: quit]
21:11brandas has joined #asahi-dev
21:58VinDuv has quit [Quit: Leaving.]
22:29amw has joined #asahi-dev
22:41austriancoder has quit [Read error: Connection reset by peer]
22:41austriancoder has joined #asahi-dev
23:47linkmauve has quit [Ping timeout: 256 seconds]
…