Index: branches/cparm/TODO =================================================================== --- branches/cparm/TODO (revision 1823) +++ branches/cparm/TODO (revision 1824) @@ -1,7 +1,7 @@ TODO List for Chameleon Boot Loader ==================================== -- (re-)Implement a watchdog library set (clear the watchdog at the right moment can avoid infinite loop made for unknow reasons by the compiler) +- (re-)Implement a watchdog library set (clear the watchdog , can avoid infinite loop made for unknow reasons by the compiler or cpu reset) - Implement a Host like in bits to avoid some return issues Index: branches/cparm/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/cparm/Chameleon.xcodeproj/project.pbxproj (revision 1823) +++ branches/cparm/Chameleon.xcodeproj/project.pbxproj (revision 1824) @@ -45,7 +45,6 @@ AB43B2DD14C37E520018D529 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; AB43B2DF14C37E520018D529 /* efi_tables.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = efi_tables.c; sourceTree = ""; }; AB43B2E014C37E520018D529 /* efi_tables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = efi_tables.h; sourceTree = ""; }; - AB43B2E114C37E520018D529 /* error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = error.c; sourceTree = ""; }; AB43B2E214C37E520018D529 /* libsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libsa.h; sourceTree = ""; }; AB43B2E314C37E520018D529 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; AB43B2E414C37E520018D529 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = ""; }; @@ -68,7 +67,6 @@ AB43B2F614C37E520018D529 /* bios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bios.h; sourceTree = ""; }; AB43B2F714C37E520018D529 /* bios.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = bios.s; sourceTree = ""; }; AB43B2F814C37E520018D529 /* biosfn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = biosfn.c; sourceTree = ""; }; - AB43B2F914C37E520018D529 /* bootLion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootLion.h; sourceTree = ""; }; AB43B2FA14C37E520018D529 /* bootstruct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bootstruct.c; sourceTree = ""; }; AB43B2FB14C37E520018D529 /* bootstruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootstruct.h; sourceTree = ""; }; AB43B2FC14C37E520018D529 /* cache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cache.c; sourceTree = ""; }; @@ -293,6 +291,7 @@ AB43B3F314C383120018D529 /* umoddi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = umoddi3.c; sourceTree = ""; }; AB43B3F814C384040018D529 /* stack_protector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stack_protector.c; sourceTree = ""; }; AB43B42A14C3A8080018D529 /* arc4random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = arc4random.c; sourceTree = ""; }; + AB79217514F38CF200F5EB39 /* bootXnu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootXnu.h; sourceTree = ""; }; B0056CD611F3868000754B65 /* boot */ = {isa = PBXFileReference; lastKnownFileType = text; path = boot; sourceTree = ""; }; B0056CD711F3868000754B65 /* boot.sys */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.preload"; path = boot.sys; sourceTree = ""; }; B0056CD811F3868000754B65 /* boot0 */ = {isa = PBXFileReference; lastKnownFileType = text; path = boot0; sourceTree = ""; }; @@ -561,7 +560,6 @@ AB43B3F314C383120018D529 /* umoddi3.c */, AB43B2DF14C37E520018D529 /* efi_tables.c */, AB43B2E014C37E520018D529 /* efi_tables.h */, - AB43B2E114C37E520018D529 /* error.c */, AB43B2E214C37E520018D529 /* libsa.h */, AB43B2E314C37E520018D529 /* Makefile */, AB43B2E414C37E520018D529 /* memory.h */, @@ -592,9 +590,9 @@ AB43B2F614C37E520018D529 /* bios.h */, AB43B2F714C37E520018D529 /* bios.s */, AB43B2F814C37E520018D529 /* biosfn.c */, - AB43B2F914C37E520018D529 /* bootLion.h */, AB43B2FA14C37E520018D529 /* bootstruct.c */, AB43B2FB14C37E520018D529 /* bootstruct.h */, + AB79217514F38CF200F5EB39 /* bootXnu.h */, AB43B2FC14C37E520018D529 /* cache.c */, AB43B2FD14C37E520018D529 /* console.c */, AB43B2FE14C37E520018D529 /* convert.c */, Index: branches/cparm/artwork/themes/default/device_hfsraid_ml.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/default/device_hfsraid_ml.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/default/device_hfsplus_ml.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/default/device_hfsplus_ml.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/default/device_hfsraid_ml_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/default/device_hfsraid_ml_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/default/device_hfsplus_ml_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/default/device_hfsplus_ml_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/device_hfsraid_ml_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/device_hfsraid_ml_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/device_hfsraid_ml.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/device_hfsraid_ml.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/device_hfsplus_ml_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/device_hfsplus_ml_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/device_hfsplus_ml.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/device_hfsplus_ml.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/i386/libsaio/bootLion.h =================================================================== --- branches/cparm/i386/libsaio/bootLion.h (revision 1823) +++ branches/cparm/i386/libsaio/bootLion.h (revision 1824) @@ -1,240 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the License - * may not be used to create, or enable the creation or redistribution of, - * unlawful or unlicensed copies of an Apple operating system, or to - * circumvent, violate, or enable the circumvention or violation of, any - * terms of an Apple operating system software license agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ - */ -#ifndef _PEXPERT_I386_BOOT_H -#define _PEXPERT_I386_BOOT_H - -#include - -/* - * What the booter leaves behind for the kernel. - */ - -/* - * Types of boot driver that may be loaded by the booter. - */ -enum { - kBootDriverTypeInvalid = 0, - kBootDriverTypeKEXT = 1, - kBootDriverTypeMKEXT = 2 -}; - -enum { - kEfiReservedMemoryType = 0, - kEfiLoaderCode = 1, - kEfiLoaderData = 2, - kEfiBootServicesCode = 3, - kEfiBootServicesData = 4, - kEfiRuntimeServicesCode = 5, - kEfiRuntimeServicesData = 6, - kEfiConventionalMemory = 7, - kEfiUnusableMemory = 8, - kEfiACPIReclaimMemory = 9, - kEfiACPIMemoryNVS = 10, - kEfiMemoryMappedIO = 11, - kEfiMemoryMappedIOPortSpace = 12, - kEfiPalCode = 13, - kEfiMaxMemoryType = 14 -}; - -/* - * Memory range descriptor. - */ -typedef struct EfiMemoryRange { - uint32_t Type; - uint32_t Pad; - uint64_t PhysicalStart; - uint64_t VirtualStart; - uint64_t NumberOfPages; - uint64_t Attribute; -} EfiMemoryRange; - -#define BOOT_LINE_LENGTH 1024 -#define BOOT_STRING_LEN BOOT_LINE_LENGTH - -/* - * Video information.. - */ - -struct Boot_Video { - uint32_t v_baseAddr; /* Base address of video memory */ - uint32_t v_display; /* Display Code (if Applicable */ - uint32_t v_rowBytes; /* Number of bytes per pixel row */ - uint32_t v_width; /* Width */ - uint32_t v_height; /* Height */ - uint32_t v_depth; /* Pixel Depth */ -}; - -typedef struct Boot_Video Boot_Video; - -/* Values for v_display */ - -#define GRAPHICS_MODE 1 -#define FB_TEXT_MODE 2 - -/* Boot argument structure - passed into Mach kernel at boot time. - * "Revision" can be incremented for compatible changes - */ -#define kBootArgsRevision 0 -#define kBootArgsVersion 2 - -/* Snapshot constants of previous revisions that are supported */ -#define kBootArgsVersion1 1 -#define kBootArgsVersion2 2 -#define kBootArgsRevision2_0 0 - -#define kBootArgsEfiMode32 32 -#define kBootArgsEfiMode64 64 - -typedef struct boot_args_Legacy { - uint16_t Revision; /* Revision of boot_args structure */ - uint16_t Version; /* Version of boot_args structure */ - - char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ - - uint32_t MemoryMap; /* Physical address of memory map */ - uint32_t MemoryMapSize; - uint32_t MemoryMapDescriptorSize; - uint32_t MemoryMapDescriptorVersion; - - Boot_Video Video; /* Video Information */ - - uint32_t deviceTreeP; /* Physical address of flattened device tree */ - uint32_t deviceTreeLength; /* Length of flattened tree */ - - uint32_t kaddr; /* Physical address of beginning of kernel text */ - uint32_t ksize; /* Size of combined kernel text+data+efi */ - - uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ - uint32_t efiRuntimeServicesPageCount; - uint32_t efiSystemTable; /* physical address of system table in runtime area */ - - uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ - uint8_t __reserved1[3]; - uint32_t __reserved2[1]; - uint32_t performanceDataStart; /* physical address of log */ - uint32_t performanceDataSize; - uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ - uint32_t __reserved3[2]; - -} boot_args_Legacy; - -typedef struct boot_args { - uint16_t Revision; /* Revision of boot_args structure */ - uint16_t Version; /* Version of boot_args structure */ - - uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ - uint8_t debugMode; /* Bit field with behavior changes */ - uint8_t __reserved1[2]; - - char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ - - uint32_t MemoryMap; /* Physical address of memory map */ - uint32_t MemoryMapSize; - uint32_t MemoryMapDescriptorSize; - uint32_t MemoryMapDescriptorVersion; - - Boot_Video Video; /* Video Information */ - - uint32_t deviceTreeP; /* Physical address of flattened device tree */ - uint32_t deviceTreeLength; /* Length of flattened tree */ - - uint32_t kaddr; /* Physical address of beginning of kernel text */ - uint32_t ksize; /* Size of combined kernel text+data+efi */ - - uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ - uint32_t efiRuntimeServicesPageCount; - uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ - - uint32_t efiSystemTable; /* physical address of system table in runtime area */ - uint32_t __reserved2; - - uint32_t performanceDataStart; /* physical address of log */ - uint32_t performanceDataSize; - - uint32_t keyStoreDataStart; /* physical address of key store data */ - uint32_t keyStoreDataSize; - uint64_t bootMemStart; - uint64_t bootMemSize; - uint64_t PhysicalMemorySize; - uint64_t FSBFrequency; - uint32_t __reserved4[734]; - -} boot_args_107; - -typedef struct boot_args_header { - uint16_t Revision; /* Revision of boot_args structure */ - uint16_t Version; /* Version of boot_args structure */ -} boot_args_header; - -typedef struct boot_args_10x { - boot_args_header Header; - - Boot_Video Video; /* Video Information */ - - uint32_t MemoryMap; /* Physical address of memory map */ - uint32_t MemoryMapSize; - uint32_t MemoryMapDescriptorSize; - uint32_t MemoryMapDescriptorVersion; - - uint8_t debugMode; /* Bit field with behavior changes */ - uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ - - - uint32_t deviceTreeP; /* Physical address of flattened device tree */ - uint32_t deviceTreeLength; /* Length of flattened tree */ - - char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ - - - uint32_t keyStoreDataStart; /* physical address of key store data */ - uint32_t keyStoreDataSize; - uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ - uint32_t efiRuntimeServicesPageCount; - uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ - - uint32_t efiSystemTable; /* physical address of system table in runtime area */ - uint64_t FSBFrequency; - - uint32_t performanceDataSize; - uint32_t performanceDataStart; /* physical address of log */ - - uint32_t kaddr; /* Physical address of beginning of kernel text */ - uint32_t ksize; /* Size of combined kernel text+data+efi */ - - uint64_t bootMemStart; - uint64_t bootMemSize; - uint64_t PhysicalMemorySize; - -} boot_args_10x; - -typedef struct boot_args_10x boot_args_common; - -extern char assert_boot_args_107_size_is_4096[sizeof(boot_args_107) == 4096 ? 1 : -1]; - -#endif /* _PEXPERT_I386_BOOT_H */ - Index: branches/cparm/i386/libsaio/bootstruct.h =================================================================== --- branches/cparm/i386/libsaio/bootstruct.h (revision 1823) +++ branches/cparm/i386/libsaio/bootstruct.h (revision 1824) @@ -25,7 +25,7 @@ #ifndef __BOOTSTRUCT_H #define __BOOTSTRUCT_H -#include "bootLion.h" +#include "bootXnu.h" #include "saio_types.h" #include "bios.h" #include "device_tree.h" Index: branches/cparm/i386/libsaio/bios.h =================================================================== --- branches/cparm/i386/libsaio/bios.h (revision 1823) +++ branches/cparm/i386/libsaio/bios.h (revision 1824) @@ -29,7 +29,7 @@ #ifndef __LIBSAIO_BIOS_H #define __LIBSAIO_BIOS_H -#include "bootLion.h" +#include "bootXnu.h" typedef union { unsigned int rx; Index: branches/cparm/i386/libsaio/bootXnu.h =================================================================== --- branches/cparm/i386/libsaio/bootXnu.h (revision 0) +++ branches/cparm/i386/libsaio/bootXnu.h (revision 1824) @@ -0,0 +1,240 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ + */ +#ifndef _PEXPERT_I386_BOOT_H +#define _PEXPERT_I386_BOOT_H + +#include + +/* + * What the booter leaves behind for the kernel. + */ + +/* + * Types of boot driver that may be loaded by the booter. + */ +enum { + kBootDriverTypeInvalid = 0, + kBootDriverTypeKEXT = 1, + kBootDriverTypeMKEXT = 2 +}; + +enum { + kEfiReservedMemoryType = 0, + kEfiLoaderCode = 1, + kEfiLoaderData = 2, + kEfiBootServicesCode = 3, + kEfiBootServicesData = 4, + kEfiRuntimeServicesCode = 5, + kEfiRuntimeServicesData = 6, + kEfiConventionalMemory = 7, + kEfiUnusableMemory = 8, + kEfiACPIReclaimMemory = 9, + kEfiACPIMemoryNVS = 10, + kEfiMemoryMappedIO = 11, + kEfiMemoryMappedIOPortSpace = 12, + kEfiPalCode = 13, + kEfiMaxMemoryType = 14 +}; + +/* + * Memory range descriptor. + */ +typedef struct EfiMemoryRange { + uint32_t Type; + uint32_t Pad; + uint64_t PhysicalStart; + uint64_t VirtualStart; + uint64_t NumberOfPages; + uint64_t Attribute; +} EfiMemoryRange; + +#define BOOT_LINE_LENGTH 1024 +#define BOOT_STRING_LEN BOOT_LINE_LENGTH + +/* + * Video information.. + */ + +struct Boot_Video { + uint32_t v_baseAddr; /* Base address of video memory */ + uint32_t v_display; /* Display Code (if Applicable */ + uint32_t v_rowBytes; /* Number of bytes per pixel row */ + uint32_t v_width; /* Width */ + uint32_t v_height; /* Height */ + uint32_t v_depth; /* Pixel Depth */ +}; + +typedef struct Boot_Video Boot_Video; + +/* Values for v_display */ + +#define GRAPHICS_MODE 1 +#define FB_TEXT_MODE 2 + +/* Boot argument structure - passed into Mach kernel at boot time. + * "Revision" can be incremented for compatible changes + */ +#define kBootArgsRevision 0 +#define kBootArgsVersion 2 + +/* Snapshot constants of previous revisions that are supported */ +#define kBootArgsVersion1 1 +#define kBootArgsVersion2 2 +#define kBootArgsRevision2_0 0 + +#define kBootArgsEfiMode32 32 +#define kBootArgsEfiMode64 64 + +typedef struct boot_args_Legacy { + uint16_t Revision; /* Revision of boot_args structure */ + uint16_t Version; /* Version of boot_args structure */ + + char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ + + uint32_t MemoryMap; /* Physical address of memory map */ + uint32_t MemoryMapSize; + uint32_t MemoryMapDescriptorSize; + uint32_t MemoryMapDescriptorVersion; + + Boot_Video Video; /* Video Information */ + + uint32_t deviceTreeP; /* Physical address of flattened device tree */ + uint32_t deviceTreeLength; /* Length of flattened tree */ + + uint32_t kaddr; /* Physical address of beginning of kernel text */ + uint32_t ksize; /* Size of combined kernel text+data+efi */ + + uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ + uint32_t efiRuntimeServicesPageCount; + uint32_t efiSystemTable; /* physical address of system table in runtime area */ + + uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ + uint8_t __reserved1[3]; + uint32_t __reserved2[1]; + uint32_t performanceDataStart; /* physical address of log */ + uint32_t performanceDataSize; + uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ + uint32_t __reserved3[2]; + +} boot_args_Legacy; + +typedef struct boot_args { + uint16_t Revision; /* Revision of boot_args structure */ + uint16_t Version; /* Version of boot_args structure */ + + uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ + uint8_t debugMode; /* Bit field with behavior changes */ + uint8_t __reserved1[2]; + + char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ + + uint32_t MemoryMap; /* Physical address of memory map */ + uint32_t MemoryMapSize; + uint32_t MemoryMapDescriptorSize; + uint32_t MemoryMapDescriptorVersion; + + Boot_Video Video; /* Video Information */ + + uint32_t deviceTreeP; /* Physical address of flattened device tree */ + uint32_t deviceTreeLength; /* Length of flattened tree */ + + uint32_t kaddr; /* Physical address of beginning of kernel text */ + uint32_t ksize; /* Size of combined kernel text+data+efi */ + + uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ + uint32_t efiRuntimeServicesPageCount; + uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ + + uint32_t efiSystemTable; /* physical address of system table in runtime area */ + uint32_t __reserved2; + + uint32_t performanceDataStart; /* physical address of log */ + uint32_t performanceDataSize; + + uint32_t keyStoreDataStart; /* physical address of key store data */ + uint32_t keyStoreDataSize; + uint64_t bootMemStart; + uint64_t bootMemSize; + uint64_t PhysicalMemorySize; + uint64_t FSBFrequency; + uint32_t __reserved4[734]; + +} boot_args_107; + +typedef struct boot_args_header { + uint16_t Revision; /* Revision of boot_args structure */ + uint16_t Version; /* Version of boot_args structure */ +} boot_args_header; + +typedef struct boot_args_10x { + boot_args_header Header; + + Boot_Video Video; /* Video Information */ + + uint32_t MemoryMap; /* Physical address of memory map */ + uint32_t MemoryMapSize; + uint32_t MemoryMapDescriptorSize; + uint32_t MemoryMapDescriptorVersion; + + uint8_t debugMode; /* Bit field with behavior changes */ + uint8_t efiMode; /* 32 = 32-bit, 64 = 64-bit */ + + + uint32_t deviceTreeP; /* Physical address of flattened device tree */ + uint32_t deviceTreeLength; /* Length of flattened tree */ + + char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ + + + uint32_t keyStoreDataStart; /* physical address of key store data */ + uint32_t keyStoreDataSize; + uint32_t efiRuntimeServicesPageStart; /* physical address of defragmented runtime pages */ + uint32_t efiRuntimeServicesPageCount; + uint64_t efiRuntimeServicesVirtualPageStart; /* virtual address of defragmented runtime pages */ + + uint32_t efiSystemTable; /* physical address of system table in runtime area */ + uint64_t FSBFrequency; + + uint32_t performanceDataSize; + uint32_t performanceDataStart; /* physical address of log */ + + uint32_t kaddr; /* Physical address of beginning of kernel text */ + uint32_t ksize; /* Size of combined kernel text+data+efi */ + + uint64_t bootMemStart; + uint64_t bootMemSize; + uint64_t PhysicalMemorySize; + +} boot_args_10x; + +typedef struct boot_args_10x boot_args_common; + +extern char assert_boot_args_107_size_is_4096[sizeof(boot_args_107) == 4096 ? 1 : -1]; + +#endif /* _PEXPERT_I386_BOOT_H */ + Index: branches/cparm/i386/libsaio/saio_types.h =================================================================== --- branches/cparm/i386/libsaio/saio_types.h (revision 1823) +++ branches/cparm/i386/libsaio/saio_types.h (revision 1824) @@ -34,7 +34,7 @@ #else #include #endif -#include "bootLion.h" +#include "bootXnu.h" #if DEBUG #define DEBUG_DISK(x) printf x Index: branches/cparm/i386/boot2/graphics.c =================================================================== --- branches/cparm/i386/boot2/graphics.c (revision 1823) +++ branches/cparm/i386/boot2/graphics.c (revision 1824) @@ -649,7 +649,7 @@ //========================================================================== // Return the current video mode, VGA_TEXT_MODE or GRAPHICS_MODE. -inline int getVideoMode(void) +int getVideoMode(void) { return bootArgs->Video.v_display; } Index: branches/cparm/i386/boot2/boot.c =================================================================== --- branches/cparm/i386/boot2/boot.c (revision 1823) +++ branches/cparm/i386/boot2/boot.c (revision 1824) @@ -1067,8 +1067,9 @@ // If a kext is found in /Extra/Extentions return true // If a mkext is found in /Extra return true // Otherwise return false -// Tips (if you still use extra kext(s)/mkext(s) ): With Lion it's recommended to create a system mkext (see the kextcache commandline) to decrease boot time, -// otherwise it will act like a -f each time a extra kext/kext is detected +// Tips (if you still want to use extra kext(s)/mkext(s) ): +// With Lion and earlier, the default boot cache is a kernelcache, no mkext is created anymore by kextd automaticaly (kextd still update the existing mkexts), +// so it's recommended to create a system mkext by yourself to decrease boot time (see the kextcache commandline) static bool found_extra_kext(void) { #define EXTENSIONS "Extensions" Index: branches/cparm/i386/boot2/modules.c =================================================================== --- branches/cparm/i386/boot2/modules.c (revision 1823) +++ branches/cparm/i386/boot2/modules.c (revision 1824) @@ -1063,7 +1063,7 @@ } } -inline void rebase_location(UInt32* location, char* base, int type) +void rebase_location(UInt32* location, char* base, int type) { switch(type) { @@ -1077,7 +1077,7 @@ } } -inline void bind_location(UInt32* location, char* value, UInt32 addend, int type) +void bind_location(UInt32* location, char* value, UInt32 addend, int type) { // do actual update char* newValue = value + addend; Index: branches/cparm/i386/boot2/modules.h =================================================================== --- branches/cparm/i386/boot2/modules.h (revision 1823) +++ branches/cparm/i386/boot2/modules.h (revision 1824) @@ -71,8 +71,8 @@ EFI_STATUS execute_hook(const char* name, void*, void*, void*, void*, void*, void*); VOID register_hook_callback(const char* name, void(*callback)(void*, void*, void*, void*, void*, void*)); -inline void rebase_location(UInt32* location, char* base, int type); -inline void bind_location(UInt32* location, char* value, UInt32 addend, int type); +void rebase_location(UInt32* location, char* base, int type); +void bind_location(UInt32* location, char* value, UInt32 addend, int type); void rebase_macho(void* base, char* rebase_stream, UInt32 size); void bind_macho(void* base, char* bind_stream, UInt32 size); Index: branches/cparm/i386/modules/ACPIPatcher/acpi_patcher.c =================================================================== --- branches/cparm/i386/modules/ACPIPatcher/acpi_patcher.c (revision 1823) +++ branches/cparm/i386/modules/ACPIPatcher/acpi_patcher.c (revision 1824) @@ -150,7 +150,7 @@ #define __RES(s, u) \ -inline unsigned u \ +static inline unsigned u \ resolve_##s(unsigned u defaultentry, char *str, int base) \ { \ unsigned u entry = defaultentry; \ Index: branches/cparm/i386/modules/ACPICodec/acpi_codec.c =================================================================== --- branches/cparm/i386/modules/ACPICodec/acpi_codec.c (revision 1823) +++ branches/cparm/i386/modules/ACPICodec/acpi_codec.c (revision 1824) @@ -180,7 +180,7 @@ //#define ULONG_MAX_32 4294967295UL #define __RES(s, u) \ -inline unsigned u \ +static inline unsigned u \ resolve_##s(unsigned u defaultentry, char *str, int base) \ { \ unsigned u entry = defaultentry; \ Index: branches/cparm/i386/libsa/error.c =================================================================== --- branches/cparm/i386/libsa/error.c (revision 1823) +++ branches/cparm/i386/libsa/error.c (revision 1824) @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 2.0 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* error handling */ - -#include "libsa.h" -#if UNUSED -int errno; - -char * strerror(int errnum) -{ - static char error_string[16]; - sprintf(error_string,"Error %d", errnum); - return error_string; -} -#endif \ No newline at end of file Index: branches/cparm/i386/libsa/Makefile =================================================================== --- branches/cparm/i386/libsa/Makefile (revision 1823) +++ branches/cparm/i386/libsa/Makefile (revision 1824) @@ -32,7 +32,7 @@ SFILES = setjmp.s bzero.s bcopy.s CFILES = qdivrem.c umoddi3.c udivdi3.c divdi3.c moddi3.c prf.c printf.c zalloc.c \ - string.c strtol.c error.c \ + string.c strtol.c \ qsort.c efi_tables.c HFILES = memory.h