Skip to content

Instantly share code, notes, and snippets.

@ryo
ryo / calc-vm-aarch64.c
Created March 2, 2023 20:25
nvmm sample
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <err.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <nvmm.h>
#define PAGE_SIZE getpagesize()
@ryo
ryo / rk3588.netbsd.log
Created August 21, 2022 20:05
netbsd/evbarm on rk3588 evb on 2022-08-22
[ 1.000000] SMCCC: Version 0x10002 (SMC)
[ 1.000000] pool redzone disabled for 'pcache'
[ 1.000000] pool redzone disabled for 'kmem-02048'
[ 1.000000] pool redzone disabled for 'kmem-04096'
[ 1.000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[ 1.000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[ 1.000000] 2018, 2019, 2020, 2021, 2022
[ 1.000000] The NetBSD Foundation, Inc. All rights reserved.
[ 1.000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.000000] The Regents of the University of California. All rights reserved.
@ryo
ryo / rk3588.netbsd.log
Created August 17, 2022 21:37
on rk3588 evb on 2022-08-18
Starting kernel ...
boot NetBSD/aarch64
initarm
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] SMCCC: Version 0x10002 (SMC)
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
@ryo
ryo / rk3588.netbsd.log
Created August 14, 2022 00:50
netbsd/evbarm on rk3588 evb on 2022-08-14
boot NetBSD/aarch64
initarm
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] SMCCC: Version 0x10002 (SMC)
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
@ryo
ryo / rk3588.netbsd.log
Created August 10, 2022 20:48
netbsd/evbarm on rk3588 evb on 2022-08-11
boot NetBSD/aarch64
initarm
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
[ 1.0000000] SMCCC: Version 0x10002 (SMC)
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot
@ryo
ryo / rk3588.netbsd.log
Created August 9, 2022 18:57
netbsd/evbarm on rk3588 evb #2
Starting kernel ...
boot NetBSD/aarch64
initarm
[ 1.0000000] NetBSD/evbarm (fdt) booting ...
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
@ryo
ryo / rk3588.netbsd.log
Created August 4, 2022 08:34
netbsd/evbarm on rk3588 evb
mmc@fe2c0000: 1, mmc@fe2e0000: 0
Bootdev(atags): mmc 0
MMC0: HS200, 200Mhz
PartType: EFI
DM: v2
boot mode: recovery (misc)
boot mode: None
Android 12.0, Build 2022.2, v2
Found DTB in boot part
rpdzkj dtb list :
% cpuctl -v identify 0; cpuctl -v identify 4
cpu0: MIDR_EL1: 0x611f0221
cpu0: MPIDR_EL1: 0x0000000080000000
cpu0: ID_AA64DFR0_EL1: 0x0000000010305f09
cpu0: ID_AA64DFR1_EL1: 0x0000000000000000
cpu0: ID_AA64ISAR0_EL1: 0x0221100110212120
cpu0: ID_AA64ISAR1_EL1: 0x0000011110211202
cpu0: ID_AA64MMFR0_EL1: 0x000012120f100001
cpu0: ID_AA64MMFR1_EL1: 0x0000000011212100
cpu0: ID_AA64MMFR2_EL1: 0x1201111100001011
#!/usr/local/bin/perl
use strict;
use warnings;
use Getopt::Std;
sub usage {
die <<__USAGE__
tcpdump_dd2h [options]
-c output C format
04:00.0 Ethernet controller: Aquantia Corp. Device 94c0 (rev 03)
Subsystem: ASUSTeK Computer Inc. Device 8812
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 10
Region 0: Memory at f7000000 (64-bit, non-prefetchable) [disabled]
Region 2: Memory at f70a0000 (64-bit, non-prefetchable) [disabled]
Region 4: Memory at f6c00000 (64-bit, non-prefetchable) [disabled]
Expansion ROM at f7080000 [disabled]
Capabilities: [40] Power Management version 3