Skip to content

Instantly share code, notes, and snippets.

---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Type Physical Virtual #Pages Attr
ConventionalMemory 000080000000 0 000630d8 WC WT WB
LoaderData 0000e30d8000 0 00008000 WC WT WB
LoaderCode 0000eb0d8000 0 00000095 WC WT WB
LoaderData 0000eb16d000 0 00002103 WC WT WB
LoaderCode 0000ed270000 0 000000f2 WC WT WB
ConventionalMemory 0000ed362000 0 0000005e WC WT WB
@z3ntu
z3ntu / rotation_matrix.py
Last active January 22, 2025 08:34
generate the iio rotation matrix
#!/usr/bin/python3
import glob
import os
import sys
import time
"""
(according to Android emulator, seems to be inverse for iio)
upright/normal: 0 9.81 0

Foreward

This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.

It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.

Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2

Original Foreword: Some Opinion

The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and

@i-am-tom
i-am-tom / FizzBuzz.hs
Last active December 21, 2024 10:17
Arguably the fastest implementation of FizzBuzz ever written.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UnsaturatedTypeFamilies #-}
import GHC.TypeLits
import Prelude hiding (Functor, Semigroup)
type Main = (Fizz <> Buzz) <$> (0 `To` 100)
@lizthegrey
lizthegrey / attributes.rb
Last active May 23, 2025 05:50
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@orangecms
orangecms / coreboot-p34v2.md
Last active May 14, 2025 00:05
Porting guide for coreboot: GIGABYTE P34G v2 / Schenker XMG C404

Porting coreboot to a Haswell / Lynx Point laptop: GIGABYTE P34G v2

This mainboard was sold by Schenker XMG as C404, while the original model name by GIGABYTE is P34G v2.

The board schematics are not publicly available. However, from another laptop board's schematics, we can learn a bit about the components it should have: laptop mainboard schematics

autoport

@i3v
i3v / cdm_fio.sh
Last active May 15, 2024 13:10
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test
@LiveOverflow
LiveOverflow / AcoraidaMonicaGame.sol
Last active January 24, 2025 19:53
Acoraida Monica
pragma solidity =0.4.25;
contract AcoraidaMonicaGame{
uint256 public version = 4;
string public description = "Acoraida Monica admires smart guys, she'd like to pay 10000ETH to the one who could answer her question. Would it be you?";
string public constant sampleQuestion = "Who is Acoraida Monica?";
string public constant sampleAnswer = "$*!&#^[` [email protected];Ta&*T` R`<`~5Z`^5V You beat me! :D";
Logger public constant logger=Logger(0x5e351bd4247f0526359fb22078ba725a192872f3);
address questioner;
string public question;
@nvsofts
nvsofts / gist:09a0bd09336c49bce0f7efe8d4fa9f56
Created December 5, 2018 12:06
PlayStation Classic boot log (verbose mode) plug usb -> power on -> power off
oot from normal
mt_pll_init +
CLK_GATING_CTRL1:d891923e
after set, CLK_GATING_CTRL1:d891923e
CLK_GATING_CTRL2:7afdbf10
[PWRAP] pmic ID: 2092.
[EMI] MDL number = 0
[EMI] PCDDR3
@MIvanchev
MIvanchev / article.md
Last active May 24, 2025 14:52
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!