2021-01-12 18:22:11 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
|
|
|
|
#ifndef XNUBOOT_H
|
|
|
|
#define XNUBOOT_H
|
|
|
|
|
2024-08-25 07:30:10 +00:00
|
|
|
#define CMDLINE_LENGTH_RV1 256
|
|
|
|
#define CMDLINE_LENGTH_RV2 608
|
|
|
|
#define CMDLINE_LENGTH_RV3 1024
|
2021-01-12 18:22:11 +00:00
|
|
|
|
|
|
|
struct boot_video {
|
|
|
|
u64 base;
|
|
|
|
u64 display;
|
|
|
|
u64 stride;
|
|
|
|
u64 width;
|
|
|
|
u64 height;
|
|
|
|
u64 depth;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct boot_args {
|
|
|
|
u16 revision;
|
|
|
|
u16 version;
|
|
|
|
u64 virt_base;
|
|
|
|
u64 phys_base;
|
|
|
|
u64 mem_size;
|
|
|
|
u64 top_of_kernel_data;
|
|
|
|
struct boot_video video;
|
|
|
|
u32 machine_type;
|
|
|
|
void *devtree;
|
|
|
|
u32 devtree_size;
|
2024-08-25 07:30:10 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
char cmdline[CMDLINE_LENGTH_RV1];
|
|
|
|
u64 boot_flags;
|
|
|
|
u64 mem_size_actual;
|
|
|
|
} rv1;
|
|
|
|
struct {
|
|
|
|
char cmdline[CMDLINE_LENGTH_RV2];
|
|
|
|
u64 boot_flags;
|
|
|
|
u64 mem_size_actual;
|
|
|
|
} rv2;
|
|
|
|
struct {
|
|
|
|
char cmdline[CMDLINE_LENGTH_RV3];
|
|
|
|
u64 boot_flags;
|
|
|
|
u64 mem_size_actual;
|
|
|
|
} rv3;
|
|
|
|
};
|
2021-01-12 18:22:11 +00:00
|
|
|
};
|
|
|
|
|
2021-01-14 09:18:07 +00:00
|
|
|
extern u64 boot_args_addr;
|
2021-01-12 18:22:11 +00:00
|
|
|
extern struct boot_args cur_boot_args;
|
|
|
|
|
|
|
|
#endif
|