Skip to content

Instantly share code, notes, and snippets.

The following GUIDs are present in /EFI/BOOT/BOOTAA64.efi of memtest86-usb.zip
(https://www.memtest86.com/downloads/memtest86-usb.zip)
D2 E8 A4 EB 58 38 EC 41 A2 81 26 47 BA 96 60 D0
#define EFI_DEBUGPORT_PROTOCOL_GUID \
{0xEBA4E8D2,0x3858,0x41EC,\
{0xA2,0x81,0x26,0x47,0xBA,0x96,0x60,0xD0}}
DE A9 42 90 DC 23 38 4A 96 FB 7A DE D0 80 51 6A
@xypron
xypron / Makefile
Last active December 12, 2024 15:45
Makefile to create SiFive HiFive Premier P550 firmware
#!/usr/bin/make -f
# SPDX-License-Identifier: MIT
UBOOT_VERSION=eab538b697011b866aba64938ef045e67fa08dc2
OPENSBI_VERSION=EIC7X-2024.11
NSIGN_VERSION=74e7c69b812923f68ef3eeb0c1cbbee90f80b566
all:
make uboot
make sbi
@xypron
xypron / DeepComputing_Roma_II_UART.jpg
Last active November 21, 2024 16:18
Roma II laptop UART
DeepComputing_Roma_II_UART.jpg
@xypron
xypron / Milk-V_Mars_Boot_Source_Selection_SD_card.jpg
Last active March 8, 2024 02:22
Boot select switches on Milk-V Mars
Milk-V_Mars_Boot_Source_Selection_SD_card.jpg
@xypron
xypron / gist:43b58aac1232e73b8eff749fbcc3b4b3
Created March 6, 2024 15:26
OpenOCD specification for PolarFire Icicle Board
#**************************************************************************
# Copyright (C) 2015-2020 by Microchip Technology Inc. *
# http://www.microchip.com/support *
# *
# This program is free software; you can redistribute it and/or modify *
# it under the terms of the GNU General Public License as published by *
# the Free Software Foundation; either version 2 of the License, or *
# (at your option) any later version. *
# *
# This program is distributed in the hope that it will be useful, *
@xypron
xypron / gist:2202c7b86cdd149d70c59d353e64e76e
Created February 20, 2024 22:36
defective in memory device-tree when running u-boot-starfive_2024.01+dfsg-1ubuntu1_riscv64
Device-tree in memory
$47 = 0xff72efc9 "clock-f\001"
(gdb) x/16w 0xff72efa0
0xff72efa0: 0x69006b73 0x7265746e 0x74707572 0x70616d2d
0xff72efb0: 0x72777000 0x672d6e65 0x736f6970 0x73657200
0xff72efc0: 0x672d7465 0x736f6970 0x6f6c6300 0x662d6b63
0xff72efd0: >>0x00000001<< 0x79636e65 0x66697300 0x2c657669
0xff72efe0: 0x2d726464 0x61726170 0x6300736d 0x6b636f6c
0xff72eff0: 0x74756f2d 0x2d747570 0x656d616e 0x756d0073
@xypron
xypron / gist:09a82594047b9f736c09f5839ff90272
Created February 17, 2024 12:29
OpenOCD configuration of SiFive HiFive Unmatched
adapter speed 10000
adapter driver ftdi
ftdi device_desc "Dual RS232-HS"
ftdi vid_pid 0x0403 0x6010
ftdi layout_init 0x0008 0x001b
ftdi layout_signal nSRST -oe 0x0020 -data 0x0020
set _CHIPNAME riscv
transport select jtag
@xypron
xypron / gist:b1c10073a321b2ca9afa433215ab74b6
Created February 4, 2024 10:42
Detect Zba, Zbc extensions
// SPDX-License-Identifier: 0BSD
#include <stdio.h>
int test_sh1add(void) {
long x = -1L;
__asm__ volatile (
"mv a0, zero\n"
"li t1, 0x30\n"
@xypron
xypron / openocd.cfg
Last active January 2, 2024 11:19
OpenOCD for Sipeed MAIX
# SiPEED USB-JTAG/TTL
adapter driver ftdi
transport select jtag
ftdi_device_desc "Dual RS232"
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0508 0x0f1b
ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
@xypron
xypron / Lenovo_X13s_UEFI_SCT_result.csv
Last active December 23, 2022 03:50
Lenovo X13s UEFI Self Conformance Test results
We can't make this file beautiful and searchable because it's too large.
"Self Certification Test Report"
"Service\Protocol Name","Total","Failed","Passed"
"BootServicesTest\EventTimerandPriorityServicesTest","34","3","31"
"BootServicesTest\MemoryAllocationServicesTest","138","0","138"
"BootServicesTest\ProtocolHandlerServicesTest","1216","0","1216"
"BootServicesTest\ImageServicesTest","125","0","125"
"BootServicesTest\MiscBootServicesTest","118","0","118"
"RuntimeServicesTest\VariableServicesTest","57","5","52"
"RuntimeServicesTest\TimeServicesTest","31","0","31"
"RuntimeServicesTest\MiscRuntimeServicesTest","12","0","12"