2021-06-02
00:00jn has quit [Remote host closed the connection]
00:00m42uko has quit [Read error: Connection reset by peer]
00:01m42uko has joined #asahi
00:01jn has joined #asahi
00:22richbridger has joined #asahi
00:27aquijoule_ has quit [Ping timeout: 480 seconds]
01:24guan has joined #asahi
01:32bgb has joined #asahi
01:40bgb has quit [Ping timeout: 480 seconds]
01:43bgb has joined #asahi
02:12marcanbloom: m1n1's primary purpose is to do low level CPU init and take care of ADT->FDT adaptation
02:13marcanhow much other hardware init is in m1n1 vs u-boot is subject to discussion; right now we're doing things like taking care of some fuse-based pokes and such in m1n1 so downstream users don't have to
02:13marcancurrently I like being able to not require u-boot to boot linux from m1n1 but sven has a hack to chainload via u-boot anyway and I will accept that as a requirement if it makes sense :p
02:14marcanbut I don't see much point in moving all of m1n1 into u-boot; there isn't really anything to be gained there, it'd just be moving code from point A to point B, including all of the ADT handling and whatnot
02:17marcankettenis: fwiw m1n1 currently provides enough entropy (forwarded from iBoot) to linux to init its entropy pool, iff it's built with the config option to trust bootloader-provided entropy
02:19phiologe has joined #asahi
02:20brentr123[m]I’m curious is the hyper visor going to be optimized any time soon so that it can run the best it possibly can or is it “good enough”?
02:23PhilippvK has quit [Ping timeout: 480 seconds]
02:25marcanI don't think there is much to optimize; ARM virtualization doesn't really trigger many traps
02:26marcanif it's slow it's because it runs on one e-core only and, when you have mmiotrace, because that slows things down obviously.
02:27marcanthough I do wonder how much slowness is caused by my bad timer handling (can't be fixed due to ARM limitations); might be worth trying a few hacks for that
02:28bloomWe have no choice on iBoot or Linux, and we can't teach Linux to be an iBoot payload, but we do have a choice of having in between 1 or 2 or 3
02:29bloomand if we can do iBoot -> m1n1 -> Linux or iBoot -> U-Boot -> Linux, I would much prefer that to iBoot -> m1n1 -> U-Boot -> Linux or, er, iBoot -> m1n1 -> U-Boot -> GRUB -> Linux
02:30brentr123[m]Kind of related to asahi, but how did you guys get into coding? Self taught or you learned it in school? It’s always interesting to see how people get into it. Even though I don’t know all of these complex terms like “traps” and such, it is so interesting just to be here and witness people talking in that sort of way
02:30bloombut I suppose m1n1 could be cut down dramatically if _all_ it needs to do is to do ADT->FDT, some mmio pokes, and jump to u-boot
02:31bloomso, er, iBoot -> tiny-m1n1 -> U-Boot -> Linux is probably my preference, since distros know how to do U-Boot so you get some semblance of standard
02:32marcanin fact I bet just taking out the proxy stuff from main() will optimize out most of that code, because -ffunction-sections and such
03:11marvin24_ has joined #asahi
03:14marvin24 has quit [Ping timeout: 480 seconds]
03:59bgb has quit [Remote host closed the connection]
04:00bgb has joined #asahi
04:04norwoodites has joined #asahi
04:05pinskia has quit [Remote host closed the connection]
04:35bgb has quit [Ping timeout: 480 seconds]
04:43shenki has quit [Quit: leaving]
04:43shenki has joined #asahi
04:44shenki has quit []
04:46shenki has joined #asahi
04:47norwoodites is now known as pinskia
04:48shenki has quit []
04:48shenki has joined #asahi
05:17emilazyI thought the planned boot chain involved UEFI at some point which sounded cursed... so I'm glad to hear it's slightly less cursed than that
05:25jannaumarcan: nothing wrong with booting Linux directly from m1n1. It is just inconvenient in production
05:25VinDuv has joined #asahi
05:26jannaukernel updates only through 1TR or booting over uart/usb. The second has currently no security whatsoever
05:30emilazyyeah, I get the practicality benefits with aarch64 server/desktop ecosystem standardizing on UEFI/ACPI for everything... just a little sad since part of the appeal of the Apple Silicon machines is the less fucky firmware/bootchain situation for me
05:33marcanjannau: I'm talking about for development/testing only; the question is whether we eventually want to have linux drivers rely in initialization that only u-boot performs or not
05:33marcanif we go that route, then USB loading will have the u-boot wrapper requirement (which we already have a hack for)
05:34marcanI do not expect anyone to do direct linux loads as a m1n1 payload in production for normal boot; the end-user setup we ship will definitely be m1n1+u-boot
05:35marcanthe question is whether we can keep `linux.py <kernel>` working without a u-boot intermediate stage, or whether there are good enough arguments to do some of the init in u-boot and just say we expect linux.py to always load it first
05:36marcanemilazy: u-boot provides enough UEFI services to load GRUB or a UEFI-wrapped linux, but it can also load kernels directly
05:36marcanwhether people want to use UEFI or just u-boot straight to arm64-boot-protocol linux is up to them
05:36emilazythat'll presumably happen when someone masochistic enough gets Windows running on them :p
05:37marcanwindows needs core kernel changes; like linux, there's enough different about the M1 that you can't just do it all in drivers
05:37emilazywell I mean you could always just something something hypervisor something something magically shim things out
05:38marcanand I mean I already wrote a shim hypervisor so if someone is masochistic enough to want to go that way and emulate a GIC inside that and PSCI or something then sure, it'll probably work
05:39emilazyI kind of want that Microsoft/Snapdragon ARM64 development PC purely because it's the only Windows 10 you get GPU acceleration on
06:21VinDuv has quit [Quit: Leaving.]
06:50bgb has joined #asahi
07:03norwoodites has joined #asahi
07:09pinskia has quit [Ping timeout: 480 seconds]
07:21norwoodites is now known as pinskia
07:27vafanlignarde has joined #asahi
07:38bgb has quit [Remote host closed the connection]
07:39bgb has joined #asahi
08:17bgb has quit [Ping timeout: 480 seconds]
08:22Graypup_ has quit [Quit: meow]
08:24Graypup_ has joined #asahi
09:33bgb has joined #asahi
09:49bgb_ has joined #asahi
09:52bgb has quit [Ping timeout: 480 seconds]
10:40ganpa[m] has joined #asahi
10:48egavinc has quit [Remote host closed the connection]
10:48egavinc has joined #asahi
10:50bgb_ has quit [Ping timeout: 480 seconds]
11:23choozy has joined #asahi
11:42alessandrorzz[m]>how much other hardware init is in m1n1 vs u-boot is subject to discussion; right now we're doing things like taking care of some fuse-based pokes and such in m1n1 so downstream users don't have to
11:42alessandrorzz[m]1tr means 1 terabyte?
11:44brentr123[m]1tr is basically recovery mode
11:50bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:27Thomas___ has joined #asahi
12:33StupidYui has quit [Ping timeout: 480 seconds]
13:22yrlf has quit [Quit: The Lounge - https://thelounge.chat]
13:23yrlf has joined #asahi
13:29Epsillion has quit [Remote host closed the connection]
13:52choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
14:07tom-w has quit [Quit: Connection closed for inactivity]
14:08egavinc has quit [Remote host closed the connection]
14:08egavinc has joined #asahi
14:14Izumoo has quit [Quit: Konversation terminated!]
15:01pugguu has joined #asahi
16:19VinDuv has joined #asahi
16:31bps has joined #asahi
16:45Andalu30 has joined #asahi
16:51choozy has joined #asahi
17:10roxfan has joined #asahi
17:42berryRed has joined #asahi
18:04frode_0xa has joined #asahi
18:09Andalu30 has quit [Quit: Konversation terminated!]
18:14frode_0xa has quit [Quit: Page closed]
18:17frode_0xa has joined #asahi
18:17frode_0xa has quit []
18:20frode_0xa has joined #asahi
18:20frode_0xa has quit []
18:21kyjus25 has joined #asahi
18:21frode_0xa has joined #asahi
18:22frode_0xa has quit []
18:23frode_0xa has joined #asahi
18:24frode_0xa has quit []
18:25berryRed has quit [Quit: Leaving]
18:34frode_0xa has joined #asahi
18:34frode_0xa has quit []
18:37frode_0xa has joined #asahi
18:38frode_0xa has quit []
18:40frode_0xa has joined #asahi
18:57klltkr has joined #asahi
19:06kyjus25 has left #asahi [#asahi]
19:19kyjus25 has joined #asahi
19:40Emantor[m] has joined #asahi
19:41berryRed has joined #asahi
19:54klltkr has quit [Ping timeout: 480 seconds]
20:03pugguuCus he literally dm'ed me 2 days ago but since i never have notifcations on my phone i didnt notice
20:07sorearfor half a second i thought this was a new apple silicon-based playstation, they've migrated architectures enough already
20:07berryRed has quit [Quit: Leaving]
20:42VinDuv has quit [Quit: Leaving.]
20:53svenagain, 99% of this is thanks to maz and kettenis. i just did some plumbing to make sure it plays nicely with my dart driver
20:55kyjus25 has quit [Quit: Leaving.]
20:58sven64 bytes from 192.168.42.1: seq=0 ttl=64 time=0.812 ms <-- and with working interrupts we're down to <1ms from what used to be ~130ms :-)
20:59kyjus25 has joined #asahi
21:00kettenislast version removes the "phy" set of registers, so that will require an adjustment in the driver code
21:01sveni'll probably send a v3 of the dart code to get some feedback on the 4k bypass hack but i hope that at least the dt binding should be fine sooner than later
21:03svenand that matches with the some function called fullBypassSupported in the kext which checks if bit 1 in the register 0x04 is set
21:04svenso for the 4k pages what i can do for now is just setup a static pagetable to map 0x0..0x100000000 to 0x800000000 and then setup dma-ranges to let the dma layer know about that offset
21:05svenhttps://github.com/svenpeter42/linux/commits/pcie/hack for now. will clean it up a little bit and then push to dart/dev soon
21:07svenhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/dma-iommu.c#n238
21:08svenyeah, the only issue are the clock bindings. i think if you comment them out in the uboot device tree and add the dart interrupts it works
21:14svenhttps://f.svpe.de/1dbc4689fdf9bbe2296401000144489112e6972d4d4ad4d5c03f4ce5cbd2e0b1_0001-hack-the-dtsi-to-make-linux-happy.patch that's the only patch on top of your uboot dt to make my hacked kernel happy
21:15svenfor my 4k test i just used dma-ranges = <0x42000000 0 0 0x8 0 0 0xffff0000>; without any good reason
21:18kettenisI picked something a bit higher up since low memory is used by the firmware and not available
21:21svenif it's acceptable it should at least give us enough confidence that we can work with the dt bindings like this
21:40pugguu has quit [Ping timeout: 480 seconds]
21:54egavinc has quit [Remote host closed the connection]
21:55egavinc has joined #asahi
21:56egavinc_ has joined #asahi
22:03egavinc has quit [Ping timeout: 480 seconds]
22:12kyjus25 has quit [Quit: Leaving.]
22:24choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
22:55digitalfx has joined #asahi
23:27nepeat has joined #asahi
23:34skoobasteeve has joined #asahi