1 | /* |
2 | * Copyright (c) 2007-2009 Apple Inc. All rights reserved. |
3 | * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. |
4 | */ |
5 | /* |
6 | * @OSF_COPYRIGHT@ |
7 | */ |
8 | |
9 | #ifndef _PEXPERT_ARM64_BOOT_H_ |
10 | #define _PEXPERT_ARM64_BOOT_H_ |
11 | |
12 | #include <kern/kern_types.h> |
13 | #include <pexpert/arm/consistent_debug.h> |
14 | #include <pexpert/arm/protos.h> |
15 | |
16 | #define BOOT_LINE_LENGTH 256 |
17 | |
18 | /* |
19 | * Video information.. |
20 | */ |
21 | |
22 | struct Boot_Video { |
23 | unsigned long v_baseAddr; /* Base address of video memory */ |
24 | unsigned long v_display; /* Display Code (if Applicable */ |
25 | unsigned long v_rowBytes; /* Number of bytes per pixel row */ |
26 | unsigned long v_width; /* Width */ |
27 | unsigned long v_height; /* Height */ |
28 | unsigned long v_depth; /* Pixel Depth and other parameters */ |
29 | }; |
30 | |
31 | #define kBootVideoDepthMask (0xFF) |
32 | #define kBootVideoDepthDepthShift (0) |
33 | #define kBootVideoDepthRotateShift (8) |
34 | #define kBootVideoDepthScaleShift (16) |
35 | |
36 | #define kBootFlagsDarkBoot (1ULL << 0) |
37 | |
38 | typedef struct Boot_Video Boot_Video; |
39 | |
40 | /* Boot argument structure - passed into Mach kernel at boot time. |
41 | */ |
42 | #define kBootArgsRevision 1 |
43 | #define kBootArgsRevision2 2 /* added boot_args.bootFlags */ |
44 | #define kBootArgsVersion1 1 |
45 | #define kBootArgsVersion2 2 |
46 | |
47 | typedef struct boot_args { |
48 | uint16_t Revision; /* Revision of boot_args structure */ |
49 | uint16_t Version; /* Version of boot_args structure */ |
50 | uint64_t virtBase; /* Virtual base of memory */ |
51 | uint64_t physBase; /* Physical base of memory */ |
52 | uint64_t memSize; /* Size of memory */ |
53 | uint64_t topOfKernelData; /* Highest physical address used in kernel data area */ |
54 | Boot_Video Video; /* Video Information */ |
55 | uint32_t machineType; /* Machine Type */ |
56 | void *deviceTreeP; /* Base of flattened device tree */ |
57 | uint32_t deviceTreeLength; /* Length of flattened tree */ |
58 | char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ |
59 | uint64_t bootFlags; /* Additional flags specified by the bootloader */ |
60 | uint64_t memSizeActual; /* Actual size of memory */ |
61 | } boot_args; |
62 | |
63 | #define SOC_DEVICE_TYPE_BUFFER_SIZE 32 |
64 | |
65 | #define PC_TRACE_BUF_SIZE 1024 |
66 | |
67 | #if SHMCON |
68 | #define SHMCON_MEM 0x4000 |
69 | #else |
70 | #define SHMCON_MEM 0 |
71 | #endif |
72 | |
73 | #define CDBG_MEM ((sizeof(dbg_registry_t) + PAGE_SIZE - 1) & ~PAGE_MASK) |
74 | |
75 | #define PE_EARLY_BOOT_VA (SHMCON_MEM + CDBG_MEM) |
76 | |
77 | #endif /* _PEXPERT_ARM64_BOOT_H_ */ |
78 | |
79 | |