Sunday, 2022-01-02

sadoon_albader[mLol nice04:42
lkclhurrah - i've turned microwatt's sdram_init into a stand-alone mini-bios15:35
lkclhttps://twitter.com/lkcl/status/147766345120400589315:35
lkclnext step is, now that the console has been properly initialised, chain-load to the linux kernel15:36
lkclha! got the early boot messages now, after switching to joel's microwatt-5.7 kernel16:31
henrioklkcl: Are you running Microwatt-Linux on Libre-SOC?17:03
lkclhenriok: on microwatt.17:39
lkclthat's the first step17:39
lkclthere are too many unknowns at the moment17:39
lkcli cannot "flip in" both an unknown-status HDL *and* an unknown-status simulator *and* an unknown-status linux kernel17:40
lkclhaha just did the calculations on running the uncompression of a zImage linux kernel, it's somewhere around an hour :)18:19
lkcli fink i will investigate how to do uncompressed linux images :)18:20
programmerjakemaybe zstd compression instead...iirc it has really fast decompression speeds if you use the right setting18:23
programmerjakehttps://github.com/facebook/zstd#benchmarks18:25
lkclsimulated-memory is cheap: i can always increase simulated memory from 512 mb to 1 GB18:25
lkclsimulated-processor speed is a HUNDRED thousand times slower18:26
lkcli'm lucky to have 5 characters per second outputted on the serial console18:26
lkclthis is operating at 4-5 orders of magnitude slower than real time18:26
programmerjakewas just thinking that zstd is already used on some distros, so you could copy their work. uncompressed is likely a lot less common18:27
lkclzstd - if it is, say, 5x better, would still be 15 minutes to complete decompression.18:27
lkcl15 minutes of real-time that is18:27
programmerjakeif you use --fast=4 when compressing, the benchmark shows it as being around 6x faster than gzip18:29
lkclthat's still 15 minutes of real time waiting for it to unpack.18:30
lkclthat's if i have my calculations right.18:30
programmerjakefor decompression speeds18:30
lkcli was getting an estimated 1,000 bytes decompressed per second18:30
lkcland there are...18:30
lkclDecompressing (0x0000000000000000 <- 0x0000000000614000:0x0000000000926a9d)...18:30
programmerjakemaybe disable unneeded drivers too? smaller kernel makes for faster decompression18:31
lkclbasically a lot18:31
programmerjakeidk if that's already done18:31
lkcli'm currently working through how to set HAVE_KERNEL_UNCOMPRESSED18:31
lkclah, got it. have to add an option to arch/powerpc/Kconfig18:33
programmerjakehope that works, cuz apparently it's not well supported on x86, so may not be well supported on powerpc either18:35
programmerjakefrom google search: https://www.reddit.com/r/archlinux/comments/ex3pxb/comment/fg66gjz/18:36
lkclyep just having to add #ifndef CONFIG_KERNEL_DECOMPRESSED around the call attempting to detect a compression signature18:41
lkclokaaaay that's double the size - a good sign18:42
lkcl6mb instead of 3mb18:42
lkclover 60% of that is the initrd.18:42
lkclfrickin hilarious seeing 20 gigabyte gtkwave files...18:43
lkclthat's after only running for about 45 seconds (!)18:44
lkclyuk it's currently copying the memory over at 32-bit intervals18:44
lkclbram wr addr 0002d8e4 dout 7c84483000000000 sel f0 ....0H..18:44
lkclbram wr addr 0002d8e5 dout         7c8407b4 sel f ........18:44
lkclblech :)18:44
lkcli've got verilator printing out all read/writes to the simulated-memory so i can see what's going on18:45
lkclbram wr addr 000a71e5 dout            4bc00 sel f ........18:47
lkclbram wr addr 000a71e5 dout 10013ecc00000000 sel f0 ........18:47
lkclngggggh come ooooonnn :18:47
lkcl:)18:47
lkcloo, oo!18:47
lkclAllocating 0x5fb320 bytes for kernel...18:47
lkcl0x5b0e10 bytes of uncompressed data copied18:47
programmerjakeprinting r/w...maybe a big part of the simulator's slowness...printing can be pretty inefficient compared to just pure calculations18:48
lkclthat's in c++ - by the simulator18:48
lkclholy cow!18:48
lkclLinux/PowerPC load:18:48
programmerjakeint -> str conversions and buffering and write syscalls all contribute to slowness18:49
lkclFinalizing device tree... flat tree at 0xbd4c8018:49
lkclconsole messages!18:49
programmerjakeyay!!18:50
lkclit's doing approx one line of output per 30 seconds, but is actually running18:50
programmerjakecongrats!18:50
lkcl -> early_setup(), dt_ptr: 0xbd4c8018:50
lkcl[    0.000000] dt-cpu-ftrs: setup for ISA 300018:50
lkcl[    0.000000] dt-cpu-ftrs: final cpu/mmu features = 0x00000087800391e1 0x3c00604118:50
*** kylel1 is now known as kylel18:50
lkclfrickin awesome18:50
*** Festive_Dragon is now known as A_Dragon18:51
lkclthis is microwatt, but it's still a big deal18:51
lkclurrrr with TestIssuer it's going to be about 5-10x slower even than this, urrrr18:51
lkcl[    0.000000] radix-mmu: Mapped 0x0000000000600000-0x0000000010000000 with 2.00 MiB pages18:55
lkcl <- early_setup()18:55
lkcl[    0.000000] Linux version 5.7.0-00030-gabe0e1dab0a2-dirty (lkcl@fizzy) (gcc version 9.3.0 (Debian 9.3.0-13), GNU ld (GNU Binutils for Debian) 2.35.1)18:55
lkclwha-hey!18:55
programmerjaketry running test issuer with pypy, it'll likely simulate much faster than cpython18:59
lkclthis is not under python at all, it's *actual* verilator c++18:59
lkclmicrowatt is compiled from vhdl to verilog19:00
lkclverilog is handed to verilator, which gets compiled to a full c++ program19:00
lkclso there's no python involved here at all19:00
programmerjakein my experience with the partitioned multiplier and the divider...pypy does nmigen construction/translation slower but simulates much faster.19:00
programmerjakei was thinking you meant the simulator in openpower-isa.git19:01
lkclwhen we get to running libresoc instead, microwatt.v will be flipped out and libresoc.v put in its place19:01
lkclyehyeh, no this is entirely verilator19:01
lkclstand-alone19:01
lkclhttps://git.libre-soc.org/?p=microwatt.git;a=commitdiff;h=6431824a5f37a3a3d729d407b43f1443de93ff9819:01
lkcl           CLK: 50 MHz19:03
lkcl[    0.000000] Found legacy serial port 0 for /soc@c0000000/serial@200019:04
lkcl[    0.000000]   mem=c0002000, taddr=c0002000, irq=0, clk=100000000, speed=11520019:04
lkclspot the deliberate mistake?19:04
lkclBITS error 434 4419:04
lkcl                   BITS error 434 4319:04
lkclwark-wark :)19:04

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!