Skip to content

Instantly share code, notes, and snippets.

View amarioguy's full-sized avatar

Arminder Singh amarioguy

View GitHub Profile
@amarioguy
amarioguy / cpu_local_region_dump.py
Created July 18, 2026 21:08
CPU MMIO region dumping experiment
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
import sys, pathlib, time
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))
from m1n1.proxy import REGION_RX_EL1 #this line can probably be removed...
from m1n1.setup import *
from m1n1 import asm
CPU_LOCAL_RANGE_START = 0x211010000
@amarioguy
amarioguy / t8142_cpu_local_regs_diff.txt
Created July 18, 2026 20:48
T8142 CPU local register dump diff
diff -u t8142_25G5028f_cpu_local_reg_dump.txt t8142_25G5043d_cpu_local_reg_dump.txt
--- t8142_25G5028f_cpu_local_reg_dump.txt 2026-07-18 16:13:48
+++ t8142_25G5043d_cpu_local_reg_dump.txt 2026-07-18 16:32:59
@@ -1,4 +1,4 @@
-m1n1 base: 0x10005dd8000
+m1n1 base: 0x10004a14000
Fetching ADT (0x00094000 bytes)...
0x211010000: 0x0
0x211010008: 0x0
@@ -32768,7 +32768,7 @@
@amarioguy
amarioguy / m1n1_rtkit_syslog_boot_logs.txt
Created August 20, 2023 11:51
m1n1 rtkit syslog boot
Host log:
TTY> density: 1
TTY> machine_type: 0
TTY> devtree: 0x1b08c000
TTY> devtree_size: 0xa4000
TTY> cmdline: -v
TTY> boot_flags: 0x0
TTY> mem_size_act: 0x1000000000
TTY>
TTY>
@amarioguy
amarioguy / gist:6d14f247f8453517c5491986caf9079b
Created August 20, 2023 00:12
display init log with sonoma iboot stage 1
Host log:
TTY> CPU init (MIDR: 0x612f0280)...
TTY> CPU part: 0x28 rev: 0x20
TTY> CPU: M1 Max Icestorm
TTY>
TTY> boot_args at 0x10004534000
TTY> revision: 2
TTY> version: 2
TTY> virt_base: 0xfb6c000
@amarioguy
amarioguy / hacr_el2_bit_56_tests.txt
Created March 14, 2023 11:21
HACR_EL2 bit 56 (TRAP_PMUV3) notes
HACR_EL2[56] effects and observations:
the following registers are trapped to EL2 (ESR_EL1 = 0xfe000020):
- PMCR_EL0
- PMCCNTR_EL0
- PMCCFILTR_EL0
- PMCEID0_EL0
- PMCEID1_EL0
- PMCNTENCLR_EL0
- PMCNTENSET_EL0