Skip to content

Instantly share code, notes, and snippets.

View ErnyTech's full-sized avatar
:octocat:
#movingtogithub

Ernesto Castellotti ErnyTech

:octocat:
#movingtogithub
  • Savona, Italy
  • 10:44 (UTC +02:00)
View GitHub Profile
by @ErnyCS
testblink2.elf: formato del file elf32-avr
Disassemblamento della sezione .text:
00000000 <main>:
0: 8f ef ldi r24, 0xFF ; 255
2: 84 b9 out 0x04, r24 ; 4
00000004 <LBB0_1>:
@ErnyTech
ErnyTech / qemu
Last active April 3, 2024 05:40
Qemu hook for Intel GVT-g
#!/bin/sh
GVT_DRIVER=i915
GVT_PCI=0000:00:02.0
function create_gpu {
local GVT_GUID="$1"
local MDEV_TYPE="$2"
pkexec sh -c "echo $GVT_GUID > /sys/bus/pci/drivers/$GVT_DRIVER/$GVT_PCI/mdev_supported_types/$MDEV_TYPE/create"
}
@ErnyTech
ErnyTech / intel-gvtg.md
Last active March 19, 2022 21:28
How to setup Intel GVT-g with libvirt
@ErnyTech
ErnyTech / dsdt.dsl
Last active August 8, 2022 12:26
Huawei Matebook 16 [AMD] S3 Deep Sleep Patch
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20220331 (64-bit version)
* Copyright (c) 2000 - 2022 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of dsdt.dat, Mon Aug 8 14:02:02 2022
*
* Original Table Header:
@ErnyTech
ErnyTech / allocaheap.d
Last active July 19, 2023 23:07
Allocate memory on heap, which works like he stack
align(16) struct StackHeader {
StackHeader* next = void;
void* ptrDeep = void; // stack deep ptr
}
static StackHeader* lastAllocatedHeader = null;
void[] allocaHeap(size_t size) {
import core.stdc.stdlib : malloc, free;