forked from Imagelibrary/rtems
bsps/aarch64/start: Add support for Image protocol
This adds support for a the Image header protocol similar to the zImage protocol that Linux kernels use to describe their expectations of the system configuration.
This commit is contained in:
committed by
Kinsey Moore
parent
90587938e4
commit
ad5a2be4c1
@@ -37,12 +37,35 @@
|
|||||||
#include <rtems/asm.h>
|
#include <rtems/asm.h>
|
||||||
#include <rtems/score/percpu.h>
|
#include <rtems/score/percpu.h>
|
||||||
|
|
||||||
|
#include <bsp.h>
|
||||||
#include <bspopts.h>
|
#include <bspopts.h>
|
||||||
|
|
||||||
/* Global symbols */
|
/* Global symbols */
|
||||||
.globl _start
|
.globl _start
|
||||||
.section ".bsp_start_text", "ax"
|
.section ".bsp_start_text", "ax"
|
||||||
|
|
||||||
|
#ifdef BSP_START_IMAGE_HEADER
|
||||||
|
/*
|
||||||
|
* This format is defined by:
|
||||||
|
* https://www.kernel.org/doc/Documentation/arm64/booting.txt
|
||||||
|
*/
|
||||||
|
mov x0, x0
|
||||||
|
b _start
|
||||||
|
/*
|
||||||
|
* This must be defined by the BSP as different environments may not treat it
|
||||||
|
* the same. Xen treats it as an offset from 0x40000000 while QEMU treats it
|
||||||
|
* as an absolute offset (RAM origin + load offset).
|
||||||
|
*/
|
||||||
|
.dword BSP_START_IMAGE_HEADER_LOAD_OFFSET
|
||||||
|
.dword 0 /* image size */
|
||||||
|
.dword 0 /* kernel flags, LE, page size unspecified, place near RAM start */
|
||||||
|
.dword 0 /* reserved 2 */
|
||||||
|
.dword 0 /* reserved 3 */
|
||||||
|
.dword 0 /* reserved 4 */
|
||||||
|
.word 0x644d5241 /* magic, ascii ['A', 'R', 'M', 64] LE */
|
||||||
|
.word 0 /* reserved 5, PE COFF offset */
|
||||||
|
#endif /* BSP_START_IMAGE_HEADER */
|
||||||
|
|
||||||
/* Start entry */
|
/* Start entry */
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
|
|||||||
16
spec/build/bsps/aarch64/optimghdr.yml
Normal file
16
spec/build/bsps/aarch64/optimghdr.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||||
|
actions:
|
||||||
|
- get-boolean: null
|
||||||
|
- define-condition: null
|
||||||
|
build-type: option
|
||||||
|
copyrights:
|
||||||
|
- Copyright (C) 2025 On-Line Applications Research (OAR)
|
||||||
|
default:
|
||||||
|
- enabled-by: true
|
||||||
|
value: true
|
||||||
|
description: |
|
||||||
|
include zImage boot header
|
||||||
|
enabled-by: true
|
||||||
|
links: []
|
||||||
|
name: BSP_START_IMAGE_HEADER
|
||||||
|
type: build
|
||||||
Reference in New Issue
Block a user