|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: #ifndef _BOOT_H_ ! 26: #define _BOOT_H_ ! 27: ! 28: #define BOOT_LINE_LENGTH 256 ! 29: ! 30: /* ! 31: * Video information.. ! 32: */ ! 33: ! 34: struct Boot_Video { ! 35: unsigned long v_baseAddr; /* Base address of video memory */ ! 36: unsigned long v_display; /* Display Code (if Applicable */ ! 37: unsigned long v_rowBytes; /* Number of bytes per pixel row */ ! 38: unsigned long v_width; /* Width */ ! 39: unsigned long v_height; /* Height */ ! 40: unsigned long v_depth; /* Pixel Depth */ ! 41: }; ! 42: ! 43: typedef struct Boot_Video Boot_Video; ! 44: ! 45: /* DRAM Bank definitions - describes physical memory layout. ! 46: */ ! 47: #define kMaxDRAMBanks 26 /* maximum number of DRAM banks */ ! 48: ! 49: struct DRAMBank ! 50: { ! 51: unsigned long base; /* physical base of DRAM bank */ ! 52: unsigned long size; /* size of bank */ ! 53: }; ! 54: typedef struct DRAMBank DRAMBank; ! 55: ! 56: ! 57: #define kPropNameLength 32 ! 58: ! 59: typedef struct DeviceTreeNodeProperty { ! 60: char name[kPropNameLength]; // NUL terminated property name ! 61: unsigned long length; // Length (bytes) of folloing prop value ! 62: // unsigned long value[1]; // Variable length value of property ! 63: // Padded to a multiple of a longword? ! 64: } DeviceTreeNodeProperty; ! 65: ! 66: typedef struct OpaqueDTEntry { ! 67: unsigned long nProperties; // Number of props[] elements (0 => end) ! 68: unsigned long nChildren; // Number of children[] elements ! 69: // DeviceTreeNodeProperty props[];// array size == nProperties ! 70: // DeviceTreeNode children[]; // array size == nChildren ! 71: } DeviceTreeNode; ! 72: ! 73: ! 74: /* Boot argument structure - passed into Mach kernel at boot time. ! 75: */ ! 76: #define kBootArgsVersion 1 ! 77: #define kBootArgsRevision 1 ! 78: ! 79: typedef struct boot_args { ! 80: unsigned short Revision; /* Revision of boot_args structure */ ! 81: unsigned short Version; /* Version of boot_args structure */ ! 82: char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ ! 83: DRAMBank PhysicalDRAM[kMaxDRAMBanks]; /* base and range pairs for the 26 DRAM banks */ ! 84: Boot_Video Video; /* Video Information */ ! 85: unsigned long machineType; /* Machine Type (gestalt) */ ! 86: void *deviceTreeP; /* Base of flattened device tree */ ! 87: unsigned long deviceTreeLength;/* Length of flattened tree */ ! 88: unsigned long topOfKernelData;/* Highest address used in kernel data area */ ! 89: } boot_args; ! 90: ! 91: extern boot_args passed_args; ! 92: ! 93: #endif /* _BOOT_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.