Skip to content

Instantly share code, notes, and snippets.

@X547
X547 / 2.log
Created November 12, 2026 11:04
Haiku riscv64 pci bus renumbering (DW PCIe host)
> temu haiku-uefi.cfg
U-Boot 2021.10-dirty (Nov 02 2026 - 02:19:50 +0900)
CPU: rv64imafdcsu_zicsr_zifencei_zicntr_zba_zbb_zbs_sstc_svadu_svinval
Model: ucbbar,riscvemu-bare
DRAM: 1 GiB
Flash: ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB
## Unknown flash on Bank 2 - Size = 0x00000000 = 0 MB
@X547
X547 / 1.log
Created November 11, 2026 20:55
Haiku riscv64 bus renumbering crash
> ./temu /boot/data/VM/Haiku/riscv64/haiku-uefi.cfg
U-Boot 2021.10-dirty (Nov 02 2026 - 02:19:50 +0900)
CPU: rv64imafdcsu_zicsr_zifencei_zicntr_zba_zbb_zbs_sstc_svadu_svinval
Model: ucbbar,riscvemu-bare
DRAM: 1 GiB
Flash: ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB
## Unknown flash on Bank 2 - Size = 0x00000000 = 0 MB

Haiku VM Subsystem — Architecture Notes

A walkthrough of how Haiku's virtual memory subsystem fits together: the core objects, ownership, intrusive linked lists, wiring, area cutting, the arch-independent / arch-specific boundary, copy-on-write, and page-out.

All file/line references point into the Haiku source tree.


@X547
X547 / MinApp2.cpp
Last active August 31, 2026 23:25
BeOS R5 drawing modes behavior investigation
#include <Application.h>
#include <Window.h>
#include <View.h>
#include <Bitmap.h>
#include <Picture.h>
#include <File.h>
static void Check(status_t res)
hda: Failed to setup new audio function group (No such device)!
hda: no active codec
msi_free_vectors: freeing 1 vectors starting from 64
free_io_interrupt_vectors: freeing 1 vectors starting from 64
hda: ERROR: No such device(80007007)
slab memory manager: created area 0xffffffff99001000 (19195)
driver "nvidia_gsp" added
driver "nvidia_gsp_modeset" added
nvidia_gsp: InitDriver
nvidia_gsp: module_init
slab memory manager: created area 0xffffffff81801000 (759)
bfs: mounted "Haiku USB" (root node at 524288, device = /dev/disk/usb/0/0/1)
Mounted boot partition: /dev/disk/usb/0/0/1
unknown: [19595154: 27] Adding packages from "/boot/system/packages"
unknown: [19604904: 27] Failed to open packages activation file: No such file or directory
unknown: [19612927: 27] Loading packages from activation file failed. Loading all packages in packages directory.
slab memory manager: created area 0xffffffffa3801000 (761)
slab memory manager: created area 0xffffffffa4001000 (762)
unknown: [20539682: 27] StringPool usage:
unknown: [20543492: 27] total unique strings: 30910, 563112 bytes, overhead: 494560 bytes + 524288 bytes
@X547
X547 / gist:46ae4d3d9d04fed75000b0504b32dd5c
Created August 23, 2026 00:42
Haiku KDL when unmounting FAT volume
kdebug> message
PANIC: acquire_vnode(0xffffffffae557880, 770): node wasn't used!
kdebug> bt
stack trace for thread 4289 "w>DriveSetup"
kernel stack: 0xffffffffb7cd4000 to 0xffffffffb7cd9000
user stack: 0x00007f27b96cf000 to 0x00007f27b970f000
frame caller <image>:function + offset
0 ffffffffb7cd8380 (+ 32) ffffffff800bdd59 <kernel_x86_64> invoke_command_trampoline(void*) + 0x19
1 ffffffffb7cd83a0 (+ 32) ffffffff80162d8b <kernel_x86_64> arch_debug_call_with_fault_handler + 0x1d
2 ffffffffb7cd83f0 (+ 80) ffffffff800baed0 <kernel_x86_64> debug_call_with_fault_handler + 0x80
@X547
X547 / Port.cpp
Created August 17, 2026 22:53
Region scene with 2 swappable buffers redraw algorithm
void
Port::Update(BRegion& updateRgn)
{
if (
!fBackSurf->bitmap.IsSet() ||
fBackSurf->bitmap->Width() != fWidth ||
fBackSurf->bitmap->Height() != fHeight
) {
fBackSurf->bitmap.SetTo(new AppServer::Bitmap(fWidth, fHeight, B_RGBA32, (bitmap_flags)0), true);
fBackSurf->canvas.reset(fPainterAddOn->NewBitmapCanvas(fBackSurf->bitmap.Get()));
@X547
X547 / OCF-Format.md
Created July 28, 2026 15:52
The BlackBox Object Code File (`.ocf`) Format (assisted with Claude Code)

The BlackBox Object Code File (.ocf) Format

A specification of the on-disk layout of BlackBox Component Builder object code files, as produced by the Component Pascal compiler's object emitter and consumed by the dynamic module loader.

One .ocf file holds exactly one compiled module: its executable code, its statically initialised data, its runtime meta-information (type descriptors, export directory, debug references), the relocation information needed to place it at an arbitrary address, and the list of imports that must be resolved before

@X547
X547 / kdl1.log
Created June 27, 2026 17:48
KDL when writing through bindfs, Haiku hrev59799
kdebug> message
PANIC: Unexpected exception "General Protection Exception" occurred in kernel mode! Error code: 0x0
kdebug> bt
stack trace for thread 122523 "perl"
kernel stack: 0xffffffffb8679000 to 0xffffffffb867e000
user stack: 0x00007fe0107f1000 to 0x00007fe0147f1000
frame caller <image>:function + offset
0 ffffffffb867d190 (+ 32) ffffffff800bd5d9 <kernel_x86_64> invoke_command_trampoline(void*) + 0x19
1 ffffffffb867d1b0 (+ 32) ffffffff8016193b <kernel_x86_64> arch_debug_call_with_fault_handler + 0x1d