Skip to content

Instantly share code, notes, and snippets.

View pdp7's full-sized avatar
💭
Linux on RISC-V

Drew Fustini pdp7

💭
Linux on RISC-V
View GitHub Profile
@pdp7
pdp7 / blackhole-linux-boot-log.txt
Created December 3, 2025 01:40
Blackhole Linux boot log
/home/dfustini/.tenstorrent-venv/bin/python boot.py --boot --l2cpu 0 --opensbi_bin fw_jump.bin --opensbi_dst 0x400030000000 --rootfs_dst 0x4000e5000000 --kernel_bin Image --kernel_dst 0x400030200000 --dtb_bin blackhole-card.dtb --dtb_dst 0x400030100000
Starting PCI link reset on BH devices at PCI indices: 0
Waiting for up to 2 seconds for asic to come back after reset
Config space reset completed for device 0
Finishing PCI link reset on BH devices at PCI indices: 0
Writing OpenSBI to 0x400030000000
Writing Kernel to 0x400030200000
Writing dtb to 0x400030100000
Setting clock to 200
Setting clock to 1750
@pdp7
pdp7 / kernel-config-202512010-r1.txt
Created December 1, 2025 17:55
kernel config for "riscv: dts: thead: Add CPU clock and OPP table for TH1520"
#
# Automatically generated file; DO NOT EDIT.
# Linux/riscv 6.18.0-rc6 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Ubuntu clang version 18.1.3 (1ubuntu1)"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_CLANG_VERSION=180103
CONFIG_AS_IS_LLVM=y
CONFIG_AS_VERSION=180103
@pdp7
pdp7 / bmw.c
Created November 22, 2025 16:40
cbqri bitmask width bmw
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
long int_value;
char *endptr;
int x;
if (argc < 2) {
printf("Usage: %s <integer_argument>\n", argv[0]);
@pdp7
pdp7 / resctrl Intel GOLD 5315Y.txt
Created November 17, 2025 07:19
resctrl Intel GOLD 5315Y
vendor_id : GenuineIntel
cpu family : 6
model : 106
model name : Intel(R) Xeon(R) Gold 5315Y CPU @ 3.20GHz
stepping : 6
microcode : 0xd000410
cpu MHz : 800.000
cache size : 12288 KB
physical id : 0
siblings : 16
@pdp7
pdp7 / cpuinfo.txt
Last active November 16, 2025 05:53
cpuinfo
root@accepted-malamute:/sys/fs/resctrl# for i in `find . -type f |grep -v tasks `; do echo ========== $i ==========; cat $i ; done
========== ./cpus_list ==========
0-31
========== ./mode ==========
shareable
========== ./schemata ==========
SMBA:0=2048;2=2048;4=2048;6=2048
MB:0=2048;2=2048;4=2048;6=2048
L3:0=ffff;2=ffff;4=ffff;6=ffff
========== ./mon_data/mon_L3_06/mbm_local_bytes ==========
@pdp7
pdp7 / 20251020-ssqosid-20251020-1547.txt
Last active October 20, 2025 23:32
20251020 ssqosid
echo '' > /sys/kernel/tracing/trace ; echo $$ > thread_qoscfg_value ; echo ''
> /sys/kernel/tracing/trace
[ 26.622995] DEBUG thread_qoscfg_value_show(): CSR_SRMCFG: 0x00 pid: 194 ppid: 165 thread.srmcfg: 0x00
[ 179.874627] DEBUG thread_qoscfg_value_store(): value: 0xa5 write 0xa5 to CSR_SRMCFG
# cat info/L3^Cache_id
# cat /^C
# cat /sys/kernel/tracing/trace
# tracer: nop
@pdp7
pdp7 / th1520 poweroff reboot support for TH1520 via AON.txt
Last active September 19, 2025 18:05
Poweroff/reboot support for TH1520 via AON
pdp7@thelio:~/linux$ git log --oneline -3
75253f2a247a (HEAD) pmdomain: thead: create auxiliary device for rebooting
f51ab51b4f8c driver: reset: th1520-aon: add driver for poweroff/reboot via AON FW
8f7f8b1b3f4c (tag: next-20250918, next/master) Add linux-next specific files for 20250918
https://fast-mirror.isrc.ac.cn/revyos/revyos-kernels/pool/main/t/th1520-boot-firmware/th1520-boot-firmware_2025.05.10%2Bsdk2.0.2.tar.xz
debian@lpi4amain:/boot$ sha512sum light*bin
688274748bc0c9e4bc2a6975ab94d1512ad95f7a69fff2737fbb27ac30f647007aaab8c999a3a16404b9b615785a696c61fd619ffa2e57327673badd1b52246f light_aon_fpga.bin
1bf9a62f1455f44b2bb5767ea024e2abc80109ec188ff9268dcc1f54c0477c29d3c196564b6b14553f46fe75cba0a6813021ea859e3e15434eb8b9bdf491bd8f light_c906_audio.bin
@pdp7
pdp7 / th1520 clk orpha patched.md
Created July 5, 2025 23:58
th1520 clk orpha patched
4.4.2.2.30 C910_CLK_CFG
Description: C910 clock configuration reigster
Offset: 0x100
Default Value: 0x9f0

[1]
C910_CCLK_I0_SWITCH_SELRW
c910_cclk_i0 clock select
0: PLL0
@pdp7
pdp7 / th1520 clk orphan test.md
Last active July 5, 2025 23:55
th1520 clk orphan test
root@lpi4amain:/sys/kernel/debug/clk# uname -a
Linux lpi4amain 6.16.0-rc4-next-20250704 #1372 SMP Sat Jul  5 15:12:57 PDT 2025 riscv64 GNU/Linux

root@lpi4amain:/sys/kernel/debug/clk# cat clk_orphan_summary 
                                 enable  prepare  protect                                duty  hardware                            connection
   clock                          count    count    count        rate   accuracy phase  cycle    enable   consumer                         id
---------------------------------------------------------------------------------------------------------------------------------------------
 osc_12m                             0       0        0        0           0          0     50000      Y   deviceless                      no_connection_id         
@pdp7
pdp7 / dot config mwilczy rust-next-pwm-working-fan-for-sending-v8.txt
Created June 20, 2025 00:42
dot config mwilczy rust-next-pwm-working-fan-for-sending-v8
#
# Automatically generated file; DO NOT EDIT.
# Linux/riscv 6.16.0-rc2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Ubuntu clang version 18.1.3 (1ubuntu1)"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_CLANG_VERSION=180103
CONFIG_AS_IS_LLVM=y
CONFIG_AS_VERSION=180103