Skip to content

Instantly share code, notes, and snippets.

View nero's full-sized avatar

nero

View GitHub Profile
@smoser
smoser / README.md
Last active March 6, 2024 18:11
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
@ljmccarthy
ljmccarthy / detect.asm
Last active July 30, 2021 05:38
Detect CGA, EGA, VGA or VESA BIOS in DOS.
format MZ
entry main:start
use16
segment main
start:
; detect EGA BIOS
mov ah, 0x12
mov bl, 0x10
local char_to_hex = function(c)
return string.format("%%%02X", string.byte(c))
end
local function urlencode(url)
if url == nil then
return
end
url = url:gsub("\n", "\r\n")
url = url:gsub("([^%w ])", char_to_hex)