Skip to content

Instantly share code, notes, and snippets.

View imbushuo's full-sized avatar
👋
Yahallo

Ben (Bingxing) Wang imbushuo

👋
Yahallo
View GitHub Profile
@imbushuo
imbushuo / DFRComposite.inf
Created July 24, 2019 18:39
Composite configuration for Apple DFR device in Windows
;
; DFRUsbCCGP.inf
;
; Installs CCGP and WinUSB device for DFR
;
[Version]
Signature = "$Windows NT$"
Class = USBDevice
ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}

Keybase proof

I hereby claim:

  • I am imbushuo on github.
  • I am imbushuo (https://keybase.io/imbushuo) on keybase.
  • I have a public key ASDOrhNA8INjOhFTuNQ0_oNWCl47tb7VbgtIpIEMpz8LDgo

To claim this, I am signing this object:

@imbushuo
imbushuo / Vibrator.cs
Last active November 2, 2019 10:57
Turn your Apple Magic Trackpad 2 into a vibrator
using HidSharp;
using System.Linq;
namespace ForceTouchTrigger
{
class Program
{
static void Main(string[] args)
{
// Force Touch Device: USB\VID_05AC&PID_0265&MI_02
@imbushuo
imbushuo / PPTT.dsl
Created December 8, 2019 22:15
Lenovo C630 WOS (Snapdragon 850) ACPI PPTT Table
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20190703 (32-bit version)
* Copyright (c) 2000 - 2019 Intel Corporation
*
* Disassembly of ./PPTT.aml, Sun Dec 8 17:13:58 2019
*
* ACPI Data Table [PPTT]
*
* Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue
@imbushuo
imbushuo / bootlog.log
Created February 24, 2020 01:07
Debian 10 Hyper-V arm64 VM boot log
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x51df804e]
[ 0.000000] Linux version 4.19.84-microsoft-standard+ (imbushuo@BEN-SURFACEPROX) (gcc version 8.3.0 (Debian 8.3.0-6)) #2 SMP Sun Feb 23 18:32:21 EST 2020
[ 0.000000] earlycon: pl11 at MMIO 0x00000000effec000 (options '')
[ 0.000000] bootconsole [pl11] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: EFI v2.70 by EDK II
[ 0.000000] efi: ACPI=0x3fffa000 ACPI 2.0=0x3fffa014 SMBIOS=0x3ffd3000 SMBIOS 3.0=0x3ffd1000 MEMATTR=0x3f022018 RNG=0x3ffd7e18
[ 0.000000] efi: seeding entropy pool
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x000000003FFFA014 000024 (v02 VRTUAL)
@imbushuo
imbushuo / arm64-config
Created February 24, 2020 07:45
WSL2 modified arm64 kernel config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.19.84 Kernel Configuration
#
#
# Compiler: gcc (Debian 8.3.0-6) 8.3.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=80300
tinymembench v0.4.9 (simple benchmark for memory throughput and latency)
==========================================================================
== Memory bandwidth tests ==
== ==
== Note 1: 1MB = 1000000 bytes ==
== Note 2: Results for 'copy' tests show how many bytes can be ==
== copied per second (adding together read and writen ==
== bytes would have provided twice higher numbers) ==
== Note 3: 2-pass copy means that we are using a small temporary buffer ==
imbushuo@hvminlinux:~/Sources/tinymembench$ lscpu
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 1
Core(s) per socket: 8
Socket(s): 1
Vendor ID: Qualcomm
Model: 14
tinymembench v0.4.9 (simple benchmark for memory throughput and latency)
==========================================================================
== Memory bandwidth tests ==
== ==
== Note 1: 1MB = 1000000 bytes ==
== Note 2: Results for 'copy' tests show how many bytes can be ==
== copied per second (adding together read and writen ==
== bytes would have provided twice higher numbers) ==
== Note 3: 2-pass copy means that we are using a small temporary buffer ==
@imbushuo
imbushuo / HalInterrupt.md
Last active November 17, 2020 10:13
Third party Windows interrupt controller support if you are brave enough

Extracted from Windows public symbol, with a bit guessing. Function prototypes are not fully understood yet.

You still need your own way to hook your things into HAL.dll, as interrupt controller extension is never exposed.

typedef struct _SOC_INITIALIZATION_HEADER {
    ULONG TableVersion;
    ULONG TableSize;
} SOC_INITIALIZATION_HEADER, *PSOC_INITIALIZATION_HEADER;