rpi5_native_start masks x0 down to the documented 32-bit DTB-pointer range (the firmware's own entry protocol leaves the upper 32 bits unspecified), stores it into g_rpi5_dtb_ptr for the still-open DTB->BootInfo constructor (item 2) to read, then switches sp to a dedicated 2 MiB BSS stack -- this path has no EDK2 boot stack to inherit, unlike every other entry path in this codebase. Intentionally halts (wfe/b loop) afterward rather than tail-calling into item 2's constructor, which doesn't exist yet -- no stub function pretending to be more than it is. Not yet linked at the real 0x80000 load address; that needs its own linker script/build target, not scoped into this item. Compiles and links into the existing ARCH=aarch64 QEMU/UEFI acceptance build as dead code (ELF kernel build's KERNEL_ASM wildcards every *.S in arch/aarch64/; nothing there branches to it), same as rpi5_dtb.c/rpi5_mailbox.c before it. Verified 3-arch boot to ok>/zuse)ok>. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YcT3H2PQeyujrzjqS3Var
33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
/*
|
||
StarForth — Steady-State Virtual Machine Runtime
|
||
Copyright (c) 2023–2025 Robert A. James. All rights reserved.
|
||
Licensed under the StarForth License, Version 1.0.
|
||
*/
|
||
|
||
/**
|
||
* rpi5_native_entry.h - Raspberry Pi 5 native (non-UEFI) boot entry point
|
||
* (FABRIC-3.md §IV.3 item 1).
|
||
*
|
||
* `native_rpi5_entry.S`'s `rpi5_native_start` is the very first code that
|
||
* runs on this path -- entered directly by Pi 5 firmware, no UEFI, no
|
||
* ACPI, none of `boot/uefi_loader.c`'s PE-loader shape applies. It masks
|
||
* the firmware's raw entry register down to the documented 32-bit DTB
|
||
* pointer (§IV.1: upper 32 bits of the 64-bit register are unspecified)
|
||
* and stores it here, then establishes its own dedicated stack (this path
|
||
* has no EDK2 boot stack to inherit) and halts.
|
||
*
|
||
* `g_rpi5_dtb_ptr` is this stub's one real output -- the still-open
|
||
* DTB->BootInfo constructor (§IV.3 item 2) reads it from here once it
|
||
* exists; nothing calls that constructor yet, so `rpi5_native_start`
|
||
* halts rather than tail-calling into a function that isn't real.
|
||
*/
|
||
|
||
#ifndef STARKERNEL_RPI5_NATIVE_ENTRY_H
|
||
#define STARKERNEL_RPI5_NATIVE_ENTRY_H
|
||
|
||
#include <stdint.h>
|
||
|
||
extern uint64_t g_rpi5_dtb_ptr;
|
||
|
||
#endif /* STARKERNEL_RPI5_NATIVE_ENTRY_H */
|