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 / 20251020-ssqosid-v5.txt
Last active October 20, 2025 08:13
20251020 ssqosid
#
# _-----=> irqs-off/BH-disabled
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / _-=> migrate-disable
# |||| / delay
# TASK-PID CPU# ||||| TIMESTAMP FUNCTION
# | | | ||||| | |
sh-170 [005] ..... 422.219426: thread_qoscfg_value_store: DEBUG thread_qoscfg_value_store(): task->pid=170 value=170 sh-170 [005] ..... 422.219911: thread_qoscfg_value_store: DEBUG thread_qoscfg_value_store(): old_thread.srmcfg=0x0 sh-170 [005] ..... 422.219947: thread_qoscfg_value_store: DEBUG thread_qoscfg_value_store(): write value to thread.srmcfg=0xaa for pid=170 sh-170 [005] ..... 422.219962: thread_qoscfg_value_store: DEBUG thread_qoscfg_value_store(): read thread.srmcfg=170 for pid=1
@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
@pdp7
pdp7 / Linux dmesg lpi4amain 6.15.0-12439-g7ec07c93dbac.txt
Created June 11, 2025 23:50
Linux dmesg lpi4amain 6.15.0-12439-g7ec07c93dbac
root@lpi4amain:~# dmesg
[ 0.000000] Booting Linux on hartid 1
[ 0.000000] Linux version 6.15.0-12439-g7ec07c93dbac (pdp7@thelio) (Ubuntu clang version 18.1.3 (1ubuntu1), Ubuntu LLD 18.1.3) #1354 SMP Wed Jun 11 11:12:46 PDT 2025
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Sipeed Lichee Pi 4A
[ 0.000000] SBI specification v2.0 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x10004
[ 0.000000] SBI TIME extension detected
[ 0.000000] SBI IPI extension detected
[ 0.000000] SBI RFENCE extension detected
@pdp7
pdp7 / Linux config lpi4amain 6.15.0-12439-g7ec07c93dbac.txt
Created June 11, 2025 23:46
Linux config lpi4amain 6.15.0-12439-g7ec07c93dbac
#
# Automatically generated file; DO NOT EDIT.
# Linux/riscv 6.15.0 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 / rust-next-pwm-working-fan-for-sending-v4.config
Created June 10, 2025 21:09
kernel config used with mwilczy/rust-next-pwm-working-fan-for-sending-v4
#
# Automatically generated file; DO NOT EDIT.
# Linux/riscv 6.15.0 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 / boot-hang-th1520-2025-06-01.txt
Last active June 1, 2025 22:41
th1520 boot hang 2025-06-01: next-20250530 with series [email protected]
brom_ver 8
[APP][E] protocol_connect failed, exit.
-----------------------------------------
_____ _ _____ _____ _ __
| __ \ (_)/ ____| __ \| |/ /
| |__) | _ _ _ _| (___ | | | | ' /
| _ / | | | | | | |\___ \| | | | <
| | \ \ |_| | |_| | |____) | |__| | . \
|_| \_\__,_|\__, |_|_____/|_____/|_|\_\
__/ |
@pdp7
pdp7 / acpi-rqsc-resctrl.md
Last active February 22, 2025 21:26
acpi-rqsc-resctrl.txt
mount -t resctrl resctrl /sys/fs/resls -la /sys/fs/resctrl/

ls -la /sys/fs/resctrl/

cd /sys/fs/resctrl/

echo 'L2:3=ff0' >  /sys/fs/resctrl/schemata