347 headers said "Licensed under the StarForth License, Version 1.0" -- a shortening (Captain Bob, 2026-11-08: "License file SL I think I shortened accidently"); LICENSE is, and has been since the first commit, the Starship License 1.0 (SL-1.0, SPDX LicenseRef-Starship-1.0). 349 files, 566 occurrences, now "Starship License, Version 1.0 (SL-1.0)". Left as they are, pending a ruling: docs/patent/ (the patent figures), docs/formal/ (the citable volumes) and the generated reports under docs/working/experiments/ (32 files). Comments and license text only: the amd64 kernel builds, every changed script parses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
71 lines
3.0 KiB
C
71 lines
3.0 KiB
C
/*
|
||
StarForth — Steady-State Virtual Machine Runtime
|
||
Copyright (c) 2023–2025 Robert A. James. All rights reserved.
|
||
Licensed under the Starship License, Version 1.0 (SL-1.0).
|
||
*/
|
||
|
||
/**
|
||
* rpi5_mailbox.h - VideoCore mailbox property-interface framebuffer
|
||
* setup, for the native (non-UEFI) Raspberry Pi 5 boot path
|
||
* (FABRIC-3.md §IV.3 item 3).
|
||
*
|
||
* Register layout, message/tag format, and property-tag IDs confirmed
|
||
* against multiple sources before writing `rpi5_mailbox.c` — see that
|
||
* file's own doc comment for exactly which, and what (if anything)
|
||
* remains unverified against real hardware (not in hand until
|
||
* 2026-09-17; this driver has never run on real silicon).
|
||
*/
|
||
|
||
#ifndef STARKERNEL_RPI5_MAILBOX_H
|
||
#define STARKERNEL_RPI5_MAILBOX_H
|
||
|
||
#include <stdint.h>
|
||
|
||
/* Mirrors uefi.h's FramebufferInfo exactly -- populated by
|
||
* rpi5_mailbox_get_framebuffer() the same shape UEFI GOP already
|
||
* populates it, so console.c/vt100.c/framebuffer.c need no changes at
|
||
* all for this path. Not #include-ing uefi.h here (that header is a
|
||
* large UEFI-protocol grab-bag; this driver only needs this one
|
||
* struct's shape) -- callers that already have a `FramebufferInfo*`
|
||
* (from uefi.h) can pass it directly, since the two struct
|
||
* definitions are kept in exact field-for-field sync by convention.
|
||
*/
|
||
typedef struct {
|
||
void* base;
|
||
uint64_t size;
|
||
uint32_t width;
|
||
uint32_t height;
|
||
uint32_t pixels_per_scanline;
|
||
uint32_t pixel_format; /* 0 = RGB, matches uefi.h's
|
||
* PixelRedGreenBlueReserved8BitPerColor --
|
||
* this driver always requests RGB pixel
|
||
* order explicitly (tag 0x00048006), never
|
||
* leaves it at hardware/firmware default. */
|
||
} Rpi5FramebufferInfo;
|
||
|
||
/**
|
||
* @brief Request a framebuffer from the VideoCore firmware via the
|
||
* mailbox property interface, at the requested resolution/depth.
|
||
*
|
||
* Sends one buffer with all six setup tags (physical size, virtual
|
||
* size, depth, pixel order, virtual offset, allocate) plus a
|
||
* get-pitch tag, in one request/response round trip.
|
||
*
|
||
* @param dtb Devicetree blob (passed to `rpi5_mailbox_base()`).
|
||
* @param width Requested physical+virtual width, pixels.
|
||
* @param height Requested physical+virtual height, pixels.
|
||
* @param bpp Requested bits per pixel (32 is the only depth this
|
||
* driver has been designed against; others are not
|
||
* refused outright but are unverified).
|
||
* @param out Populated on success; untouched on failure.
|
||
* @return 0 on success, negative on failure: -2 no mailbox node in the
|
||
* DTB, -3 the VC firmware rejected the request, -4 a response
|
||
* came back empty, -5 no answer within one second (every wait is
|
||
* bounded), -6 the devicetree's dma-ranges cannot place the
|
||
* framebuffer's bus address.
|
||
*/
|
||
int rpi5_mailbox_get_framebuffer(const void* dtb, uint32_t width, uint32_t height,
|
||
uint32_t bpp, Rpi5FramebufferInfo* out);
|
||
|
||
#endif /* STARKERNEL_RPI5_MAILBOX_H */
|