#
…

2021-02-05

00:00brandas has joined #asahi-dev
00:00brandas has quit [Remote host closed the connection]
00:01brandas has joined #asahi-dev
00:01amwThere is only one line difference from git diff marcan/upstream-bringup marcan/upstream-bringup-v2
00:02modwizcodeamw: I would assume the work is still in progress.
00:02j`eyamw: v1 was *just* sent to the list
00:02j`eyamw: the v2 branch is for all changes from v1
00:10amwRefreshed linux/m1n1 from git and having trouble with .dtb:
00:12roxfanm.arcan is probably asleep, it's 9 AM in Japan
00:13amwNew linux dtb - arch/arm64/boot/dts/apple/apple-j274.dtb - gives FDT: DT CPU 1 MPIDR mismatch: 0x1 != 0x0
00:13modwizcodeamw: if you're using qemu still you cannot use the latest versions of anything
00:14modwizcodeI have local patches that get the latest stuff to boot by hacking away a lot of new stuff, but until I get the SMP bringup done it's going to be incompatible
00:15modwizcodeThe SMP bringup wouldn't be so terribly hard but I have to create a new blob of ADT with the right nodes
00:16amwmodwizcode: Ok - thanks will fall back to the older linux then
00:16modwizcodeYou need the older m1n1 too I think, although it might work okay for now. But the device tree in m1n1 is basically the same one as in the kernel so you don't want the updated version.
00:16modwizcodeYou could just checkout that one file though
00:17amwI would have thought the latest .dtb would be still acceptable to the latest m1n1/proxychain/linux.py though?
00:22brandas has quit [Quit: quit]
00:22brandas has joined #asahi-dev
00:24stemnic5 has joined #asahi-dev
00:24brandas has quit [Client Quit]
00:25stemnic has quit [Read error: Connection reset by peer]
00:25stemnic5 is now known as stemnic
00:25brandas has joined #asahi-dev
00:25modwizcodeThe dtb is processed by m1n1 itself the python side just dumps it into memory and calls a proxy function to poke it with the dynamic values from the ADT
00:26modwizcodeThe latest version of m1n1 expects different things to poke, and it comes with a new .dts with spots to put them.
00:26modwizcode(specifically it has more than 1 cpu definition with register properties for spin table startup in linux) that's not what you want if you want to use the single processor setup I had working
00:26amwAccording to linux/Documentation/devicetree/bindings/arm/cpus.yaml the address value must be 1 for arm64 v8 CPUs but they dts files have zero?
00:27modwizcodeThat's the dynamic part
00:27brandas has quit [Client Quit]
00:28modwizcodeiBoot supplies an apple style device tree which linux can't read, m1n1 reads that, sets up a linux compatible entry point for the secondary CPUs and then before it boots it edit's a regular dtb in memory with the correct addresses for linux to poke.
00:28brandas has joined #asahi-dev
00:28modwizcodethe QEMU I have at the moment doesn't have the iBoot entry point that m1n1 expects nor a proper apple style device tree, so m1n1 cannot set things up right when it goes to fill in the 0's so it just won't work.
00:30amwmodwizcode: It's failing in m1n1 not qemu ? Or is m1n1 getting the values from qemu?
00:30modwizcodeIt's failing in m1n1 because qemu doesn't give it the values it needs because I've not written that code yet :)
00:30amwmodwizcode: Ok - thanks
00:31amwI think I understand - the fact it didn't even get to load linux was confusing me
00:31amwSo I should fall back to the old m1n1 and linux for the moment
00:32amwI mean for qemu booting - need to update the wiki too I guess.
00:32modwizcodeYeah use the old versions for both
00:43brandas has quit [Quit: quit]
00:44brandas has joined #asahi-dev
00:45brandas has quit [Client Quit]
00:45brandas has joined #asahi-dev
01:20Raqbit has quit [Ping timeout: 256 seconds]
01:36_whitelogger has joined #asahi-dev
01:45_whitelogger has joined #asahi-dev
01:53Raqbit has joined #asahi-dev
01:53rwhitby has quit [Quit: ZNC - http://znc.in]
01:57rwhitby has joined #asahi-dev
02:08KindOne has quit [Ping timeout: 272 seconds]
02:15KindOne has joined #asahi-dev
02:59thestr4ng3r has quit [Read error: Connection reset by peer]
03:00thestr4ng3r has joined #asahi-dev
03:26PhilippvK has quit [Ping timeout: 258 seconds]
03:26phiologe has joined #asahi-dev
03:30modwizcodeI'm fairly certain there's a small bug in irq-apple-aic.c as well, BITS_TO_LONGS is used which gives the number of longs to represent a given number of bits, but on 64bit arm a long is 8 bytes, the registers in the AIC afaik are 4 byte registers and it uses writel, which isn't write long but actually for writing a u32. My printouts from the emulation confirm it seems to only set half the bits
04:50amwMy prog int main() { printf("sizeof(long)=%d\\n", sizeof(long));} gives 8 on both M1 MBA and old 64bit x86 linux
04:51modwizcodeyeah linux is LLP64, int is 4, long and pointers are 8
04:51amwmodwizcode: My M1 MBA is running MacOS if it wasn't obvious :-)
04:52modwizcodeoh duh lmao
04:54davidrysk[m]amw: fwiw -- LLP64 is usually defined to mean int is 4, long is 4, long long is 8, pointers are 8
04:55davidrysk[m](Windows is the odd one out here)
04:55modwizcodeYeah I put an extra L oops
04:55modwizcodeI meant to say LP64
04:56davidrysk[m]ahhh it's ok :P
04:56davidrysk[m]apple supports ILP32 on aarch64 for the apple watch
04:57davidrysk[m](it's to save memory)
04:57modwizcodeI'm not exactly sure how that would save memory
04:57davidrysk[m]you don't need to use 64-bit pointers
04:57modwizcodeI misread lol I thought you said ILP64
04:57modwizcodeYes ILP32 would indeed save memory
04:59dhewgthat's the x32 abi, right?
04:59dhewgwhich never really took off for linux
04:59modwizcodeI'm a little surprised it didn't
05:00modwizcodeprobably too much effort and not enough understanding
05:00dhewgmemory too cheap maybe
05:00modwizcodeI don't think memory is *that* cheap
05:01dhewgmaybe not overall, but the amount you'd save by using that abi
05:02dhewgand there're prolly tons of issues with software not properly supporting it
05:21mxw39 has quit [Remote host closed the connection]
05:21mxw39 has joined #asahi-dev
06:04amwOn watches which aren't that cheap perhaps it's battery / power that's critical to limit the size of the ram
06:06brandas has quit [Quit: quit]
06:07brandas has joined #asahi-dev
06:08brandas has quit [Client Quit]
06:09brandas has joined #asahi-dev
06:11brandas has quit [Client Quit]
06:17brandas has joined #asahi-dev
06:21davidrysk[m]Yeah, RAM sucks power
06:23marcanmodwizcode: can you paste the error somewhere?
06:24marcanre the FIQ thing, the CPU implementer is probably wrong. it needs to be apple (0x61) for the FIQ support code to trigger properly.
06:25marcanyou should emulate the proper ID registers matching icestorm/firestorm
06:26marcanamw: yes, v2 is for new changes and will be rebased and rewrittenuntil submitted
06:31VinDuv has joined #asahi-dev
06:34amwok - v2 will have history re-written - the other is more suitable for branching/working from?
06:44psydruid has joined #asahi-dev
06:53maor26 has joined #asahi-dev
06:57Namidairo has quit [Quit: ZNC - https://znc.in]
06:57acelogic2 has quit [Ping timeout: 256 seconds]
06:58Namidairo has joined #asahi-dev
07:29VinDuv has quit [Quit: Leaving.]
09:00nufflee[m] has quit [Quit: Idle for 30+ days]
09:39Glanzmanndavidrysk[m]: I aggree RAM sucks approx. 10% power. However I have the 16 GB macbook air and I never had a notebook that draw that less power.
09:40GlanzmannExample: I watched one hour video less than 1% power.
09:40GlanzmannI worked for 5 hours. less than 20% power gone.
09:41GlanzmannI did a teamviewer session in daylight for 2.5 hours. 16% power gone.
09:41GlanzmannIn the car.
09:47marcanthe "1h video, 1%" stat seems overly optimistic. was that from 100% to 99% or something like that? PMICs lie about the edges of the curve :)
09:47marcanjust the display would eat more than that
09:48marcan5% I'd buy though
09:48Glanzmannyess it was 100% to 99%
09:48Glanzmannso it was a lie. However. I'm very happy with poiwer consumption
09:58baryluk has joined #asahi-dev
10:04GlanzmannBut my thinkpad is after 4 hours dead if I disable power management. With power management I'm dead after 5 hours. And by dead my mean the system is off.
10:04GlanzmannAlso I noticed that the display appears to drain less power for the same brightness.
10:05GlanzmannAnd macbook is brighter than the t490.
10:06GlanzmannAlso the macbook never gets hot unless I do qemu, but for zoom (my thinkpad starts burning battery - once I was done after 2,5 hours), video playback or normal work it never gets hot. While my thinkpad becomes hot.
10:20qyousef has quit [Ping timeout: 240 seconds]
10:27jato has joined #asahi-dev
10:32amw has quit [Ping timeout: 258 seconds]
10:49amw has joined #asahi-dev
11:02amw has quit [Ping timeout: 246 seconds]
11:57sbingner has quit [Ping timeout: 260 seconds]
12:35sbingner has joined #asahi-dev
12:42sbingner has quit [Ping timeout: 258 seconds]
13:32amw has joined #asahi-dev
13:45Axenntio has joined #asahi-dev
13:47Axenntio has quit [Remote host closed the connection]
13:57Axenntio has joined #asahi-dev
14:00Axenntio has quit [Client Quit]
14:03acelogic has joined #asahi-dev
14:05modwizcodei believe the whole trick of the M1 is their accelerators and their platform integration making using them to do something like decode a videk seemless
14:06modwizcodepower is way better with hardware like that
14:06modwizcodemarcan: can you specify the error in question?
14:06marcan08:21:22 < modwizcode> marcan: I tried building your upstream kernel branch and uh it doesn't build for me.
14:06marcan08:21:38 < modwizcode> error about labels being used with a declaration in a switch, I wrapped the cases with braces to fix.
14:07amw has quit [Ping timeout: 264 seconds]
14:08modwizcodeI'll get you a printout. j`ey linked a mailing list reply from the build test bot that had the same error tho
14:09Axenntio has joined #asahi-dev
14:10Axenntio has quit [Read error: Connection reset by peer]
14:11Axenntio has joined #asahi-dev
14:12Axenntio has quit [Remote host closed the connection]
14:22Axenntio has joined #asahi-dev
14:23Axenntio has quit [Remote host closed the connection]
14:40acelogic has quit [Ping timeout: 272 seconds]
14:47roxfan2 has joined #asahi-dev
14:50roxfan has quit [Ping timeout: 265 seconds]
15:04acelogic has joined #asahi-dev
16:00josiahmendes[m] has quit [Quit: Idle for 30+ days]
16:00mcnight[m] has quit [Quit: Idle for 30+ days]
16:00mofux[m] has quit [Quit: Idle for 30+ days]
16:02vimal has quit [Remote host closed the connection]
16:08mofux[m] has joined #asahi-dev
16:08arnddhewg, modwizcode: supporting extra ABIs in a distro is a pain, so almost nothing supports x32 applications, and the ones that do (gentoo, mainly) suffer from running into all the bugs that nobody else noticed
16:09arndfor arm64, there are still ilp32 patches getting ported to every kernel because there are a handful of users, but it never made it into mainline because that would have required maintaining the ABI indefinitely
16:10arndit's a similar niche to big-endian arm64, which was merged early on, but has a similar set of users, and in restrospect we would have perhaps been better off without that as well
16:13arndilp32 does have a noticeable performance advantage (5% to 20% according to numbers I've seen) over both traditional 32-bit binaries and native 64-bit binaries, but a lot of the applications that do care about performance are the same ones that care about addressing lots of memory and want 64-bit anyway
16:14modwizcodeYeah that's basically what I figured. Correct me if I'm wrong but I think that x86 in contrast since x32 isn't a totally different instruction set and mode, can easily benefit in multiple ways, whereas for arm64 you already need a new build and x32 is just another build to maintain with hard to explain tradeoffs for users and limitations for developers.
16:22marcanmodwizcode: ohh that one. thanks, just pushed a fix to upstream-bringup-v2
16:23modwizcodeYeah I was trying to pull it up for you again but I couldn't find it when I tried to replicate it locally, I was going to clean and rebuild at some point but it seems you didn't need it
16:24marcanI wonder why I never saw my compiler complain about that one
16:24modwizcodeYeah that's weird, maybe your CFLAGS are weird?
16:24modwizcodeI think there's an extension to ignore that issue
16:25marcanI didn't set anything special...
16:25marcangcc versions?
16:25marcananyway, it's fixed now :)
16:25dhewgarnd: yeah, i figured. i think debian supports x32 too. and wasn't there at least an attempt to remove x32 support for linux?
16:27arndAh right, I forgot there was a whole debianport, I thought it was just a few packages for some reason. We tried killing it off twice, but chickened out each time because there are a couple of people that have specific applications (gcc mostly) running that way
16:28Axenntio has joined #asahi-dev
16:28arndI still hope we can kill it off before we assign system call number #512, which currently conflicts with x32
16:28marcanha, does it halve gcc memory usage or so?
16:28arndx32 uses numbers 512 through 547 for syscalls that require some compat handling
16:30arndnot quite, but it's a noticeable reduction nonetheless. I haven't done memory usage measurements, but did see up to 15% difference in performance on kernel builds
16:30arndwhich would mostly come from better cache utilization
16:30Axenntio has quit [Client Quit]
16:30modwizcodeI'm surprised by now there's not like a late binding syscall number assignment.
16:32Axenntio has joined #asahi-dev
16:32jixyou can always compile to wasm if you want 32bit pointers ;)
16:33Axenntio has quit [Client Quit]
16:36roxfan has joined #asahi-dev
16:39marcanmodwizcode: oh duh, because I'm building with !CONFIG_PM_SLEEP
16:39marcanthat's why I never saw that error
16:39marcansecond time that part of the code borks and I miss it for this reason... I should really enable that
16:39modwizcodeI wasn't using your config because I lost it when I installed natively to do further work outside a VM
16:40modwizcodeMy current config is a lot bigger than i expect I'm kind of wondering where it's picking up the bloat
16:40roxfan2 has quit [Ping timeout: 276 seconds]
16:40marcanok, off to sleep
16:40marcanlet's see if I can fix my damn sleep schedule
16:41modwizcodeI'm also going to have to figure out why when loading linux I time transfers to qemu at being like 0.3MB/s when testing in shell I can copy at like 0.5MB/s and both of those are slow
16:41marcanone context switch per uart char?
16:41modwizcodeI hope not
16:42modwizcodeIt should mostly be doing full fifo writes if my last effort on the fifo code was anything to go by
16:42josiahmendes[m] has joined #asahi-dev
16:42modwizcodeBut I haven't done the tracing yet :)
16:42marcanthough I think m1n1 doesn't really use the FIFO properly for tx, though it does for RX probably
16:42modwizcodeNeed to implement timing traces that don't write one line per char to qemu's trace output which involves taking locks at least sometimes
16:42modwizcodeQemu doesn't implement anything for TX but that's not an issue
16:43modwizcodeTX is "slow" but I think has literally always worked slower than RX
16:43modwizcode*faster than Rx
16:43modwizcodeAnyway go to sleep and maybe when you wake up I'll have answers :)
16:54Axenntio has joined #asahi-dev
16:54Axenntio has quit [Remote host closed the connection]
17:32VinDuv has joined #asahi-dev
17:43sbingner has joined #asahi-dev
17:43vimal has joined #asahi-dev
17:46sbingner has quit [Excess Flood]
17:49sbingner has joined #asahi-dev
18:18dagb has quit [Remote host closed the connection]
18:26Axenntio has joined #asahi-dev
18:27Axenntio has quit [Client Quit]
18:30mxw39 has quit [Read error: Connection reset by peer]
18:36mxw39 has joined #asahi-dev
18:36sbingner has quit [Ping timeout: 258 seconds]
18:41sbingner has joined #asahi-dev
19:18acelogic has quit [Ping timeout: 258 seconds]
19:45acelogic has joined #asahi-dev
19:49carlosn has left #asahi-dev [#asahi-dev]
20:51vimal has quit [Remote host closed the connection]
20:55vimal has joined #asahi-dev
21:19VinDuv has quit [Quit: Leaving.]
21:53acelogic has quit [Ping timeout: 256 seconds]
22:04danilonc has quit [Ping timeout: 240 seconds]
22:07danilonc has joined #asahi-dev
22:18acelogic has joined #asahi-dev
23:06amw has joined #asahi-dev
23:31amw has quit [Ping timeout: 256 seconds]
23:51qyousef has joined #asahi-dev
…