]>
git.saurik.com Git - apple/xnu.git/blob - pexpert/pexpert/arm64/boot.h
1bcf4990e4fad01622e643eebd7fa501aedf07cd
2 * Copyright (c) 2007-2009 Apple Inc. All rights reserved.
3 * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.
9 #ifndef _PEXPERT_ARM64_BOOT_H_
10 #define _PEXPERT_ARM64_BOOT_H_
13 #include <kern/kern_types.h>
15 #include <pexpert/arm/consistent_debug.h>
16 #include <pexpert/arm/protos.h>
19 * Maximum size of an environment variable value. This particular value is
20 * chosen to accommodate the maximum encoded size of the system token as
21 * computed in https://confluence.sd.apple.com/display/TK/System+Token.
23 * This value matches iBoot's IBOOT_MAX_ENV_VAR_DATA_SIZE.
24 * There are no iBoot headers so have to duplicate it here for now.
26 #define BOOT_LINE_LENGTH 608
33 unsigned long v_baseAddr
; /* Base address of video memory */
34 unsigned long v_display
; /* Display Code (if Applicable */
35 unsigned long v_rowBytes
; /* Number of bytes per pixel row */
36 unsigned long v_width
; /* Width */
37 unsigned long v_height
; /* Height */
38 unsigned long v_depth
; /* Pixel Depth and other parameters */
41 #define kBootVideoDepthMask (0xFF)
42 #define kBootVideoDepthDepthShift (0)
43 #define kBootVideoDepthRotateShift (8)
44 #define kBootVideoDepthScaleShift (16)
46 #define kBootFlagsDarkBoot (1ULL << 0)
48 typedef struct Boot_Video Boot_Video
;
50 /* Boot argument structure - passed into Mach kernel at boot time.
52 #define kBootArgsRevision 1
53 #define kBootArgsRevision2 2 /* added boot_args.bootFlags */
54 #define kBootArgsVersion1 1
55 #define kBootArgsVersion2 2
57 typedef struct boot_args
{
58 uint16_t Revision
; /* Revision of boot_args structure */
59 uint16_t Version
; /* Version of boot_args structure */
60 uint64_t virtBase
; /* Virtual base of memory */
61 uint64_t physBase
; /* Physical base of memory */
62 uint64_t memSize
; /* Size of memory */
63 uint64_t topOfKernelData
; /* Highest physical address used in kernel data area */
64 Boot_Video Video
; /* Video Information */
65 uint32_t machineType
; /* Machine Type */
66 void *deviceTreeP
; /* Base of flattened device tree */
67 uint32_t deviceTreeLength
; /* Length of flattened tree */
68 char CommandLine
[BOOT_LINE_LENGTH
]; /* Passed in command line */
69 uint64_t bootFlags
; /* Additional flags specified by the bootloader */
70 uint64_t memSizeActual
; /* Actual size of memory */
73 #define SOC_DEVICE_TYPE_BUFFER_SIZE 32
75 #define PC_TRACE_BUF_SIZE 1024
78 #define SHMCON_MEM 0x4000
83 #define CDBG_MEM ((sizeof(dbg_registry_t) + PAGE_SIZE - 1) & ~PAGE_MASK)
85 #define PE_EARLY_BOOT_VA (SHMCON_MEM + CDBG_MEM)
87 #endif /* _PEXPERT_ARM64_BOOT_H_ */