#
…

2023-09-15

00:31nicolas17 has joined #asahi-dev
00:38nicolas17https://twitter.com/tech_reve/status/1702097480924741873 there's some evidence that A17 has the same CPU cores as A16
00:41* kevans91ponders using stackable headers for the middle board in a stacked setup
00:44nicolas17marcan: just for your curiosity ^
01:02elros has joined #asahi-dev
01:06elrosHey there, I'm unsure if this is the right place to ask, but given what's written in the contributing page, I wanted to get familiar with asahi in order to contribute by looking at the docs and helping out there. But I'm unsure on what repo exactly should I contribute. Or would it be more efficient to just look at issues on the repos under the org?
01:07elrosIn any case, would like to help any way I can. I am a beginner at this, however. My experience is as a web dev, mainly. I do some C programming as part of my studying efforts, on the side, but that's about as familiar as I am with things at lower levels than web...
01:30elros has quit [Ping timeout: 480 seconds]
01:44weitcis has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:48elros has joined #asahi-dev
01:49chadmedelros: i think the best place to start would be the yaks page, https://github.com/AsahiLinux/docs/wiki/Yaks-in-need-of-shaving
02:00gabuscus has quit []
02:00jeisom_ has quit [Quit: Leaving]
02:00elros has quit [Ping timeout: 480 seconds]
02:01jeisom has joined #asahi-dev
02:08chadmed has quit [Quit: Konversation terminated!]
02:10jeisom has quit [Ping timeout: 480 seconds]
02:24i509vcb has quit [Quit: Connection closed for inactivity]
02:34crabbedhaloablut has joined #asahi-dev
02:35gabuscus has joined #asahi-dev
03:11pthariensflame has joined #asahi-dev
03:13tristan2 has joined #asahi-dev
03:15tristan2_ has quit [Ping timeout: 480 seconds]
03:30rpirea_ has joined #asahi-dev
03:32pthariensflame has quit [Quit: Textual IRC Client: www.textualapp.com]
03:35rpirea has quit [Ping timeout: 480 seconds]
03:45psykose has quit [Remote host closed the connection]
03:46psykose has joined #asahi-dev
04:09tobhe_ has joined #asahi-dev
04:14tobhe has quit [Ping timeout: 480 seconds]
04:26weitcis has joined #asahi-dev
04:41chadmed has joined #asahi-dev
05:22i509vcb has joined #asahi-dev
05:26chadmedwhats going to be the best way to do the dt schema for the smc hwmon stuff? rummaging around it looks like its probably best to write one for the whole SMC and put it under mfd
05:26chadmedbut im open to suggestions
05:48nicolas17ok I'm seeing conflicting info about A17 now so nevermind
05:48gladiac has joined #asahi-dev
05:57nicolas17 has quit [Quit: Konversation terminated!]
06:22rpirea_ is now known as rpirea
06:39chadmed has quit [Remote host closed the connection]
07:15nst has quit [Ping timeout: 480 seconds]
07:24nst has joined #asahi-dev
07:34cylm has quit [Ping timeout: 480 seconds]
08:01cylm has joined #asahi-dev
08:42hightower2 has quit [Ping timeout: 480 seconds]
08:51cylm has quit [Ping timeout: 480 seconds]
08:56vup2 has quit [Ping timeout: 480 seconds]
08:57elros has joined #asahi-dev
09:07elroschadmed: Thanks a lot! But I did look at that page. The thing is I don't think I have enough knowledge to claim any of the unclaimed issues. Which is why I was kind of trying to go for docs.
09:07elrosLooking at those issues I'm unsure where to start
09:08cylm has joined #asahi-dev
09:09elros has quit [Quit: WeeChat 4.0.4]
09:10elros has joined #asahi-dev
09:10elros has quit []
09:15elros has joined #asahi-dev
09:23gladiac has quit [Quit: k thx bye]
09:24cylm has quit [Ping timeout: 480 seconds]
09:24chadmed has joined #asahi-dev
09:45chadmedtested on j415 and j314, been meaning to get the mac mini going too but couldnt really drag that with me to hospital :)
09:45chadmedim sure there are probably issues with it though so further testing would be nice :)
09:46cylm has joined #asahi-dev
09:51chadmed has quit [Quit: Konversation terminated!]
10:00cylm has quit [Ping timeout: 480 seconds]
10:03chadmed has joined #asahi-dev
10:09elrosI see... maybe I can help with that. I only have an M1 available, though. I might be able to test on an M2, but I was unable to install the fedora remix on it.
10:11chadmedit should work regardless of soc, what we need to figure out is which smc keys we are going to expose for which devices
10:11chadmedbecause theres like 99999 grillion keys
10:11chadmedbut not all of them expose user-helpfuk information
10:11chadmedhelpful*
10:12chadmedonly thing im really not too sure about is all that horrid pointer voodoo in macsmc_hwmon_populate_info
10:12chadmedthere just *has* to be a better way to do that
10:12elrosOk. Which brings me to my next question: where can I read up to understand what are these keys and even to be able to understand this file, for example: https://github.com/chadmed/linux/commit/fa332c54cae797dc03a1db6601057d098ab01d88
10:13j`eychadmed: nice work
10:14chadmedj`ey: thanks :)
10:14chadmedfirst real attempt at kernel work that isnt rearranging a for loop so it probably needs work
10:15elroschadmed: thanks!
10:19hightower2 has joined #asahi-dev
11:01cylm has joined #asahi-dev
11:08hightower2 has quit [Ping timeout: 480 seconds]
11:31elroschadmed: How do you test these things? I found this page: https://github.com/AsahiLinux/docs/wiki/Low-level-serial-debug
11:32elrosBut I'm thinking that's probably not how to do it?
11:39as400 has quit [Remote host closed the connection]
11:41hightower2 has joined #asahi-dev
11:43as400 has joined #asahi-dev
11:53elrosI guess the specific question is how do I do to read whatever info the hardware is printing out. In the HW:SMC page there are mentions of reading and writing, but I couldn't find out how to read and write. Nor if this is doable on a terminal emulator, for example
11:59_jannau__for testing kernels most of us probably use something along https://github.com/AsahiLinux/docs/wiki/Tethered-Boot-Setup-(For-Developers)
12:01_jannau__probably with m1n1 installed in proxy only mode in a separate partition or m1n1 installed in a macOS partition for running macOS under the HV for tracing
12:03jeisom has joined #asahi-dev
12:13cylm_ has joined #asahi-dev
12:15cylm has quit [Ping timeout: 480 seconds]
12:20SalimTerryLi has quit [Quit: ZNC - https://znc.in]
12:20SalimTerryLi has joined #asahi-dev
12:29Cyrinux9474 has quit []
12:29Cyrinux9474 has joined #asahi-dev
12:36j`eyelros: you can't do it via linux terminal (as is, I had at some point some patches to add a debugfs to the SMC stuff so you could access all the keys..)
12:37j`eyeasiest way is to use m1n1 to read them (and they are some examples in the experiments/ folder in m1n1)
13:06cylm_ has quit [Ping timeout: 480 seconds]
13:32elrosAaaah, nice to know. And sorry if my questions are basic. I really have 0 knowledge on how to work with these things. Thanks a lot everyone!
13:50ydalton has joined #asahi-dev
13:51ydaltoni have a question, where do you find the compiled dtb files? i can't seem to find them in the /boot folder. are they embedded in the kernel? uboot?
13:53mpsydalton: depends on distro kernel, i.e. how it set where to put dtb files
13:53_jannau__they are embedded in ESP/m1n1/boot.bin, location in the system is distro specific, check the update-m1n1 source and/or config
13:53mpsusually /boot/dtbs-...
13:54_jannau__I think asahi alarm installs them in the module dir
13:54mpsah, interesting
13:54ydaltonthere's no /boot/dtbs-... folder in my installation
13:54ydaltonboot.bin is just m1n1 right?
13:55ydaltonsecond stage m1n1
13:55mpsboot.bin is m1n1+u-boot=dtbs
13:55mpss/=/+/
13:56_jannau__s/u-boot/next stage payload (usually u-boot)/
13:56ydaltonbut it could be a linux kernel if you really want it to be
13:57ydaltonah, i see on the wiki
13:57_jannau__yes, in that case you probably want to append boot args as well
13:58_jannau__you can also append an initrd
13:58ydaltonah i see it here
14:00ydaltoncan you use the chainload script to chainload m1n1 with the bootargs, dtb, linux kernel and initramfs?
14:00ydaltoni figure it should work
14:03* _jannau__should prepare the initramfs hooks to copy kernel modules into a tmpfs for the live system
14:18lena6 has quit [Read error: Connection reset by peer]
14:22ydalton has left #asahi-dev [ERC 5.4 (IRC client for GNU Emacs 28.2)]
14:29roxfan has joined #asahi-dev
14:32ydalton has joined #asahi-dev
14:36ydaltonhi, i was reading up on aarch64 assembly, and it said the W registers are just the 32 bit half of the 64 bit of the X registers, similar to rax and eax in x86_64 assembly. i looked at an assembly file in m1n1 and noticed it used the W registers, but i thought apple silicon does not support 32 bit arm!
14:42j`eyit supports 32bit registers still
14:44j`eyrather: aarch64 architecture includes 32-bit registers
14:44j`ey(and instructions that operatre on 32-bit quantities)
14:44j`eybut the m1 doesnt support the aarch32 ISA
14:48nicolas17 has joined #asahi-dev
14:53_jannau__nicolas17: on one hand possible, ~10% faster but almost 10% max perf core frequency, 20% faster GPU after updating from 5 to 6 GPU cores. But I doubt apple would have talked about wider decode/execution units in the presentation if the cpu core were identical
14:57nicolas17ydalton: a hypothetical x86_64 CPU that doesn't support x86 (32-bit) instructions would still have eax, ax, and al/ah
14:58nicolas17_jannau__: guess we have to wait for the software to be out to figure out the core codenames
14:58nicolas17(iOS 17.0 RC does not include the new iPhones)
15:03ydalton has quit [Remote host closed the connection]
15:05chadmed has quit [Remote host closed the connection]
15:06chadmed has joined #asahi-dev
15:07ydalton has joined #asahi-dev
15:07ydaltoni think i understand
15:13ydaltonbut like if you don't have instructions to use them, do they really exist?
15:15nicolas17I think you misunderstand what "64bit instructions" means :P
15:15_jannau__most aarch64 instructions can operate on x and w register (aliases)
15:16ydaltonnicolas17: if i understand what it means, it's instructions that operate on 64 bit wide registers?
15:17_jannau__aarch32 has no w registers. it uses rX mnemonics since all registers are 32-bit wide
15:17ydaltonyeah, i've seen those r registers before
15:18ydaltoni was today years old when i realized the r registers are the w registers in aarch64
15:18ChaosPrincessin case of x86, 64 bit instructions are just 32 bit ones, but with a REX prefix in front of them, in case of arm32/aarch64, the instruction sets are quite different, and
15:19ydaltoni think i get it now
15:19ChaosPrincessi'd even say 32 and 64 bit arm are different instruction sets, with 64 bit just being vaguely inspired by the 32 bit one
15:19ydaltonit doesn't support arm executables
15:19ydaltonbut you can still use the 32 bit wide registers
15:20ydaltonand arm64 32 bit code is completely different to regular arm code
15:20ydaltonis my understanding correct?
15:20ChaosPrincesssomething like that, yes
15:20ydaltonand apple silicon doesn't support the latter
15:20ydaltonbut you can still use the 32 bit registers
15:21j`eythe 32-bit registers are part of aarch64 too
15:21svena bit of nitpicking: all aarch64 instructions are 32bits long, it's just that some of them operate on 32bit registers while others operate on 64bit registers
15:21ydaltonyeah, i heard and saw arm64 instructions are 4 bytes wide
15:21j`eyit's not like theyre just 'leftover' or something
15:21ydaltoncompared to x86 with their variable length instructions
15:22ydaltony u no be simple arm/arm64
15:23ChaosPrincessid say its x86 that is the weirdo
15:23svenx86 is much much worse :D
15:23j`eyydalton: it is simple!
15:23ydaltonit had to hold cruft for nearly 45+ years
15:24svenyeah, which makes it much worse than aarch64 which threw away the 32bit legacy imho
15:24nicolas17fixed-length instructions are one thing letting ARM CPUs be faster
15:24nicolas17I don't think it's a *significant* difference but it's one factor
15:24ydaltonwell if you're not trying to decipher how long the next instruction is, when you can basically assume all instructions are 4 bytes wide, it's gonna be faster
15:25ChaosPrincessthat matters surprisingly little
15:25svenit also helps that apple as an all time world-class hw team ;)
15:25ChaosPrincessa lot of hot code will run out of micro-op cache anyway
15:25ChaosPrincesssven: throwing trucks full of cash at tsmc to get the best node doesnt hurt either :P
15:26svenyup :D
15:26nicolas17ydalton: you can decode more instructions in parallel if you don't need to figure out the length of one before you can start decoding the next
15:26nicolas17but yeah I don't know to what extent instruction decoding speed affects overall speed
15:27ydaltonmaybe aarch64 is just built better
15:28ydaltonbut like if i look at x86 assembly to machine code (in hex), i can kind of guess how it all works
15:28ydaltonwhen i look at aarch64 assembly and its machine code it looks incomprehensible
15:30ydaltonalso aarch32 has that weird thumb code thing
15:30sventhat just sounds like you're more used to x86
15:30svenanyway, this is also pretty off topic at this point
15:32eiln has joined #asahi-dev
15:38sefidel has quit [Remote host closed the connection]
15:39sefidel has joined #asahi-dev
15:42ydalton has left #asahi-dev [ERC 5.5 (IRC client for GNU Emacs 29.0.90)]
16:00os has quit [Ping timeout: 480 seconds]
16:08rpirea has quit [Quit: Leaving]
16:35lynndotpy has quit [Quit: bye bye]
16:37lynndotpy has joined #asahi-dev
16:38eldriitch has joined #asahi-dev
17:18jacksonchen666 has joined #asahi-dev
17:41Guest2615 has quit [Quit: Bridge terminating on SIGTERM]
17:41rhysmdnz has quit [Quit: Bridge terminating on SIGTERM]
17:44Jamie has joined #asahi-dev
17:44Jamie is now known as Guest250
17:45rhysmdnz has joined #asahi-dev
17:56Adilpickles has joined #asahi-dev
18:35Adilpick1es has joined #asahi-dev
18:36Adilpickles has quit [Ping timeout: 480 seconds]
18:43Adilpickles has joined #asahi-dev
18:45Adilpick1es has quit [Ping timeout: 480 seconds]
19:04jacksonchen666 has quit [Ping timeout: 480 seconds]
19:10le_petit_segfault has joined #asahi-dev
19:15Adilpickles has quit [Read error: Connection reset by peer]
19:16Adilpickles has joined #asahi-dev
19:32Adilpickles has quit [Remote host closed the connection]
19:47le_petit_segfault has quit [Ping timeout: 480 seconds]
19:48hightower2 has quit [Remote host closed the connection]
19:50hightower2 has joined #asahi-dev
20:10maximbaz has quit [Quit: bye]
20:11maximbaz has joined #asahi-dev
20:14jacksonchen666 has joined #asahi-dev
20:22eiln has quit [Quit: WeeChat 4.0.4]
20:29eldriitch has quit [Remote host closed the connection]
20:32elros has quit [Ping timeout: 480 seconds]
20:36elros has joined #asahi-dev
20:46lena6 has joined #asahi-dev
20:46eldriitch has joined #asahi-dev
20:48le_petit_segfault has joined #asahi-dev
21:16le_petit_segfault has quit [Ping timeout: 480 seconds]
21:45lena6 has quit [Ping timeout: 480 seconds]
21:55eldriitch has quit [Quit: Page closed]
22:02nela has quit [Quit: bye!]
22:02nela has joined #asahi-dev
22:19amarioguy has joined #asahi-dev
22:26crabbedhaloablut has quit []
23:51cylm has joined #asahi-dev
…