Index: branches/chucko/version =================================================================== --- branches/chucko/version (revision 2453) +++ branches/chucko/version (revision 2454) @@ -1 +1 @@ -2.2svn +2.3svn Index: branches/chucko/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/chucko/Chameleon.xcodeproj/project.pbxproj (revision 2453) +++ branches/chucko/Chameleon.xcodeproj/project.pbxproj (revision 2454) @@ -2694,11 +2694,12 @@ A3561CB41414024C00E9B51E /* Keylayout */ = { isa = PBXGroup; children = ( - A3F1F267141B9B3B00DDA709 /* Readme.txt */, - A35D216E141A73B000969AC0 /* layouts */, A3561DA81414296600E9B51E /* Cconfig */, A3561DA61414296600E9B51E /* Keylayout.c */, + 361BF6CE19DBA1820015F031 /* Keylayout.h */, + A35D216E141A73B000969AC0 /* layouts */, A3561DA71414296600E9B51E /* Makefile */, + A3F1F267141B9B3B00DDA709 /* Readme.txt */, ); path = Keylayout; sourceTree = ""; @@ -2948,13 +2949,13 @@ A35D2170141A73B000969AC0 /* layouts-src */ = { isa = PBXGroup; children = ( - A35D2178141A753E00969AC0 /* README */, A35D2171141A73B000969AC0 /* mac-de.slt */, A35D2172141A73B000969AC0 /* mac-es.slt */, A35D2173141A73B000969AC0 /* mac-fr.slt */, A35D2174141A73B000969AC0 /* mac-it.slt */, A35D2175141A73B000969AC0 /* mac-se.slt */, A35D2176141A73B000969AC0 /* pc-fr.slt */, + A35D2178141A753E00969AC0 /* README */, ); path = "layouts-src"; sourceTree = ""; @@ -3730,7 +3731,7 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0510; }; buildConfigurationList = 1DEB919308733D9F0010E9CD /* Build configuration list for PBXProject "Chameleon" */; compatibilityVersion = "Xcode 3.2"; @@ -3793,6 +3794,7 @@ GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_UNUSED_FUNCTION = YES; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = Chameleon; @@ -3803,6 +3805,7 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; + GCC_OPTIMIZATION_LEVEL = 2; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = Chameleon; @@ -3812,8 +3815,8 @@ 1DEB919408733D9F0010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_FUNCTION = NO; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -3823,8 +3826,8 @@ 1DEB919508733D9F0010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_FUNCTION = NO; GCC_WARN_UNUSED_VARIABLE = YES; SDKROOT = macosx; }; Index: branches/chucko/i386/libsaio/asm.s =================================================================== --- branches/chucko/i386/libsaio/asm.s (revision 2453) +++ branches/chucko/i386/libsaio/asm.s (revision 2454) @@ -495,3 +495,30 @@ ret #endif + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// computeRand() +// +// Pike R. Alpha - 12 October 2014 +// + +LABEL(_computeRand) + pushl %edx + mov $0xa, %edx + +Repeat: + rdrand %eax + jae Ok + jmp Exit + +Ok: + dec %edx + pause + jne Repeat + mov $0x0, %eax + +Exit: + popl %edx + + ret + Index: branches/chucko/i386/libsaio/console.c =================================================================== --- branches/chucko/i386/libsaio/console.c (revision 2453) +++ branches/chucko/i386/libsaio/console.c (revision 2454) @@ -247,24 +247,24 @@ vprf(fmt, ap); } + // Kabyl: BooterLog + struct putc_info pi; + + if (!msgbuf) { - // Kabyl: BooterLog - struct putc_info pi; + return 0; + } - if (!msgbuf) { - return 0; - } + if (((cursor - msgbuf) > (BOOTER_LOG_SIZE - SAFE_LOG_SIZE))) + { + return 0; + } - if (((cursor - msgbuf) > (BOOTER_LOG_SIZE - SAFE_LOG_SIZE))) { - return 0; - } + pi.str = cursor; + pi.last_str = 0; + prf(fmt, ap, sputc, &pi); + cursor += strlen((char *)cursor); - pi.str = cursor; - pi.last_str = 0; - prf(fmt, ap, sputc, &pi); - cursor += strlen((char *)cursor); - } - va_end(ap); return(0); } Index: branches/chucko/i386/libsaio/bootstruct.c =================================================================== --- branches/chucko/i386/libsaio/bootstruct.c (revision 2453) +++ branches/chucko/i386/libsaio/bootstruct.c (revision 2454) @@ -27,6 +27,7 @@ */ #include "libsaio.h" +#include "boot.h" #include "bootstruct.h" #ifndef DEBUG_BOOTSTRUCT @@ -44,10 +45,10 @@ * the kernel by the booter. */ -boot_args *bootArgs; +boot_args *bootArgs; boot_args_pre_lion *bootArgsPreLion; PrivateBootInfo_t *bootInfo; -Node *gMemoryMapNode; +Node *gMemoryMapNode; static char platformName[64]; @@ -56,7 +57,7 @@ Node *node; int nameLen; static int init_done = 0; - + if ( !init_done ) { bootArgs = (boot_args *)malloc(sizeof(boot_args)); @@ -64,11 +65,11 @@ bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t)); if (bootArgs == 0 || bootArgsPreLion == 0 || bootInfo == 0) stop("Couldn't allocate boot info\n"); - + bzero(bootArgs, sizeof(boot_args)); bzero(bootArgsPreLion, sizeof(boot_args_pre_lion)); bzero(bootInfo, sizeof(PrivateBootInfo_t)); - + // Get system memory map. Also update the size of the // conventional/extended memory for backwards compatibility. @@ -76,22 +77,22 @@ getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax, (unsigned long *) &bootInfo->convmem, (unsigned long *) &bootInfo->extmem ); - + if ( bootInfo->memoryMapCount == 0 ) { // BIOS did not provide a memory map, systems with // discontiguous memory or unusual memory hole locations // may have problems. - - bootInfo->convmem = getConventionalMemorySize(); - bootInfo->extmem = getExtendedMemorySize(); + + bootInfo->convmem = getConventionalMemorySize(); + bootInfo->extmem = getExtendedMemorySize(); } - - bootInfo->configEnd = bootInfo->config; - bootArgs->Video.v_display = VGA_TEXT_MODE; - + + bootInfo->configEnd = bootInfo->config; + bootArgs->Video.v_display = VGA_TEXT_MODE; + DT__Initialize(); - + node = DT__FindNode("/", true); if (node == 0) { stop("Couldn't create root node"); @@ -100,40 +101,40 @@ nameLen = strlen(platformName) + 1; DT__AddProperty(node, "compatible", nameLen, platformName); DT__AddProperty(node, "model", nameLen, platformName); - + gMemoryMapNode = DT__FindNode("/chosen/memory-map", true); - + bootArgs->Version = kBootArgsVersion; bootArgs->Revision = kBootArgsRevision; - + bootArgsPreLion->Version = kBootArgsPreLionVersion; bootArgsPreLion->Revision = kBootArgsPreLionRevision; - + init_done = 1; } } - /* Copy boot args after kernel and record address. */ -void -reserveKernBootStruct(void) +void reserveKernBootStruct(void) { - if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0') - && (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7' || gMacOSVersion[3] == '8' || gMacOSVersion[3] == '9')) + if ( TIGER || LEOPARD || SNOW_LEOPARD ) { + // for 10.4 10.5 10.6 + void *oldAddr = bootArgsPreLion; + bootArgsPreLion = (boot_args_pre_lion *)AllocateKernelMemory(sizeof(boot_args_pre_lion)); + bcopy(oldAddr, bootArgsPreLion, sizeof(boot_args_pre_lion)); + } else { + // for 10.7 10.8 10.9 10.10 void *oldAddr = bootArgs; bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args)); bcopy(oldAddr, bootArgs, sizeof(boot_args)); - } else { - void *oldAddr = bootArgsPreLion; - bootArgsPreLion = (boot_args_pre_lion *)AllocateKernelMemory(sizeof(boot_args_pre_lion)); - bcopy(oldAddr, bootArgsPreLion, sizeof(boot_args_pre_lion)); } } -void -finalizeBootStruct(void) +//============================================================================== + +void finalizeBootStruct(void) { uint32_t size; void *addr; @@ -141,65 +142,76 @@ EfiMemoryRange *memoryMap; MemoryRange *range; int memoryMapCount = bootInfo->memoryMapCount; - - if (memoryMapCount == 0) { + + if (memoryMapCount == 0) + { // XXX could make a two-part map here stop("Unable to convert memory map into proper format\n"); } - + // convert memory map to boot_args memory map memoryMap = (EfiMemoryRange *)AllocateKernelMemory(sizeof(EfiMemoryRange) * memoryMapCount); - bootArgs->MemoryMap = (uint32_t)memoryMap; - bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount; - bootArgs->MemoryMapDescriptorSize = sizeof(EfiMemoryRange); - bootArgs->MemoryMapDescriptorVersion = 0; - + + bootArgs->MemoryMap = (uint32_t)memoryMap; + bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount; + bootArgs->MemoryMapDescriptorSize = sizeof(EfiMemoryRange); + bootArgs->MemoryMapDescriptorVersion = 0; + for (i = 0; i < memoryMapCount; i++, memoryMap++) { range = &bootInfo->memoryMap[i]; - switch(range->type) { + + switch(range->type) + { case kMemoryRangeACPI: memoryMap->Type = kEfiACPIReclaimMemory; break; + case kMemoryRangeNVS: memoryMap->Type = kEfiACPIMemoryNVS; break; + case kMemoryRangeUsable: memoryMap->Type = kEfiConventionalMemory; break; + case kMemoryRangeReserved: + default: memoryMap->Type = kEfiReservedMemoryType; break; } - memoryMap->PhysicalStart = range->base; - memoryMap->VirtualStart = range->base; - memoryMap->NumberOfPages = range->length >> I386_PGSHIFT; - memoryMap->Attribute = 0; + + memoryMap->PhysicalStart = range->base; + memoryMap->VirtualStart = range->base; + memoryMap->NumberOfPages = range->length >> I386_PGSHIFT; + memoryMap->Attribute = 0; } - + // copy bootFile into device tree // XXX - + // add PCI info somehow into device tree // XXX - + // Flatten device tree DT__FlattenDeviceTree(0, &size); addr = (void *)AllocateKernelMemory(size); - if (addr == 0) { + + if (addr == 0) + { stop("Couldn't allocate device tree\n"); } - + DT__FlattenDeviceTree((void **)&addr, &size); bootArgs->deviceTreeP = (uint32_t)addr; bootArgs->deviceTreeLength = size; // Copy BootArgs values to older structure - + memcpy(&bootArgsPreLion->CommandLine, &bootArgs->CommandLine, BOOT_LINE_LENGTH); memcpy(&bootArgsPreLion->Video, &bootArgs->Video, sizeof(Boot_Video)); - + bootArgsPreLion->MemoryMap = bootArgs->MemoryMap; bootArgsPreLion->MemoryMapSize = bootArgs->MemoryMapSize; bootArgsPreLion->MemoryMapDescriptorSize = bootArgs->MemoryMapDescriptorSize; @@ -207,16 +219,16 @@ bootArgsPreLion->deviceTreeP = bootArgs->deviceTreeP; bootArgsPreLion->deviceTreeLength = bootArgs->deviceTreeLength; - + bootArgsPreLion->kaddr = bootArgs->kaddr; bootArgsPreLion->ksize = bootArgs->ksize; - + bootArgsPreLion->efiRuntimeServicesPageStart = bootArgs->efiRuntimeServicesPageStart; bootArgsPreLion->efiRuntimeServicesPageCount = bootArgs->efiRuntimeServicesPageCount; bootArgsPreLion->efiSystemTable = bootArgs->efiSystemTable; - + bootArgsPreLion->efiMode = bootArgs->efiMode; - + bootArgsPreLion->performanceDataStart = bootArgs->performanceDataStart; bootArgsPreLion->performanceDataSize = bootArgs->performanceDataSize; bootArgsPreLion->efiRuntimeServicesVirtualPageStart = bootArgs->efiRuntimeServicesVirtualPageStart; Index: branches/chucko/i386/libsaio/efi.h =================================================================== --- branches/chucko/i386/libsaio/efi.h (revision 2453) +++ branches/chucko/i386/libsaio/efi.h (revision 2454) @@ -231,7 +231,7 @@ // range requires a runtime mapping #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL - +#define EFI_MEMORY_KERN_RESERVED (1ULL << 59) typedef EFI_UINT64 EFI_PHYSICAL_ADDRESS; typedef EFI_UINT64 EFI_VIRTUAL_ADDRESS; @@ -254,7 +254,7 @@ IN EFI_UINTN DescriptorSize, IN EFI_UINT32 DescriptorVersion, IN EFI_MEMORY_DESCRIPTOR * VirtualMap - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE @@ -262,7 +262,7 @@ (EFIAPI *EFI_CONVERT_POINTER) ( IN EFI_UINTN DebugDisposition, IN OUT VOID **Address - ) __attribute__((regparm(0))); + ); // Variable attributes @@ -281,7 +281,7 @@ OUT EFI_UINT32 * Attributes OPTIONAL, IN OUT EFI_UINTN * DataSize, OUT VOID * Data - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE @@ -290,7 +290,7 @@ IN OUT EFI_UINTN * VariableNameSize, IN OUT EFI_CHAR16 * VariableName, IN OUT EFI_GUID * VendorGuid - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE @@ -301,7 +301,7 @@ IN EFI_UINT32 Attributes, IN EFI_UINTN DataSize, IN VOID * Data - ) __attribute__((regparm(0))); + ); // EFI Time @@ -318,14 +318,14 @@ (EFIAPI *EFI_GET_TIME) ( OUT EFI_TIME * Time, OUT EFI_TIME_CAPABILITIES * Capabilities OPTIONAL - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE EFI_STATUS (EFIAPI *EFI_SET_TIME) ( IN EFI_TIME * Time - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE @@ -334,7 +334,7 @@ OUT EFI_BOOLEAN * Enabled, OUT EFI_BOOLEAN * Pending, OUT EFI_TIME * Time - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE @@ -342,7 +342,7 @@ (EFIAPI *EFI_SET_WAKEUP_TIME) ( IN EFI_BOOLEAN Enable, IN EFI_TIME * Time OPTIONAL - ) __attribute((regparm(0))); + ); typedef enum { EfiResetCold, @@ -363,7 +363,7 @@ IN EFI_STATUS ResetStatus, IN EFI_UINTN DataSize, IN EFI_CHAR16 * ResetData OPTIONAL - ) __attribute__((regparm(0))); + ); typedef EFI_RUNTIMESERVICE @@ -391,7 +391,7 @@ IN EFI_UINT32 Instance, IN EFI_GUID * CallerId OPTIONAL, IN EFI_STATUS_CODE_DATA * Data OPTIONAL - ) __attribute__((regparm(0))); + ); #endif // Index: branches/chucko/i386/libsaio/vbe.c =================================================================== --- branches/chucko/i386/libsaio/vbe.c (revision 2453) +++ branches/chucko/i386/libsaio/vbe.c (revision 2454) @@ -36,7 +36,7 @@ #if UNUSED //============================================================================== - +#if UNUSED static inline void outi (int port, int index, int val) { @@ -68,7 +68,7 @@ outb (port, index); outb (port + 1, (inb (port + 1) & ~clear) | set); } - +#endif /* UNUSED */ //============================================================================== #endif /* UNUSED */ Index: branches/chucko/i386/libsaio/bootstruct.h =================================================================== --- branches/chucko/i386/libsaio/bootstruct.h (revision 2453) +++ branches/chucko/i386/libsaio/bootstruct.h (revision 2454) @@ -47,7 +47,7 @@ /* * Maximum number of boot drivers that can be loaded. */ -#define NDRIVERS 500 +#define NDRIVERS 500 #define CONFIG_SIZE (40 * 4096) @@ -74,10 +74,12 @@ unsigned char BIOSPresent; } PCI_bus_info_t; -typedef struct { - unsigned long address; // address where driver was loaded - unsigned long size; // number of bytes - unsigned long type; // driver type + +typedef struct +{ + unsigned long address; // address where driver was loaded + unsigned long size; // number of bytes + unsigned long type; // driver type } driver_config_t; /* @@ -90,11 +92,12 @@ /* * ACPI defined memory range types. */ -enum { - kMemoryRangeUsable = 1, // RAM usable by the OS. - kMemoryRangeReserved = 2, // Reserved. (Do not use) - kMemoryRangeACPI = 3, // ACPI tables. Can be reclaimed. - kMemoryRangeNVS = 4, // ACPI NVS memory. (Do not use) +enum +{ + kMemoryRangeUsable = 1, // RAM usable by the OS. + kMemoryRangeReserved = 2, // Reserved. (Do not use) + kMemoryRangeACPI = 3, // ACPI tables. Can be reclaimed. + kMemoryRangeNVS = 4, // ACPI NVS memory. (Do not use) /* Undefined types should be treated as kMemoryRangeReserved */ }; Index: branches/chucko/i386/libsaio/device_tree.c =================================================================== --- branches/chucko/i386/libsaio/device_tree.c (revision 2453) +++ branches/chucko/i386/libsaio/device_tree.c (revision 2454) @@ -403,7 +403,7 @@ DT__GetProperty(Node *node, const char *name) { Property *prop; - + for (prop = node->properties; prop; prop = prop->next) { if (strcmp(prop->name, name) == 0) @@ -411,7 +411,7 @@ return prop; } } - + return NULL; } Index: branches/chucko/i386/libsaio/acpi_patcher.c =================================================================== --- branches/chucko/i386/libsaio/acpi_patcher.c (revision 2453) +++ branches/chucko/i386/libsaio/acpi_patcher.c (revision 2454) @@ -1034,6 +1034,7 @@ } DBG("TABLE %c%c%c%c@%x \n", table[0],table[1],table[2],table[3],xsdt_entries[i]); + continue; } if (tableSign(table, "FACP")) { @@ -1112,6 +1113,7 @@ DBG("\n"); // Correct the checksum of RSDP + DBG("RSDP: Original checksum %d, ", rsdp_mod->Checksum); rsdp_mod->Checksum=0; rsdp_mod->Checksum=256-checksum8(rsdp_mod,20); Index: branches/chucko/i386/libsaio/bootargs.h =================================================================== --- branches/chucko/i386/libsaio/bootargs.h (revision 2453) +++ branches/chucko/i386/libsaio/bootargs.h (revision 2454) @@ -108,9 +108,12 @@ #define kBootArgsPreLionVersion 1 /* Snapshot constants of previous revisions that are supported */ +#define kBootArgsVersion1 1 +#define kBootArgsVersion2 2 +#define kBootArgsRevision2_0 0 -#define kBootArgsEfiMode32 32 -#define kBootArgsEfiMode64 64 +#define kBootArgsEfiMode32 32 +#define kBootArgsEfiMode64 64 typedef struct boot_args { uint16_t Revision; /* Revision of boot_args structure */ @@ -118,7 +121,7 @@ uint8_t efiMode; /* 32 means 32-bit mode, 64 means 64-bit mode */ uint8_t debugMode; /* Bit field with behavior changes */ - uint8_t __reserved1[2]; + uint16_t flags; // uint8_t __reserved1[2]; char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */ @@ -140,7 +143,7 @@ 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 kslide; // uint32_t __reserved2; uint32_t performanceDataStart; /* physical address of log */ uint32_t performanceDataSize; @@ -151,7 +154,13 @@ uint64_t bootMemSize; uint64_t PhysicalMemorySize; uint64_t FSBFrequency; - uint32_t __reserved4[734]; + // + uint64_t pciConfigSpaceBaseAddress; + uint32_t pciConfigSpaceStartBusNumber; + uint32_t pciConfigSpaceEndBusNumber; + uint32_t __reserved4[730]; + // +// uint32_t __reserved4[734]; } boot_args; Index: branches/chucko/i386/libsaio/spd.c =================================================================== --- branches/chucko/i386/libsaio/spd.c (revision 2453) +++ branches/chucko/i386/libsaio/spd.c (revision 2454) @@ -382,31 +382,34 @@ static struct smbus_controllers_t smbus_controllers[] = { - {0x8086, 0x1C22, "6 Series", read_smb_intel }, - {0x8086, 0x1D22, "C600/X79 Series", read_smb_intel }, - {0x8086, 0x1D70, "C600/X79 Series", read_smb_intel }, - {0x8086, 0x1D71, "C608/C606/X79 Series", read_smb_intel }, - {0x8086, 0x1D72, "C608", read_smb_intel }, - {0x8086, 0x1E22, "7 Series/C210 Series", read_smb_intel }, - {0x8086, 0x2330, "DH89xxCC", read_smb_intel }, - {0x8086, 0x2413, "82801AA", read_smb_intel }, - {0x8086, 0x2423, "82801BA/BAM", read_smb_intel }, - {0x8086, 0x2443, "82801BA/BAM", read_smb_intel }, - {0x8086, 0x2483, "82801CA/CAM", read_smb_intel }, - {0x8086, 0x24C3, "82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M)", read_smb_intel }, - {0x8086, 0x24D3, "82801EB/ER (ICH5/ICH5R)", read_smb_intel }, - {0x8086, 0x25A4, "6300ESB", read_smb_intel }, - {0x8086, 0x266A, "82801FB/FBM/FR/FW/FRW (ICH6 Family)", read_smb_intel }, - {0x8086, 0x269B, "631xESB/632xESB/3100", read_smb_intel }, - {0x8086, 0x27DA, "N10/ICH 7 Family", read_smb_intel }, - {0x8086, 0x283E, "82801H (ICH8 Family) ", read_smb_intel }, - {0x8086, 0x2930, "82801I (ICH9 Family)", read_smb_intel }, - {0x8086, 0x3A30, "82801JI (ICH10 Family)", read_smb_intel }, - {0x8086, 0x3A60, "82801JD/DO (ICH10 Family)", read_smb_intel }, - {0x8086, 0x3B30, "5 Series/3400 Series", read_smb_intel }, - {0x8086, 0x5032, "EP80579", read_smb_intel }, - {0x8086, 0x8C22, "8 Series/C220", read_smb_intel }, - {0x8086, 0x9C22, "Lynx Point-LP", read_smb_intel } + {0x8086, 0x1C22, "P67", read_smb_intel }, // Z68, Q67 + {0x8086, 0x1D22, "X79", read_smb_intel }, + {0x8086, 0x1D70, "X79", read_smb_intel }, + {0x8086, 0x1D71, "X79", read_smb_intel }, + {0x8086, 0x1D72, "C608", read_smb_intel }, + {0x8086, 0x1E22, "Z77", read_smb_intel }, // H77, Q77 + {0x8086, 0x2330, "DH89xxCC", read_smb_intel }, + {0x8086, 0x2413, "82801AA", read_smb_intel }, + {0x8086, 0x2423, "BAM", read_smb_intel }, + {0x8086, 0x2443, "BAM", read_smb_intel }, + {0x8086, 0x2483, "CAM", read_smb_intel }, + {0x8086, 0x24C3, "ICH4", read_smb_intel }, + {0x8086, 0x24D3, "ICH5", read_smb_intel }, + {0x8086, 0x25A4, "6300ESB", read_smb_intel }, + {0x8086, 0x266A, "ICH6", read_smb_intel }, + {0x8086, 0x269B, "ESB", read_smb_intel }, + {0x8086, 0x27DA, "ICH7", read_smb_intel }, + {0x8086, 0x283E, "ICH8", read_smb_intel }, + {0x8086, 0x2930, "ICH9", read_smb_intel }, + {0x8086, 0x3A30, "ICH10", read_smb_intel }, + {0x8086, 0x3A60, "ICH10", read_smb_intel }, + {0x8086, 0x3B30, "P55", read_smb_intel }, + {0x8086, 0x5032, "EP80579", read_smb_intel }, + {0x8086, 0x8119, "US15W", read_smb_intel }, + {0x8086, 0x8C22, "HSW", read_smb_intel }, // Z87, H87, Q87, H81 + {0x8086, 0x8CA2, "Z97/H97", read_smb_intel }, // new + {0x8086, 0x8D22, "X99", read_smb_intel }, // new + {0x8086, 0x9C22, "HSW-ULT", read_smb_intel } }; Index: branches/chucko/i386/libsaio/Makefile =================================================================== --- branches/chucko/i386/libsaio/Makefile (revision 2453) +++ branches/chucko/i386/libsaio/Makefile (revision 2454) @@ -51,11 +51,11 @@ all: $(DIRS_NEEDED) $(CONFIG_HEADERS) $(LIBS) all-recursive $(LIBS): $(SAIO_OBJS) - @echo "\t[RM] $@" + @echo " [RM] $@" @rm -f $@ - @echo "\t[AR] $(@F)" + @echo " [AR] $(@F)" @ar q $@ $^ &> /dev/null - @echo "\t[RANLIB] $(@F)" + @echo " [RANLIB] $(@F)" @ranlib $(SYMROOT)/$(@F) clean-local: Index: branches/chucko/i386/libsaio/bios.s =================================================================== --- branches/chucko/i386/libsaio/bios.s (revision 2453) +++ branches/chucko/i386/libsaio/bios.s (revision 2454) @@ -80,21 +80,21 @@ bits of code and data within the first 63.5k and modify the loaders to be able to load more than 63.5k. */ - .align 2 + .align 4 save_eax: .space 4 + .align 4 +save_edx: .space 4 .align 2 -save_edx: .space 4 - .align 1 save_es: .space 2 - .align 1 + .align 2 save_flag: .space 2 - .align 2 + .align 4 new_eax: .space 4 + .align 4 +new_edx: .space 4 .align 2 -new_edx: .space 4 - .align 1 new_es: .space 2 - .align 1 + .align 2 new_ds: .space 2 .section __INIT,__text // turbo - This code must reside within the first segment Index: branches/chucko/i386/libsaio/device_inject.c =================================================================== --- branches/chucko/i386/libsaio/device_inject.c (revision 2453) +++ branches/chucko/i386/libsaio/device_inject.c (revision 2454) @@ -23,11 +23,11 @@ #define DBG(x...) msglog(x) #endif -uint32_t devices_number = 1; -uint32_t builtin_set = 0; -DevPropString *string = 0; -uint8_t *stringdata = 0; -uint32_t stringlength = 0; +uint32_t devices_number = 1; +uint32_t builtin_set = 0; +DevPropString *string = 0; +uint8_t *stringdata = 0; +uint32_t stringlength = 0; char *efi_inject_get_devprop_string(uint32_t *len) { @@ -251,9 +251,11 @@ return 1; } +// devprop_generate_string optimized by cparm char *devprop_generate_string(DevPropString *string) { - char *buffer = (char*)malloc(string->length * 2); + int len = string->length * 2; + char *buffer = (char*)malloc(len); char *ptr = buffer; if(!buffer) @@ -261,44 +263,68 @@ return NULL; } - sprintf(buffer, "%08x%08x%04x%04x", dp_swap32(string->length), string->WHAT2, + snprintf(buffer, len, "%08x%08x%04x%04x", dp_swap32(string->length), string->WHAT2, dp_swap16(string->numentries), string->WHAT3); buffer += 24; + len -= 24; int i = 0, x = 0; while(i < string->numentries) { - sprintf(buffer, "%08x%04x%04x", dp_swap32(string->entries[i]->length), + if (!(i < DEV_PROP_DEVICE_MAX_ENTRIES)) { + break; + } + + if(!len) { + break; + } + + snprintf(buffer, len, "%08x%04x%04x", dp_swap32(string->entries[i]->length), dp_swap16(string->entries[i]->numentries), string->entries[i]->WHAT2); buffer += 16; - sprintf(buffer, "%02x%02x%04x%08x%08x", string->entries[i]->acpi_dev_path.type, + len -= 16; + snprintf(buffer, len, "%02x%02x%04x%08x%08x", string->entries[i]->acpi_dev_path.type, string->entries[i]->acpi_dev_path.subtype, dp_swap16(string->entries[i]->acpi_dev_path.length), string->entries[i]->acpi_dev_path._HID, dp_swap32(string->entries[i]->acpi_dev_path._UID)); buffer += 24; + len -= 24; for(x = 0;x < string->entries[i]->num_pci_devpaths; x++) { - sprintf(buffer, "%02x%02x%04x%02x%02x", string->entries[i]->pci_dev_path[x].type, + if(!len) { + break; + } + snprintf(buffer, len, "%02x%02x%04x%02x%02x", string->entries[i]->pci_dev_path[x].type, string->entries[i]->pci_dev_path[x].subtype, dp_swap16(string->entries[i]->pci_dev_path[x].length), string->entries[i]->pci_dev_path[x].function, string->entries[i]->pci_dev_path[x].device); buffer += 12; + len -= 12; } - - sprintf(buffer, "%02x%02x%04x", string->entries[i]->path_end.type, + + if(!len) { + break; + } + + snprintf(buffer, len, "%02x%02x%04x", string->entries[i]->path_end.type, string->entries[i]->path_end.subtype, dp_swap16(string->entries[i]->path_end.length)); buffer += 8; + len -= 8; uint8_t *dataptr = string->entries[i]->data; for(x = 0; (uint32_t)x < (string->entries[i]->length) - (24 + (6 * string->entries[i]->num_pci_devpaths)) ; x++) { - sprintf(buffer, "%02x", *dataptr++); + if(!len) { + break; + } + snprintf(buffer, len, "%02x", *dataptr++); buffer += 2; + len -= 2; } i++; } Index: branches/chucko/i386/libsaio/hda.c =================================================================== --- branches/chucko/i386/libsaio/hda.c (revision 2453) +++ branches/chucko/i386/libsaio/hda.c (revision 2454) @@ -108,11 +108,11 @@ { HDA_INTEL_PCH, "5 Series/3400 Series" }, { HDA_INTEL_PCH2, "5 Series/3400 Series" }, { HDA_INTEL_SCH, "System Controller Hub (SCH Poulsbo)" }, - { HDA_INTEL_SCH2, "9 Series" }, - { HDA_INTEL_LPT1, "Lynx Point" }, - { HDA_INTEL_LPT2, "Lynx Point" }, - { HDA_INTEL_LYNX, "Lynx Point-LP" }, - { HDA_INTEL_LYNX2, "Lynx Point-LP" }, + { HDA_INTEL_SCH2, "Wildcat Point" }, + { HDA_INTEL_LPT1, "Wellsburg" }, + { HDA_INTEL_LPT2, "Wellsburg" }, + { HDA_INTEL_LYNX, "Lynx Point" }, + { HDA_INTEL_LYNX2, "Lynx Point" }, //10de NVIDIA Corporation { HDA_NVIDIA_MCP51, "MCP51" }, { HDA_NVIDIA_MCP55, "MCP55" }, Index: branches/chucko/i386/libsaio/dram_controllers.c =================================================================== --- branches/chucko/i386/libsaio/dram_controllers.c (revision 2453) +++ branches/chucko/i386/libsaio/dram_controllers.c (revision 2454) @@ -525,7 +525,7 @@ { 0x8086, 0x29C0, "82G33/G31/P35/P31", setup_p35, get_fsb_i965, get_timings_p35 }, { 0x8086, 0x29D0, "82Q33 Express", setup_p35, get_fsb_i965, get_timings_p35 }, { 0x8086, 0x29E0, "82X38/X48 Express", setup_p35, get_fsb_i965, get_timings_p35 }, -// { 0x8086, 0x29F0, "3200/3210 Chipset", NULL, NULL, NULL }, + { 0x8086, 0x29F0, "3200/3210", setup_p35, get_fsb_i965, get_timings_p35 }, { 0x8086, 0x2E00, "Eaglelake", setup_p35, get_fsb_i965, get_timings_p35 }, { 0x8086, 0x2E10, "Q45/Q43", setup_p35, get_fsb_i965, get_timings_p35 }, Index: branches/chucko/i386/libsaio/nvidia.c =================================================================== --- branches/chucko/i386/libsaio/nvidia.c (revision 2453) +++ branches/chucko/i386/libsaio/nvidia.c (revision 2454) @@ -181,6 +181,7 @@ { 0x10DE0046, "GeForce 6800 GT" }, { 0x10DE0047, "GeForce 6800 GS" }, { 0x10DE0048, "GeForce 6800 XT" }, + { 0x10DE0049, "NV40GL" }, { 0x10DE004D, "Quadro FX 3400" }, { 0x10DE004E, "Quadro FX 4000" }, // 0050 - 005F @@ -192,6 +193,7 @@ { 0x10DE0091, "GeForce 7800 GTX" }, { 0x10DE0092, "GeForce 7800 GT" }, { 0x10DE0093, "GeForce 7800 GS" }, + { 0x10DE0094, "GeForce 7800SE/XT/LE/LT/ZT" }, { 0x10DE0095, "GeForce 7800 SLI" }, { 0x10DE0098, "GeForce Go 7800" }, { 0x10DE0099, "GeForce Go 7800 GTX" }, @@ -235,6 +237,7 @@ { 0x10DE0148, "GeForce Go 6600" }, { 0x10DE0149, "GeForce Go 6600 GT" }, { 0x10DE014A, "Quadro NVS 440" }, + { 0x10DE014B, "NV43" }, { 0x10DE014C, "Quadro FX 550" }, { 0x10DE014D, "Quadro FX 550" }, { 0x10DE014E, "Quadro FX 540" }, @@ -257,7 +260,9 @@ // 0170 - 017F // 0180 - 018F // 0190 - 019F + { 0x10DE0190, "GeForce 8800" }, { 0x10DE0191, "GeForce 8800 GTX" }, + { 0x10DE0192, "GeForce 8800" }, { 0x10DE0193, "GeForce 8800 GTS" }, { 0x10DE0194, "GeForce 8800 Ultra" }, { 0x10DE0197, "Tesla C870" }, @@ -315,6 +320,8 @@ { 0x10DE0293, "GeForce 7950 GX2" }, { 0x10DE0294, "GeForce 7950 GX2" }, { 0x10DE0295, "GeForce 7950 GT" }, + { 0x10DE0296, "G71" }, + { 0x10DE0297, "GeForce Go 7950 GTX" }, { 0x10DE0298, "GeForce Go 7900 GS" }, { 0x10DE0299, "GeForce Go 7900 GTX" }, { 0x10DE029A, "Quadro FX 2500M" }, @@ -924,7 +931,7 @@ { 0x10DE0DCE, "GeForce GT 555M" }, // { 0x10DE0DCF, "N12P-GT-B" }, // 0DD0 - 0DDF - // { 0x10DE0DD0, "N11E-GT" }, + { 0x10DE0DD0, "N11E-GT" }, { 0x10DE0DD1, "GeForce GTX 460M" }, { 0x10DE0DD2, "GeForce GT 445M" }, { 0x10DE0DD3, "GeForce GT 435M" }, @@ -932,7 +939,7 @@ { 0x10DE0DD8, "Quadro 2000" }, { 0x10DE0DDA, "Quadro 2000M" }, { 0x10DE0DDE, "GF106-ES" }, - // { 0x10DE0DDF, "GF106-INT" }, + { 0x10DE0DDF, "GF106-INT" }, // 0DE0 - 0DEF { 0x10DE0DE0, "GeForce GT 440" }, { 0x10DE0DE1, "GeForce GT 430" }, @@ -947,7 +954,7 @@ { 0x10DE0DEC, "GeForce GT 525M" }, { 0x10DE0DED, "GeForce GT 520M" }, { 0x10DE0DEE, "GeForce GT 415M" }, - { 0x10DE0DEF, "N13P-NS1-A1" }, + { 0x10DE0DEF, "NVS 5400M" }, // 0DF0 - 0DFF { 0x10DE0DF0, "GeForce GT 425M" }, { 0x10DE0DF1, "GeForce GT 420M" }, @@ -962,7 +969,7 @@ { 0x10DE0DFA, "Quadro 1000M" }, { 0x10DE0DFC, "NVS 5200M" }, { 0x10DE0DFE, "GF108 ES" }, - // { 0x10DE0DFF, "GF108 INT" }, + { 0x10DE0DFF, "GF108 INT" }, // 0E00 - 0E0F // 0E10 - 0E1F // 0E20 - 0E2F @@ -970,17 +977,17 @@ { 0x10DE0E22, "GeForce GTX 460" }, { 0x10DE0E23, "GeForce GTX 460 SE" }, { 0x10DE0E24, "GeForce GTX 460" }, - // { 0x10DE0E25, "D12U-50" }, + { 0x10DE0E25, "D12U-50" }, { 0x10DE0E28, "GeForce GTX 460" }, // 0E30 - 0E3F { 0x10DE0E30, "GeForce GTX 470M" }, { 0x10DE0E31, "GeForce GTX 485M" }, - // { 0x10DE0E32, "N12E-GT" }, + { 0x10DE0E32, "N12E-GT" }, { 0x10DE0E38, "GF104GL" }, { 0x10DE0E3A, "Quadro 3000M" }, { 0x10DE0E3B, "Quadro 4000M" }, - // { 0x10DE0E3E, "GF104-ES" }, - // { 0x10DE0E3F, "GF104-INT" }, + { 0x10DE0E3E, "GF104-ES" }, + { 0x10DE0E3F, "GF104-INT" }, // 0E40 - 0E4F // 0E50 - 0E5F // 0E60 - 0E6F @@ -996,6 +1003,7 @@ // 0F00 - 0F0F { 0x10DE0F00, "GeForce GT 630" }, { 0x10DE0F01, "GeForce GT 620" }, + { 0x10DE0F02, "GeForce GT 730" }, // 0F10 - 0F1F // 0F20 - 0F2F // 0F30 - 0F3F @@ -1012,7 +1020,9 @@ { 0x10DE0FC1, "GeForce GT 640" }, { 0x10DE0FC2, "GeForce GT 630" }, { 0x10DE0FC6, "GeForce GTX 650" }, + { 0x10DE0FC8, "GeForce GT 740" }, { 0x10DE0FCD, "GeForce GT 755M" }, + { 0x10DE0FCE, "GeForce GT 640M LE" }, // 0FD0 - 0FDF { 0x10DE0FD1, "GeForce GT 650M" }, { 0x10DE0FD2, "GeForce GT 640M" }, @@ -1021,15 +1031,29 @@ { 0x10DE0FD5, "GeForce GT 650M" }, { 0x10DE0FD8, "GeForce GT 640M" }, { 0x10DE0FD9, "GeForce GT 645M" }, + { 0x10DE0FDA, "GK107-ES-A1" }, { 0x10DE0FDB, "GK107-ESP-A1" }, + { 0x10DE0FDC, "GK107-INT22-A1" }, { 0x10DE0FDF, "GeForce GT 740M" }, // 0FE0 - 0FEF { 0x10DE0FE0, "GeForce GTX 660M" }, { 0x10DE0FE1, "GeForce GT 730M" }, { 0x10DE0FE3, "GeForce GT 745M" }, { 0x10DE0FE4, "GeForce GT 750M" }, + { 0x10DE0FE5, "GeForce K340 USM" }, + { 0x10DE0FE6, "NVS K1 USM" }, + { 0x10DE0FE7, "Generic K1 USM / GRID K100" }, + { 0x10DE0FE9, "GeForce GT 750M" }, + { 0x10DE0FEA, "GeForce GT 755M" }, + { 0x10DE0FEF, "GRID K340" }, // 0FF0 - 0FFF - { 0x10DE0FF2, "VGX K1" }, + { 0x10DE0FF0, "NB1Q" }, + { 0x10DE0FF1, "NVS 1000" }, + { 0x10DE0FF2, "GRID K1" }, + { 0x10DE0FF3, "Quadro K420" }, + { 0x10DE0FF5, "Tesla K1 USM" }, + { 0x10DE0FF6, "Quadro K1100M" }, + { 0x10DE0FF7, "Quadro K1 USM" }, // K1 USM / GRID K120Q / GRID K140Q { 0x10DE0FF8, "Quadro K500M" }, { 0x10DE0FF9, "Quadro K2000D" }, { 0x10DE0FFA, "Quadro K600" }, @@ -1039,12 +1063,18 @@ { 0x10DE0FFE, "Quadro K2000" }, { 0x10DE0FFF, "Quadro 410" }, // 1000 - 100F + { 0x10DE1001, "GeForce GTX TITAN Z" }, { 0x10DE1003, "GeForce GTX Titan LE" }, { 0x10DE1004, "GeForce GTX 780" }, { 0x10DE1005, "GeForce GTX Titan" }, + { 0x10DE1006, "GeForce GTX 780 Ti" }, + { 0x10DE1007, "GeForce GTX 780" }, + { 0x10DE1008, "GeForce GTX 780 Ti" }, { 0x10DE100A, "GeForce GTX 780 Ti" }, +// { 0x10DE100B, "Graphics Device" }, // GK110 { 0x10DE100C, "GeForce GTX Titan Black" }, // 1010 - 101F + { 0x10DE101E, "Tesla K20X" }, // GK110GL { 0x10DE101F, "Tesla K20" }, // 1020 - 102F { 0x10DE1020, "Tesla K20X" }, @@ -1052,7 +1082,15 @@ { 0x10DE1022, "Tesla K20c" }, { 0x10DE1026, "Tesla K20s" }, { 0x10DE1028, "Tesla K20m" }, + { 0x10DE102A, "Tesla K40t" }, // GK110BGL +// { 0x10DE102B, "Graphics Device" }, // GK110BGL +// { 0x10DE102C, "Graphics Device" }, // GK110BGL + { 0x10DE102D, "Tesla K80" }, // GK110BGL (2x) + { 0x10DE102E, "Tesla K40d" }, // GK110BGL + { 0x10DE102F, "Tesla Stella Solo" }, // GK110BGL // 1030 - 103F +// { 0x10DE1030, "" }, // GK110 + { 0x10DE103F, "Tesla Stella SXM" }, // GK110 // 1040 - 104F { 0x10DE1040, "GeForce GT 520" }, // { 0x10DE1041, "D13M1-45" }, @@ -1061,6 +1099,8 @@ { 0x10DE1049, "GeForce GT 620" }, { 0x10DE104A, "GeForce GT 610" }, { 0x10DE104B, "GeForce GT 625 (OEM)" }, + { 0x10DE104C, "GeForce GT 705" }, // GF119 + { 0x10DE104D, " GeForce GT 710" }, // GF119 // 1050 - 105F { 0x10DE1050, "GeForce GT 520M" }, { 0x10DE1051, "GeForce GT 520MX" }, @@ -1118,15 +1158,15 @@ { 0x10DE1140, "GeForce GT 610M" }, { 0x10DE1141, "GeForce 610M" }, { 0x10DE1142, "GeForce 620M" }, - // { 0x10DE1143, "N13P-GV" }, - // { 0x10DE1144, "GF117" }, - // { 0x10DE1145, "GF117" }, - // { 0x10DE1146, "GF117" }, - // { 0x10DE1147, "GF117" }, + { 0x10DE1143, "N13P-GV" }, + { 0x10DE1144, "GF117" }, + { 0x10DE1145, "GF117" }, + { 0x10DE1146, "GF117" }, + { 0x10DE1147, "GF117" }, { 0x10DE1149, "GF117-ES" }, - // { 0x10DE114A, "GF117-INT" }, - // { 0x10DE114B, "PCI-GEN3-B" }, - // 1150 - 115F + { 0x10DE114A, "GF117-INT" }, + { 0x10DE114B, "PCI-GEN3-B" }, + { 0x10DE1150, "N13M-NS" }, // 1160 - 116F // 1170 - 117F // 1180 - 118F @@ -1143,13 +1183,16 @@ { 0x10DE118E, "GeForce GTX 760 (192-bit)" }, { 0x10DE118F, "Tesla K10" }, // 1190 - 119F + { 0x10DE1191, "GeForce GTX 760" }, // GK104 { 0x10DE1192, "GeForce GK104" }, { 0x10DE1193, "GeForce GTX 760 Ti" }, + { 0x10DE1194, "Tesla K8" }, // GK104 + { 0x10DE1195, "GeForce GTX 660" }, { 0x10DE1198, "GeForce GTX 880M" }, { 0x10DE1199, "GeForce GTX 870M" }, - { 0x10DE119a, "GeForce GTX 860M" }, - { 0x10DE119d, "GeForce GTX 775M" }, // Mac Edition - { 0x10DE119e, "GeForce GTX 780M" }, // Mac Edition + { 0x10DE119A, "GeForce GTX 860M" }, + { 0x10DE119D, "GeForce GTX 775M" }, // Mac Edition + { 0x10DE119E, "GeForce GTX 780M" }, // Mac Edition { 0x10DE119F, "GeForce GTX 780M" }, // 11A0 - 11AF { 0x10DE11A0, "GeForce GTX 680M" }, @@ -1157,9 +1200,11 @@ { 0x10DE11A2, "GeForce GTX 675MX" }, // Mac Edition { 0x10DE11A3, "GeForce GTX 680MX" }, { 0x10DE11A7, "GeForce GTX 675MX" }, + { 0x10DE11AF, "GRID IceCube" }, // GF104M // 11B0 - 11BF { 0x10DE11B0, "GRID K240Q" }, // K260Q vGPU { 0x10DE11B1, "GRID K2 Tesla USM" }, + { 0x10DE11B4, "Quadro K4200" }, { 0x10DE11B6, "Quadro K3100M" }, { 0x10DE11B7, "Quadro K4100M" }, { 0x10DE11B8, "Quadro K5100M" }, @@ -1168,7 +1213,7 @@ { 0x10DE11BC, "Quadro K5000M" }, { 0x10DE11BD, "Quadro K4000M" }, { 0x10DE11BE, "Quadro K3000M" }, - { 0x10DE11BF, "VGX K2" }, + { 0x10DE11BF, "GRID K2" }, // 11C0 - 11CF { 0x10DE11C0, "GeForce GTX 660" }, { 0x10DE11C2, "GeForce GTX 650 Ti BOOST" }, @@ -1181,12 +1226,13 @@ { 0x10DE11D0, "GK106-INT353" }, // 11E0 - 11EF { 0x10DE11E0, "GeForce GTX 770M" }, - { 0x10DE11E1, "N14E-GE-B-A1" }, + { 0x10DE11E1, "GeForce GTX 765M" }, { 0x10DE11E2, "GeForce GTX 765M" }, { 0x10DE11E3, "GeForce GTX 760M" }, // 11F0 - 11FF { 0x10DE11FA, "Quadro K4000" }, { 0x10DE11FC, "Quadro 2100M" }, + { 0x10DE11FF, "NB1Q" }, // // 1200 - 120F { 0x10DE1200, "GeForce GTX 560 Ti" }, { 0x10DE1201, "GeForce GTX 560" }, @@ -1200,7 +1246,7 @@ { 0x10DE1211, "GeForce GTX 580M" }, { 0x10DE1212, "GeForce GTX 675M" }, { 0x10DE1213, "GeForce GTX 670M" }, - //{ 0x10DE121F, "GF114-INT" }, + { 0x10DE121F, "GF114-INT" }, { 0x10DE1240, "GeForce GT 620M" }, { 0x10DE1241, "GeForce GT 545" }, { 0x10DE1243, "GeForce GT 545" }, @@ -1233,7 +1279,7 @@ { 0x10DE1296, "GeForce 825M" }, // GK208M { 0x10DE1298, "GeForce GT 720M" }, // 12A0 - 12AF - //{ 0x10DE12A0, "GeForce GT ???" }, + { 0x10DE12A0, "GK208" }, { 0x10DE12AF, "GK208-INT" }, { 0x10DE12B0, "GK208-CS-Q" }, { 0x10DE12B9, "Quadro K610M" }, @@ -1248,18 +1294,60 @@ { 0x10DE1380, "GeForce GTX 750 Ti" }, { 0x10DE1381, "GeForce GTX 750" }, { 0x10DE1382, "GeForce GTX 745" }, +// { 0x10DE1383, "Graphics Device" }, // GM107 + { 0x10DE1389, "GRID M3" }, // GM107 { 0x10DE1390, "GeForce 845M" }, { 0x10DE1391, "GeForce GTX 850M" }, { 0x10DE1392, "GeForce GTX 860M" }, { 0x10DE1393, "GeForce 840M" }, + { 0x10DE1398, "GeForce N15S-GT1R" }, // + { 0x10DE13AD, "GM107 INT52" }, // + { 0x10DE13AE, "GM107 CS1" }, // +// { 0x10DE13AF, "Graphics Device" }, // GM107GLM + { 0x10DE13B3, "Quadro K2200M" }, // { 0x10DE13BA, "Quadro K2200" }, { 0x10DE13BB, "Quadro K620" }, - { 0x10DE13BD, "Tesla M40" }, + { 0x10DE13BD, "Tesla M40" }, // GM107GLM + { 0x10DE13BE, "GM107 CS1" }, // + { 0x10DE13BF, "GM107 INT52" }, // // 12B0 - 12BF - { 0x10DE13C0, "GeForce GTX 980" }, // GM204 -// { 0x10DE13C1, "GeForce GTX 9xx" }, // GM204 - { 0x10DE13C2, "GeForce GTX 970" } // GM204 -// { 0x10DE13C3, "GeForce GTX 9xx" }, // GM204 + { 0x10DE13C0, "GeForce GTX 980" }, // GM107GLM +// { 0x10DE13C1, "Graphics Device" }, // GM107GLM + { 0x10DE13C2, "GeForce GTX 970" }, // GM107GLM +// { 0x10DE13C3, "Graphics Device" }, // GM107GLM + { 0x10DE13D7, "GeForce GTX 980M" }, // + { 0x10DE13D8, "GeForce GTX 970M" }, // +// { 0x10DE13D9, "Graphics Device" }, // +// { 0x10DE13F0, "Graphics Device" }, // GM107GLM +// { 0x10DE13F1, "Graphics Device" }, // GM107GLM +// { 0x10DE1401, "Graphics Device" }, // +// { 0x10DE1402, "Graphics Device" }, // +// { 0x10DE143F, "Graphics Device" }, // +// { 0x10DE1600, "Graphics Device" }, // +// { 0x10DE1601, "Graphics Device" }, // +// { 0x10DE1602, "Graphics Device" }, // +// { 0x10DE1603, "Graphics Device" }, // +// { 0x10DE1630, "Graphics Device" }, // +// { 0x10DE1631, "Graphics Device" }, // +// { 0x10DE1780, "Graphics Device" }, // +// { 0x10DE1781, "Graphics Device" }, // +// { 0x10DE1782, "Graphics Device" }, // +// { 0x10DE1783, "Graphics Device" }, // + { 0x10DE1789, "GRID M3-3020" }, // + { 0x10DE1790, "N15S-GX" }, // + { 0x10DE1791, "N15P-GT" }, // + { 0x10DE1792, "N15P-GX" }, // +// { 0x10DE17B3, "Quadro" }, // +// { 0x10DE17BA, "Quadro" }, // +// { 0x10DE17BB, "Quadro" }, // +// { 0x10DE17BD, "Graphics Device" }, // + { 0x10DE17BE, "GM107 CS1" } // GM107 +// { 0x10DE17C1, "Graphics Device" }, // +// { 0x10DE17C2, "Graphics Device" }, // +// { 0x10DE17EE, "Graphics Device" }, // +// { 0x10DE17EF, "Graphics Device" }, // +// { 0x10DE17F0, "Graphics Device" }, // +// { 0x10DE17FF, "Graphics Device" }, // }; static nvidia_card_info_t nvidia_card_exceptions[] = { @@ -1694,7 +1782,7 @@ //ErmaC added selector for Chameleon "old" style in System Profiler if (getBoolForKey(kNvidiaGeneric, &showGeneric, &bootInfo->chameleonConfig)) { - verbose("\tNvidiaGeneric = Yes\n"); + verbose("NvidiaGeneric = Yes\n"); for (i = 1; i < (sizeof(nvidia_card_generic) / sizeof(nvidia_card_generic[0])); i++) { if (nvidia_card_generic[i].device == device_id) { Index: branches/chucko/i386/libsaio/ati.c =================================================================== --- branches/chucko/i386/libsaio/ati.c (revision 2453) +++ branches/chucko/i386/libsaio/ati.c (revision 2454) @@ -348,9 +348,10 @@ { 0x9553, 0xFFA21179, CHIP_FAMILY_RV710, "ATI Mobility Radeon HD 4500", kPeregrine }, { 0x9553, 0xFFC01179, CHIP_FAMILY_RV710, "ATI Mobility Radeon HD 4500", kPeregrine }, - { 0x9555, 0x29241682, CHIP_FAMILY_RV710, "ATI Radeon HD 4550", kNull }, - { 0x9555, 0x24651682, CHIP_FAMILY_RV710, "ATI Radeon HD4300/HD4500", kNull }, - { 0x9555, 0x3711174B, CHIP_FAMILY_RV710, "ATI Radeon HD4300/HD4500", kNull }, + { 0x9555, 0x1726103C, CHIP_FAMILY_RV710, "ATI Radeon HD 4550", kShrike }, + { 0x9555, 0x29241682, CHIP_FAMILY_RV710, "ATI Radeon HD 4550", kShrike }, + { 0x9555, 0x24651682, CHIP_FAMILY_RV710, "ATI Radeon HD4300/HD4500", kShrike }, + { 0x9555, 0x3711174B, CHIP_FAMILY_RV710, "ATI Radeon HD4300/HD4500", kShrike }, { 0x9581, 0x011F1025, CHIP_FAMILY_RV630, "ATI Radeon HD 2600", kNull }, { 0x9581, 0x0562107B, CHIP_FAMILY_RV630, "ATI Radeon HD 2600", kNull }, Index: branches/chucko/i386/libsaio/load.c =================================================================== --- branches/chucko/i386/libsaio/load.c (revision 2453) +++ branches/chucko/i386/libsaio/load.c (revision 2454) @@ -18,12 +18,11 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ - */ -/* - * load.c - Functions for decoding a Mach-o Kernel. * - * Copyright (c) 1998-2003 Apple Computer, Inc. + * load.c - Functions for decoding a Mach-o Kernel. * + * Copyright (c) 1998-2003 Apple Computer, Inc. + * */ #include @@ -59,19 +58,23 @@ cpu_type_t fapcputype; uint32_t fapoffset; uint32_t fapsize; - - if (fhp->magic == FAT_MAGIC)/* 0xcafebabe */{ + + if (fhp->magic == FAT_MAGIC)/* 0xcafebabe */ + { nfat = fhp->nfat_arch; swapped = 0; - } else if (fhp->magic == FAT_CIGAM)/* 0xbebafeca */{ + } else if (fhp->magic == FAT_CIGAM)/* 0xbebafeca */ + { nfat = OSSwapInt32(fhp->nfat_arch); swapped = 1; } else { return -1; } - for (; nfat > 0; nfat--, fap++) { - if (swapped) { + for (; nfat > 0; nfat--, fap++) + { + if (swapped) + { fapcputype = OSSwapInt32(fap->cputype); fapoffset = OSSwapInt32(fap->offset); fapsize = OSSwapInt32(fap->size); @@ -81,14 +84,16 @@ fapsize = fap->size; } - if (fapcputype == archCpuType) { + if (fapcputype == archCpuType) + { *binary = (void *) ((unsigned long)*binary + fapoffset); size = fapsize; break; } } - if (length != 0) { + if (length != 0) + { *length = size; } @@ -113,7 +118,7 @@ mH = (struct mach_header *)(gBinaryAddress); - /*#if DEBUG +/*#if DEBUG DBG("magic: 0x%x\n", (unsigned)mH->magic); DBG("cputype: 0x%x\n", (unsigned)mH->cputype); DBG("cpusubtype: 0x%x\n", (unsigned)mH->cpusubtype); @@ -121,16 +126,17 @@ DBG("ncmds: 0x%x\n", (unsigned)mH->ncmds); DBG("sizeofcmds: 0x%x\n", (unsigned)mH->sizeofcmds); DBG("flags: 0x%x\n", (unsigned)mH->flags); - DBG("archCpuType: 0x%x\n", archCpuType); + DBG("archCpuType: 0x%x\n", archCpuType); //getchar(); - #endif*/ - +#endif*/ + switch (archCpuType) { case CPU_TYPE_I386: - if (mH->magic != MH_MAGIC) { - error("Mach-O file has bad magic number\n"); + if (mH->magic != MH_MAGIC) + { + error("Mach-O (i386) file has bad magic number\n"); return -1; } @@ -139,12 +145,14 @@ case CPU_TYPE_X86_64: /* - if (mH->magic != MH_MAGIC_64 && mH->magic == MH_MAGIC) { + if (mH->magic != MH_MAGIC_64 && mH->magic == MH_MAGIC) + { return -1; } */ - if (mH->magic != MH_MAGIC_64) { - error("Mach-O file has bad magic number\n"); + if (mH->magic != MH_MAGIC_64) + { + error("Mach-O file (x86_64) has bad magic number\n"); return -1; } @@ -167,7 +175,8 @@ unsigned int load_addr; unsigned int load_size; - switch (cmd) { + switch (cmd) + { case LC_SEGMENT_64: case LC_SEGMENT: ret = DecodeSegment(cmdBase, &load_addr, &load_size); @@ -194,7 +203,8 @@ } - if (ret != 0) { + if (ret != 0) + { return -1; } @@ -207,19 +217,22 @@ cmdBase = cmdstart; - for (cnt = 0; cnt < ncmds; cnt++) { + for (cnt = 0; cnt < ncmds; cnt++) + { cmd = ((long *)cmdBase)[0]; cmdsize = ((long *)cmdBase)[1]; - - if (cmd == LC_SYMTAB) { - if (DecodeSymbolTable(cmdBase) != 0) { + + if (cmd == LC_SYMTAB) + { + if (DecodeSymbolTable(cmdBase) != 0) + { return -1; } } cmdBase += cmdsize; } - + return ret; } @@ -234,7 +247,8 @@ long vmsize, filesize; unsigned long vmaddr, fileaddr; - if (((long *)cmdBase)[0] == LC_SEGMENT_64) { + if (((long *)cmdBase)[0] == LC_SEGMENT_64) + { struct segment_command_64 *segCmd; segCmd = (struct segment_command_64 *)cmdBase; vmaddr = (segCmd->vmaddr & 0x3fffffff); @@ -267,20 +281,21 @@ #endif } - if (vmsize == 0 || filesize == 0) { + if (vmsize == 0 || filesize == 0) + { *load_addr = ~0; *load_size = 0; return 0; } - if (! ((vmaddr >= KERNEL_ADDR && (vmaddr + vmsize) <= (KERNEL_ADDR + KERNEL_LEN)) || - (vmaddr >= HIB_ADDR && (vmaddr + vmsize) <= (HIB_ADDR + HIB_LEN)))) { - stop("Kernel overflows available space"); - } + if (! ((vmaddr >= KERNEL_ADDR && (vmaddr + vmsize) <= (KERNEL_ADDR + KERNEL_LEN)) || + (vmaddr >= HIB_ADDR && (vmaddr + vmsize) <= (HIB_ADDR + HIB_LEN)))) { + stop("Kernel overflows available space"); + } - if (vmsize && ((strcmp(segname, "__PRELINK_INFO") == 0) || (strcmp(segname, "__PRELINK") == 0))) { - gHaveKernelCache = true; - } + if (vmsize && ((strcmp(segname, "__PRELINK_INFO") == 0) || (strcmp(segname, "__PRELINK") == 0))) { + gHaveKernelCache = true; + } // Copy from file load area. if (vmsize>0 && filesize > 0) { Index: branches/chucko/i386/libsaio/cpu.c =================================================================== --- branches/chucko/i386/libsaio/cpu.c (revision 2453) +++ branches/chucko/i386/libsaio/cpu.c (revision 2454) @@ -106,7 +106,7 @@ unsigned long pollCount; uint64_t retval = 0; int i; - + /* Time how many TSC ticks elapse in 30 msec using the 8254 PIT * counter 2. We run this loop 3 times to make sure the cache * is hot and we take the minimum delta from all of the runs. @@ -176,7 +176,7 @@ unsigned long pollCount; uint64_t retval = 0; int i; - + /* Time how many APERF ticks elapse in 30 msec using the 8254 PIT * counter 2. We run this loop 3 times to make sure the cache * is hot and we take the minimum delta from all of the runs. @@ -210,7 +210,7 @@ /* mperfDelta is now the least number of MPERF ticks the processor made in * a timespan of 0.03 s (e.g. 30 milliseconds) */ - + if (aperfDelta > (1ULL<<32)) { retval = 0; } else { @@ -230,23 +230,33 @@ */ void scan_cpu(PlatformInfo_t *p) { - uint64_t tscFrequency, fsbFrequency, cpuFrequency; - uint64_t msr, flex_ratio; - uint8_t maxcoef, maxdiv, currcoef, bus_ratio_max, currdiv; + uint64_t tscFrequency = 0; + uint64_t fsbFrequency = 0; + uint64_t cpuFrequency = 0; + uint64_t msr = 0; + uint64_t flex_ratio = 0; + uint32_t max_ratio = 0; + uint32_t min_ratio = 0; + uint8_t bus_ratio_max = 0; + uint8_t currdiv = 0; + uint8_t currcoef = 0; + uint8_t maxdiv = 0; + uint8_t maxcoef = 0; const char *newratio; - int len, myfsb; - uint8_t bus_ratio_min; - uint32_t max_ratio, min_ratio; + int len = 0; + int myfsb = 0; + uint8_t bus_ratio_min = 0; + uint32_t reg[4]; + char str[128]; - max_ratio = min_ratio = myfsb = bus_ratio_min = 0; - maxcoef = maxdiv = bus_ratio_max = currcoef = currdiv = 0; - /* get cpuid values */ do_cpuid(0x00000000, p->CPU.CPUID[CPUID_0]); do_cpuid(0x00000001, p->CPU.CPUID[CPUID_1]); + do_cpuid(0x00000002, p->CPU.CPUID[CPUID_2]); do_cpuid(0x00000003, p->CPU.CPUID[CPUID_3]); do_cpuid2(0x00000004, 0, p->CPU.CPUID[CPUID_4]); + do_cpuid(0x80000000, p->CPU.CPUID[CPUID_80]); if (p->CPU.CPUID[CPUID_0][0] >= 0x5) { do_cpuid(5, p->CPU.CPUID[CPUID_5]); @@ -289,70 +299,104 @@ p->CPU.Vendor = p->CPU.CPUID[CPUID_0][1]; p->CPU.Signature = p->CPU.CPUID[CPUID_1][0]; - // stepping = cpu_feat_eax & 0xF; - p->CPU.Stepping = bitfield(p->CPU.CPUID[CPUID_1][0], 3, 0); - // model = (cpu_feat_eax >> 4) & 0xF; - p->CPU.Model = bitfield(p->CPU.CPUID[CPUID_1][0], 7, 4); - // family = (cpu_feat_eax >> 8) & 0xF; - p->CPU.Family = bitfield(p->CPU.CPUID[CPUID_1][0], 11, 8); - // type = (cpu_feat_eax >> 12) & 0x3; - //p->CPU.Type = bitfield(p->CPU.CPUID[CPUID_1][0], 13, 12); - // ext_model = (cpu_feat_eax >> 16) & 0xF; - p->CPU.ExtModel = bitfield(p->CPU.CPUID[CPUID_1][0], 19, 16); - // ext_family = (cpu_feat_eax >> 20) & 0xFF; - p->CPU.ExtFamily = bitfield(p->CPU.CPUID[CPUID_1][0], 27, 20); + p->CPU.Stepping = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][0], 3, 0); // stepping = cpu_feat_eax & 0xF; + p->CPU.Model = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][0], 7, 4); // model = (cpu_feat_eax >> 4) & 0xF; + p->CPU.Family = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][0], 11, 8); // family = (cpu_feat_eax >> 8) & 0xF; + //p->CPU.Type = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][0], 13, 12); // type = (cpu_feat_eax >> 12) & 0x3; + p->CPU.ExtModel = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][0], 19, 16); // ext_model = (cpu_feat_eax >> 16) & 0xF; + p->CPU.ExtFamily = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][0], 27, 20); // ext_family = (cpu_feat_eax >> 20) & 0xFF; p->CPU.Model += (p->CPU.ExtModel << 4); - if (p->CPU.Vendor == CPUID_VENDOR_INTEL && - p->CPU.Family == 0x06 && - p->CPU.Model >= CPU_MODEL_NEHALEM && - p->CPU.Model != CPU_MODEL_ATOM // MSR is *NOT* available on the Intel Atom CPU - ) { - msr = rdmsr64(MSR_CORE_THREAD_COUNT); // Undocumented MSR in Nehalem and newer CPUs - p->CPU.NoCores = bitfield((uint32_t)msr, 31, 16); // Using undocumented MSR to get actual values - p->CPU.NoThreads = bitfield((uint32_t)msr, 15, 0); // Using undocumented MSR to get actual values - } else if (p->CPU.Vendor == CPUID_VENDOR_AMD) { - p->CPU.NoThreads = bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16); - p->CPU.NoCores = bitfield(p->CPU.CPUID[CPUID_88][2], 7, 0) + 1; - } else { - // Use previous method for Cores and Threads - p->CPU.NoThreads = bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16); - p->CPU.NoCores = bitfield(p->CPU.CPUID[CPUID_4][0], 31, 26) + 1; + if (p->CPU.Vendor == CPUID_VENDOR_INTEL) + { + /* + * Find the number of enabled cores and threads + * (which determines whether SMT/Hyperthreading is active). + */ + switch (p->CPU.Model) + { + case CPU_MODEL_NEHALEM: + case CPU_MODEL_FIELDS: + case CPU_MODEL_DALES: + case CPU_MODEL_NEHALEM_EX: + case CPU_MODEL_JAKETOWN: + case CPU_MODEL_SANDYBRIDGE: + case CPU_MODEL_IVYBRIDGE: + case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_SVR: + //case CPU_MODEL_HASWELL_H: + case CPU_MODEL_HASWELL_ULT: + case CPU_MODEL_CRYSTALWELL: + msr = rdmsr64(MSR_CORE_THREAD_COUNT); + p->CPU.NoCores = (uint8_t)bitfield((uint32_t)msr, 31, 16); + p->CPU.NoThreads = (uint8_t)bitfield((uint32_t)msr, 15, 0); + break; + + case CPU_MODEL_DALES_32NM: + case CPU_MODEL_WESTMERE: + case CPU_MODEL_WESTMERE_EX: + msr = rdmsr64(MSR_CORE_THREAD_COUNT); + p->CPU.NoCores = (uint8_t)bitfield((uint32_t)msr, 19, 16); + p->CPU.NoThreads = (uint8_t)bitfield((uint32_t)msr, 15, 0); + break; + + default: + p->CPU.NoCores = 0; + break; + } // end switch } - /* get brand string (if supported) */ + if (p->CPU.NoCores == 0) { + p->CPU.NoCores = (uint8_t)(p->CPU.CoresPerPackage & 0xff); + p->CPU.NoThreads = (uint8_t)(p->CPU.LogicalPerPackage & 0xff); + } + + /* get BrandString (if supported) */ /* Copyright: from Apple's XNU cpuid.c */ if (p->CPU.CPUID[CPUID_80][0] > 0x80000004) { - uint32_t reg[4]; - char str[128], *s; + char *s; + bzero(str, 128); /* - * The brand string 48 bytes (max), guaranteed to + * The BrandString 48 bytes (max), guaranteed to * be NULL terminated. */ do_cpuid(0x80000002, reg); - bcopy((char *)reg, &str[0], 16); + memcpy(&str[0], (char *)reg, 16); do_cpuid(0x80000003, reg); - bcopy((char *)reg, &str[16], 16); + memcpy(&str[16], (char *)reg, 16); do_cpuid(0x80000004, reg); - bcopy((char *)reg, &str[32], 16); + memcpy(&str[32], (char *)reg, 16); for (s = str; *s != '\0'; s++) { - if (*s != ' ') { - break; - } + if (*s != ' ') { break; } } - - strlcpy(p->CPU.BrandString, s, sizeof(p->CPU.BrandString)); - - if (!strncmp(p->CPU.BrandString, CPU_STRING_UNKNOWN, MIN(sizeof(p->CPU.BrandString), strlen(CPU_STRING_UNKNOWN) + 1))) { + strlcpy(p->CPU.BrandString, s, 48); + + if (!strncmp(p->CPU.BrandString, CPU_STRING_UNKNOWN, + MIN(sizeof(p->CPU.BrandString), + strlen(CPU_STRING_UNKNOWN) + 1))) { /* * This string means we have a firmware-programmable brand string, * and the firmware couldn't figure out what sort of CPU we have. */ p->CPU.BrandString[0] = '\0'; } + p->CPU.BrandString[47] = '\0'; +// DBG("Brandstring = %s\n", p->CPU.BrandString); } - + + //workaround for N270. I don't know why it detected wrong + // MSR is *NOT* available on the Intel Atom CPU + if ((p->CPU.Model == CPU_MODEL_ATOM) && (strstr(p->CPU.BrandString, "270"))) { + p->CPU.NoCores = 1; + p->CPU.NoThreads = 2; + } + + if (p->CPU.Vendor == CPUID_VENDOR_AMD) { + p->CPU.NoThreads = (uint8_t)bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16); + p->CPU.NoCores = (uint8_t)bitfield(p->CPU.CPUID[CPUID_88][2], 7, 0) + 1; + } + /* setup features */ if ((bit(23) & p->CPU.CPUID[CPUID_1][3]) != 0) { p->CPU.Features |= CPU_FEATURE_MMX; @@ -384,103 +428,113 @@ } tscFrequency = measure_tsc_frequency(); + DBG("cpu freq classic = 0x%016llx\n", tscFrequency); /* if usual method failed */ if ( tscFrequency < 1000 ) { //TEST - tscFrequency = timeRDTSC() * 20; + tscFrequency = timeRDTSC() * 20;//measure_tsc_frequency(); + // DBG("cpu freq timeRDTSC = 0x%016llx\n", tscFrequency); + } else { + // DBG("cpu freq timeRDTSC = 0x%016llxn", timeRDTSC() * 20); } fsbFrequency = 0; cpuFrequency = 0; - if ((p->CPU.Vendor == CPUID_VENDOR_INTEL) && ((p->CPU.Family == 0x06) || (p->CPU.Family == 0x0f))) { + if (p->CPU.Vendor == CPUID_VENDOR_INTEL && ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) || (p->CPU.Family == 0x0f && p->CPU.Model >= 0x03))) { int intelCPU = p->CPU.Model; - if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) || (p->CPU.Family == 0x0f && p->CPU.Model >= 0x03)) { + if (p->CPU.Family == 0x06) { /* Nehalem CPU model */ - if (p->CPU.Family == 0x06 && (p->CPU.Model == CPU_MODEL_NEHALEM || - p->CPU.Model == CPU_MODEL_FIELDS || - p->CPU.Model == CPU_MODEL_DALES || - p->CPU.Model == CPU_MODEL_DALES_32NM || - p->CPU.Model == CPU_MODEL_WESTMERE || - p->CPU.Model == CPU_MODEL_NEHALEM_EX || - p->CPU.Model == CPU_MODEL_WESTMERE_EX || - p->CPU.Model == CPU_MODEL_SANDYBRIDGE || - p->CPU.Model == CPU_MODEL_JAKETOWN || - p->CPU.Model == CPU_MODEL_IVYBRIDGE_XEON || - p->CPU.Model == CPU_MODEL_IVYBRIDGE || - p->CPU.Model == CPU_MODEL_HASWELL || - p->CPU.Model == CPU_MODEL_HASWELL_SVR || - //p->CPU.Model == CPU_MODEL_HASWELL_H || - p->CPU.Model == CPU_MODEL_HASWELL_ULT || - p->CPU.Model == CPU_MODEL_CRYSTALWELL )) - { - msr = rdmsr64(MSR_PLATFORM_INFO); - DBG("msr(%d): platform_info %08x\n", __LINE__, bitfield(msr, 31, 0)); - bus_ratio_max = bitfield(msr, 15, 8); - bus_ratio_min = bitfield(msr, 47, 40); //valv: not sure about this one (Remarq.1) - msr = rdmsr64(MSR_FLEX_RATIO); - DBG("msr(%d): flex_ratio %08x\n", __LINE__, bitfield(msr, 31, 0)); - if (bitfield(msr, 16, 16)) { - flex_ratio = bitfield(msr, 15, 8); - /* bcc9: at least on the gigabyte h67ma-ud2h, - where the cpu multipler can't be changed to - allow overclocking, the flex_ratio msr has unexpected (to OSX) - contents. These contents cause mach_kernel to - fail to compute the bus ratio correctly, instead - causing the system to crash since tscGranularity - is inadvertently set to 0. - */ - if (flex_ratio == 0) { - /* Clear bit 16 (evidently the presence bit) */ - wrmsr64(MSR_FLEX_RATIO, (msr & 0xFFFFFFFFFFFEFFFFULL)); - msr = rdmsr64(MSR_FLEX_RATIO); - verbose("Unusable flex ratio detected. Patched MSR now %08x\n", bitfield(msr, 31, 0)); - } else { - if (bus_ratio_max > flex_ratio) { - bus_ratio_max = flex_ratio; + switch (p->CPU.Model) { + case CPU_MODEL_NEHALEM: + case CPU_MODEL_FIELDS: + case CPU_MODEL_DALES: + case CPU_MODEL_DALES_32NM: + case CPU_MODEL_WESTMERE: + case CPU_MODEL_NEHALEM_EX: + case CPU_MODEL_WESTMERE_EX: +/* --------------------------------------------------------- */ + case CPU_MODEL_SANDYBRIDGE: + case CPU_MODEL_JAKETOWN: + case CPU_MODEL_IVYBRIDGE_XEON: + case CPU_MODEL_IVYBRIDGE: + case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_SVR: + + case CPU_MODEL_HASWELL_ULT: + case CPU_MODEL_CRYSTALWELL: +/* --------------------------------------------------------- */ + msr = rdmsr64(MSR_PLATFORM_INFO); + DBG("msr(%d): platform_info %08x\n", __LINE__, bitfield(msr, 31, 0)); + bus_ratio_max = bitfield(msr, 15, 8); + bus_ratio_min = bitfield(msr, 47, 40); //valv: not sure about this one (Remarq.1) + msr = rdmsr64(MSR_FLEX_RATIO); + DBG("msr(%d): flex_ratio %08x\n", __LINE__, bitfield(msr, 31, 0)); + if (bitfield(msr, 16, 16)) { + flex_ratio = bitfield(msr, 15, 8); + /* bcc9: at least on the gigabyte h67ma-ud2h, + where the cpu multipler can't be changed to + allow overclocking, the flex_ratio msr has unexpected (to OSX) + contents. These contents cause mach_kernel to + fail to compute the bus ratio correctly, instead + causing the system to crash since tscGranularity + is inadvertently set to 0. + */ + if (flex_ratio == 0) { + /* Clear bit 16 (evidently the presence bit) */ + wrmsr64(MSR_FLEX_RATIO, (msr & 0xFFFFFFFFFFFEFFFFULL)); + msr = rdmsr64(MSR_FLEX_RATIO); + DBG("Unusable flex ratio detected. Patched MSR now %08x\n", bitfield(msr, 31, 0)); + } else { + if (bus_ratio_max > flex_ratio) { + bus_ratio_max = flex_ratio; + } } } - } - if (bus_ratio_max) { - fsbFrequency = (tscFrequency / bus_ratio_max); - } - //valv: Turbo Ratio Limit - if ((intelCPU != 0x2e) && (intelCPU != 0x2f)) { - msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); - cpuFrequency = bus_ratio_max * fsbFrequency; - max_ratio = bus_ratio_max * 10; - } else { - cpuFrequency = tscFrequency; - } - if ((getValueForKey(kbusratio, &newratio, &len, &bootInfo->chameleonConfig)) && (len <= 4)) { - max_ratio = atoi(newratio); - max_ratio = (max_ratio * 10); - if (len >= 3) { - max_ratio = (max_ratio + 5); + if (bus_ratio_max) { + fsbFrequency = (tscFrequency / bus_ratio_max); } + //valv: Turbo Ratio Limit + if ((intelCPU != 0x2e) && (intelCPU != 0x2f)) { + msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); - verbose("Bus-Ratio: min=%d, max=%s\n", bus_ratio_min, newratio); + cpuFrequency = bus_ratio_max * fsbFrequency; + max_ratio = bus_ratio_max * 10; + } else { + cpuFrequency = tscFrequency; + } + if ((getValueForKey(kbusratio, &newratio, &len, &bootInfo->chameleonConfig)) && (len <= 4)) { + max_ratio = atoi(newratio); + max_ratio = (max_ratio * 10); + if (len >= 3) { + max_ratio = (max_ratio + 5); + } - // extreme overclockers may love 320 ;) - if ((max_ratio >= min_ratio) && (max_ratio <= 320)) { - cpuFrequency = (fsbFrequency * max_ratio) / 10; - if (len >= 3) { - maxdiv = 1; + verbose("Bus-Ratio: min=%d, max=%s\n", bus_ratio_min, newratio); + + // extreme overclockers may love 320 ;) + if ((max_ratio >= min_ratio) && (max_ratio <= 320)) { + cpuFrequency = (fsbFrequency * max_ratio) / 10; + if (len >= 3) { + maxdiv = 1; + } else { + maxdiv = 0; + } } else { - maxdiv = 0; + max_ratio = (bus_ratio_max * 10); } - } else { - max_ratio = (bus_ratio_max * 10); } - } - //valv: to be uncommented if Remarq.1 didn't stick - /*if (bus_ratio_max > 0) bus_ratio = flex_ratio;*/ - p->CPU.MaxRatio = max_ratio; - p->CPU.MinRatio = min_ratio; + //valv: to be uncommented if Remarq.1 didn't stick + /*if (bus_ratio_max > 0) bus_ratio = flex_ratio;*/ + p->CPU.MaxRatio = max_ratio; + p->CPU.MinRatio = min_ratio; myfsb = fsbFrequency / 1000000; verbose("Sticking with [BCLK: %dMhz, Bus-Ratio: %d]\n", myfsb, max_ratio/10); // Bungo: fixed wrong Bus-Ratio readout currcoef = bus_ratio_max; - } else { + + break; + + default: msr = rdmsr64(MSR_IA32_PERF_STATUS); DBG("msr(%d): ia32_perf_stat 0x%08x\n", __LINE__, bitfield(msr, 31, 0)); currcoef = bitfield(msr, 12, 8); // Bungo: reverted to 2263 state because of wrong old CPUs freq. calculating @@ -512,6 +566,7 @@ } DBG("max: %d%s current: %d%s\n", maxcoef, maxdiv ? ".5" : "",currcoef, currdiv ? ".5" : ""); } + break; } } /* Mobile CPU */ @@ -589,11 +644,15 @@ } #if 0 - if (!fsbFrequency) { + if (!fsbFrequency) + { fsbFrequency = (DEFAULT_FSB * 1000); cpuFrequency = tscFrequency; DBG("0 ! using the default value for FSB !\n"); } + + DBG("cpu freq = 0x%016llxn", timeRDTSC() * 20); + #endif p->CPU.MaxCoef = maxcoef; @@ -605,16 +664,29 @@ p->CPU.CPUFrequency = cpuFrequency; // keep formatted with spaces instead of tabs - DBG("CPU: Brand String: %s\n", p->CPU.BrandString); - DBG("CPU: Vendor/Family/ExtFamily: 0x%x/0x%x/0x%x\n", p->CPU.Vendor, p->CPU.Family, p->CPU.ExtFamily); - DBG("CPU: Model/ExtModel/Stepping: 0x%x/0x%x/0x%x\n", p->CPU.Model, p->CPU.ExtModel, p->CPU.Stepping); - DBG("CPU: MaxCoef/CurrCoef: 0x%x/0x%x\n", p->CPU.MaxCoef, p->CPU.CurrCoef); - DBG("CPU: MaxDiv/CurrDiv: 0x%x/0x%x\n", p->CPU.MaxDiv, p->CPU.CurrDiv); - DBG("CPU: TSCFreq: %dMHz\n", p->CPU.TSCFrequency / 1000000); - DBG("CPU: FSBFreq: %dMHz\n", p->CPU.FSBFrequency / 1000000); - DBG("CPU: CPUFreq: %dMHz\n", p->CPU.CPUFrequency / 1000000); - DBG("CPU: NoCores/NoThreads: %d/%d\n", p->CPU.NoCores, p->CPU.NoThreads); - DBG("CPU: Features: 0x%08x\n", p->CPU.Features); + DBG("\n---------------------------------------------\n"); + DBG("--------------- CPU INFO ---------------\n"); + DBG("---------------------------------------------\n"); + DBG("Brand String: %s\n", p->CPU.BrandString); // Processor name (BIOS) + DBG("Vendor: 0x%x\n", p->CPU.Vendor); // Vendor ex: GenuineIntel + DBG("Family: 0x%x\n", p->CPU.Family); // Family ex: 6 (06h) + DBG("ExtFamily: 0x%x\n", p->CPU.ExtFamily); + DBG("Signature: %x\n", p->CPU.Signature); // CPUID signature + DBG("Model: 0x%x\n", p->CPU.Model); // Model ex: 37 (025h) + DBG("ExtModel: 0x%x\n", p->CPU.ExtModel); + DBG("Stepping: 0x%x\n", p->CPU.Stepping); // Stepping ex: 5 (05h) + DBG("MaxCoef: 0x%x\n", p->CPU.MaxCoef); + DBG("CurrCoef: 0x%x\n", p->CPU.CurrCoef); + DBG("MaxDiv: 0x%x\n", p->CPU.MaxDiv); + DBG("CurrDiv: 0x%x\n", p->CPU.CurrDiv); + DBG("TSCFreq: %dMHz\n", p->CPU.TSCFrequency / 1000000); + DBG("FSBFreq: %dMHz\n", p->CPU.FSBFrequency / 1000000); + DBG("CPUFreq: %dMHz\n", p->CPU.CPUFrequency / 1000000); + DBG("Cores: %d\n", p->CPU.NoCores); // Cores + DBG("Logical processor: %d\n", p->CPU.NoThreads); // Logical procesor + DBG("Features: 0x%08x\n", p->CPU.Features); + + DBG("\n---------------------------------------------\n"); #if DEBUG_CPU pause(); #endif Index: branches/chucko/i386/libsaio/platform.h =================================================================== --- branches/chucko/i386/libsaio/platform.h (revision 2453) +++ branches/chucko/i386/libsaio/platform.h (revision 2454) @@ -30,6 +30,8 @@ #define CPUID_88 9 #define CPUID_MAX 10 +#define CPU_MODEL_ANY 0x00 +#define CPU_MODEL_UNKNOWN 0x01 #define CPU_MODEL_PRESCOTT 0x03 // Celeron D, Pentium 4 (90nm) #define CPU_MODEL_NOCONA 0x04 // Xeon Nocona/Paxville, Irwindale (90nm) #define CPU_MODEL_PRESLER 0x06 // Pentium 4, Pentium D (65nm) @@ -42,26 +44,36 @@ #define CPU_MODEL_PENRYN 0x17 // Wolfdale, Yorkfield, Harpertown, Penryn #define CPU_MODEL_WOLFDALE 0x17 // #define CPU_MODEL_NEHALEM 0x1A // Bloomfield. Nehalem-EP, Nehalem-WS, Gainestown -#define CPU_MODEL_ATOM 0x1C // Pineview +#define CPU_MODEL_ATOM 0x1C // Pineview, Bonnell #define CPU_MODEL_XEON_MP 0x1D // MP 7400 #define CPU_MODEL_FIELDS 0x1E // Lynnfield, Clarksfield, Jasper Forest #define CPU_MODEL_DALES 0x1F // Havendale, Auburndale #define CPU_MODEL_DALES_32NM 0x25 // Clarkdale, Arrandale #define CPU_MODEL_ATOM_SAN 0x26 // Lincroft -#define CPU_MODEL_LINCROFT 0x27 // +#define CPU_MODEL_LINCROFT 0x27 // Bonnell #define CPU_MODEL_SANDYBRIDGE 0x2A // Sandy Bridge #define CPU_MODEL_WESTMERE 0x2C // Gulftown, Westmere-EP, Westmere-WS #define CPU_MODEL_JAKETOWN 0x2D // Sandy Bridge-E, Sandy Bridge-EP #define CPU_MODEL_NEHALEM_EX 0x2E // Beckton #define CPU_MODEL_WESTMERE_EX 0x2F // Westmere-EX -#define CPU_MODEL_ATOM_2000 0x36 // Cedarview +//#define CPU_MODEL_BONNELL_ATOM 0x35 // Bonnell +#define CPU_MODEL_ATOM_2000 0x36 // Cedarview / Saltwell +#define CPU_MODEL_SILVERMONT 0x37 // Atom Silvermont #define CPU_MODEL_IVYBRIDGE 0x3A // Ivy Bridge #define CPU_MODEL_HASWELL 0x3C // Haswell DT +#define CPU_MODEL_BROADWELL 0x3D // Core M, Broadwell / Core-AVX2 #define CPU_MODEL_IVYBRIDGE_XEON 0x3E // Ivy Bridge Xeon -#define CPU_MODEL_HASWELL_SVR 0x3F // Haswell MB +#define CPU_MODEL_HASWELL_SVR 0x3F // Haswell Server //#define CPU_MODEL_HASWELL_H 0x?? // Haswell H #define CPU_MODEL_HASWELL_ULT 0x45 // Haswell ULT -#define CPU_MODEL_CRYSTALWELL 0x46 // Haswell ULX +#define CPU_MODEL_CRYSTALWELL 0x46 // Crystal Well +// 4A silvermont / atom +#define CPU_MODEL_AVOTON 0x4D // Silvermont/Avoton Atom C2000 +// 4E Core??? +#define CPU_MODEL_BRODWELL_SVR 0x4F // Broadwell Server +#define CPU_MODEL_BRODWELL_MSVR 0x56 // Broadwell Micro Server +// 5A silvermont / atom +// 5D silvermont / atom /* CPU Features */ #define CPU_FEATURE_MMX 0x00000001 // MMX Instruction Set @@ -98,6 +110,7 @@ #define SMB_MEM_TYPE_DDR2 19 #define SMB_MEM_TYPE_FBDIMM 20 #define SMB_MEM_TYPE_DDR3 24 // Supported in 10.5.6+ AppleSMBIOS +#define SMB_MEM_TYPE_DDR4 26 /* Memory Configuration Types */ #define SMB_MEM_CHANNEL_UNKNOWN 0 @@ -131,10 +144,13 @@ //============================================================================== -typedef struct _PlatformInfo_t { +typedef struct _PlatformInfo_t +{ struct CPU { uint32_t Features; // CPU Features like MMX, SSE2, VT, MobileCPU uint32_t Vendor; // Vendor + uint32_t CoresPerPackage; + uint32_t LogicalPerPackage; uint32_t Signature; // Processor Signature uint32_t Stepping; // Stepping //uint16_t Type; // Type Index: branches/chucko/i386/libsaio/disk.c =================================================================== --- branches/chucko/i386/libsaio/disk.c (revision 2453) +++ branches/chucko/i386/libsaio/disk.c (revision 2454) @@ -681,20 +681,29 @@ // GUID's in LE form: // HFS+ partition - 48465300-0000-11AA-AA11-00306543ECAC -EFI_GUID const GPT_HFS_GUID = { 0x48465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; +EFI_GUID const GPT_HFS_GUID = { 0x48465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF00 "Apple HFS/HFS+" // turbo - Apple Boot Partition - 426F6F74-0000-11AA-AA11-00306543ECAC -EFI_GUID const GPT_BOOT_GUID = { 0x426F6F74, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; +EFI_GUID const GPT_BOOT_GUID = { 0x426F6F74, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAB00 "Apple boot" // turbo - or an EFI System Partition - C12A7328-F81F-11D2-BA4B-00A0C93EC93B -EFI_GUID const GPT_EFISYS_GUID = { 0xC12A7328, 0xF81F, 0x11D2, { 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B } }; +EFI_GUID const GPT_EFISYS_GUID = { 0xC12A7328, 0xF81F, 0x11D2, { 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B } }; // 0xEF00 "EFI System" // zef - Basic Data Partition - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 for foreign OS support -EFI_GUID const GPT_BASICDATA_GUID = { 0xEBD0A0A2, 0xB9E5, 0x4433, { 0x87, 0xC0, 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7 } }; +EFI_GUID const GPT_BASICDATA_GUID = { 0xEBD0A0A2, 0xB9E5, 0x4433, { 0x87, 0xC0, 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7 } }; // 0x0100 "Microsoft basic data" // Microsoft Reserved Partition - E3C9E316-0B5C-4DB8-817DF92DF00215AE -EFI_GUID const GPT_BASICDATA2_GUID = { 0xE3C9E316, 0x0B5C, 0x4DB8, { 0x81, 0x7D, 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE } }; +EFI_GUID const GPT_BASICDATA2_GUID = { 0xE3C9E316, 0x0B5C, 0x4DB8, { 0x81, 0x7D, 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE } }; // 0x0C01 "Microsoft reserved" +// Apple OSX +//EFI_GUID const GPT_UFS_GUID = { 0x55465300, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xA800 "Apple UFS" +//EFI_GUID const GPT_RAID_GUID = { 0x52414944, 0x0000, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF01 "Apple RAID" +//EFI_GUID const GPT_RAID_OFFLINE_GUID = { 0x52414944, 0x5f4f, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF02 "Apple RAID offline" +//EFI_GUID const GPT_LABEL_GUID = { 0x4C616265, 0x6C00, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF03 "Apple label" +//EFI_GUID const GPT_APPLETV_GUID = { 0x5265636F, 0x7665, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF04 "Apple TV recovery" +//EFI_GUID const GPT_CORESTORAGE_GUID = { 0x53746F72, 0x6167, 0x11AA, { 0xAA, 0x11, 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC } }; // 0xAF05 "Apple Core storage" +// same as Apple ZFS +//EFI_GUID const GPT_ZFS_GUID = { 0x6A898CC3, 0x1DD2, 0x11B2, { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } }; // 0xBF01 "Solaris /usr & Apple ZFS BVRef newGPTBVRef( int biosdev, int partno, unsigned int blkoff, const gpt_ent * part, @@ -1039,8 +1048,10 @@ HFSGetDirEntry, HFSGetFileBlock, HFSGetUUID, + HFSGetDescription, + HFSFree, 0, - kBIOSDevTypeHardDrive); + kBIOSDevTypeHardDrive, 0); bvr->next = map->bvr; map->bvr = bvr; map->bvrcnt++; @@ -1078,6 +1089,7 @@ { return NULL; } + bzero(buffer,BPS); /* Check for alternate block size */ if (readBytes( biosdev, 0, 0, BPS, buffer ) != 0) @@ -1096,6 +1108,7 @@ { return NULL; } + bzero(buffer,BPS); } factor = blksize / BPS; } @@ -1578,7 +1591,12 @@ // getValueForKey uses const char for val // so copy it and trim *str = '\0'; - strncat(str, val, MIN(len, 4)); + // crazybirdy + if (len > 4 && (val[3] == '1')) { + strncat(str, val, MIN(len, 5)); + } else { + strncat(str, val, MIN(len, 4)); + } } else { valid = false; } Index: branches/chucko/i386/libsaio/smbios.c =================================================================== --- branches/chucko/i386/libsaio/smbios.c (revision 2453) +++ branches/chucko/i386/libsaio/smbios.c (revision 2454) @@ -267,7 +267,7 @@ kSMBBaseBoardSerialNumberKey, NULL, &defaultBaseBoard.serialNumber }, // SMboardserial - C02140302D5DMT31M {kSMBTypeBaseBoard, kSMBString, getFieldOffset(SMBBaseBoard, assetTag), - kSMBBaseBoardAssetTagKey, NULL, &defaultBaseBoard.assetTag }, // SMboardassetag - Base Board Asset Tag# + kSMBBaseBoardAssetTagKey, NULL, &defaultBaseBoard.assetTag }, // SMboardassettag - Base Board Asset Tag# {kSMBTypeBaseBoard, kSMBString, getFieldOffset(SMBBaseBoard, locationInChassis), kSMBBaseBoardLocationInChassisKey, NULL, &defaultBaseBoard.locationInChassis }, // SMboardlocation - Part Component @@ -1046,8 +1046,20 @@ /* ============================================== OEM Platform Feature (Apple Specific - Type 133) ================================================ */ - /*void addSMBOemPlatformFeature(SMBStructPtrs *structPtr) { }*/ + /*void addSMBOemPlatformFeature(SMBStructPtrs *structPtr) { + SMBOemPlatformFeature *p = (SMBOemPlatformFeature *)structPtr->new; + p->header.type = kSMBTypeOemPlatformFeature; + p->header.length = sizeof(SMBOemPlatformFeature); + p->header.handle = handle++; + + setSMBValue(structPtr, numOfSetters - 2 , (returnType *)&(p->PlatformFeature)); + + structPtr->new = (SMBStructHeader *)((uint8_t *)structPtr->new + sizeof(SMBOemPPlatformFeature) + 2); + tableLength += sizeof(SMBOemPlatformFeature) + 2; + structureCount++; + }*/ + //------------------------------------------------------------------------------------------------------------------------- // EndOfTable //------------------------------------------------------------------------------------------------------------------------- Index: branches/chucko/i386/libsaio/smbios_decode.c =================================================================== --- branches/chucko/i386/libsaio/smbios_decode.c (revision 2453) +++ branches/chucko/i386/libsaio/smbios_decode.c (revision 2454) @@ -401,6 +401,10 @@ } //------------------------------------------------------------------------------------------------------------------------- +// Memory Controller Information (Type 5) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- // Memory Module Information (Type 6) //------------------------------------------------------------------------------------------------------------------------- //void decodeMemoryModule(SMBStructHeader *structHeader) @@ -417,6 +421,22 @@ //} //------------------------------------------------------------------------------------------------------------------------- +// Cache Information (Type 7) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- +// Port Connector Information (Type 8) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- +// System Slot Information (Type 9) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- +// On Board Device Information (Type 10) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- // OEM Strings (Type 11) //------------------------------------------------------------------------------------------------------------------------- void decodeSMBOEMStrings(SMBStructHeader *structHeader) @@ -431,8 +451,19 @@ } DBG("\n"); } +//------------------------------------------------------------------------------------------------------------------------- +// System Configuration Options (Type 12) +//------------------------------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------------------------- +// BIOS Language Information (Type 13) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- +// Physical Memory Array (Type 16) +//------------------------------------------------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------------------------------------------------- // MemoryDevice (Type 17) //------------------------------------------------------------------------------------------------------------------------- void decodeMemoryDevice(SMBStructHeader *structHeader) Index: branches/chucko/i386/libsaio/stringTable.c =================================================================== --- branches/chucko/i386/libsaio/stringTable.c (revision 2453) +++ branches/chucko/i386/libsaio/stringTable.c (revision 2454) @@ -613,8 +613,8 @@ int loadSystemConfig(config_file_t *config) { char *dirspec[] = { + "/OS X Install Data/com.apple.Boot.plist", "/Library/Preferences/SystemConfiguration/com.apple.Boot.plist", - "/OS X Install Data/com.apple.Boot.plist", }; int i, fd, count, ret=-1; Index: branches/chucko/i386/libsaio/saio_types.h =================================================================== --- branches/chucko/i386/libsaio/saio_types.h (revision 2453) +++ branches/chucko/i386/libsaio/saio_types.h (revision 2454) @@ -41,13 +41,16 @@ typedef unsigned long entry_t; -typedef struct { +typedef struct +{ unsigned int sectors:8; unsigned int heads:8; unsigned int cylinders:16; } compact_diskinfo_t; -struct driveParameters { + +struct driveParameters +{ int cylinders; int sectors; int heads; @@ -77,8 +80,10 @@ /* * BIOS drive information. */ -struct boot_drive_info { - struct drive_params { +struct boot_drive_info +{ + struct drive_params + { unsigned short buf_size; unsigned short info_flags; unsigned long phys_cyls; @@ -100,7 +105,8 @@ unsigned char checksum; } params; - struct drive_dpte { + struct drive_dpte + { unsigned short io_port_base; unsigned short control_port_base; unsigned char head_flags; @@ -120,7 +126,9 @@ } __attribute__((packed)); typedef struct boot_drive_info boot_drive_info_t; -struct driveInfo { + +struct driveInfo +{ boot_drive_info_t di; int uses_ebios; @@ -129,7 +137,9 @@ int valid; }; -typedef struct FinderInfo { + +typedef struct FinderInfo +{ unsigned char data[16]; } FinderInfo; @@ -205,7 +215,8 @@ }; -enum { +enum +{ kBVFlagPrimary = 0x01, kBVFlagNativeBoot = 0x02, kBVFlagForeignBoot = 0x04, @@ -216,7 +227,8 @@ kBVFlagInstallVolume = 0x80 }; -enum { +enum +{ kBIOSDevTypeFloppy = 0x00, kBIOSDevTypeHardDrive = 0x80, kBIOSDevTypeNetwork = 0xE0, @@ -225,7 +237,8 @@ kBIOSDevMask = 0xFF }; -enum { +enum +{ //KPartitionTypeFAT12 = 0x01, // FAT12 kPartitionTypeHPFS = 0x07, // Mac OS X kPartitionTypeFAT16 = 0x06, // FAT16 @@ -248,7 +261,8 @@ // KernBootStruct device types. -enum { +enum +{ DEV_SD = 0, DEV_HD = 1, DEV_FD = 2, @@ -277,7 +291,8 @@ kBlockDeviceType = kBIOSDevTypeHardDrive }; //gBootFileType_t; -enum { +enum +{ kCursorTypeHidden = 0x0100, kCursorTypeUnderline = 0x0607 }; Index: branches/chucko/i386/libsaio/md5c.c =================================================================== --- branches/chucko/i386/libsaio/md5c.c (revision 2453) +++ branches/chucko/i386/libsaio/md5c.c (revision 2454) @@ -50,8 +50,6 @@ * These notices must be retained in any copies of any part of this * documentation and/or software. * - * $Id: md5c.c,v 1.1 2005/06/24 22:47:12 curtisg Exp $ - * * This code is the same as the code published by RSA Inc. It has been * edited for clarity and style only. */ @@ -151,7 +149,8 @@ index = (unsigned int)((context->count[0] >> 3) & 0x3F); /* Update number of bits */ - if ((context->count[0] += ((u_int32_t)inputLen << 3)) < ((u_int32_t)inputLen << 3)) { + if ((context->count[0] += ((u_int32_t)inputLen << 3)) < ((u_int32_t)inputLen << 3)) + { context->count[1]++; } @@ -161,7 +160,8 @@ /* Transform as many times as possible. */ - if (inputLen >= partLen) { + if (inputLen >= partLen) + { memcpy((void *)&context->buffer[index], (const void *)input, partLen); MD5Transform (context->state, context->buffer); Index: branches/chucko/i386/libsaio/fake_efi.c =================================================================== --- branches/chucko/i386/libsaio/fake_efi.c (revision 2453) +++ branches/chucko/i386/libsaio/fake_efi.c (revision 2454) @@ -68,12 +68,22 @@ return ((uint64_t)addr | 0xFFFFFF8000000000ULL); } +// ========================================================================== +// ErmaC +static inline uint64_t getCPUTick(void) +{ + uint32_t lowest; + uint32_t highest; + __asm__ volatile ("rdtsc" : "=a" (lowest), "=d" (highest)); + return (uint64_t) highest << 32 | lowest; +} + /*========================================================================== * Fake EFI implementation */ /* Identify ourselves as the EFI firmware vendor */ -static EFI_CHAR16 const FIRMWARE_VENDOR[] = {'C','h','a','m','e','l','e','o','n','_','2','.','2', 0}; +static EFI_CHAR16 const FIRMWARE_VENDOR[] = {'C','h','a','m','e','l','e','o','n','_','2','.','3', 0}; // Bungo //static EFI_UINT32 const FIRMWARE_REVISION = 132; /* FIXME: Find a constant for this. */ static EFI_UINT32 const FIRMWARE_REVISION = 0x0001000a; // got from real MBP6,1 @@ -93,6 +103,8 @@ EFI_SYSTEM_TABLE_64 *gST64 = NULL; Node *gEfiConfigurationTableNode = NULL; +// ========================================================================== + extern EFI_STATUS addConfigurationTable(EFI_GUID const *pGuid, void *table, char const *alias) { EFI_UINTN i = 0; @@ -146,6 +158,8 @@ return EFI_UNSUPPORTED; } +// ========================================================================== + //Azi: crc32 done in place, on the cases were it wasn't. /*static inline void fixupEfiSystemTableCRC32(EFI_SYSTEM_TABLE_64 *efiSystemTable) { @@ -437,7 +451,7 @@ static const char FIRMWARE_REVISION_PROP[] = "firmware-revision"; static const char FIRMWARE_ABI_PROP[] = "firmware-abi"; static const char FIRMWARE_VENDOR_PROP[] = "firmware-vendor"; -/* static const char FIRMWARE_ABI_32_PROP_VALUE[] = "EFI32"; */ /* unused */ +//static const char FIRMWARE_ABI_32_PROP_VALUE[] = "EFI32"; static const char FIRMWARE_ABI_64_PROP_VALUE[] = "EFI64"; static const char EFI_MODE_PROP[] = "efi-mode"; //Bungo static const char SYSTEM_ID_PROP[] = "system-id"; @@ -695,8 +709,92 @@ length = strlen(bootInfo->bootFile); DT__AddProperty(chosenNode, "boot-file", length + 1, bootInfo->bootFile); +// DT__AddProperty(chosenNode, "boot-device-path", bootDPsize, gBootDP); +// DT__AddProperty(chosenNode, "boot-file-path", bootFPsize, gBootFP); + +// DT__AddProperty(chosenNode, "boot-kernelcache-adler32", sizeof(adler32), adler32); + DT__AddProperty(chosenNode, "machine-signature", sizeof(EFI_UINT32), (EFI_UINT32 *)&MachineSig); + + + if(YOSEMITE) + { + // + // Pike R. Alpha - 12 October 2014 + // + UInt8 index = 0; + EFI_UINT16 PMTimerValue = 0; + EFI_UINT32 randomValue, tempValue, cpuTick; + EFI_UINT32 ecx, esi, edi = 0; + EFI_UINT32 rcx, rdx, rsi, rdi; + + randomValue = tempValue = ecx = esi = edi = 0; // xor %ecx, %ecx + rcx = rdx = rsi = rdi = cpuTick = 0; + + // LEAF_1 - Feature Information (Function 01h). + if (Platform.CPU.CPUID[CPUID_1][2] & 0x40000000) // Checking ecx:bit-30 + { + // + // i5/i7 Ivy Bridge and Haswell processors with RDRAND support. + // + EFI_UINT32 seedBuffer[16] = {0}; + // + // Main loop to get 16 qwords (four bytes each). + // + for (index = 0; index < 16; index++) // 0x17e12: + { + randomValue = computeRand(); // callq 0x18e20 + cpuTick = getCPUTick(); // callq 0x121a7 + randomValue = (randomValue ^ cpuTick); // xor %rdi, %rax + seedBuffer[index] = randomValue; // mov %rax,(%r15,%rsi,8) + } // jb 0x17e12 + + DT__AddProperty(chosenNode, "random-seed", sizeof(seedBuffer), (EFI_UINT32*) &seedBuffer); + } + else + { + // + // All other processors without RDRAND support. + // + EFI_UINT8 seedBuffer[64] = {0}; + // + // Main loop to get the 64 bytes. + // + do // 0x17e55: + { + PMTimerValue = inw(0x408); // in (%dx), %ax + esi = PMTimerValue; // movzwl %ax, %esi + + if (esi < ecx) // cmp %ecx, %esi + { + continue; // jb 0x17e55 (retry) + } + + cpuTick = getCPUTick(); // callq 0x121a7 + rcx = (cpuTick >> 8); // mov %rax, %rcx + // shr $0x8, %rcx + rdx = (cpuTick >> 10); // mov %rax, %rdx + // shr $0x10, %rdx + rdi = rsi; // mov %rsi, %rdi + rdi = (rdi ^ cpuTick); // xor %rax, %rdi + rdi = (rdi ^ rcx); // xor %rcx, %rdi + rdi = (rdi ^ rdx); // xor %rdx, %rdi + + seedBuffer[index] = (rdi & 0xff); // mov %dil, (%r15,%r12,1) + + edi = (edi & 0x2f); // and $0x2f, %edi + edi = (edi + esi); // add %esi, %edi + index++; // inc r12 + ecx = (edi & 0xffff); // movzwl %di, %ecx + + } while (index < 64); // cmp %r14d, %r12d + // jne 0x17e55 (next) + + DT__AddProperty(chosenNode, "random-seed", sizeof(seedBuffer), (EFI_UINT8*) &seedBuffer); + + } + } } /* Index: branches/chucko/i386/libsaio/saio_internal.h =================================================================== --- branches/chucko/i386/libsaio/saio_internal.h (revision 2453) +++ branches/chucko/i386/libsaio/saio_internal.h (revision 2454) @@ -28,11 +28,12 @@ #include "saio_types.h" /* asm.s */ -extern void real_to_prot(void); -extern void prot_to_real(void); -extern void halt(void); -extern void startprog(unsigned int address, void *arg); -extern void loader(UInt32 code, UInt32 cmdptr); +extern void real_to_prot(void); +extern void prot_to_real(void); +extern void halt(void); +extern void startprog(unsigned int address, void *arg); +extern void loader(UInt32 code, UInt32 cmdptr); +extern uint64_t computeRand(void); /* bios.s */ extern void bios(biosBuf_t *bb); @@ -81,8 +82,7 @@ /* cache.c */ extern void CacheReset(); extern void CacheInit(CICell ih, u_int32_t blockSize); -extern u_int32_t CacheRead(CICell ih, char *buffer, long long offset, - u_int32_t length, long cache); +extern u_int32_t CacheRead(CICell ih, char *buffer, long long offset, u_int32_t length, long cache); /* console.c */ extern bool gVerboseMode; Index: branches/chucko/i386/boot0/boot0.s =================================================================== --- branches/chucko/i386/boot0/boot0.s (revision 2453) +++ branches/chucko/i386/boot0/boot0.s (revision 2454) @@ -88,6 +88,7 @@ kPartCount EQU 4 ; number of paritions per table kPartTypeHFS EQU 0xaf ; HFS+ Filesystem type +kPartTypeABHFS EQU 0xab ; Apple_Boot partition kPartTypePMBR EQU 0xee ; On all GUID Partition Table disks a Protective MBR (PMBR) ; in LBA 0 (that is, the first block) precedes the ; GUID Partition Table Header to maintain compatibility @@ -322,7 +323,7 @@ ; signature check. jmp .tryToBoot -.Pass2: +.Pass2: cmp BYTE [si + part.type], kPartTypeHFS ; In pass 2 we're going to find a HFS+ partition ; equipped with boot1h in its boot record ; regardless if it's active or not. @@ -740,7 +741,7 @@ popad ret - + print_nibble: and al, 0x0f add al, '0' @@ -764,7 +765,6 @@ ; NULL terminated strings. ; log_title_str db 10, 13, 'boot0: ', 0 -boot_error_str db 'error', 0 %if VERBOSE gpt_str db 'GPT', 0 @@ -772,6 +772,8 @@ done_str db 'done', 0 %endif +boot_error_str db 'error', 0 + ;-------------------------------------------------------------------------- ; Pad the rest of the 512 byte sized booter with zeroes. The last ; two bytes is the mandatory boot sector signature. Index: branches/chucko/i386/boot0/boot0hfs.s =================================================================== --- branches/chucko/i386/boot0/boot0hfs.s (revision 2453) +++ branches/chucko/i386/boot0/boot0hfs.s (revision 2454) @@ -88,6 +88,7 @@ kPartCount EQU 4 ; number of paritions per table kPartTypeHFS EQU 0xaf ; HFS+ Filesystem type +kPartTypeABHFS EQU 0xab ; Apple_Boot partition kPartTypePMBR EQU 0xee ; On all GUID Partition Table disks a Protective MBR (PMBR) ; in LBA 0 (that is, the first block) precedes the ; GUID Partition Table Header to maintain compatibility @@ -763,7 +764,6 @@ ; NULL terminated strings. ; log_title_str db 10, 13, 'boot0: ', 0 -boot_error_str db 'error', 0 %if VERBOSE gpt_str db 'GPT', 0 @@ -771,6 +771,8 @@ done_str db 'done', 0 %endif +boot_error_str db 'error', 0 + ;-------------------------------------------------------------------------- ; Pad the rest of the 512 byte sized booter with zeroes. The last ; two bytes is the mandatory boot sector signature. Index: branches/chucko/i386/boot0/boot0md.s =================================================================== --- branches/chucko/i386/boot0/boot0md.s (revision 2453) +++ branches/chucko/i386/boot0/boot0md.s (revision 2454) @@ -442,12 +442,11 @@ jne .continue +.tryToBoot: ; ; Found boot partition, read boot sector to memory. ; -.tryToBoot: - call loadBootSector jne .continue jmp SHORT initBootLoader @@ -868,7 +867,6 @@ ; NULL terminated strings. ; log_title_str db 10, 13, 'boot0:', 0 -boot_error_str db 'error', 0 gpt_str db 'GPT', 0 ;test_str db 'test', 0 @@ -876,6 +874,8 @@ %endif +boot_error_str db 'error', 0 + ;-------------------------------------------------------------------------- ; Pad the rest of the 512 byte sized booter with zeroes. The last ; two bytes is the mandatory boot sector signature. Index: branches/chucko/i386/boot0/Makefile =================================================================== --- branches/chucko/i386/boot0/Makefile (revision 2453) +++ branches/chucko/i386/boot0/Makefile (revision 2454) @@ -17,10 +17,13 @@ all: $(DIRS_NEEDED) $(OBJS) +#To rebuild boot0 if boot0.s is touched +$(SYMROOT)/boot0: boot0.s + $(OBJS): $(SRCROOT)/autoconf.inc - @echo "\t[NASM] $(@F)" + @echo " [NASM] $(@F)" @$(NASM) $(@F).s -o $@ clean-local: - @for o in $(OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done + @for o in $(OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done @rm -f $(OBJS) Index: branches/chucko/i386/include/architecture/i386/asm_help.h =================================================================== --- branches/chucko/i386/include/architecture/i386/asm_help.h (revision 2453) +++ branches/chucko/i386/include/architecture/i386/asm_help.h (revision 2454) @@ -45,7 +45,7 @@ #ifdef __ASSEMBLER__ #define ALIGN \ - .align 2, 0x90 + .align 4, 0x90 #define ROUND_TO_STACK(len) \ (((len) + STACK_INCR - 1) / STACK_INCR * STACK_INCR) Index: branches/chucko/i386/include/mach/i386/asm.h =================================================================== --- branches/chucko/i386/include/mach/i386/asm.h (revision 2453) +++ branches/chucko/i386/include/mach/i386/asm.h (revision 2454) @@ -107,7 +107,7 @@ /* There is another definition of ALIGN for .c sources */ #ifdef ASSEMBLER -#define ALIGN 4,0x90 +#define ALIGN 16,0x90 #endif /* ASSEMBLER */ #ifndef FALIGN Index: branches/chucko/i386/include/sys/socket.h =================================================================== --- branches/chucko/i386/include/sys/socket.h (revision 2453) +++ branches/chucko/i386/include/sys/socket.h (revision 2454) @@ -514,6 +514,7 @@ * peer from lying about its identity. (Note that cmcred_groups[0] * is the effective GID.) */ +#if 0 struct cmsgcred { pid_t cmcred_pid; /* PID of sending process */ uid_t cmcred_uid; /* real UID of sending process */ @@ -523,6 +524,7 @@ gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ }; #endif +#endif #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ /* given pointer to struct cmsghdr, return pointer to data */ Index: branches/chucko/i386/boot1/boot1f32.s =================================================================== --- branches/chucko/i386/boot1/boot1f32.s (revision 2453) +++ branches/chucko/i386/boot1/boot1f32.s (revision 2454) @@ -75,7 +75,7 @@ kBoot1LoadAddr EQU 0x7C00 ; boot1 load address kBoot1RelocAddr EQU 0xE000 ; boot1 relocated address -kBoot2Sectors EQU (448 * 1024 - 512) / kSectorBytes ; max size of 'boot' file in sectors +kBoot2Sectors EQU (480 * 1024 - 512) / kSectorBytes ; max size of 'boot' file in sectors kBoot2Segment EQU 0x2000 ; boot2 load segment kBoot2Address EQU kSectorBytes ; boot2 load address Index: branches/chucko/i386/boot1/boot1he.s =================================================================== --- branches/chucko/i386/boot1/boot1he.s (revision 2453) +++ branches/chucko/i386/boot1/boot1he.s (revision 2454) @@ -79,7 +79,7 @@ kBoot1ExtAddr EQU kBoot1RelocAddr + kSectorBytes ; boot1 load address for sector 41-47 kHFSPlusBuffer EQU kBoot1RelocAddr + kBoot1ExtSize ; HFS+ Volume Header address -kBoot2Sectors EQU (448 * 1024 - 512) / kSectorBytes ; max size of 'boot' file in sectors +kBoot2Sectors EQU (480 * 1024 - 512) / kSectorBytes ; max size of 'boot' file in sectors = 448 but I want 472 kBoot2Segment EQU 0x2000 ; boot2 load segment kBoot2Address EQU kSectorBytes ; boot2 load address Index: branches/chucko/i386/boot1/Makefile =================================================================== --- branches/chucko/i386/boot1/Makefile (revision 2453) +++ branches/chucko/i386/boot1/Makefile (revision 2454) @@ -32,8 +32,11 @@ all: $(DIRS_NEEDED) $(PROGRAMS) +#To rebuild boot1h if boot1h.s is touched +$(SYMROOT)/boot1h: boot1h.s + $(PROGRAMS): $(SRCROOT)/autoconf.inc - @echo "\t[NASM] $(@F)" + @echo " [NASM] $(@F)" @$(NASM) $(@F).s -o $@ install_i386:: all $(INSTALLDIR) @@ -41,5 +44,5 @@ cd $(INSTALLDIR); chmod u+w $(VERSIONED_FILES) clean-local: - @for p in $(PROGRAMS); do if [ -f "$${p}" ];then echo "\t[RM] $${p}"; fi; done + @for p in $(PROGRAMS); do if [ -f "$${p}" ];then echo " [RM] $${p}"; fi; done @rm -f $(PROGRAMS) Index: branches/chucko/i386/boot1/boot1h.s =================================================================== --- branches/chucko/i386/boot1/boot1h.s (revision 2453) +++ branches/chucko/i386/boot1/boot1h.s (revision 2454) @@ -1,7 +1,7 @@ ; 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 @@ -9,7 +9,7 @@ ; 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, @@ -17,7 +17,7 @@ ; 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@ ; ; Partition Boot Loader: boot1h @@ -335,7 +335,7 @@ mov si, %1 call print_string %endmacro - + %macro LogString 1 mov di, %1 call log_string @@ -352,7 +352,7 @@ %define PutChar(x) %define PrintHex(x) %endif - + ;-------------------------------------------------------------------------- ; Start of text segment. @@ -388,7 +388,7 @@ mov cx, kSectorBytes ; copy 256 words rep movsb ; repeat string move (word) operation pop si - + ; ; Code relocated, jump to startReloc in relocated location. ; @@ -406,7 +406,7 @@ ; Initializing global variables. ; mov eax, [si + part.lba] - mov [gPartLBA], eax ; save the current partition LBA offset + mov [gPartLBA], eax ; save the current partition LBA offset mov [gBIOSDriveNumber], dl ; save BIOS drive number mov WORD [gMallocPtr], mallocStart ; set free space pointer @@ -500,7 +500,7 @@ %if VERBOSE LogString(error_str) %endif - + hang: hlt jmp hang @@ -977,7 +977,7 @@ ; %if VERBOSE -root_str db '/boot', NULL +root_str db '/boot', CR, LF, NULL %endif ;-------------------------------------------------------------------------- @@ -1058,11 +1058,11 @@ mov bx, [bp + BTree.nodeBuffer + BTNodeDescriptor.numRecords] xchg bh, bl dec bx - + .bsearch: cmp ax, bx ja .checkResult ; jump if lowerBound > upperBound - + mov cx, ax add cx, bx shr cx, 1 ; test index = (lowerBound + upperBound / 2) @@ -1088,7 +1088,7 @@ je .checkResult jl .searchLessThanTrial jg .searchGreaterThanTrial - jmp .bsearch + jmp .bsearch .searchLessThanTrial: mov bx, cx @@ -1099,7 +1099,7 @@ mov ax, cx inc ax ; lowerBound = index + 1 jmp .bsearch - + .checkResult: cmp BYTE [bp + BTree.searchResult], 0 jge .foundKey @@ -1115,7 +1115,7 @@ mov bx, [bx] mov edx, [bx] jmp .readNode - + .exit: cmp BYTE [bp + BTree.searchResult], 0 ret @@ -1183,7 +1183,7 @@ .exit: pop di ; restore address of trialKey -%if UNUSED +%if UNUSED ; ; Print catalog trial key ; @@ -1199,15 +1199,15 @@ .printLoop: lodsw call print_char - loop .printLoop + loop .printLoop .printExit: popad ; ; ; %endif ; UNUSED - -%if UNUSED + +%if UNUSED ; ; Print extent trial key ; @@ -1230,7 +1230,7 @@ pop si ; restore SI call bx ; call key compare proc popad - ret + ret ;-------------------------------------------------------------------------- ; readExtent - read extents from a HFS+ file (multiple extent support) @@ -1300,7 +1300,7 @@ pop ebx jmp .beginExtentBlock - + .continue: mov edx, [di + HFSPlusExtentDescriptor.blockCount] call blockToSector ; ECX = converted current extent's blockCount to sectors @@ -1328,20 +1328,20 @@ mov edx, [di + HFSPlusExtentDescriptor.startBlock] call blockToSector ; ECX = converted to sectors add ecx, eax ; file offset converted to sectors - + push si mov ax, si mov edx, [bp + BTree.readBufferPtr] call readSectors pop si - + add ebx, esi mov ax, si cwde shl ax, 9 ; convert SI (read sector count) to byte unit add [bp + BTree.readBufferPtr], eax sub [bp + BTree.readSize], esi - + jz .exit .nextExtent: @@ -1431,8 +1431,8 @@ ; %if VERBOSE -log_title_str db CR, LF, 'boot1: ', NULL -error_str db 'error', NULL +log_title_str db 'boot1: ', NULL +error_str db 'error', NULL %endif searchCatalogKey dd kHFSRootFolderID Index: branches/chucko/i386/boot1/boot1hp.s =================================================================== --- branches/chucko/i386/boot1/boot1hp.s (revision 2453) +++ branches/chucko/i386/boot1/boot1hp.s (revision 2454) @@ -269,7 +269,7 @@ mov al, 1 ; read HFS+ Volume Header mov edx, kHFSPlusBuffer call readLBA - jc NEAR bios_read_error + jc NEAR bios_read_error ; ; Looking for HFSPlus ('H+') or HFSPlus case-sensitive ('HX') signature. Index: branches/chucko/i386/klibc/Makefile =================================================================== --- branches/chucko/i386/klibc/Makefile (revision 2453) +++ branches/chucko/i386/klibc/Makefile (revision 2454) @@ -34,17 +34,17 @@ $(LIBS): $(OBJS) - @echo "\t[RM] $@" + @echo " [RM] $@" @rm -f $@ - @echo "\t[AR] $(@F)" + @echo " [AR] $(@F)" @ar q $@ $^ &> /dev/null - @echo "\t[RANLIB] $(@F)" + @echo " [RANLIB] $(@F)" @ranlib $@ # dependencies -include $(OBJROOT)/Makedep clean-local: - @for o in $(OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done - @for l in $(LIBS); do if [ -f "$${l}" ];then echo "\t[RM] $${l}"; fi; done + @for o in $(OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done + @for l in $(LIBS); do if [ -f "$${l}" ];then echo " [RM] $${l}"; fi; done @rm -f $(LIBS) $(OBJS) Index: branches/chucko/i386/boot2/picopng.c =================================================================== --- branches/chucko/i386/boot2/picopng.c (revision 2453) +++ branches/chucko/i386/boot2/picopng.c (revision 2454) @@ -23,7 +23,8 @@ /*************************************************************************************************/ -typedef struct png_alloc_node { +typedef struct png_alloc_node +{ struct png_alloc_node *prev, *next; void *addr; size_t size; @@ -32,32 +33,55 @@ png_alloc_node_t *png_alloc_head = NULL; png_alloc_node_t *png_alloc_tail = NULL; +//============================================================================== + png_alloc_node_t *png_alloc_find_node(void *addr) { png_alloc_node_t *node; + for (node = png_alloc_head; node; node = node->next) + { if (node->addr == addr) + { break; + } + } + return node; } + +//============================================================================== + void png_alloc_add_node(void *addr, size_t size) { png_alloc_node_t *node; + if (png_alloc_find_node(addr)) + { return; - node = malloc(sizeof (png_alloc_node_t)); + } + + node = malloc(sizeof(png_alloc_node_t)); node->addr = addr; node->size = size; node->prev = png_alloc_tail; node->next = NULL; png_alloc_tail = node; + if (node->prev) + { node->prev->next = node; + } + if (!png_alloc_head) + { png_alloc_head = node; + } } +//============================================================================== + void png_alloc_remove_node(png_alloc_node_t *node) { if (!node) { Index: branches/chucko/i386/boot2/graphics.c =================================================================== --- branches/chucko/i386/boot2/graphics.c (revision 2453) +++ branches/chucko/i386/boot2/graphics.c (revision 2454) @@ -20,11 +20,10 @@ * under the License. * * @APPLE_LICENSE_HEADER_END@ + * + * Copyright 1993 NeXT, Inc. All rights reserved. + * */ -/* - * Copyright 1993 NeXT, Inc. - * All rights reserved. - */ #include "boot.h" #include "vbe.h" @@ -50,18 +49,18 @@ { VBEInfoBlock vbeInfo; int err, small; - + bzero( &vbeInfo, sizeof(vbeInfo) ); strcpy( (char*)&vbeInfo, "VBE2" ); err = getVBEInfo( &vbeInfo ); if (err != errSuccess) return 0; - + if ( strncmp( (char *)vbeInfo.VESASignature, "VESA", 4 ) ) return 0; - + small = (vbeInfo.TotalMemory < 16); - + return vbeInfo.TotalMemory * 64 * 1024; } @@ -79,23 +78,24 @@ err = getVBEInfo( &vbeInfo ); if (err != errSuccess) return 0; - + if ( strncmp( (char *)vbeInfo.VESASignature, "VESA", 4 ) ) return 0; - + buff = malloc(sizeof(char) * 256); if (!buff) { return 0; } + small = (vbeInfo.TotalMemory < 16); - + snprintf(buff, 256, - "VESA v%d.%d %d%s (%s)\n", - vbeInfo.VESAVersion >> 8, - vbeInfo.VESAVersion & 0xf, - small ? (vbeInfo.TotalMemory * 64) : (vbeInfo.TotalMemory / 16), - small ? "KB" : "MB", - VBEDecodeFP(const char *, vbeInfo.OEMStringPtr) ); + "VESA v%d.%d %d%s (%s)\n", + vbeInfo.VESAVersion >> 8, + vbeInfo.VESAVersion & 0xf, + small ? (vbeInfo.TotalMemory * 64) : (vbeInfo.TotalMemory / 16), + small ? "KB" : "MB", + VBEDecodeFP(const char *, vbeInfo.OEMStringPtr) ); return buff; } @@ -163,13 +163,15 @@ clearScreenRows(0, 24); setCursorPosition( 0, 0, 1 ); } - } + } if (line != 0) { pause(); } setActiveDisplayPage(0); } +//============================================================================== + char *getVBEModeInfoString() { VBEInfoBlock vbeInfo; @@ -184,7 +186,8 @@ return 0; } char *buff=malloc(sizeof(char)*3072); - if(!buff) { + if(!buff) + { return 0; } @@ -208,7 +211,7 @@ *modePtr, modeInfo.XResolution, modeInfo.YResolution, modeInfo.BitsPerPixel, modeInfo.MemoryModel, modeInfo.ModeAttributes); - } + } return buff; } @@ -219,141 +222,146 @@ // If a mode is not found, then return the "best" available mode. static unsigned short -getVESAModeWithProperties( unsigned short width, - unsigned short height, - unsigned char bitsPerPixel, - unsigned short attributesSet, - unsigned short attributesClear, - VBEModeInfoBlock * outModeInfo, - unsigned short * vesaVersion ) +getVESAModeWithProperties( unsigned short width, + unsigned short height, + unsigned char bitsPerPixel, + unsigned short attributesSet, + unsigned short attributesClear, + VBEModeInfoBlock *outModeInfo, + unsigned short *vesaVersion + ) { - VBEInfoBlock vbeInfo; - unsigned short * modePtr; - VBEModeInfoBlock modeInfo; - unsigned char modeBitsPerPixel; - unsigned short matchedMode = modeEndOfList; - int err; + VBEInfoBlock vbeInfo; + unsigned short * modePtr; + VBEModeInfoBlock modeInfo; + unsigned char modeBitsPerPixel; + unsigned short matchedMode = modeEndOfList; + int err; - // Clear output mode info. + // Clear output mode info. - bzero( outModeInfo, sizeof(*outModeInfo) ); + bzero( outModeInfo, sizeof(*outModeInfo) ); - // Get VBE controller info containing the list of supported modes. + // Get VBE controller info containing the list of supported modes. - bzero( &vbeInfo, sizeof(vbeInfo) ); - strcpy( (char*)&vbeInfo, "VBE2" ); - err = getVBEInfo( &vbeInfo ); - if ( err != errSuccess ) - { - return modeEndOfList; - } + bzero( &vbeInfo, sizeof(vbeInfo) ); + strcpy( (char*)&vbeInfo, "VBE2" ); + err = getVBEInfo( &vbeInfo ); + if ( err != errSuccess ) + { + return modeEndOfList; + } - // Report the VESA major/minor version number. + // Report the VESA major/minor version number. - if (vesaVersion) *vesaVersion = vbeInfo.VESAVersion; + if (vesaVersion) + { + *vesaVersion = vbeInfo.VESAVersion; + } - // Loop through the mode list, and find the matching mode. + // Loop through the mode list, and find the matching mode. - for ( modePtr = VBEDecodeFP( unsigned short *, vbeInfo.VideoModePtr ); - *modePtr != modeEndOfList; modePtr++ ) - { - // Get mode information. + for ( modePtr = VBEDecodeFP( unsigned short *, vbeInfo.VideoModePtr ); + *modePtr != modeEndOfList; modePtr++ ) + { + // Get mode information. - bzero( &modeInfo, sizeof(modeInfo) ); - err = getVBEModeInfo( *modePtr, &modeInfo ); - if ( err != errSuccess ) - { - continue; - } + bzero( &modeInfo, sizeof(modeInfo) ); + err = getVBEModeInfo( *modePtr, &modeInfo ); + if ( err != errSuccess ) + { + continue; + } #if DEBUG - printf("Mode %x: %dx%dx%d mm:%d attr:%x\n", + printf("Mode %x: %dx%dx%d mm:%d attr:%x\n", *modePtr, modeInfo.XResolution, modeInfo.YResolution, modeInfo.BitsPerPixel, modeInfo.MemoryModel, modeInfo.ModeAttributes); #endif - // Filter out unwanted modes based on mode attributes. + // Filter out unwanted modes based on mode attributes. - if ( ( ( modeInfo.ModeAttributes & attributesSet ) != attributesSet ) + if ( ( ( modeInfo.ModeAttributes & attributesSet ) != attributesSet ) || ( ( modeInfo.ModeAttributes & attributesClear ) != 0 ) ) - { - continue; - } + { + continue; + } - // Pixel depth in bits. + // Pixel depth in bits. - modeBitsPerPixel = modeInfo.BitsPerPixel; + modeBitsPerPixel = modeInfo.BitsPerPixel; - if ( ( modeBitsPerPixel == 4 ) && ( modeInfo.MemoryModel == 0 ) ) - { - // Text mode, 16 colors. - } - else if ( ( modeBitsPerPixel == 8 ) && ( modeInfo.MemoryModel == 4 ) ) - { - // Packed pixel, 256 colors. - } - else if ( ( ( modeBitsPerPixel == 16 ) || ( modeBitsPerPixel == 15 ) ) - && ( modeInfo.MemoryModel == 6 ) - && ( modeInfo.RedMaskSize == 5 ) - && ( modeInfo.GreenMaskSize == 5 ) - && ( modeInfo.BlueMaskSize == 5 ) ) - { - // Direct color, 16 bpp (1:5:5:5). - modeInfo.BitsPerPixel = modeBitsPerPixel = 16; - } - else if ( ( modeBitsPerPixel == 32 ) - && ( modeInfo.MemoryModel == 6 ) - && ( modeInfo.RedMaskSize == 8 ) - && ( modeInfo.GreenMaskSize == 8 ) - && ( modeInfo.BlueMaskSize == 8 ) ) - { - // Direct color, 32 bpp (8:8:8:8). - } - else - { - continue; // Not a supported mode. - } + if ( ( modeBitsPerPixel == 4 ) && ( modeInfo.MemoryModel == 0 ) ) + { + // Text mode, 16 colors. + } + else if ( ( modeBitsPerPixel == 8 ) && ( modeInfo.MemoryModel == 4 ) ) + { + // Packed pixel, 256 colors. + } + else if ( ( ( modeBitsPerPixel == 16 ) || ( modeBitsPerPixel == 15 ) ) + && ( modeInfo.MemoryModel == 6 ) + && ( modeInfo.RedMaskSize == 5 ) + && ( modeInfo.GreenMaskSize == 5 ) + && ( modeInfo.BlueMaskSize == 5 ) ) + { + // Direct color, 16 bpp (1:5:5:5). + modeInfo.BitsPerPixel = modeBitsPerPixel = 16; + } + else if ( ( modeBitsPerPixel == 32 ) + && ( modeInfo.MemoryModel == 6 ) + && ( modeInfo.RedMaskSize == 8 ) + && ( modeInfo.GreenMaskSize == 8 ) + && ( modeInfo.BlueMaskSize == 8 ) ) + { + // Direct color, 32 bpp (8:8:8:8). + } + else + { + continue; // Not a supported mode. + } - // Modes larger than the specified dimensions are skipped. + // Modes larger than the specified dimensions are skipped. - if ( ( modeInfo.XResolution > width ) || - ( modeInfo.YResolution > height ) ) - { - continue; - } + if ( ( modeInfo.XResolution > width ) || + ( modeInfo.YResolution > height ) ) + { + continue; + } - // Perfect match, we're done looking. + // Perfect match, we're done looking. - if ( ( modeInfo.XResolution == width ) && - ( modeInfo.YResolution == height ) && - ( modeBitsPerPixel == bitsPerPixel ) ) - { - matchedMode = *modePtr; - bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); - break; - } + if ( ( modeInfo.XResolution == width ) && + ( modeInfo.YResolution == height ) && + ( modeBitsPerPixel == bitsPerPixel ) ) + { + matchedMode = *modePtr; + bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); + break; + } - // Save the next "best" mode in case a perfect match is not found. + // Save the next "best" mode in case a perfect match is not found. - if ( modeInfo.XResolution == outModeInfo->XResolution && - modeInfo.YResolution == outModeInfo->YResolution && - modeBitsPerPixel <= outModeInfo->BitsPerPixel ) - { - continue; // Saved mode has more depth. - } - if ( modeInfo.XResolution < outModeInfo->XResolution || - modeInfo.YResolution < outModeInfo->YResolution || - modeBitsPerPixel < outModeInfo->BitsPerPixel ) - { - continue; // Saved mode has more resolution. - } + if ( modeInfo.XResolution == outModeInfo->XResolution && + modeInfo.YResolution == outModeInfo->YResolution && + modeBitsPerPixel <= outModeInfo->BitsPerPixel ) + { + continue; // Saved mode has more depth. + } - matchedMode = *modePtr; - bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); - } + if ( modeInfo.XResolution < outModeInfo->XResolution || + modeInfo.YResolution < outModeInfo->YResolution || + modeBitsPerPixel < outModeInfo->BitsPerPixel ) + { + continue; // Saved mode has more resolution. + } - return matchedMode; + matchedMode = *modePtr; + bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); + } + + return matchedMode; } //========================================================================== @@ -506,11 +514,9 @@ return err; } -int -convertImage( unsigned short width, - unsigned short height, - const unsigned char *imageData, - unsigned char **newImageData ) +//============================================================================== + +int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData ) { int cnt; unsigned char *img = 0; @@ -525,7 +531,7 @@ img16[cnt] = lookUpCLUTIndex(imageData[cnt], 16); img = (unsigned char *)img16; break; - + case 32 : img32 = malloc(width * height * 4); if ( !img32 ) break; @@ -533,7 +539,7 @@ img32[cnt] = lookUpCLUTIndex(imageData[cnt], 32); img = (unsigned char *)img32; break; - + default : img = malloc(width * height); bcopy(imageData, img, width * height); @@ -543,6 +549,8 @@ return 0; } +//============================================================================== + int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData) { @@ -595,6 +603,8 @@ return error; } +//============================================================================== + int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData) { PNG_info_t *info; int error = 0; @@ -623,6 +633,8 @@ return error; } +//============================================================================== + void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data) { @@ -640,7 +652,7 @@ uint32_t a; // Alpha uint32_t dstrb, dstg, srcrb, srcg, drb, dg, rb, g, tempB; // Intermediate variables uint16_t pos; - + for (pos = 0; pos < drawWidth * 4; pos += 4) { // Fast pseudo-vector alpha blending, adapted from: http://www.stereopsis.com/doubleblend.html s = *((uint32_t*) (data + pos)); @@ -669,7 +681,7 @@ } } break; - + default: /*Universal version*/ { uint32_t s; @@ -677,7 +689,7 @@ uint32_t dr, dg, db, sr, sg, sb; // Intermediate variables uint16_t pos; int bpp = (VIDEO (depth) + 7)/8; - + for (pos = 0; pos < drawWidth; pos ++) { // Fast pseudo-vector alpha blending, adapted from: http://www.stereopsis.com/doubleblend.html s = *((uint32_t*) (data + 4*pos)); @@ -687,7 +699,7 @@ sr = (s & 0xFF); a = (s >> 24) + 1; - + switch (VIDEO (depth)) { case 24: @@ -704,7 +716,7 @@ db = ((*(uint16_t *)(vram + bpp*pos))&0x1f)<<3; dg = ((*(uint16_t *)(vram + bpp*pos))&0x03e0)>>2; dr = ((*(uint16_t *)(vram + bpp*pos))&0x7c00)>>7; - break; + break; default: return; } @@ -725,8 +737,8 @@ *(uint16_t *)(vram + bpp*pos) = ((db&0xf8)>>3) | ((dg&0xf8)<<2) | ((dr&0xf8)<<7); break; } - - } + + } } break; } @@ -735,6 +747,8 @@ } } +//============================================================================== + void drawCheckerBoard() { uint32_t *vram = (uint32_t *) VIDEO(baseAddr); @@ -752,8 +766,7 @@ //========================================================================== // LookUpCLUTIndex -unsigned long lookUpCLUTIndex( unsigned char index, - unsigned char depth ) +unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth ) { long result, red, green, blue; @@ -787,14 +800,16 @@ void * stosl(void * dst, long val, long len) { - asm volatile ( "rep; stosl" - : "=c" (len), "=D" (dst) - : "0" (len), "1" (dst), "a" (val) - : "memory" ); + asm volatile ( "rep; stosl" + : "=c" (len), "=D" (dst) + : "0" (len), "1" (dst), "a" (val) + : "memory" ); - return dst; + return dst; } +//============================================================================== + void drawColorRectangle( unsigned short x, unsigned short y, unsigned short width, @@ -844,8 +859,9 @@ } } -void -loadImageScale (void *input, int iw, int ih, int ip, void *output, int ow, int oh, int op, int or) +//============================================================================== + +void loadImageScale (void *input, int iw, int ih, int ip, void *output, int ow, int oh, int op, int or) { int x,y, off; int red=0x7f, green=0x7f, blue=0x7f; @@ -862,7 +878,7 @@ red=(val>>7)&0xf8; green=(val>>2)&0xf8; blue=(val<<3)&0xf8; - break; + break; } case 32: { @@ -872,7 +888,7 @@ green=(val>>8)&0xff; blue=(val)&0xff; break; - } + } } char *ptr=(char *)output+x*(op/8)+y*or; switch (op) @@ -889,6 +905,8 @@ } } +//============================================================================== + DECLARE_IOHIBERNATEPROGRESSALPHA void drawPreview(void *src, uint8_t * saveunder) @@ -902,7 +920,7 @@ void *uncomp; int origwidth, origheight, origbpx; uint32_t saveindex[kIOHibernateProgressCount] = { 0 }; - + if (src && (uncomp=DecompressData(src, &origwidth, &origheight, &origbpx))) { if (!setVESAGraphicsMode(origwidth, origheight, origbpx, 0)) @@ -921,15 +939,15 @@ // Set the screen to 75% grey. drawColorRectangle(0, 0, VIDEO(width), VIDEO(height), 0x01 /* color index */); } - - + + pixelShift = VIDEO (depth) >> 4; if (pixelShift < 1) return; - + screen += ((VIDEO (width) - kIOHibernateProgressCount * (kIOHibernateProgressWidth + kIOHibernateProgressSpacing)) << (pixelShift - 1)) + (VIDEO (height) - kIOHibernateProgressOriginY - kIOHibernateProgressHeight) * rowBytes; - + for (y = 0; y < kIOHibernateProgressHeight; y++) { out = screen + y * rowBytes; @@ -969,6 +987,8 @@ } } +//============================================================================== + void updateProgressBar(uint8_t * saveunder, int32_t firstBlob, int32_t select) { uint8_t * screen; @@ -978,20 +998,20 @@ uint32_t alpha, in, color, result; uint8_t * out; uint32_t saveindex[kIOHibernateProgressCount] = { 0 }; - + pixelShift = VIDEO(depth) >> 4; if (pixelShift < 1) return; screen = (uint8_t *) VIDEO (baseAddr); rowBytes = VIDEO (rowBytes); - + screen += ((VIDEO (width) - kIOHibernateProgressCount * (kIOHibernateProgressWidth + kIOHibernateProgressSpacing)) << (pixelShift - 1)) + (VIDEO (height) - kIOHibernateProgressOriginY - kIOHibernateProgressHeight) * rowBytes; - + lastBlob = (select < kIOHibernateProgressCount) ? select : (kIOHibernateProgressCount - 1); - + screen += (firstBlob * (kIOHibernateProgressWidth + kIOHibernateProgressSpacing)) << pixelShift; - + for (y = 0; y < kIOHibernateProgressHeight; y++) { out = screen + y * rowBytes; @@ -1028,10 +1048,7 @@ //========================================================================== // setVESATextMode -static int -setVESATextMode( unsigned short cols, - unsigned short rows, - unsigned char bitsPerPixel ) +static int setVESATextMode( unsigned short cols, unsigned short rows, unsigned char bitsPerPixel ) { VBEModeInfoBlock minfo; unsigned short mode = modeEndOfList; @@ -1068,8 +1085,7 @@ //========================================================================== // getNumberArrayFromProperty -static int -getNumberArrayFromProperty( const char * propKey, +static int getNumberArrayFromProperty( const char * propKey, unsigned long numbers[], unsigned long maxArrayCount ) { @@ -1100,11 +1116,13 @@ return count; } +//============================================================================== + int initGraphicsMode () { unsigned long params[4]; int count; - + params[3] = 0; count = getNumberArrayFromProperty( kGraphicsModeKey, params, 4 ); @@ -1122,13 +1140,13 @@ params[1] = gui.screen.height; params[2] = 32; } - + // Map from pixel format to bits per pixel. - + if ( params[2] == 256 ) params[2] = 8; if ( params[2] == 555 ) params[2] = 16; if ( params[2] == 888 ) params[2] = 32; - + return setVESAGraphicsMode( params[0], params[1], params[2], params[3] ); } @@ -1137,8 +1155,7 @@ // // Set the video mode to VGA_TEXT_MODE or GRAPHICS_MODE. -void -setVideoMode( int mode, int drawgraphics) +void setVideoMode( int mode, int drawgraphics) { unsigned long params[4]; int count; @@ -1165,13 +1182,14 @@ params[1] = 25; } - setVESATextMode( params[0], params[1], 4 ); + setVESATextMode( params[0], params[1], 4 ); bootArgs->Video.v_display = VGA_TEXT_MODE; } currentIndicator = 0; } +//============================================================================== void getGraphicModeParams(unsigned long params[]) { params[3] = 0; @@ -1180,7 +1198,7 @@ unsigned short vesaVersion; unsigned short mode = modeEndOfList; - + getNumberArrayFromProperty( kGraphicsModeKey, params, 4); mode = getVESAModeWithProperties( params[0], params[1], params[2], @@ -1190,7 +1208,7 @@ maLinearFrameBufferAvailBit, 0, &minfo, &vesaVersion ); - + params[0] = minfo.XResolution; params[1] = minfo.YResolution; params[2] = 32; @@ -1213,11 +1231,12 @@ // ensure a minimum of 1/9 sec between animation frames. #define MIN_TICKS 2 -void -spinActivityIndicator(int sectors) +//============================================================================== + +void spinActivityIndicator(int sectors) { static unsigned long lastTickTime = 0, currentTickTime; - + if (previewTotalSectors && previewSaveunder) { int blob, lastBlob; @@ -1227,10 +1246,12 @@ blob = (previewLoadedSectors * kIOHibernateProgressCount) / previewTotalSectors; if (blob!=lastBlob) + { updateProgressBar (previewSaveunder, lastBlob, blob); + } return; } - + currentTickTime = time18(); // late binding if (currentTickTime < lastTickTime + MIN_TICKS) { @@ -1240,7 +1261,7 @@ { lastTickTime = currentTickTime; } - + if (getVideoMode() == VGA_TEXT_MODE) { if (currentIndicator >= sizeof(indicator)) @@ -1252,13 +1273,15 @@ } } -void -clearActivityIndicator( void ) +//============================================================================== + +void clearActivityIndicator( void ) { - if ( getVideoMode() == VGA_TEXT_MODE ) - { + if ( getVideoMode() == VGA_TEXT_MODE ) + { putchar(' '); putchar('\b'); - } + } } +//============================================================================== Index: branches/chucko/i386/boot2/graphics.h =================================================================== --- branches/chucko/i386/boot2/graphics.h (revision 2453) +++ branches/chucko/i386/boot2/graphics.h (revision 2454) @@ -1,7 +1,7 @@ /* * graphics.h - * * + * * Created by fassl on 22.12.08. * Copyright 2008 __MyCompanyName__. All rights reserved. * @@ -26,15 +26,12 @@ void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data ); int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData ); -int initGraphicsMode (); +int initGraphicsMode(); void drawCheckerBoard(); void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data); -void drawCheckerBoard(); -void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data); - int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData); uint32_t getVBEVideoRam(); Index: branches/chucko/i386/boot2/drivers.c =================================================================== --- branches/chucko/i386/boot2/drivers.c (revision 2453) +++ branches/chucko/i386/boot2/drivers.c (revision 2454) @@ -240,8 +240,11 @@ error("Could not load %s\n", gMKextName); return -1; } - } else { - if (gMacOSVersion[3] == '9') { + } + else + { + if ( MAVERICKS || YOSEMITE ) // issue 352 + { strlcpy(gExtensionsSpec, dirSpec, 4087); /* 4096 - sizeof("Library/") */ strcat(gExtensionsSpec, "Library/"); FileLoadDrivers(gExtensionsSpec, 0); @@ -532,6 +535,12 @@ break; } + if (!module) // cparm + { + ret = -1; + break; + } // Should never happen but it will make the compiler happy + // Allocate memory for the driver path and the plist. module->executablePath = tmpExecutablePath; @@ -769,7 +778,8 @@ { prop = GetProperty(module->dict, kPropCFBundleIdentifier); - if ((prop != 0) && !strcmp(name, prop->string)) { + if ((prop != 0) && !strcmp(name, prop->string)) + { break; } @@ -795,22 +805,26 @@ while (1) { length = XMLParseNextTag(buffer + pos, &moduleDict); - if (length == -1) { + if (length == -1) + { break; } pos += length; - if (moduleDict == 0) { + if (moduleDict == 0) + { continue; } - if (moduleDict->type == kTagTypeDict) { + if (moduleDict->type == kTagTypeDict) + { break; } XMLFreeTag(moduleDict); } - if (length == -1) { + if (length == -1) + { return -1; } @@ -823,7 +837,8 @@ } tmpModule = malloc(sizeof(Module)); - if (tmpModule == 0) { + if (tmpModule == 0) + { XMLFreeTag(moduleDict); return -1; } @@ -848,8 +863,7 @@ char *gDarwinBuildVerStr = "Darwin Kernel Version"; // Bungo -long -DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize) +long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize) { long ret = 0; compressed_kernel_header * kernel_header = (compressed_kernel_header *) binary; @@ -882,6 +896,7 @@ { return -1; } + if (kernel_header->root_path[0] && strcmp(gBootFile, kernel_header->root_path)) { return -1; @@ -907,8 +922,18 @@ } // MinusZwei - if (uncompressed_size != size) { - error("ERROR: size mismatch from lzss (found: %x, expected: %x).\n", size, uncompressed_size); + if (uncompressed_size != size) + { + if ( kernel_header->compress_type == OSSwapBigToHostConstInt32('lzvn')) + { + error("ERROR: size mismatch from lzvn (found: %x, expected: %x).\n", size, uncompressed_size); + } + + if ( kernel_header->compress_type == OSSwapBigToHostConstInt32('lzss')) + { + error("ERROR: size mismatch from lzss (found: %x, expected: %x).\n", size, uncompressed_size); + } + return -1; } Index: branches/chucko/i386/boot2/mboot.c =================================================================== --- branches/chucko/i386/boot2/mboot.c (revision 2453) +++ branches/chucko/i386/boot2/mboot.c (revision 2454) @@ -15,6 +15,8 @@ int multiboot_skip_partition=0; int multiboot_skip_partition_set=0; +void boot(int biosdev); + // Global multiboot info, if using multiboot. struct multiboot_info *gMI; @@ -61,29 +63,7 @@ // would be on the stack which would possibly be using way too much stack. void multiboot_to_boot(int multiboot_magic, struct multiboot_info *mi_orig) { - uint32_t bootdevice = hi_multiboot(multiboot_magic, mi_orig); - if(bootdevice != BAD_BOOT_DEVICE) - { - // boot only returns to do a chain load. - for(;;) - { // NOTE: boot only uses the last byte (the drive number) - common_boot(bootdevice); - if(chainbootflag) - chainLoad(); - else - waitThenReload(); - } - } - // Avoid returning to high-memory address which isn't valid in the segment - // we are now in. - // Calling sleep() ensures the user ought to be able to use Ctrl+Alt+Del - // because the BIOS will have interrupts on. - for(;;) - sleep(10); - // NOTE: *IF* we needed to return we'd have to fix up our return address to - // be in low memory using the same trick as below. - // However, there doesn't seem to be any point in returning to assembly - // particularly when the remaining code merely halts the processor. + hi_multiboot(multiboot_magic, mi_orig); } void chainLoad() @@ -344,6 +324,31 @@ // Since we call multiboot ourselves, its return address will be correct. // That is unless it's inlined in which case it does not matter. uint32_t bootdevice = multiboot(multiboot_magic, mi_p); + + if(bootdevice != BAD_BOOT_DEVICE) + { + // boot only returns to do a chain load. + for(;;) + { // NOTE: boot only uses the last byte (the drive number) + boot(bootdevice); + if(chainbootflag) + chainLoad(); + else + waitThenReload(); + } + } + + // Avoid returning to high-memory address which isn't valid in the segment + // we are now in. + // Calling sleep() ensures the user ought to be able to use Ctrl+Alt+Del + // because the BIOS will have interrupts on. + for(;;) + sleep(10); + // NOTE: *IF* we needed to return we'd have to fix up our return address to + // be in low memory using the same trick as below. + // However, there doesn't seem to be any point in returning to assembly + // particularly when the remaining code merely halts the processor. + // We're about to exit and temporaryBootArgs will no longer be valid bootArgs = NULL; return bootdevice; Index: branches/chucko/i386/boot2/Makefile =================================================================== --- branches/chucko/i386/boot2/Makefile (revision 2453) +++ branches/chucko/i386/boot2/Makefile (revision 2454) @@ -29,10 +29,10 @@ DEFINES= CONFIG = hd SYMDIR = $(SYMROOT) -LIBSADIR = ../libsa -LIBSAIODIR = ../libsaio +LIBSADIR = $(SRCROOT)/i386/libsa +LIBSAIODIR = $(SRCROOT)/i386/libsaio THEME = $(CONFIG_EMBEDED_THEME) -THEMEDIR = ../../artwork/themes/$(THEME) +THEMEDIR = $(SRCROOT)/artwork/themes/$(THEME) INC = -I. -I$(SRCROOT) -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I${SRCROOT}/i386/include LIBS= -L$(SYMDIR) -lsaio -lsa -lklibc @@ -48,7 +48,7 @@ # button.o browser.o scrollbar.o == NOTYET OBJS := $(addprefix $(OBJROOT)/, $(OBJS)) -UTILDIR = ../util +UTILDIR = $(SRCROOT)/i386/util DIRS_NEEDED = $(OBJROOT) $(SYMROOT) BOOT2ADDR = 20200 MAXBOOTSIZE = 458240 @@ -82,7 +82,7 @@ @${MKDIRS} $(OBJROOT)/../boot2_modules/ @### First pass, don't worry abount segment alignment. - @echo "\t[LD] boot.sys" + @echo " [LD] boot.sys" @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ -nostdlib -arch i386 -Wl,-pie \ -Wl,-read_only_relocs,suppress \ @@ -94,10 +94,10 @@ ifeq (${CONFIG_MODULES}, y) @# Generate the Symbols.dylib file - @echo "\t[dyldsymboltool] Symbols.dylib" + @echo " [dyldsymboltool] Symbols.dylib" @$(SYMROOT)/dyldsymboltool $(SYMROOT)/boot.sys $(SYMROOT)/${SYMBOLS_MODULE} - @echo "\t[LD] boot.sys" + @echo " [LD] boot.sys" @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ -nostdlib -arch i386 -Wl,-pie \ -Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \ @@ -114,10 +114,10 @@ @${RM} $(SYMROOT)/${SYMBOLS_MODULE} @# Generate the Symbols.dylib file - @echo "\t[dyldsymboltool] Symbols.dylib" + @echo " [dyldsymboltool] Symbols.dylib" @$(SYMROOT)/dyldsymboltool $(SYMROOT)/boot.sys $(SYMROOT)/${SYMBOLS_MODULE} - @echo "\t[LD] boot.sys" + @echo " [LD] boot.sys" @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ -nostdlib -arch i386 -Wl,-pie \ -Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \ @@ -142,7 +142,7 @@ -o $(OBJROOT)/Symbols_LINKER_ONLY.dylib else - @echo "\t[LD] boot.sys" + @echo " [LD] boot.sys" @$(CC) -Wl,-preload -Wl,-alias,boot2,start \ -nostdlib -arch i386 -Wl,-pie \ -Wl,-segaddr,__INIT,`echo obase=16\; $$((0x${BOOT2ADDR})) | bc` \ @@ -155,7 +155,7 @@ endif - @echo "\t[MACHOCONV] boot" + @echo " [MACHOCONV] boot" @$(SYMROOT)/machOconv ${SYMROOT}/$@.sys $(SYMROOT)/$@ &> /dev/null @( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ @@ -190,7 +190,7 @@ @echo "" >> $(SYMROOT)/art.h @echo "embeddedpng_t embeddedImages[] = {" >> $(SYMROOT)/art.h @cd $(SYMROOT)/embed && find . -name '*.png' | sort | cut -f 2 -d '/' | cut -f 1 -d '.' | \ - awk '{ printf "\t{.name = \"%s\", .pngdata = __%s_png, .length = &__%s_png_len},\n", $$1, $$1, $$1 }' >> $(SYMROOT)/art.h + awk '{ printf " {.name = \"%s\", .pngdata = __%s_png, .length = &__%s_png_len},\n", $$1, $$1, $$1 }' >> $(SYMROOT)/art.h @echo "};" >> $(SYMROOT)/art.h @echo "#endif /* !__BOOT2_ART_H */" >> $(SYMROOT)/art.h ;\ @@ -204,7 +204,7 @@ clean-local: @for o in $(SYMROOT)/boot $(SYMROOT)/boot.sys $(SYMROOT)/embedded.h $(OBJROOT)/Symbols_LINKER_ONLY.dylib; do \ - if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done - @if [ -d "$(OBJROOT)" ];then echo "\t[RM] all objects in $(OBJROOT)"; fi + if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done + @if [ -d "$(OBJROOT)" ];then echo " [RM] all objects in $(OBJROOT)"; fi @rm -f $(SYMROOT)/boot $(SYMROOT)/boot.sys $(SYMROOT)/embedded.h $(OBJS) @rm -rf $(OBJROOT) Index: branches/chucko/i386/boot2/boot.c =================================================================== --- branches/chucko/i386/boot2/boot.c (revision 2453) +++ branches/chucko/i386/boot2/boot.c (revision 2454) @@ -91,8 +91,6 @@ long gBootMode; /* defaults to 0 == kBootModeNormal */ BVRef bvr, menuBVR, bvChain; -static bool checkOSVersion(const char * version); -static void getOSVersion(); static unsigned long Adler32(unsigned char *buffer, long length); //static void selectBiosDevice(void); @@ -168,7 +166,8 @@ clearActivityIndicator(); - if (gErrors) { + if (gErrors) + { printf("Errors encountered while starting up the computer.\n"); printf("Pausing %d seconds...\n", kBootErrorTimeout); sleep(kBootErrorTimeout); @@ -178,15 +177,18 @@ // Cleanup the PXE base code. - if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) { - if ( (ret = nbpUnloadBaseCode()) != nbpStatusSuccess ) { + if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) + { + if ( (ret = nbpUnloadBaseCode()) != nbpStatusSuccess ) + { printf("nbpUnloadBaseCode error %d\n", (int) ret); sleep(2); } } bool dummyVal; - if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->chameleonConfig) && dummyVal) { + if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->chameleonConfig) && dummyVal) + { showTextBuffer(msgbuf, strlen(msgbuf)); } @@ -195,9 +197,12 @@ // If we were in text mode, switch to graphics mode. // This will draw the boot graphics unless we are in // verbose mode. - if (gVerboseMode) { + if (gVerboseMode) + { setVideoMode( GRAPHICS_MODE, 0 ); - } else { + } + else + { drawBootGraphics(); } @@ -209,9 +214,16 @@ finalizeBootStruct(); // Jump to kernel's entry point. There's no going back now. - if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9"))) + if (TIGER || LEOPARD || SNOW_LEOPARD) { + // Notify modules that the kernel is about to be started + execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgsPreLion, NULL, NULL); + startprog( kernelEntry, bootArgsPreLion ); + + } + else + { // Notify modules that the kernel is about to be started execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL); @@ -220,11 +232,6 @@ outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */ startprog( kernelEntry, bootArgs ); - } else { - // Notify modules that the kernel is about to be started - execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgsPreLion, NULL, NULL); - - startprog( kernelEntry, bootArgsPreLion ); } // Not reached @@ -254,13 +261,18 @@ strlcpy(kernelCacheFile, cacheFile, sizeof(kernelCacheFile)); verbose("Specified kernel cache file path = %s\n", cacheFile); } else { - // Lion, Mountain Lion and Mavericks prelink kernel cache file - if ((checkOSVersion("10.7")) || (checkOSVersion("10.8")) || (checkOSVersion("10.9"))) + // Leopard prelink kernel cache file + if (TIGER || LEOPARD) { - snprintf(kernelCacheFile, sizeof(kernelCacheFile), "%skernelcache", kDefaultCachePathSnow); - verbose("10.7, 10.8 & 10.9 kernel cache file path = %s\n", kernelCacheFile); } + // Reset cache name. + bzero(gCacheNameAdler + 64, sizeof(gCacheNameAdler) - 64); + snprintf(gCacheNameAdler + 64, sizeof(gCacheNameAdler) - 64, "%s,%s", gRootDevice, bootInfo->bootFile); + adler32 = Adler32((unsigned char *)gCacheNameAdler, sizeof(gCacheNameAdler)); + snprintf(kernelCacheFile, sizeof(kernelCacheFile), "%s.%08lX", kDefaultCachePathLeo, adler32); + verbose("Reseted kernel cache file path = %s\n", kernelCacheFile); + } // Snow Leopard prelink kernel cache file - else if (checkOSVersion("10.6")) { + else if ( SNOW_LEOPARD ) { snprintf(kernelCacheFile, sizeof(kernelCacheFile), "kernelcache_%s", (archCpuType == CPU_TYPE_I386) ? "i386" : "x86_64"); @@ -283,14 +295,10 @@ } closedir(cacheDir); } else { - // Reset cache name. - bzero(gCacheNameAdler + 64, sizeof(gCacheNameAdler) - 64); - snprintf(gCacheNameAdler + 64, sizeof(gCacheNameAdler) - 64, - "%s,%s", - gRootDevice, bootInfo->bootFile); - adler32 = Adler32((unsigned char *)gCacheNameAdler, sizeof(gCacheNameAdler)); - snprintf(kernelCacheFile, sizeof(kernelCacheFile), "%s.%08lX", kDefaultCachePathLeo, adler32); - verbose("Reseted kernel cache file path = %s\n", kernelCacheFile); + // Lion, Mountain Lion, Mavericks, and Yosemite prelink kernel cache file + // for 10.7 10.8 10.9 10.10 + snprintf(kernelCacheFile, sizeof(kernelCacheFile), "%skernelcache", kDefaultCachePathSnow); + verbose("10.7, 10.8, 10.9 & 10.10 kernel cache file path = %s\n", kernelCacheFile); } } @@ -298,32 +306,44 @@ ret = -1; // If boot from a boot helper partition check the kernel cache file on it - if (gBootVolume->flags & kBVFlagBooter) { + if (gBootVolume->flags & kBVFlagBooter) + { snprintf(kernelCachePath, sizeof(kernelCachePath), "com.apple.boot.P%s", kernelCacheFile); ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime); - if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { + + if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) + { snprintf(kernelCachePath, sizeof(kernelCachePath), "com.apple.boot.R%s", kernelCacheFile); ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime); - if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { + + if ((ret == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) + { snprintf(kernelCachePath, sizeof(kernelCachePath), "com.apple.boot.S%s", kernelCacheFile); ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime); - if ((flags & kFileTypeMask) != kFileTypeFlat) { + + if ((flags & kFileTypeMask) != kFileTypeFlat) + { ret = -1; } } } } + // If not found, use the original kernel cache path. - if (ret == -1) { + if (ret == -1) + { strlcpy(kernelCachePath, kernelCacheFile, sizeof(kernelCachePath)); ret = GetFileInfo(NULL, kernelCachePath, &flags, &cachetime); - if ((flags & kFileTypeMask) != kFileTypeFlat) { + + if ((flags & kFileTypeMask) != kFileTypeFlat) + { ret = -1; } } // Exit if kernel cache file wasn't found - if (ret == -1) { + if (ret == -1) + { DBG("No Kernel Cache File '%s' found\n", kernelCacheFile); return -1; } @@ -333,21 +353,18 @@ ret = GetFileInfo(NULL, bootInfo->bootFile, &flags, &kerneltime); // Check if the kernel file is more recent than the cache file - if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat) - && (kerneltime > cachetime)) + if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat) && (kerneltime > cachetime)) { - DBG("Kernel file (%s) is more recent than Kernel Cache (%s)! Ignoring Kernel Cache.\n", - bootInfo->bootFile, kernelCacheFile); + DBG("Kernel file (%s) is more recent than Kernel Cache (%s)! Ignoring Kernel Cache.\n", bootInfo->bootFile, kernelCacheFile); return -1; } ret = GetFileInfo("/System/Library/", "Extensions", &flags, &exttime); + // Check if the S/L/E directory time is more recent than the cache file - if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory) - && (exttime > cachetime)) + if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory) && (exttime > cachetime)) { - DBG("Folder: '/System/Library/Extensions' is more recent than Kernel Cache file (%s)! Ignoring Kernel Cache.\n", - kernelCacheFile); + DBG("Folder: '/System/Library/Extensions' is more recent than Kernel Cache file (%s)! Ignoring Kernel Cache.\n", kernelCacheFile); return -1; } @@ -426,12 +443,14 @@ // Load boot.plist config file status = loadChameleonConfig(&bootInfo->chameleonConfig, bvChain); - if (getBoolForKey(kQuietBootKey, &quiet, &bootInfo->chameleonConfig) && quiet) { + if (getBoolForKey(kQuietBootKey, &quiet, &bootInfo->chameleonConfig) && quiet) + { gBootMode |= kBootModeQuiet; } // Override firstRun to get to the boot menu instantly by setting "Instant Menu"=y in system config - if (getBoolForKey(kInstantMenuKey, &instantMenu, &bootInfo->chameleonConfig) && instantMenu) { + if (getBoolForKey(kInstantMenuKey, &instantMenu, &bootInfo->chameleonConfig) && instantMenu) + { firstRun = false; } @@ -442,29 +461,31 @@ gEnableCDROMRescan = false; // Enable it with Rescan=y in system config - if (getBoolForKey(kRescanKey, &gEnableCDROMRescan, &bootInfo->chameleonConfig) - && gEnableCDROMRescan) { + if (getBoolForKey(kRescanKey, &gEnableCDROMRescan, &bootInfo->chameleonConfig) && gEnableCDROMRescan) + { gEnableCDROMRescan = true; } // Ask the user for Rescan option by setting "Rescan Prompt"=y in system config. rescanPrompt = false; - if (getBoolForKey(kRescanPromptKey, &rescanPrompt , &bootInfo->chameleonConfig) - && rescanPrompt && biosDevIsCDROM(gBIOSDev)) + if (getBoolForKey(kRescanPromptKey, &rescanPrompt , &bootInfo->chameleonConfig) && rescanPrompt && biosDevIsCDROM(gBIOSDev)) { gEnableCDROMRescan = promptForRescanOption(); } // Enable touching a single BIOS device only if "Scan Single Drive"=y is set in system config. - if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->chameleonConfig) - && gScanSingleDrive) { + if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->chameleonConfig) && gScanSingleDrive) + { gScanSingleDrive = true; } // Create a list of partitions on device(s). - if (gScanSingleDrive) { + if (gScanSingleDrive) + { scanBootVolumes(gBIOSDev, &bvCount); - } else { + } + else + { scanDisks(gBIOSDev, &bvCount); } @@ -553,9 +574,6 @@ updateVRAM(); } - // Find out which version mac os we're booting. - getOSVersion(); - if (platformCPUFeature(CPU_FEATURE_EM64T)) { archCpuType = CPU_TYPE_X86_64; } else { @@ -673,7 +691,17 @@ // bootFile must start with a / if it not start with a device name if (!bootFileWithDevice && (bootInfo->bootFile)[0] != '/') { - snprintf(bootFile, sizeof(bootFile), "/%s", bootInfo->bootFile); // append a leading / + if (!YOSEMITE) + { + //printf(HEADER " (%s).\n", bootInfo->bootFile); + snprintf(bootFile, sizeof(bootFile), "/%s", bootInfo->bootFile); // append a leading / + //sleep(1); + } else { + + //printf(HEADER " (%s).\n", bootInfo->bootFile); + snprintf(bootFile, sizeof(bootFile), kDefaultKernelPathForYos"%s", bootInfo->bootFile); // Yosemite + //sleep(1); + } } else { strlcpy(bootFile, bootInfo->bootFile, sizeof(bootFile)); } @@ -720,7 +748,8 @@ printf("Can't find %s\n", bootFile); sleep(1); - if (gBootFileType == kNetworkDeviceType) { + if (gBootFileType == kNetworkDeviceType) + { // Return control back to PXE. Don't unload PXE base code. gUnloadPXEOnExit = false; break; @@ -769,15 +798,16 @@ bool checkOSVersion(const char * version) { - return ((gMacOSVersion[0] == version[0]) && (gMacOSVersion[1] == version[1]) - && (gMacOSVersion[2] == version[2]) && (gMacOSVersion[3] == version[3])); + if ( (sizeof(version) > 4) && (version[3] == '1') ) { + return ((gMacOSVersion[0] == version[0]) && (gMacOSVersion[1] == version[1]) + && (gMacOSVersion[2] == version[2]) && (gMacOSVersion[3] == version[3]) + && (gMacOSVersion[4] == version[4])); + } else { + return ((gMacOSVersion[0] == version[0]) && (gMacOSVersion[1] == version[1]) + && (gMacOSVersion[2] == version[2]) && (gMacOSVersion[3] == version[3])); + } } -static void getOSVersion() -{ - strncpy(gMacOSVersion, gBootVolume->OSVersion, sizeof(gMacOSVersion)); -} - #define BASE 65521L /* largest prime smaller than 65536 */ #define NMAX 5000 // NMAX (was 5521) the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 Index: branches/chucko/i386/boot2/boot2.s =================================================================== --- branches/chucko/i386/boot2/boot2.s (revision 2453) +++ branches/chucko/i386/boot2/boot2.s (revision 2454) @@ -153,7 +153,7 @@ # cannot do that and have GRUB find it because GRUB only searches the first # 8k of the binary. Since __TEXT,__const follows __TEXT,__text (the code # section) and since the code is well over 8k long, it doesn't work. -.align 2, 0x90 # Make sure we're on a 4-byte boundary. Required by Multiboot. +.align 4, 0x90 # Make sure we're on a 4-byte boundary. Required by Multiboot. _multiboot_header: # magic (NOTE: this shows up as 02b0 ad1b in a hex dump) .long MULTIBOOT_HEADER_MAGIC @@ -176,7 +176,7 @@ nop nop nop -.align 3, 0x90 # Align to 8 byte boundary which should be enough nops +.align 8, 0x90 # Align to 8 byte boundary which should be enough nops # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _multiboot_entry: @@ -276,7 +276,7 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # _continue_at_low_address does some trickery to get the caller running from the low address with the right selector .globl _continue_at_low_address - .align 2, 0x90 + .align 4, 0x90 _continue_at_low_address: # Our stack frame has been set up with the return address on top # First, fix that to be 1 MB lower @@ -325,7 +325,7 @@ # We aren't using it right now so it's in an if 0 block. #if 0 .globl _cause_crash - .align 2, 0x90 + .align 4, 0x90 _cause_crash: # Cause a crash, there is no GDT selector f0 jmp $0xf0,$0 @@ -338,7 +338,7 @@ # See the comments above as to why we have OFFSET_1MEG. //.data .section __INIT,__data // turbo - .align 2, 0x90 + .align 4, 0x90 _Gdtr_high: .word GDTLIMIT .long vtop(_Gdt + OFFSET_1MEG) Index: branches/chucko/i386/boot2/boot.h =================================================================== --- branches/chucko/i386/boot2/boot.h (revision 2453) +++ branches/chucko/i386/boot2/boot.h (revision 2454) @@ -28,11 +28,21 @@ #define __BOOT2_BOOT_H #include "libsaio.h" + +// OS X Versions +#define YOSEMITE checkOSVersion("10.10") // Yosemite +#define MAVERICKS checkOSVersion("10.9") // Mavericks +#define MOUNTAIN_LION checkOSVersion("10.8") // Mountain Lion +#define LION checkOSVersion("10.7") // Lion +#define SNOW_LEOPARD checkOSVersion("10.6") // Snow Leopard +#define LEOPARD checkOSVersion("10.5") // Leopard +#define TIGER checkOSVersion("10.4") // Tiger + /* * Paths used by chameleon */ -//kernel cache +// kernel cache #define kDefaultCachePathLeo "/System/Library/Caches/com.apple.kernelcaches/" #define kDefaultCachePathSnow "/System/Library/Caches/com.apple.kext.caches/Startup/" @@ -44,6 +54,10 @@ #define kMLionInstallerDataFolder "/OS X Install Data/" #define kMLionInstallerPlist kMLionInstallerDataFolder "com.apple.Boot.plist" +//kernel path +#define kDefaultKernelPathPreYos "/" +#define kDefaultKernelPathForYos "/System/Library/Kernels/" //for Yosemite + /* * Keys used in system Boot.plist */ @@ -70,9 +84,10 @@ #define kScanSingleDriveKey "Scan Single Drive" #define kInstantMenuKey "Instant Menu" #define kDefaultKernel "mach_kernel" +#define kOSXKernel "kernel" // Yosemite #define kGUIKey "GUI" #define kBootBannerKey "Boot Banner" -#define kShowInfoKey "ShowInfo" // gui.c +#define kShowInfoKey "ShowInfo" /* gui.c */ #define kWaitForKeypressKey "Wait" /* AsereBLN: added these keys */ @@ -88,7 +103,7 @@ #define kHidePartition "Hide Partition" /* disk.c */ #define kRenamePartition "Rename Partition" /* disk.c */ #define kSMBIOSKey "SMBIOS" /* fake_efi.c */ -#define kSystemID "SystemId" /* fake_efi.c */ +//#define kSystemID "SystemId" /* fake_efi.c */ #define kSystemType "SystemType" /* fake_efi.c */ #define kUseNvidiaROM "UseNvidiaROM" /* nvidia.c */ #define kVBIOS "VBIOS" /* nvidia.c && ati.c */ @@ -314,4 +329,6 @@ /* bmdecompress.c */ void * DecompressData(void *srcbase, int *dw, int *dh, int *bytesPerPixel); +bool checkOSVersion(const char * version); + #endif /* !__BOOT2_BOOT_H */ Index: branches/chucko/i386/boot2/modules.c =================================================================== --- branches/chucko/i386/boot2/modules.c (revision 2453) +++ branches/chucko/i386/boot2/modules.c (revision 2454) @@ -105,6 +105,11 @@ long flags; u_int32_t time; struct dirstuff* moduleDir = opendir("/Extra/modules/"); + if(!moduleDir) + { + verbose("Warning: Unable to open modules folder at '/Extra/modules/'. Ingoring modules.\n"); + return; + } while (readdir(moduleDir, (const char**)&name, &flags, &time) >= 0) { if(strcmp(&name[strlen(name) - sizeof("dylib")], ".dylib") == 0) { char* tmp = malloc(strlen(name) + 1); @@ -121,6 +126,7 @@ } } + closedir(moduleDir); } @@ -282,6 +288,11 @@ //DBG("External symbol %s located at 0x%X\n", name, entry->addr); return entry->addr; } + else if(strcmp(entry->symbol, name + 1) == 0 && *name == '_') // Allow _strstr to bing to strstr, etc + { + //DBG("External symbol %s located at 0x%X\n", name, entry->addr); + return entry->addr; + } else { entry = entry->next; Index: branches/chucko/i386/boot2/gui.c =================================================================== --- branches/chucko/i386/boot2/gui.c (revision 2453) +++ branches/chucko/i386/boot2/gui.c (revision 2454) @@ -44,6 +44,8 @@ iDeviceGeneric_o, iDeviceHFS, iDeviceHFS_o, + iDeviceHFS_yos, + iDeviceHFS_yos_o, iDeviceHFS_mav, iDeviceHFS_mav_o, iDeviceHFS_ML, @@ -59,6 +61,8 @@ iDeviceHFSRAID, iDeviceHFSRAID_o, + iDeviceHFSRAID_yos, + iDeviceHFSRAID_yos_o, iDeviceHFSRAID_mav, iDeviceHFSRAID_mav_o, iDeviceHFSRAID_ML, @@ -126,6 +130,8 @@ {.name = "device_generic_o", .image = NULL}, {.name = "device_hfsplus", .image = NULL}, {.name = "device_hfsplus_o", .image = NULL}, + {.name = "device_hfsplus_yos", .image = NULL}, + {.name = "device_hfsplus_yos_o", .image = NULL}, {.name = "device_hfsplus_mav", .image = NULL}, {.name = "device_hfsplus_mav_o", .image = NULL}, {.name = "device_hfsplus_ml", .image = NULL}, @@ -141,6 +147,8 @@ {.name = "device_hfsraid", .image = NULL}, {.name = "device_hfsraid_o", .image = NULL}, + {.name = "device_hfsraid_yos", .image = NULL}, + {.name = "device_hfsraid_yos_o", .image = NULL}, {.name = "device_hfsraid_mav", .image = NULL}, {.name = "device_hfsraid_mav_o", .image = NULL}, {.name = "device_hfsraid_ml", .image = NULL}, @@ -358,6 +366,8 @@ LOADPNG(device_generic_o, iDeviceGeneric); LOADPNG(device_hfsplus, iDeviceGeneric); LOADPNG(device_hfsplus_o, iDeviceHFS); + LOADPNG(device_hfsplus_yos, iDeviceHFS); + LOADPNG(device_hfsplus_yos_o, iDeviceHFS_yos); LOADPNG(device_hfsplus_mav, iDeviceHFS); LOADPNG(device_hfsplus_mav_o, iDeviceHFS_mav); LOADPNG(device_hfsplus_ml, iDeviceHFS); @@ -373,6 +383,8 @@ LOADPNG(device_hfsraid, iDeviceHFS); LOADPNG(device_hfsraid_o, iDeviceHFSRAID); + LOADPNG(device_hfsraid_yos, iDeviceHFSRAID); + LOADPNG(device_hfsraid_yos_o, iDeviceHFSRAID_yos); LOADPNG(device_hfsraid_mav, iDeviceHFSRAID); LOADPNG(device_hfsraid_mav_o, iDeviceHFSRAID_mav); LOADPNG(device_hfsraid_ml, iDeviceHFSRAID); @@ -984,6 +996,15 @@ case '4': devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_Tiger : iDeviceHFS_Tiger); break; + case '1': + if (device->OSVersion[4] == '0') { // 10.10 + devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_yos : iDeviceHFS_yos); + break; + } + //if (device->OSVersion[4] == '1') { // 10.11 + // devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID_??? : iDeviceHFS_???); + // break; + //} default: devicetype = (device->flags & kBVFlagBooter ? iDeviceHFSRAID : iDeviceHFS); break; Index: branches/chucko/i386/boot2/modules_support.s =================================================================== --- branches/chucko/i386/boot2/modules_support.s (revision 2453) +++ branches/chucko/i386/boot2/modules_support.s (revision 2454) @@ -3,8 +3,8 @@ LABEL(dyld_stub_binder) jmp _dyld_stub_binder - + LABEL(dyld_void_start) ret -#endif \ No newline at end of file +#endif Index: branches/chucko/i386/boot2/appleClut8.h =================================================================== --- branches/chucko/i386/boot2/appleClut8.h (revision 2453) +++ branches/chucko/i386/boot2/appleClut8.h (revision 2454) @@ -2,7 +2,7 @@ * 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 @@ -10,7 +10,7 @@ * 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, @@ -18,7 +18,7 @@ * 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@ */ @@ -31,62 +31,77 @@ 0xbc,0xbc,0xbc, 0xff,0xff,0x00, 0xba,0xba,0xba, 0xb9,0xb9,0xb9, 0xb8,0xb8,0xb8, 0xb7,0xb7,0xb7, 0xb6,0xb6,0xb6, 0xb5,0xb5,0xb5, 0xb4,0xb4,0xb4, 0xb3,0xb3,0xb3, 0xb2,0xb2,0xb2, 0x00,0x00,0x00, + 0xb1,0xb1,0xb1, 0xb0,0xb0,0xb0, 0xaf,0xaf,0xaf, 0xae,0xae,0xae, 0xad,0xad,0xad, 0xac,0xac,0xac, 0xab,0xab,0xab, 0xaa,0xaa,0xaa, 0xff,0x00,0xff, 0xa9,0xa9,0xa9, 0xa8,0xa8,0xa8, 0xa7,0xa7,0xa7, 0xa6,0xa6,0xa6, 0xa5,0xa5,0xa5, 0xa4,0xa4,0xa4, 0xa3,0xa3,0xa3, + 0xa2,0xa2,0xa2, 0xa1,0xa1,0xa1, 0xa0,0xa0,0xa0, 0xff,0x00,0x00, 0x9f,0x9f,0x9f, 0x9e,0x9e,0x9e, 0x9d,0x9d,0x9d, 0x9c,0x9c,0x9c, 0x9b,0x9b,0x9b, 0x9a,0x9a,0x9a, 0xcc,0xcc,0xff, 0xcc,0xcc,0xcc, 0x99,0x99,0x99, 0x98,0x98,0x98, 0x97,0x97,0x97, 0x96,0x96,0x96, + 0x95,0x95,0x95, 0x94,0x94,0x94, 0x93,0x93,0x93, 0x92,0x92,0x92, 0x91,0x91,0x91, 0x90,0x90,0x90, 0x8f,0x8f,0x8f, 0x8e,0x8e,0x8e, 0x8d,0x8d,0x8d, 0x8c,0x8c,0x8c, 0x8b,0x8b,0x8b, 0x8a,0x8a,0x8a, - 0x89,0x89,0x89, 0x87,0x87,0x87, 0x86,0x86,0x86, 0x85,0x85,0x85, + 0x89,0x89,0x89, 0x88,0x88,0x88, 0x86,0x86,0x86, 0x85,0x85,0x85, + 0x84,0x84,0x84, 0x83,0x83,0x83, 0x82,0x82,0x82, 0x81,0x81,0x81, 0x80,0x80,0x80, 0x7f,0x7f,0x7f, 0x7e,0x7e,0x7e, 0x7d,0x7d,0x7d, 0x7c,0x7c,0x7c, 0x7b,0x7b,0x7b, 0x7a,0x7a,0x7a, 0x79,0x79,0x79, 0x78,0x78,0x78, 0x76,0x76,0x76, 0x75,0x75,0x75, 0x74,0x74,0x74, + 0x73,0x73,0x73, 0x72,0x72,0x72, 0x71,0x71,0x71, 0x70,0x70,0x70, 0x6f,0x6f,0x6f, 0x6e,0x6e,0x6e, 0x6d,0x6d,0x6d, 0x6c,0x6c,0x6c, 0x6b,0x6b,0x6b, 0x6a,0x6a,0x6a, 0x69,0x69,0x69, 0x68,0x68,0x68, 0x67,0x67,0x67, 0x66,0x66,0x66, 0x64,0x64,0x64, 0x63,0x63,0x63, + 0x62,0x62,0x62, 0x61,0x61,0x61, 0x60,0x60,0x60, 0x5f,0x5f,0x5f, 0x5e,0x5e,0x5e, 0x5d,0x5d,0x5d, 0x5c,0x5c,0x5c, 0x5b,0x5b,0x5b, 0x5a,0x5a,0x5a, 0x59,0x59,0x59, 0x58,0x58,0x58, 0x57,0x57,0x57, 0x56,0x56,0x56, 0x54,0x54,0x54, 0x53,0x53,0x53, 0x52,0x52,0x52, + 0x51,0x51,0x51, 0x50,0x50,0x50, 0x4f,0x4f,0x4f, 0x4e,0x4e,0x4e, 0x4d,0x4d,0x4d, 0x4c,0x4c,0x4c, 0x4b,0x4b,0x4b, 0x4a,0x4a,0x4a, 0x49,0x49,0x49, 0x48,0x48,0x48, 0x47,0x47,0x47, 0x46,0x46,0x46, 0x45,0x45,0x45, 0x43,0x43,0x43, 0x42,0x42,0x42, 0x41,0x41,0x41, + 0x40,0x40,0x40, 0x3f,0x3f,0x3f, 0x3e,0x3e,0x3e, 0x3d,0x3d,0x3d, 0x3c,0x3c,0x3c, 0x3b,0x3b,0x3b, 0x3a,0x3a,0x3a, 0x39,0x39,0x39, 0x38,0x38,0x38, 0x37,0x37,0x37, 0x36,0x36,0x36, 0x35,0x35,0x35, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0xff,0xff, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0xff,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0x00,0xff, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, - 0xdd,0x00,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0xd0,0x00,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0xbb,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0xbb,0xbb,0xbb, 0x65,0x65,0x65, 0x88,0x88,0x88, 0x77,0x77,0x77, 0x55,0x55,0x55, Index: branches/chucko/i386/boot2/options.c =================================================================== --- branches/chucko/i386/boot2/options.c (revision 2453) +++ branches/chucko/i386/boot2/options.c (revision 2454) @@ -1094,8 +1094,8 @@ bool copyArgument(const char *argName, const char *val, int cnt, char **argP, int *cntRemainingP) { - int argLen = argName ? strlen(argName) : 0; - int len = argLen + cnt + 1; // +1 to account for space + int argLen = argName ? strlen(argName) : 0; + int len = argLen + cnt + 1; // + 1 to account for space. if (argName) { @@ -1107,8 +1107,9 @@ return false; } - if (argName) { - strncpy( *argP, argName, argLen ); + if (argName) + { + strncpy(*argP, argName, argLen); *argP += argLen; *argP[0] = '='; (*argP)++; @@ -1118,8 +1119,8 @@ *argP += cnt; *argP[0] = ' '; (*argP)++; + *cntRemainingP -= len; - *cntRemainingP -= len; return true; } @@ -1201,6 +1202,9 @@ return -1; } + // Find out which version mac os we're booting. + strncpy(gMacOSVersion, gBootVolume->OSVersion, sizeof(gMacOSVersion)); + // Load config table specified by the user, or use the default. if (!getValueForBootKey(cp, "config", &val, &cnt)) { @@ -1225,18 +1229,46 @@ if (( kernel = extractKernelName((char **)&cp) )) { strlcpy( bootInfo->bootFile, kernel, sizeof(bootInfo->bootFile) ); - } else { + } + else + { if ( getValueForKey( kKernelNameKey, &val, &cnt, &bootInfo->bootConfig ) ) { strlcpy( bootInfo->bootFile, val, cnt+1 ); - } else { - strlcpy( bootInfo->bootFile, kDefaultKernel, sizeof(bootInfo->bootFile) ); } + else + { + if( YOSEMITE ) // is 10.10 + { + + strlcpy( bootInfo->bootFile, kOSXKernel, sizeof(bootInfo->bootFile) ); + //printf(HEADER "/System/Library/Kernels/%s\n", bootInfo->bootFile); + } + else + { // OSX is not 10.10 + + strlcpy( bootInfo->bootFile, kDefaultKernel, sizeof(bootInfo->bootFile) ); + //printf(HEADER "/%s\n", bootInfo->bootFile); + } + } } - if (strcmp( bootInfo->bootFile, kDefaultKernel ) != 0) + + if (!YOSEMITE) // not 10.10 so 10.9 and previus { - gOverrideKernel = true; + if (strcmp( bootInfo->bootFile, kDefaultKernel ) != 0) + { + //printf(HEADER "org.chameleon.Boot.plist found path for custom '%s' found!\n", bootInfo->bootFile); + gOverrideKernel = true; + } } + else + { // OSX is 10.10 + if (strcmp( bootInfo->bootFile, kOSXKernel ) != 0) + { + //printf(HEADER "org.chameleon.Boot.plist found path for custom '%s' found!\n", bootInfo->bootFile); + gOverrideKernel = true; + } + } cntRemaining = BOOT_STRING_LEN - 2; // save 1 for NULL, 1 for space argP = bootArgs->CommandLine; @@ -1300,12 +1332,16 @@ cnt++; strlcpy(valueBuffer + 1, val, cnt); val = valueBuffer; - } else { /* + } + else + { /* if (strlen(gBootUUIDString)) { val = "*uuid"; cnt = 5; - } else { */ + } + else + { */ // Don't set "rd=.." if there is no boot device key // and no UUID. val = ""; @@ -1380,7 +1416,9 @@ if ( getValueForKey( kMKextCacheKey, &val, &cnt, &bootInfo->bootConfig ) ) { strlcpy(gMKextName, val, cnt + 1); - } else { + } + else + { gMKextName[0]=0; } @@ -1470,9 +1508,12 @@ void showHelp(void) { - if (bootArgs->Video.v_display != VGA_TEXT_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) + { showInfoBox("Help. Press q to quit.\n", (char *)BootHelp_txt); - } else { + } + else + { showTextBuffer((char *)BootHelp_txt, BootHelp_txt_len); } } @@ -1484,14 +1525,16 @@ int fd; int size; - if ((fd = open_bvdev("bt(0,0)", filename, 0)) < 0) { + if ((fd = open_bvdev("bt(0,0)", filename, 0)) < 0) + { printf("\nFile not found: %s\n", filename); sleep(2); return; } size = file_size(fd); - if (size > MAX_TEXT_FILE_SIZE) { + if (size > MAX_TEXT_FILE_SIZE) + { size = MAX_TEXT_FILE_SIZE; } buf = malloc(size); @@ -1518,9 +1561,11 @@ printf("Enter two-digit hexadecimal boot device [%02x]: ", bootdevice); do { key = getchar(); - switch (ASCII_KEY(key)) { + switch (ASCII_KEY(key)) + { case KEY_BKSP: - if (digitsI > 0) { + if (digitsI > 0) + { int x, y, t; getCursorPositionAndType(&x, &y, &t); // Assume x is not 0; @@ -1529,7 +1574,9 @@ // Overwrite with space without moving cursor position putca(' ', 0x07, 1); digitsI--; - } else { + } + else + { // TODO: Beep or something } break; @@ -1537,7 +1584,8 @@ case KEY_ENTER: digits[digitsI] = '\0'; newbootdevice = strtol(digits, &end, 16); - if (end == digits && *end == '\0') { + if (end == digits && *end == '\0') + { // User entered empty string printf("\nUsing default boot device %x\n", bootdevice); key = 0; @@ -1552,10 +1600,13 @@ break; default: - if (isxdigit(ASCII_KEY(key)) && digitsI < 2) { + if (isxdigit(ASCII_KEY(key)) && digitsI < 2) + { putchar(ASCII_KEY(key)); digits[digitsI++] = ASCII_KEY(key); - } else { + } + else + { // TODO: Beep or something } break; @@ -1568,9 +1619,12 @@ bool promptForRescanOption(void) { printf("\nWould you like to enable media rescan option?\nPress ENTER to enable or any key to skip.\n"); - if (getchar() == KEY_ENTER) { + if (getchar() == KEY_ENTER) + { return true; - } else { + } + else + { return false; } } Index: branches/chucko/i386/config/confdata.c =================================================================== --- branches/chucko/i386/config/confdata.c (revision 2453) +++ branches/chucko/i386/config/confdata.c (revision 2454) @@ -13,6 +13,18 @@ #include #include +char * +int_stpncpy (dst, src, len) + char *dst; + const char *src; + size_t len; +{ + size_t n = strlen (src); + if (n > len) + n = len; + return strncpy (dst, src, len) + n; +} + #define LKC_DIRECT_LINK #include "lkc.h" @@ -101,7 +113,7 @@ char *name_ptr = name; size_t n = min(res_rem, src - in); - res_ptr = stpncpy(res_ptr, in, n); + res_ptr = int_stpncpy(res_ptr, in, n); if (!(res_rem -= n)) { return res_value; /* buffer full, quit now */ } @@ -118,7 +130,7 @@ symval = sym_get_string_value(sym); n = min(res_rem, strlen(symval)); - res_ptr = stpncpy(res_ptr, symval, n); + res_ptr = int_stpncpy(res_ptr, symval, n); if (!(res_rem -= n)) { return res_value; /* buffer full, quit now */ } Index: branches/chucko/i386/config/Makefile =================================================================== --- branches/chucko/i386/config/Makefile (revision 2453) +++ branches/chucko/i386/config/Makefile (revision 2454) @@ -33,11 +33,11 @@ all: $(DIRS_NEEDED) $(SYMPROG) $(SYMPROG): $(OBJS) - @echo "\t[LD32] $(@F)_32" + @echo " [LD32] $(@F)_32" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/*.o32 - @echo "\t[LD64] $(@F)_64" + @echo " [LD64] $(@F)_64" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/*.o64 - @echo "\t[LIPO] $(@F)" + @echo " [LIPO] $(@F)" @lipo -create -arch i386 $(SYMROOT)/$(@F)_32 -arch x86_64 $(SYMROOT)/$(@F)_64 -output $(SYMROOT)/$(@F) @$(RM) $(SYMROOT)/$(@F)_32 $(SYMROOT)/$(@F)_64 Index: branches/chucko/i386/config/textbox.c =================================================================== --- branches/chucko/i386/config/textbox.c (revision 2453) +++ branches/chucko/i386/config/textbox.c (revision 2454) @@ -320,7 +320,6 @@ */ static void print_line(WINDOW * win, int row, int width) { - int y, x; char *line; line = get_line(); @@ -329,9 +328,9 @@ waddch(win, ' '); waddnstr(win, line, MIN(strlen(line), width - 2)); - getyx(win, y, x); /* Clear 'residue' of previous line */ #if OLD_NCURSES + getyx(win, y, x); { int i; for (i = 0; i < width - x; i++) Index: branches/chucko/i386/modules/FileNVRAM/Makefile =================================================================== --- branches/chucko/i386/modules/FileNVRAM/Makefile (revision 2453) +++ branches/chucko/i386/modules/FileNVRAM/Makefile (revision 2454) @@ -13,7 +13,7 @@ include ../MakeInc.dir $(SYMROOT)/modules/$(MODULE_NAME).dylib: - @echo "\t[CP] $(MODULE_NAME).dylib" + @echo " [CP] $(MODULE_NAME).dylib" @cp $(MODULE_NAME).dylib $(SRCROOT)/sym/i386/modules/$(MODULE_NAME).dylib $(SRCROOT)/sym/i386/boot_modules.c: Index: branches/chucko/i386/modules/MakeInc.dir =================================================================== --- branches/chucko/i386/modules/MakeInc.dir (revision 2453) +++ branches/chucko/i386/modules/MakeInc.dir (revision 2454) @@ -105,10 +105,10 @@ ifeq ($(BUILT_IN),yes) $(SYMROOT)/modules/$(MODULE_NAME).dylib: $(MODULE_OBJS) $(MODULE_DEPENDENCIES) $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author Makefile - @echo "\t[LD] $(MODULE_NAME).dylib" + @echo " [LD] $(MODULE_NAME).dylib" @ld -arch i386 -undefined dynamic_lookup \ -dylib -read_only_relocs suppress \ - -S -x -Z -dead_strip_dylibs \ + -S -Z -dead_strip_dylibs \ -no_uuid \ -current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \ -final_output $(MODULE_NAME) \ @@ -121,7 +121,7 @@ else $(SYMROOT)/modules/$(MODULE_NAME).dylib: $(MODULE_OBJS) $(MODULE_DEPENDENCIES) $(OBJROOT)/$(MODULE_NAME).desc $(OBJROOT)/$(MODULE_NAME).author $(SRCROOT)/obj/i386/boot2/Symbols_LINKER_ONLY.dylib Makefile - @echo "\t[LD] $(MODULE_NAME).dylib" + @echo " [LD] $(MODULE_NAME).dylib" @ld -arch i386 \ -alias _$(MODULE_START) start \ @@ -143,22 +143,22 @@ clean-local: @if [ -f "$(SYMROOT)/modules/$(MODULE_NAME).dylib" ];then \ - echo "\t[RM] $(SYMROOT)/modules/$(MODULE_NAME).dylib";\ + echo " [RM] $(SYMROOT)/modules/$(MODULE_NAME).dylib";\ fi - @for o in $(MODULE_OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done + @for o in $(MODULE_OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done @rm -f $(SYMROOT)/modules/$(MODULE_NAME).dylib @rm -rf $(OBJROOT) ${SYMROOT}/modules/: - @echo "\t[MKDIR] $@" + @echo " [MKDIR] $@" @$(MKDIRS) $@ .PHONY: $(SRCROOT)/sym/i386/boot_modules.h .PHONY: $(SRCROOT)/sym/i386/boot_modules.c $(SRCROOT)/sym/i386/boot_modules.c: - @echo "\tstart_built_in_module(\"$(MODULE_NAME)\", \"$(MODULE_AUTHOR)\", \"$(MODULE_DESCRIPTION)\", 0, 0, &$(MODULE_START));" >> $@ + @echo " start_built_in_module(\"$(MODULE_NAME)\", \"$(MODULE_AUTHOR)\", \"$(MODULE_DESCRIPTION)\", 0, 0, &$(MODULE_START));" >> $@ $(SRCROOT)/sym/i386/boot_modules.h: @echo "void $(MODULE_START)(); // $(MODULE_NAME)" >> $@ Index: branches/chucko/i386/modules/klibc/Cconfig =================================================================== --- branches/chucko/i386/modules/klibc/Cconfig (revision 2453) +++ branches/chucko/i386/modules/klibc/Cconfig (revision 2454) @@ -4,7 +4,7 @@ config KLIBC_MODULE tristate "klibc Module" - default m + default n ---help--- Say Y here if you want to enable the use of this module. Index: branches/chucko/i386/modules/HDAEnabler/Makefile =================================================================== --- branches/chucko/i386/modules/HDAEnabler/Makefile (revision 2453) +++ branches/chucko/i386/modules/HDAEnabler/Makefile (revision 2454) @@ -13,7 +13,7 @@ include ../MakeInc.dir $(SYMROOT)/modules/$(MODULE_NAME).dylib: - @echo "\t[CP] $(MODULE_NAME).dylib" + @echo " [CP] $(MODULE_NAME).dylib" @cp $(MODULE_NAME).dylib $(SRCROOT)/sym/i386/modules/$(MODULE_NAME).dylib $(SRCROOT)/sym/i386/boot_modules.c: Index: branches/chucko/i386/modules/Keylayout/layouts/Makefile =================================================================== --- branches/chucko/i386/modules/Keylayout/layouts/Makefile (revision 2453) +++ branches/chucko/i386/modules/Keylayout/layouts/Makefile (revision 2454) @@ -28,13 +28,13 @@ all: $(DIRS_NEEDED) $(OBJROOT) $(SYMROOT) keymaps $(PROGRAMS): $(OBJS) - @echo "\t[LD32] $(@F)_32" + @echo " [LD32] $(@F)_32" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) $(INCLUDES) -arch i386 \ -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/$(@F).o32 - @echo "\t[LD64] $(@F)_64" + @echo " [LD64] $(@F)_64" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) $(INCLUDES) -arch x86_64 \ -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/$(@F).o64 - @echo "\t[LIPO] $(@F)" + @echo " [LIPO] $(@F)" @lipo -create -arch i386 $(SYMROOT)/$(@F)_32 -arch x86_64 $(SYMROOT)/$(@F)_64 \ -output $(SYMROOT)/$(@F) @$(RM) $(SYMROOT)/$(@F)_32 $(SYMROOT)/$(@F)_64 @@ -42,16 +42,16 @@ keymaps: $(KEYBOARD_LAYOUTS) $(KEYMAPSROOT)/%.lyt: $(LAYOUTS_SRC_DIR)/%.slt $(MKLAYOUT) - @echo "\t[LAYOUT] Creating keyboard layout: $*" + @echo " [LAYOUT] Creating keyboard layout: $*" @$(MKLAYOUT) -i $< -o $@ #.PHONY layouts clean-local: - @for o in $(OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done - @for p in $(PROGRAMS); do if [ -f "$${p}" ];then echo "\t[RM] $${p}"; fi; done - @for k in $(KEYBOARD_LAYOUTS); do if [ -f "$${k}" ];then echo "\t[RM] $${k}"; fi; done + @for o in $(OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done + @for p in $(PROGRAMS); do if [ -f "$${p}" ];then echo " [RM] $${p}"; fi; done + @for k in $(KEYBOARD_LAYOUTS); do if [ -f "$${k}" ];then echo " [RM] $${k}"; fi; done @$(RM) -f $(PROGRAMS) $(OBJS) distclean-local: - @if [ -d "$(KEYMAPSROOT)" ];then echo "\t[RMDIR] $(KEYMAPSROOT)"; fi + @if [ -d "$(KEYMAPSROOT)" ];then echo " [RMDIR] $(KEYMAPSROOT)"; fi @$(RM) -rf $(KEYMAPSROOT) Index: branches/chucko/i386/modules/KernelPatcher/Cconfig =================================================================== --- branches/chucko/i386/modules/KernelPatcher/Cconfig (revision 2453) +++ branches/chucko/i386/modules/KernelPatcher/Cconfig (revision 2454) @@ -6,5 +6,5 @@ bool "Kernel Patcher Module" default y ---help--- - Say Y here if you want to enable to use of this module. + Say Y here if you want to enable the use of this module. Index: branches/chucko/i386/modules/KernelPatcher/Makefile =================================================================== --- branches/chucko/i386/modules/KernelPatcher/Makefile (revision 2453) +++ branches/chucko/i386/modules/KernelPatcher/Makefile (revision 2454) @@ -13,7 +13,7 @@ include ../MakeInc.dir $(SYMROOT)/modules/$(MODULE_NAME).dylib: - @echo "\t[CP] $(MODULE_NAME).dylib" + @echo " [CP] $(MODULE_NAME).dylib" @cp $(MODULE_NAME).dylib $(SRCROOT)/sym/i386/modules/$(MODULE_NAME).dylib $(SRCROOT)/sym/i386/boot_modules.c: Index: branches/chucko/i386/modules/AcpiCodec/acpi_codec.c =================================================================== --- branches/chucko/i386/modules/AcpiCodec/acpi_codec.c (revision 2453) +++ branches/chucko/i386/modules/AcpiCodec/acpi_codec.c (revision 2454) @@ -196,8 +196,10 @@ return entry; \ } -__RES(pss, long) -/* __RES(cst, int) */ /* unused */ +__RES(pss, long) +#if UNUSED + __RES(cst, int) +#endif /* UNUSED */ static ACPI_TABLE_HEADER * get_new_table_in_list(U32 *new_table_list, U32 Signature, U8 *retIndex ) { Index: branches/chucko/i386/modules/AcpiCodec/Makefile =================================================================== --- branches/chucko/i386/modules/AcpiCodec/Makefile (revision 2453) +++ branches/chucko/i386/modules/AcpiCodec/Makefile (revision 2454) @@ -6,8 +6,8 @@ MODULE_START = $(MODULE_NAME)_start MODULE_DEPENDENCIES = -DIR = ACPICodec +DIR = AcpiCodec MODULE_OBJS = ACPICodec.o acpi_tools.o acpi_codec.o acpidecode.o acpicode.o -include ../MakeInc.dir \ No newline at end of file +include ../MakeInc.dir Index: branches/chucko/i386/modules/Makefile =================================================================== --- branches/chucko/i386/modules/Makefile (revision 2453) +++ branches/chucko/i386/modules/Makefile (revision 2454) @@ -11,7 +11,7 @@ include ${SRCROOT}/Make.rules # The order of building modules is important. -SUBDIRS = KernelPatcher +SUBDIRS = ifdef CONFIG_KLIBC_MODULE SUBDIRS += klibc @@ -25,6 +25,14 @@ SUBDIRS += Resolution endif +ifdef CONFIG_KERNELPATCHER_MODULE +SUBDIRS += KernelPatcher +endif + +ifdef CONFIG_KEXTPATCHER_MODULE +SUBDIRS += KextPatcher +endif + ifdef CONFIG_HELLOWORLD_MODULE SUBDIRS += HelloWorld endif @@ -45,10 +53,6 @@ SUBDIRS += FileNVRAM endif -#ifdef CONFIG_KEXTPATCHER_MODULE -#SUBDIRS += KextPatcher -#endif - #ifdef CONFIG_HDAENABLER_MODULE #SUBDIRS += HDAEnabler #endif Index: branches/chucko/i386/cdboot/Makefile =================================================================== --- branches/chucko/i386/cdboot/Makefile (revision 2453) +++ branches/chucko/i386/cdboot/Makefile (revision 2454) @@ -16,7 +16,7 @@ all embedtheme optionrom: $(DIRS_NEEDED) $(SYMROOT)/cdboot $(SYMROOT)/cdboot: - @echo "\t[NASM] cdboot.s" + @echo " [NASM] cdboot.s" @$(NASM) cdboot.s -o $(SYMROOT)/cdboot @dd if=$(SYMROOT)/boot of=$(SYMROOT)/cdboot conv=sync bs=2k seek=1 &> /dev/null @@ -26,5 +26,5 @@ | dd of=$(SYMROOT)/cdboot bs=1 count=4 seek=2044 conv=notrunc &> /dev/null clean-local: - @if [ -f "$(SYMROOT)/cdboot" ];then echo "\t[RM] $(SYMROOT)/cdboot"; fi + @if [ -f "$(SYMROOT)/cdboot" ];then echo " [RM] $(SYMROOT)/cdboot"; fi @rm -f $(SYMROOT)/cdboot Index: branches/chucko/i386/libsa/zalloc.c =================================================================== --- branches/chucko/i386/libsa/zalloc.c (revision 2453) +++ branches/chucko/i386/libsa/zalloc.c (revision 2454) @@ -57,7 +57,7 @@ static void zcoalesce(void); #if ZDEBUG -size_t zalloced_size; + size_t zalloced_size; #endif #define ZALLOC_NODES 32767 /* was 16384 */ @@ -78,7 +78,8 @@ zavailable = (zmem *) zalloc_base + sizeof(zmem) * totalNodes; zavailable[0].start = (char *)zavailable + sizeof(zmem) * totalNodes; - if (size == 0) { + if (size == 0) + { size = ZALLOC_LEN; } @@ -108,8 +109,10 @@ size = ((size + 0xf) & ~0xf); - if (size == 0) { - if (zerror) { + if (size == 0) + { + if (zerror) + { (*zerror)((char *)0xdeadbeef, 0, file, line); } } @@ -155,12 +158,14 @@ done: if ((ret == 0) || (ret + size >= zalloc_end)) { - if (zerror) { + if (zerror) + { (*zerror)(ret, size, file, line); } } - if (ret != 0) { + if (ret != 0) + { bzero(ret, size); } #if ZDEBUG @@ -186,7 +191,8 @@ rp = 0; #endif - if (!start) { + if (!start) + { return; } @@ -207,8 +213,10 @@ break; } } - if (!found) { - if (zerror) { + if (!found) + { + if (zerror) + { (*zerror)(pointer, rp, "free", 0); } else { return; @@ -218,7 +226,8 @@ zalloced_size -= tsize; #endif - for (i = 0; i < availableNodes; i++) { + for (i = 0; i < availableNodes; i++) + { if ((start + tsize) == zavailable[i].start) // merge it in { zavailable[i].start = start; @@ -227,15 +236,19 @@ return; } - if ((i > 0) && (zavailable[i-1].start + zavailable[i-1].size == start)) { + if ((i > 0) && (zavailable[i-1].start + zavailable[i-1].size == start)) + { zavailable[i-1].size += tsize; zcoalesce(); return; } - if ((start + tsize) < zavailable[i].start) { - if (++availableNodes > totalNodes) { - if (zerror) { + if ((start + tsize) < zavailable[i].start) + { + if (++availableNodes > totalNodes) + { + if (zerror) + { (*zerror)((char *)0xf000f000, 0, "free", 0); } } @@ -246,8 +259,10 @@ } } - if (++availableNodes > totalNodes) { - if (zerror) { + if (++availableNodes > totalNodes) + { + if (zerror) + { (*zerror)((char *)0xf000f000, 1, "free", 0); } } @@ -270,8 +285,10 @@ zalloced[allocedNodes].start = start; zalloced[allocedNodes].size = size; - if (++allocedNodes > totalNodes) { - if (zerror) { + if (++allocedNodes > totalNodes) + { + if (zerror) + { (*zerror)((char *)0xf000f000, 2, "zallocate", 0); } }; @@ -287,7 +304,8 @@ z1 = zp + i; z2 = z1 + 1; - for (; i >= ndx; i--, z1--, z2--) { + for (; i >= ndx; i--, z1--, z2--) + { *z2 = *z1; } } @@ -301,7 +319,8 @@ z1 = zp + ndx; z2 = z1 + 1; - for (i = ndx; i < totalNodes - 1; i++, z1++, z2++) { + for (i = ndx; i < totalNodes - 1; i++, z1++, z2++) + { *z1 = *z2; } } @@ -311,8 +330,10 @@ { int i; - for (i = 0; i < availableNodes-1; i++) { - if ( zavailable[i].start + zavailable[i].size == zavailable[i + 1].start ) { + for (i = 0; i < availableNodes-1; i++) + { + if ( zavailable[i].start + zavailable[i].size == zavailable[i + 1].start ) + { zavailable[i].size += zavailable[i + 1].size; zdelete(zavailable, i + 1); availableNodes--; return; Index: branches/chucko/i386/libsa/Makefile =================================================================== --- branches/chucko/i386/libsa/Makefile (revision 2453) +++ branches/chucko/i386/libsa/Makefile (revision 2454) @@ -36,17 +36,17 @@ $(LIBS): $(OBJS) - @echo "\t[RM] $@" + @echo " [RM] $@" @rm -f $@ - @echo "\t[AR] $(@F)" + @echo " [AR] $(@F)" @ar q $@ $^ &> /dev/null - @echo "\t[RANLIB] $(@F)" + @echo " [RANLIB] $(@F)" @ranlib $@ # dependencies -include $(OBJROOT)/Makedep clean-local: - @for o in $(OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done - @for l in $(LIBS); do if [ -f "$${l}" ];then echo "\t[RM] $${l}"; fi; done + @for o in $(OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done + @for l in $(LIBS); do if [ -f "$${l}" ];then echo " [RM] $${l}"; fi; done @rm -f $(LIBS) $(OBJS) Index: branches/chucko/i386/util/fdisk/Makefile =================================================================== --- branches/chucko/i386/util/fdisk/Makefile (revision 2453) +++ branches/chucko/i386/util/fdisk/Makefile (revision 2454) @@ -29,11 +29,11 @@ all: $(SYMROOT) $(OBJROOT) $(PROGRAM) $(PROGRAM): $(OBJS) - @echo "\t[LD32] $@_32" + @echo " [LD32] $@_32" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $@_32 $(filter %.o32,$^) - @echo "\t[LD64] $@_64" + @echo " [LD64] $@_64" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $@_64 $(filter %.o64,$^) - @echo "\t[LIPO] $@" + @echo " [LIPO] $@" @lipo -create -arch i386 $@_32 -arch x86_64 $@_64 -output $@ @rm $@_32 $@_64 @@ -48,6 +48,6 @@ -include $(OBJROOT)/Makedep clean-local: - @for p in $(PROGRAMS); do if [ -f "$${p}" ];then echo "\t[RM] $${p}"; fi; done - @for o in $(OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done + @for p in $(PROGRAMS); do if [ -f "$${p}" ];then echo " [RM] $${p}"; fi; done + @for o in $(OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done @rm -f $(PROGRAM) $(OBJS) Index: branches/chucko/i386/util/Makefile =================================================================== --- branches/chucko/i386/util/Makefile (revision 2453) +++ branches/chucko/i386/util/Makefile (revision 2454) @@ -12,14 +12,12 @@ IMGSKELROOT = $(SRCROOT)/imgskel CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot - DIR = util include ${SRCROOT}/Make.rules PROGRAMS = machOconv dyldsymboltool segsize OBJS = dyldsymboltool.o32 dyldsymboltool.o64 machOconv.o32 machOconv.o64 segsize.o32 segsize.o64 - ifeq (${CONFIG_BDMESG}, y) PROGRAMS += bdmesg OBJS += bdmesg.o32 bdmesg.o64 @@ -43,11 +41,11 @@ all: $(DIRS_NEEDED) $(SYMPROG) all-recursive $(SYMPROG): $(OBJS) - @echo "\t[LD32] $(@F)_32" + @echo " [LD32] $(@F)_32" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch i386 -o $(SYMROOT)/$(@F)_32 $(OBJROOT)/$(@F).o32 - @echo "\t[LD64] $(@F)_64" + @echo " [LD64] $(@F)_64" @$(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -arch x86_64 -o $(SYMROOT)/$(@F)_64 $(OBJROOT)/$(@F).o64 - @echo "\t[LIPO] $(@F)" + @echo " [LIPO] $(@F)" @lipo -create -arch i386 $(SYMROOT)/$(@F)_32 -arch x86_64 $(SYMROOT)/$(@F)_64 -output $(SYMROOT)/$(@F) @$(RM) $(SYMROOT)/$(@F)_32 $(SYMROOT)/$(@F)_64 @@ -55,6 +53,6 @@ -include $(OBJROOT)/Makedep clean-local: - @for o in $(OBJS); do if [ -f "$${o}" ];then echo "\t[RM] $${o}"; fi; done - @for p in $(SYMPROG); do if [ -f "$${p}" ];then echo "\t[RM] $${p}"; fi; done + @for o in $(OBJS); do if [ -f "$${o}" ];then echo " [RM] $${o}"; fi; done + @for p in $(SYMPROG); do if [ -f "$${p}" ];then echo " [RM] $${p}"; fi; done @rm -f $(SYMPROG) $(OBJS) Index: branches/chucko/artwork/themes/default/device_hfsplus_yos.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/chucko/artwork/themes/default/device_hfsplus_yos.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Index: branches/chucko/artwork/themes/default/device_hfsraid_yos_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/chucko/artwork/themes/default/device_hfsraid_yos_o.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Index: branches/chucko/artwork/themes/default/device_hfsplus_yos_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/chucko/artwork/themes/default/device_hfsplus_yos_o.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Index: branches/chucko/artwork/themes/default/device_hfsraid_yos.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/chucko/artwork/themes/default/device_hfsraid_yos.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Index: branches/chucko/package/Changes.txt =================================================================== --- branches/chucko/package/Changes.txt (revision 2453) +++ branches/chucko/package/Changes.txt (revision 2454) @@ -1,3 +1,5 @@ +- ErmaC - Auto increase year for pkg resource. + - JrCs - Add translation to the project. - ErmaC - Update Language for whobuild resources. Index: branches/chucko/package/bin/clean_po_headers.sh =================================================================== --- branches/chucko/package/bin/clean_po_headers.sh (revision 2453) +++ branches/chucko/package/bin/clean_po_headers.sh (revision 2454) @@ -10,7 +10,7 @@ lang=${pofile##*/} lang=${lang%.*} gsed -i 's/; charset=CHARSET/; charset=UTF-8/g' $pofile - gsed -i 's/^\"Project-Id-Version: PACKAGE VERSION/\"Project-Id-Version: Chameleon 2.2/' $pofile + gsed -i 's/^\"Project-Id-Version: PACKAGE VERSION/\"Project-Id-Version: Chameleon 2.3/' $pofile gsed -i "s/^\"Language:.*\"/\"Language: $lang\\\n\"/" $pofile gsed -i "s/^\"Language-Team:.*\"/\"Language-Team: $lang <$lang@li.org>\\\n\"/" $pofile done Index: branches/chucko/package/po/ar.po =================================================================== --- branches/chucko/package/po/ar.po (revision 2453) +++ branches/chucko/package/po/ar.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-04-26 18:34+0000\n" Index: branches/chucko/package/po/en.po =================================================================== --- branches/chucko/package/po/en.po (revision 2453) +++ branches/chucko/package/po/en.po (revision 2454) @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-26 01:37+0200\n" +"POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:14+0000\n" "Last-Translator: ErmaC \n" "Language-Team: en \n" Index: branches/chucko/package/po/bs.po =================================================================== --- branches/chucko/package/po/bs.po (revision 2453) +++ branches/chucko/package/po/bs.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2012-03-07 00:12-0000\n" Index: branches/chucko/package/po/cs.po =================================================================== --- branches/chucko/package/po/cs.po (revision 2453) +++ branches/chucko/package/po/cs.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.1svn-r1870\n" +"Project-Id-Version: Chameleon 2.3\n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:13+0000\n" "Last-Translator: ErmaC \n" Index: branches/chucko/package/po/mk.po =================================================================== --- branches/chucko/package/po/mk.po (revision 2453) +++ branches/chucko/package/po/mk.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-05-11 17:48-0000\n" Index: branches/chucko/package/po/es.po =================================================================== --- branches/chucko/package/po/es.po (revision 2453) +++ branches/chucko/package/po/es.po (revision 2454) @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-26 01:37+0200\n" +"POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2014-05-19 21:55+0000\n" "Last-Translator: Yllelder \n" "Language-Team: es \n" Index: branches/chucko/package/po/fr.po =================================================================== --- branches/chucko/package/po/fr.po (revision 2453) +++ branches/chucko/package/po/fr.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:14+0000\n" Index: branches/chucko/package/po/nl.po =================================================================== --- branches/chucko/package/po/nl.po (revision 2453) +++ branches/chucko/package/po/nl.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:05+0000\n" Index: branches/chucko/package/po/ko.po =================================================================== --- branches/chucko/package/po/ko.po (revision 2453) +++ branches/chucko/package/po/ko.po (revision 2454) @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:00+0000\n" Index: branches/chucko/package/po/hr.po =================================================================== --- branches/chucko/package/po/hr.po (revision 2453) +++ branches/chucko/package/po/hr.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-05-11 16:58-0000\n" Index: branches/chucko/package/po/pl.po =================================================================== --- branches/chucko/package/po/pl.po (revision 2453) +++ branches/chucko/package/po/pl.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-05-11 17:11-0000\n" Index: branches/chucko/package/po/it.po =================================================================== --- branches/chucko/package/po/it.po (revision 2453) +++ branches/chucko/package/po/it.po (revision 2454) @@ -4,7 +4,7 @@ # FIRST AUTHOR , YEAR. msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-06-26 01:37+0200\n" "PO-Revision-Date: 2014-07-25 10:44+0000\n" @@ -228,7 +228,7 @@ #: Resources/templates/Localizable.strings:4 #, no-wrap msgid "Chameleon Bootloader Package" -msgstr "Installazione di Chameleon" +msgstr "Chameleon" #. type: "ERROR_BOOTVOL" #: Resources/templates/Localizable.strings:9 Index: branches/chucko/package/po/hu.po =================================================================== --- branches/chucko/package/po/hu.po (revision 2453) +++ branches/chucko/package/po/hu.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2012-04-11 02:08-0000\n" Index: branches/chucko/package/po/chameleon.pot =================================================================== --- branches/chucko/package/po/chameleon.pot (revision 2453) +++ branches/chucko/package/po/chameleon.pot (revision 2454) @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2svn-r2395\n" +"Project-Id-Version: Chameleon 2.3\n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" Index: branches/chucko/package/po/ro.po =================================================================== --- branches/chucko/package/po/ro.po (revision 2453) +++ branches/chucko/package/po/ro.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2014-06-25 23:55+0000\n" Index: branches/chucko/package/po/ca.po =================================================================== --- branches/chucko/package/po/ca.po (revision 2453) +++ branches/chucko/package/po/ca.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:16+0000\n" Index: branches/chucko/package/po/pt.po =================================================================== --- branches/chucko/package/po/pt.po (revision 2453) +++ branches/chucko/package/po/pt.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2014-01-21 15:36+0000\n" Index: branches/chucko/package/po/pt-BR.po =================================================================== --- branches/chucko/package/po/pt-BR.po (revision 2453) +++ branches/chucko/package/po/pt-BR.po (revision 2454) @@ -5,11 +5,11 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" -"PO-Revision-Date: 2013-12-29 11:56+0000\n" -"Last-Translator: ErmaC \n" +"PO-Revision-Date: 2014-10-22 21:23+0000\n" +"Last-Translator: kyndder \n" "Language-Team: pt-BR \n" "Language: pt-BR\n" "MIME-Version: 1.0\n" @@ -17,7 +17,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Pootle 2.5.0-rc1\n" -"X-POOTLE-MTIME: 1388318218.0\n" +"X-POOTLE-MTIME: 1414013009.0\n" #. type: Content of:

#: Resources/templates/Welcome.html:22 @@ -703,7 +703,7 @@ #: Resources/templates/Localizable.strings:145 #, no-wrap msgid "Force SMBIOS Table 17 to be 27 bytes long." -msgstr "" +msgstr "Força a Tabela SMBIOS 17 a ter 27 bytes." #. type: "RestartFix_title" #: Resources/templates/Localizable.strings:147 @@ -1143,44 +1143,36 @@ #. type: "HDAULayoutIDx05_title" #: Resources/templates/Localizable.strings:261 #: Resources/templates/Localizable.strings:367 -#, fuzzy, no-wrap -#| msgid "LayoutID=65" +#, no-wrap msgid "LayoutID=5" -msgstr "LayoutID=65" +msgstr "LayoutID=5" #. type: "HDEFLayoutIDx05_description" #: Resources/templates/Localizable.strings:262 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDEF layout-it to 5:\n" "005 (0x05, 0x00, 0x00, 0x00)." msgstr "" -"Define HDEF layout-it para 1:\n" -"001 (0x01, 0x00, 0x00, 0x00)." +"Define HDEF layout-id para 5:\n" +"005 (0x05, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx07_title" #: Resources/templates/Localizable.strings:265 #: Resources/templates/Localizable.strings:371 -#, fuzzy, no-wrap -#| msgid "LayoutID=387" +#, no-wrap msgid "LayoutID=7" -msgstr "LayoutID=387" +msgstr "LayoutID=7" #. type: "HDEFLayoutIDx07_description" #: Resources/templates/Localizable.strings:266 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDEF layout-it to 7:\n" "007 (0x07, 0x00, 0x00, 0x00)." msgstr "" -"Define HDEF layout-it para 1:\n" -"001 (0x01, 0x00, 0x00, 0x00)." +"Define HDEF layout-id para 7:\n" +"007 (0x07, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx12_title" #: Resources/templates/Localizable.strings:269 @@ -1571,29 +1563,23 @@ #. type: "HDAULayoutIDx05_description" #: Resources/templates/Localizable.strings:368 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDAU layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDAU layout-it to 5:\n" "005 (0x05, 0x00, 0x00, 0x00)." msgstr "" -"Define HDAU layout-it para 1:\n" -"001 (0x01, 0x00, 0x00, 0x00)." +"Define HDAU layout-id para 5:\n" +"005 (0x05, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx07_description" #: Resources/templates/Localizable.strings:372 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDAU layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDAU layout-it to 7:\n" "007 (0x07, 0x00, 0x00, 0x00)." msgstr "" -"Define HDAU layout-it para 1:\n" -"001 (0x01, 0x00, 0x00, 0x00)." +"Define HDAU layout-id para 7:\n" +"007 (0x07, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx12_description" #: Resources/templates/Localizable.strings:376 @@ -2343,7 +2329,7 @@ #: Resources/templates/Localizable.strings:600 #, no-wrap msgid "Use the classic Nvidia name for the SystemProfiler (disabled by default)." -msgstr "" +msgstr "Usa o nome clássico Nvidia no System Profiler (desabilitado por padrão)." #. type: "Verbose_title" #: Resources/templates/Localizable.strings:606 @@ -2466,6 +2452,9 @@ #, no-wrap msgid "In Yosemite Developer Previews, unsigned or improperly signed kexts will not be loaded. To use unsigned kexts during development, this strict check can be disabled by adding a 'kext-dev-mode=1' boot arg." msgstr "" +"No Developer Preview do Yosemite, kexts Imprópriamente ou não assinadas não " +"serão carregadas. Para utilizar estes kexts durante o desenvolvimento, esta " +"verificação pode ser desabilitada adicionando o boot flag 'kext-dev-mode=1'." #. type: "Dart0_title" #: Resources/templates/Localizable.strings:638 Index: branches/chucko/package/po/sr.po =================================================================== --- branches/chucko/package/po/sr.po (revision 2453) +++ branches/chucko/package/po/sr.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-05-11 16:00-0000\n" Index: branches/chucko/package/po/fa.po =================================================================== --- branches/chucko/package/po/fa.po (revision 2453) +++ branches/chucko/package/po/fa.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.1svn-r1870\n" +"Project-Id-Version: Chameleon 2.3\n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2014-01-05 13:57+0000\n" "Last-Translator: minlite \n" Index: branches/chucko/package/po/ru.po =================================================================== --- branches/chucko/package/po/ru.po (revision 2453) +++ branches/chucko/package/po/ru.po (revision 2454) @@ -5,20 +5,20 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" -"PO-Revision-Date: 2013-06-27 21:13+0000\n" -"Last-Translator: ltodoto \n" +"PO-Revision-Date: 2014-10-22 21:21+0000\n" +"Last-Translator: SergeNu \n" "Language-Team: ru \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Pootle 2.5.0-rc1\n" -"X-POOTLE-MTIME: 1372367628.0\n" +"X-POOTLE-MTIME: 1414012891.0\n" #. type: Content of:

#: Resources/templates/Welcome.html:22 @@ -82,15 +82,15 @@ "evolved from the development of David Elliott's fake EFI implementation " "added to Apple's boot-132 project." msgstr "" -"Chameleon — начальный загрузчик, построенный на основе сочетания " -"компонентов, разработка которых была начата в рамках проекта Дэвида Эллиотта " -"(David Elliott) по эмуляции прикладного интерфейса EFI в качестве дополнения " -"к оригинальному проекту загрузчика Apple boot-132." +"Chameleon - загрузчик, построенный на основе сочетания компонентов, " +"разработка которых была начата в рамках проекта Дэвида Эллиотта (David " +"Elliott) по эмуляции прикладного интерфейса EFI в качестве дополнения к " +"оригинальному проекту загрузчика Apple boot-132." #. type: Content of:

#: Resources/templates/Description.html:20 msgid "Chameleon v2 is extended with many features. For example:" -msgstr "Chameleon v2 обладает широкими возможностями. В том числе:" +msgstr "Chameleon v2 обладает широкими возможностями. Например:" #. type: Content of:

#: Resources/templates/Description.html:22 @@ -260,7 +260,7 @@ #: Resources/templates/Localizable.strings:19 #, no-wrap msgid "Chameleon Bootloader" -msgstr "Начальный загрузчик Chameleon" +msgstr "Загрузчик Chameleon" #. type: "Chameleon_description" #: Resources/templates/Localizable.strings:20 @@ -287,7 +287,10 @@ #: Resources/templates/Localizable.strings:26 #, no-wrap msgid "Install Chameleon's files to the root of the selected partition using either boot0 or boot0md depending on your system without destroying any existing Windows installation if you have one." -msgstr "Обычная установка Chameleon" +msgstr "" +"Установка файлов Chameleon в корень выбранного раздела используя boot0 или " +"boot0md и основываясь на вашей системе, без уничтожения любой установленной " +"копии Windows, если таковая имеется." #. type: "noboot_title" #: Resources/templates/Localizable.strings:28 @@ -1113,40 +1116,36 @@ #. type: "HDAULayoutIDx05_title" #: Resources/templates/Localizable.strings:261 #: Resources/templates/Localizable.strings:367 -#, fuzzy, no-wrap -#| msgid "LayoutID=65" +#, no-wrap msgid "LayoutID=5" -msgstr "LayoutID=65" +msgstr "LayoutID=5" #. type: "HDEFLayoutIDx05_description" #: Resources/templates/Localizable.strings:262 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDEF layout-it to 5:\n" "005 (0x05, 0x00, 0x00, 0x00)." -msgstr "Установить 1 карту HDEF:001 (0x01, 0x00, 0x00, 0x00)." +msgstr "" +"Установить HDEF и расположить в 5:\n" +"005 (0x05, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx07_title" #: Resources/templates/Localizable.strings:265 #: Resources/templates/Localizable.strings:371 -#, fuzzy, no-wrap -#| msgid "LayoutID=387" +#, no-wrap msgid "LayoutID=7" -msgstr "LayoutID=387" +msgstr "LayoutID=7" #. type: "HDEFLayoutIDx07_description" #: Resources/templates/Localizable.strings:266 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDEF layout-it to 7:\n" "007 (0x07, 0x00, 0x00, 0x00)." -msgstr "Установить 1 карту HDEF:001 (0x01, 0x00, 0x00, 0x00)." +msgstr "" +"Установить HDEF и расположить в 7:\n" +"007 (0x07, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx12_title" #: Resources/templates/Localizable.strings:269 @@ -1464,6 +1463,8 @@ "Set HDEF layout-it to 1981:\n" "7BD (0xBD, 0x07, 0x00, 0x00)." msgstr "" +"Установить HDEF и расположить в 1981:\n" +"7BD (0xBD, 0x07, 0x00, 0x00)." #. type: "HDAULayoutIDx01_description" #: Resources/templates/Localizable.strings:356 @@ -1472,6 +1473,8 @@ "Set HDAU layout-it to 1:\n" "001 (0x01, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 1:\n" +"001 (0x01, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx02_description" #: Resources/templates/Localizable.strings:360 @@ -1480,6 +1483,8 @@ "Set HDAU layout-it to 2:\n" "002 (0x02, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 2:\n" +"002 (0x02, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx03_description" #: Resources/templates/Localizable.strings:364 @@ -1488,28 +1493,28 @@ "Set HDAU layout-it to 3:\n" "003 (0x03, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 3:\n" +"003 (0x03, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx05_description" #: Resources/templates/Localizable.strings:368 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDAU layout-it to 885:\n" -#| "375 (0x75, 0x03, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDAU layout-it to 5:\n" "005 (0x05, 0x00, 0x00, 0x00)." -msgstr "Установить значение HDAU layout-it равным 885" +msgstr "" +"Установить HDAU и расположить в 5:\n" +"005 (0x05, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx07_description" #: Resources/templates/Localizable.strings:372 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDAU layout-it to 7:\n" "007 (0x07, 0x00, 0x00, 0x00)." -msgstr "Установить 1 карту HDEF:001 (0x01, 0x00, 0x00, 0x00)." +msgstr "" +"Установить HDAU и расположить в 7:\n" +"007 (0x07, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx12_description" #: Resources/templates/Localizable.strings:376 @@ -1518,6 +1523,8 @@ "Set HDAU layout-it to 12:\n" "00C (0x0C, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 12:\n" +"00C (0x0C, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx32_description" #: Resources/templates/Localizable.strings:380 @@ -1526,6 +1533,8 @@ "Set HDAU layout-it to 32:\n" "020 (0x20, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 32:\n" +"020 (0x20, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx40_description" #: Resources/templates/Localizable.strings:384 @@ -1534,6 +1543,8 @@ "Set HDAU layout-it to 40:\n" "028 (0x28, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 40:\n" +"028 (0x28, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx65_description" #: Resources/templates/Localizable.strings:388 @@ -1542,6 +1553,8 @@ "Set HDAU layout-it to 65:\n" "041 (0x41, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 65:\n" +"041 (0x41, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx99_description" #: Resources/templates/Localizable.strings:392 @@ -1550,6 +1563,8 @@ "Set HDAU layout-it to 99:\n" "063 (0x63, 0x00, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 99:\n" +"063 (0x63, 0x00, 0x00, 0x00)." #. type: "HDAULayoutIDx269_description" #: Resources/templates/Localizable.strings:396 @@ -1558,6 +1573,8 @@ "Set HDAU layout-it to 269:\n" "10D (0x0D, 0x01, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 269:\n" +"10D (0x0D, 0x01, 0x00, 0x00)." #. type: "HDAULayoutIDx387_description" #: Resources/templates/Localizable.strings:400 @@ -1638,6 +1655,8 @@ "Set HDAU layout-it to 887:\n" "377 (0x77, 0x03, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 887:\n" +"377 (0x77, 0x03, 0x00, 0x00)." #. type: "HDAULayoutIDx888_description" #: Resources/templates/Localizable.strings:440 @@ -1646,6 +1665,8 @@ "Set HDAU layout-it to 888:\n" "378 (0x78, 0x03, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 888:\n" +"378 (0x78, 0x03, 0x00, 0x00)." #. type: "HDAULayoutIDx889_description" #: Resources/templates/Localizable.strings:444 @@ -1654,6 +1675,8 @@ "Set HDAU layout-it to 889:\n" "379 (0x79, 0x03, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 889:\n" +"379 (0x79, 0x03, 0x00, 0x00)." #. type: "HDAULayoutIDx892_description" #: Resources/templates/Localizable.strings:448 @@ -1662,6 +1685,8 @@ "Set HDAU layout-it to 892:\n" "37C (0x7C, 0x03, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 892:\n" +"37C (0x0C, 0x03, 0x00, 0x00)." #. type: "HDAULayoutIDx898_description" #: Resources/templates/Localizable.strings:452 @@ -1670,6 +1695,8 @@ "Set HDAU layout-it to 898:\n" "382 (0x82, 0x03, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 898:\n" +"382 (0x82, 0x03, 0x00, 0x00)." #. type: "HDAULayoutIDxBD7_description" #: Resources/templates/Localizable.strings:456 @@ -1678,6 +1705,8 @@ "Set HDAU layout-it to 1981:\n" "7BD (0xBD, 0x07, 0x00, 0x00)." msgstr "" +"Установить HDAU и расположить в 1981:\n" +"7BD (0xBD, 0x07, 0x00, 0x00)." #. type: "IntelCaprix00_title" #: Resources/templates/Localizable.strings:461 @@ -2218,6 +2247,8 @@ #, no-wrap msgid "Use the classic Nvidia name for the SystemProfiler (disabled by default)." msgstr "" +"Использовать классическое название Nvidia для профиля системы (по-умолчанию " +"отключено)." #. type: "Verbose_title" #: Resources/templates/Localizable.strings:606 @@ -2337,6 +2368,10 @@ #, no-wrap msgid "In Yosemite Developer Previews, unsigned or improperly signed kexts will not be loaded. To use unsigned kexts during development, this strict check can be disabled by adding a 'kext-dev-mode=1' boot arg." msgstr "" +"В версиях Yosemite для разработчиков, неподписанные или неправильно " +"подписанные кексты не будут загружены. Для того, чтобы использовать " +"неподписанные кексты для разработки можно отменить проверку, добавив " +"загрузочный аргумент 'kext-dev-mode=1'." #. type: "Dart0_title" #: Resources/templates/Localizable.strings:638 @@ -2602,7 +2637,7 @@ #: Resources/templates/Localizable.strings:733 #, no-wrap msgid "A selection of options that deal with video." -msgstr "Параметры отображения." +msgstr "Выбор параметров отображения видео." #. type: "Keymaps_title" #: Resources/templates/Localizable.strings:736 Index: branches/chucko/package/po/de.po =================================================================== --- branches/chucko/package/po/de.po (revision 2453) +++ branches/chucko/package/po/de.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-29 12:04+0000\n" @@ -1137,44 +1137,36 @@ #. type: "HDAULayoutIDx05_title" #: Resources/templates/Localizable.strings:261 #: Resources/templates/Localizable.strings:367 -#, fuzzy, no-wrap -#| msgid "LayoutID=65" +#, no-wrap msgid "LayoutID=5" -msgstr "LayoutID=65" +msgstr "LayoutID=5" #. type: "HDEFLayoutIDx05_description" #: Resources/templates/Localizable.strings:262 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDEF layout-it to 5:\n" "005 (0x05, 0x00, 0x00, 0x00)." msgstr "" -"Setzt HDEF Layout auf 1:\n" -"01 (0x01, 0x00, 0x00,0x00)" +"Setzt HDEF Layout auf 5:\n" +"005 (0x05, 0x00, 0x00,0x00)" #. type: "HDAULayoutIDx07_title" #: Resources/templates/Localizable.strings:265 #: Resources/templates/Localizable.strings:371 -#, fuzzy, no-wrap -#| msgid "LayoutID=387" +#, no-wrap msgid "LayoutID=7" -msgstr "LayoutID=387" +msgstr "LayoutID=7" #. type: "HDEFLayoutIDx07_description" #: Resources/templates/Localizable.strings:266 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDEF layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDEF layout-it to 7:\n" "007 (0x07, 0x00, 0x00, 0x00)." msgstr "" -"Setzt HDEF Layout auf 1:\n" -"01 (0x01, 0x00, 0x00,0x00)" +"Setzt HDEF Layout auf 7:\n" +"007 (0x07, 0x00, 0x00,0x00)" #. type: "HDAULayoutIDx12_title" #: Resources/templates/Localizable.strings:269 @@ -1565,29 +1557,23 @@ #. type: "HDAULayoutIDx05_description" #: Resources/templates/Localizable.strings:368 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDAU layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDAU layout-it to 5:\n" "005 (0x05, 0x00, 0x00, 0x00)." msgstr "" -"Setzt HDAU Layout auf 1:\n" -"001 (0x01, 0x00, 0x00, 0x00)" +"Setzt HDAU Layout auf 5:\n" +"005 (0x05, 0x00, 0x00, 0x00)" #. type: "HDAULayoutIDx07_description" #: Resources/templates/Localizable.strings:372 -#, fuzzy, no-wrap -#| msgid "" -#| "Set HDAU layout-it to 1:\n" -#| "001 (0x01, 0x00, 0x00, 0x00)." +#, no-wrap msgid "" "Set HDAU layout-it to 7:\n" "007 (0x07, 0x00, 0x00, 0x00)." msgstr "" -"Setzt HDAU Layout auf 1:\n" -"001 (0x01, 0x00, 0x00, 0x00)" +"Setzt HDAU Layout auf 7:\n" +"007 (0x07, 0x00, 0x00, 0x00)" #. type: "HDAULayoutIDx12_description" #: Resources/templates/Localizable.strings:376 Index: branches/chucko/package/po/bg.po =================================================================== --- branches/chucko/package/po/bg.po (revision 2453) +++ branches/chucko/package/po/bg.po (revision 2454) @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-06-26 01:37+0200\n" +"POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2012-04-28 17:25+0200\n" "Last-Translator: Желязко \n" "Language-Team: bg \n" Index: branches/chucko/package/po/zh_TW.po =================================================================== --- branches/chucko/package/po/zh_TW.po (revision 2453) +++ branches/chucko/package/po/zh_TW.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-28 07:30+0000\n" Index: branches/chucko/package/po/id.po =================================================================== --- branches/chucko/package/po/id.po (revision 2453) +++ branches/chucko/package/po/id.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2014-06-25 23:47+0000\n" Index: branches/chucko/package/po/he.po =================================================================== --- branches/chucko/package/po/he.po (revision 2453) +++ branches/chucko/package/po/he.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" Index: branches/chucko/package/po/el.po =================================================================== --- branches/chucko/package/po/el.po (revision 2453) +++ branches/chucko/package/po/el.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" Index: branches/chucko/package/po/zh_CN.po =================================================================== --- branches/chucko/package/po/zh_CN.po (revision 2453) +++ branches/chucko/package/po/zh_CN.po (revision 2454) @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Chameleon 2.2\n" +"Project-Id-Version: Chameleon 2.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-09-18 14:17+0100\n" "PO-Revision-Date: 2013-12-28 07:30+0000\n" Index: branches/chucko/Make.rules =================================================================== --- branches/chucko/Make.rules (revision 2453) +++ branches/chucko/Make.rules (revision 2454) @@ -54,22 +54,22 @@ $(OBJROOT)/%.o: %.c - @echo "\t[CC] $<" + @echo " [CC] $<" @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $@.Makedep @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ $(OBJROOT)/%.o: %.m - @echo "\t[M] $<" + @echo " [M] $<" @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -MM -M -o $@.Makedep @$(CC) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $@ $(OBJROOT)/%.o: %.cpp - @echo "\t[CPP] $<" + @echo " [CPP] $<" @$(CPP) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -MM -M -o $@.Makedep @$(CPP) $(CPPFLAGS) $(CFLAGS) -c "$<" $(INC) -o $@ $(OBJROOT)/%.o: %.s - @echo "\t[AS] $<" + @echo " [AS] $<" @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -MM -M -o $@.Makedep @$(CC) $(CPPFLAGS) -c $(INC) -arch i386 $< -o $@ @@ -89,7 +89,7 @@ # This breaks make, must use make all (FIXME) $(DIRS_NEEDED) $(INSTALLDIR) $(OBJROOT) $(SYMROOT): - @echo "\t[MKDIR] $@" + @echo " [MKDIR] $@" @$(MKDIRS) $@ # Recursive rules @@ -127,13 +127,13 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $$local_target) \ + (cd $$subdir && $(MAKE) --no-print-directory $$local_target) \ || eval $$failcom; \ done clean-dep: - @if [ -f "$(OBJROOT)/Makedep" ];then echo "\t[RM] $(OBJROOT)/Makedep"; fi + @if [ -f "$(OBJROOT)/Makedep" ];then echo " [RM] $(OBJROOT)/Makedep"; fi @rm -f $(OBJROOT)/Makedep @@ -141,11 +141,11 @@ # clean: remove almost everything (execpt auto.conf, autoconf.h, autoconf.inc) clean: clean-recursive clean-dep - @if [ -d "$(OBJROOT)" ];then echo "\t[RMDIR] $(OBJROOT)"; fi - @if [ -d "$(SYMROOT)" ];then echo "\t[RMDIR] $(SYMROOT)"; fi - @if [ -d "$(DSTROOT)" ];then echo "\t[RMDIR] $(DSTROOT)"; fi + @if [ -d "$(OBJROOT)" ];then echo " [RMDIR] $(OBJROOT)"; fi + @if [ -d "$(SYMROOT)" ];then echo " [RMDIR] $(SYMROOT)"; fi + @if [ -d "$(DSTROOT)" ];then echo " [RMDIR] $(DSTROOT)"; fi @if [ -d "$(SRCROOT)/i386/modules/module_includes" ];then \ - echo "\t[RMDIR] $(SRCROOT)/i386/modules/module_includes"; \ + echo " [RMDIR] $(SRCROOT)/i386/modules/module_includes"; \ fi @rm -rf $(OBJROOT) $(SYMROOT) $(DSTROOT) \ $(SRCROOT)/i386/modules/module_includes Index: branches/chucko/CHANGES =================================================================== --- branches/chucko/CHANGES (revision 2453) +++ branches/chucko/CHANGES (revision 2454) @@ -1,3 +1,32 @@ +- ErmaC : Merge Yosemite patch (ready from June 2014) Thanks all involved in the test and develop; + Special thanks: Alex J, viv xix, zenith432 from http://forge.voodooprojects.org/p/chameleon/issues/375/ + Testing and improvements: Pike R. Alpha, ErmaC, Bungo, blackosx, Micky1979, crazybirdy, oldnapalm, janek202, MinusZwei and Andy Vandijck. + +- Pike R. Alpha : dinamic "random-seed" implementation ( http://www.insanelymac.com/forum/topic/301350-lets-make-random-seed-really-random/ ) +- ErmaC : getCPUTick() helper function ( http://www.insanelymac.com/forum/topic/301350-lets-make-random-seed-really-random/ ) +- ErmaC : Add Yosemite Icons detection for chameleon UI +- blackosx : Add chameleon UI Icons for Yosemite +- ErmaC : Use macro instead of full checkOSVersion +- viv xix : Move checkOSVersion into boot header +- ErmaC : define macro for OS X Versions +- Slice and Clover Team : Replace "NULL" terminated strings and fit Boot2 Sectors size +- ErmaC : Update bootargs +- crazybirdy : Fit length for "Loading Darwin" +- meklort : Update align directives to 2^(old_align) +- Ermac : Bump svn to 2.3 +- ErmaC : Update efi Header +- cparm : buffer BPS +- cparm : devprop_generate_string optimized by cparm +- ErmaC : Update CPUID and change conditional logic. +- ErmaC : Typo & ID names +- meklort : Make compile on gcc w/ errors enabled. +- bitshoveler : Remove the '-x' option from the offending 'ld' command +- Jief : Makefile dependency missing for boot0 and boot1h +- ErmaC :Temp disable klibc module +- meklort : Silence output. +- meklort : Add --no-print-directory. +- meklort : Replace \t with tab. +- ErmaC : Update Chameleon.xcodeproj - ErmaC : Merge LZVN decompression routine by MinusZwei (C Conversion) based on works from Pike R. Alpha and AnV Software (Andy Vandijck). - Bungo : Loading custom ECDT.aml, Darwin version string printing, clean boot-args, change firmware rev. to real Mac (0x0001000a), added kernel-compatibility, boot-file, boot-args, machine-signature, random-seed DT properties & some minor changes. - ErmaC : Merge tja's patch http://forum.voodooprojects.org/index.php/topic,5951.0.html Property changes on: branches/chucko ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r2406-2453