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