2021-12-21
00:03chengsun has quit [Quit: Quit]
00:21joe[_]D has quit []
00:23Dcow has joined #asahi-dev
00:27yuyichao_ has quit [Ping timeout: 480 seconds]
00:43bmrgz has quit [Quit: Page closed]
01:07chengsun has joined #asahi-dev
01:14chengsun has quit [Quit: Quit]
01:15chengsun has joined #asahi-dev
01:18Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:18Dcow has joined #asahi-dev
02:02DarkShadow44 has quit [Quit: ZNC - https://znc.in]
03:01DarkShadow44 has joined #asahi-dev
03:06marcankettenis: oh wow, didn't realize you were on serial. yeah, use --no-sepfw over serial to avoid that.
03:28chadmed has joined #asahi-dev
03:31c10l0 has joined #asahi-dev
03:35yuyichao has joined #asahi-dev
03:37c10l has quit [Ping timeout: 480 seconds]
03:38yuyichao has quit []
03:40yuyichao has joined #asahi-dev
03:46c10l0 has quit []
03:47c10l0 has joined #asahi-dev
03:47c10l0 is now known as c10l
03:49yuyichao has quit [Quit: Konversation terminated!]
04:01phiologe has quit [Ping timeout: 480 seconds]
04:02Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:03Dcow has joined #asahi-dev
04:05Dcow has quit []
04:06yuyichao has joined #asahi-dev
04:07yuyichao has quit []
04:09tpw_rulesthe kernel uses EFI to reboot here: https://github.com/AsahiLinux/linux/blob/b63c1083b20eefa3b23180ae57e1919c723f7d86/arch/arm64/kernel/process.c#L137
04:09tpw_ruleswhich calls into EFI services here: https://github.com/torvalds/linux/blob/6e0567b7305209c2d689ce57180a63d8dc657ad8/drivers/firmware/efi/reboot.c#L46
04:09tpw_ruleswhich hangs in u-boot here: https://github.com/kettenis/u-boot/blob/fd6480ff7986e61848bc96dc43a279c80ba27cc9/drivers/firmware/psci.c#L131
04:09tpw_rulesmeaning the watchdog restart function which was registered here: https://github.com/AsahiLinux/linux/blob/b63c1083b20eefa3b23180ae57e1919c723f7d86/drivers/watchdog/watchdog_core.c#L317
04:10tpw_rulesthe efi spec: https://uefi.org/sites/default/files/resources/UEFI%20Spec%202_6.pdf says on page 266 (physical 316) that "The ResetSystem() function does not return" so i'm not sure what the kernel is doing trying to call stuff after that
04:11tpw_rulesfortunately the system resets anyway because the watchdog gets initialized with its default 30 second timeout before the EFI function is called
04:12tpw_rulesor rather, programmed with its default 30 second timeout at boot, then turned on during shutdown, possibly by systemd
04:15yuyichao has joined #asahi-dev
04:40tpw_rulesactually, this is probably u-boot's fault for claiming it can reset the board when it can't. setting CONFIG_EFI_HAVE_RUNTIME_RESET=n fixes the problem. presumably once the PSCI stuff y'all mention gets worked out it will work
05:00Dcow has joined #asahi-dev
05:00c10l has quit [Quit: The Lounge - https://thelounge.chat]
05:00c10l has joined #asahi-dev
05:17Dcow has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:33Dcow has joined #asahi-dev
05:38Dcow_ has quit [Ping timeout: 480 seconds]
06:16marcantpw_rules: fun, I guess that will also work once we implement PSCI :p (but we'd have to teach u-boot about the new PSCI call method too)
06:20tpw_rulesdoes anybody know how to get symbols for grub's efi binary? i'm trying to figure out why it hangs when booting a kernel
06:21tpw_rulesmarcan: did you have a chance to glance through the guide? i'm really hoping the asahi installer can handle all the partitioning in the future
06:22_jannau_amw: in prinicle sure. at the moment it will result in non working keyboard/trackpad due to changed defaults
06:22marcanwhich makes life much easier for developers, but it's missing all the boring bits around partitioning :)
06:22tpw_rulesare you going to have to ship your own partitioner? even `diskutil` seems hopelessly broken
06:23marcanwe need to use diskutil for APFS resizes and creating the EFI stub partition, since we need to mount the latter
06:24amw_jannau_: I only clone it if I want to preserve an exact revision as there is so much re-basing going on
06:24tpw_rulesbut i found out diskutil does not parse non-sorted gpt tables correctly: https://pastebin.com/LSv0zYAE
06:27marcanah, so we *can* create partitions with arbitrary EFI types, but what we can't do is *format* them
06:31amw_jannau_: Just a brief note + link on developer quick start (has big LARGELY OBSOLETE section from marcan above it) - if you want to check it
06:31marcanso one dumb thing we can do is format it as FAT32, take a disk image in RAM, then format it as EFI, and dump the disk image back
06:31marcanI kind of want to avoid touching the GPT outside of diskutil, but it seems formatting ourselves should work
06:34Redecorating[m]is /System/Library/Filesystems/msdos.fs/Contents/Resources/newfs_msdos there on the recovery filesystem? that might work too
06:40Redecorating[m]-v might change that
06:46marcany'know, maybe I should write a blog post about this (how the partitioning/installer will work)
06:59bps2 has joined #asahi-dev
07:47Redecorating[m]whenever getting the module-instance for wifi on t2 macs gets worked on, these might be useful: https://gist.github.com/Redecorating/6259c0e710c0639150f17bddc08fe133 https://github.com/torvalds/linux/blob/9e9fb7655ed585da8f468e29221f0ba194a5f613/drivers/bluetooth/hci_bcm.c#L961
07:49thunfisch has quit [Ping timeout: 480 seconds]
07:58Redecorating[m]the only places the antenna is in `ioreg -l` for me is under RequestedFiles and IO80211CountryCode
08:02MajorBiscuit has joined #asahi-dev
08:13Major_Biscuit has joined #asahi-dev
08:15MajorBiscuit has quit [Ping timeout: 480 seconds]
08:50kettenistpw_rules: it looks like some PSCI functionality is incorrectly enabled in u-boot right now
09:01kit_ty_kate has quit [Quit: WeeChat 2.9]
09:23kettenistpw_rules: disable PSCI_RESET makes sure CONFIG_EFI_HAVE_RUNTIME_RESET isn't set, so this should make u-boot stop advertising EFI runtime reset support
09:41Dcow_ has joined #asahi-dev
09:52nabaiste^ has quit [Ping timeout: 480 seconds]
09:57thunfisch has joined #asahi-dev
10:00bps2 has quit [Ping timeout: 480 seconds]
10:14Glanzmann has joined #asahi-dev
10:15Glanzmannamw: https://ab34.de/u/asahi.txt are my notes, from my site feel free to add it. But better use the new shorter url: https://tg.st/u/asahi.txt
10:16Glanzmannamw: I also considered improving this steps to be able to install debian in less than 10 minutes (I also thought about doing a debian live system if you just want to try it and discard it afterwards), but probably that is not necessary because marcan will do the installer soon anyway.
10:26blassphemy[m] has joined #asahi-dev
10:33Glanzmann has quit [Quit: EOF]
10:36aleasto has joined #asahi-dev
10:44mazI'd rather we turn that off by default, because the behaviour really isn't compliant with the architecture.
10:50mazwell, that's what I do already. just need to rebuild the test m1n1/u-boot bundle... once I have sorted the NV branch...
10:53bps2 has joined #asahi-dev
11:07bps2 has quit [Ping timeout: 480 seconds]
11:13Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:38amwGlanzmann: FWIW I got debian X working mostly following your steps. I had to install a particular set of packages to get X + mouse working - still can't get the touch pad to work though
12:04chadmedjannau was working on the touchpad. aiui applespi has issues with how this particular touchpad reports HID events, pressure etc
12:14Dcow_ has joined #asahi-dev
12:35chadmed has quit [Remote host closed the connection]
12:36amwchadmed: Could see any newer touchpad patches in Jannau's github branches - presume it's still to be decoded
12:44Dcow_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:56phire has quit [Ping timeout: 480 seconds]
13:32Dcow_ has joined #asahi-dev
14:02Guest7760 is now known as svenpeter[m]
14:34yuyichao has quit [Ping timeout: 480 seconds]
14:51zsxh has quit [Ping timeout: 480 seconds]
15:03yuyichao has joined #asahi-dev
15:22Glanzmann has joined #asahi-dev
15:23Glanzmannamw: Perfect. Touchpad worked for me out of the box without doing anything. Jannau gave me some tips (added to asahi.txt) how to use the touchpad. When I'm back home I'll try wifi and also send you my package list. With that touchpad works out of the box. I used xorg (are using X or wayland)?
15:25Glanzmannamw: are you* using X or wayland? (kde and gnome os debian testing wayland - fvwm2 the window manager I use is for example xorg)
15:34Glanzmann has quit [Quit: EOF]
16:31Glanzmann has joined #asahi-dev
16:31Glanzmann has left #asahi-dev [#asahi-dev]
17:06tpw_rules has quit [Ping timeout: 480 seconds]
17:09tpw_rules has joined #asahi-dev
17:30kit_ty_kate has joined #asahi-dev
17:30yuyichao_ has joined #asahi-dev
17:33yuyichao has quit [Ping timeout: 480 seconds]
18:08Major_Biscuit has quit [Ping timeout: 480 seconds]
18:44yuyichao has joined #asahi-dev
18:48yuyichao_ has quit [Ping timeout: 480 seconds]
19:00Major_Biscuit has joined #asahi-dev
19:05marcankettenis: I'm thinking smc would be a parent node with subnodes for individual features, then one of those would just be a standard gpio controller
19:06marcangiven this needs to come up before the root port does link training, since we don't do hotplug yet...
19:12marcanrobher: would be nice to hear your opinion on the general idea for the bindings before I start writing it that way
19:13marcantl;dr one parent node that implements a key/value interface, then a bunch of child nodes each bound by a subdriver that implements a given feature (gpio, battery, hwmon, etc)
19:13marcanthe parent node would not be a simple-bus derivative; the driver there would be in charge of probing child nodes
19:14marcanI think this makes sense because it lets us use the compatible mechanism to identify SMC features/quirks across devices (and makes it more reusable), and allows for obvious things like "the mac mini does not have a battery so does not instantiate that driver"
19:15marcanan alternative way would be to ditch all the explicit description in the DT and just have one monolithic driver attempt to autoprobe everything...
19:16robhermarcan: It's a judgement call. If the child devices have DT resources then it makes sense. But often it is just a node with only compatible just for convenience of instantiating (Linux) drivers.
19:17marcanI guess part of the question is whether we can autodetect ~everything or whether we're going to need DT props at some point
19:17marcanif we need to start specifying per-platform props it starts making sense to break it apart like that
19:18marcanI guess the general driver model would be the same in both cases, it mostly just changes how the subdrivers are instantiated, so it wouldn't be too hard to make the call a bit later
19:20tpw_ruleskettenis: so it turns out u-boot's efi layer polls usb keyboards each time grub reads a sector to check if a new key is available. this leads to a 53 second delay when one is attached after selecting a boot option, unless you press a key
19:21marcanwe're definitely going to have a sysfs interface with all the keys for experiments/debug anyway
19:38yuyichao_ has joined #asahi-dev
19:42yuyichao has quit [Ping timeout: 480 seconds]
20:02aleasto has quit [Remote host closed the connection]
20:30___nick___ has joined #asahi-dev
20:30___nick___ has quit []
20:32___nick___ has joined #asahi-dev
20:36sveni usually submit what I think is the best way. chances are the first submission has to be rewritten anyway ;)
20:58Major_Biscuit has quit [Ping timeout: 480 seconds]
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:17tpw_rulesi found a keyboard which runs into this problem: https://patchwork.ozlabs.org/project/uboot/patch/20200914023921.119630-3-jason.wessel@windriver.com/ but it looks like the patch never made it into u-boot
21:59ar has quit [Ping timeout: 480 seconds]
22:08ar has joined #asahi-dev
22:20Major_Biscuit has joined #asahi-dev
22:48Major_Biscuit has quit [Ping timeout: 480 seconds]
23:02gladiac is now known as Guest9080
23:02gladiac has joined #asahi-dev
23:07Guest9080 has quit [Ping timeout: 480 seconds]
23:58yuyichao_ has quit [Ping timeout: 480 seconds]