Index: branches/meklort/i386/libsaio/usb.c =================================================================== --- branches/meklort/i386/libsaio/usb.c (revision 542) +++ branches/meklort/i386/libsaio/usb.c (revision 543) @@ -1,345 +0,0 @@ -/* - * usb.c - * - * - * Created by mackerintel on 12/20/08. - * Copyright 2008 mackerintel. All rights reserved. - * - */ - -#include "libsaio.h" -#include "boot.h" -#include "bootstruct.h" -#include "pci.h" - -#ifndef DEBUG_USB -#define DEBUG_USB 0 -#endif - -#if DEBUG_USB -#define DBG(x...) printf(x) -#else -#define DBG(x...) -#endif - - -struct pciList -{ - pci_dt_t* pciDev; - struct pciList* next; -}; - -struct pciList* usbList = NULL; - -int legacy_off (pci_dt_t *pci_dev); -int ehci_acquire (pci_dt_t *pci_dev); -int uhci_reset (pci_dt_t *pci_dev); - -// Add usb device to the list -void notify_usb_dev(pci_dt_t *pci_dev) -{ - - struct pciList* current = usbList; - if(!usbList) - { - usbList = (struct pciList*)malloc(sizeof(struct pciList)); - usbList->next = NULL; - usbList->pciDev = pci_dev; - - } - else - { - while(current != NULL && current->next != NULL) - { - current = current->next; - } - current->next = (struct pciList*)malloc(sizeof(struct pciList)); - current = current->next; - - current->pciDev = pci_dev; - current->next = NULL; - } -} - -// Loop through the list and call the apropriate patch function -int usb_loop() -{ - int retVal = 1; - bool fix_ehci, fix_uhci, fix_usb, fix_legacy; - fix_ehci = fix_uhci = fix_usb = fix_legacy = false; - - if (getBoolForKey(kUSBBusFix, &fix_usb, &bootInfo->bootConfig)) - { - fix_ehci = fix_uhci = fix_legacy = fix_usb; // Disable all if none set - } - else - { - getBoolForKey(kEHCIacquire, &fix_ehci, &bootInfo->bootConfig); - getBoolForKey(kUHCIreset, &fix_uhci, &bootInfo->bootConfig); - getBoolForKey(kLegacyOff, &fix_legacy, &bootInfo->bootConfig); - } - - struct pciList* current = usbList; - - while(current) - { - switch (pci_config_read8(current->pciDev->dev.addr, PCI_CLASS_PROG)) - { - // EHCI - case 0x20: - if(fix_ehci) retVal &= ehci_acquire(current->pciDev); - if(fix_legacy) retVal &= legacy_off(current->pciDev); - - break; - - // UHCI - case 0x00: - if (fix_uhci) retVal &= uhci_reset(current->pciDev); - - break; - } - - current = current->next; - } - return retVal; -} - -int legacy_off (pci_dt_t *pci_dev) -{ - // Set usb legacy off modification by Signal64 - // NOTE: This *must* be called after the last file is loaded from the drive in the event that we are booting form usb. - // NOTE2: This should be called after any getc() call. (aka, after the Wait=y keyworkd is used) - // AKA: Make this run immediatly before the kernel is called - uint32_t capaddr, opaddr; - uint8_t eecp; - uint32_t usbcmd, usbsts, usbintr; - uint32_t usblegsup, usblegctlsts; - - int isOSowned; - int isBIOSowned; - - verbose("Setting Legacy USB Off on controller [%04x:%04x] at %02x:%2x.%x\n", - pci_dev->vendor_id, pci_dev->device_id, - pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func); - - - // capaddr = Capability Registers = dev.addr + offset stored in dev.addr + 0x10 (USBBASE) - capaddr = pci_config_read32(pci_dev->dev.addr, 0x10); - - // opaddr = Operational Registers = capaddr + offset (8bit CAPLENGTH in Capability Registers + offset 0) - opaddr = capaddr + *((unsigned char*)(capaddr)); - - // eecp = EHCI Extended Capabilities offset = capaddr HCCPARAMS bits 15:8 - eecp=*((unsigned char*)(capaddr + 9)); - - DBG("capaddr=%x opaddr=%x eecp=%x\n", capaddr, opaddr, eecp); - - usbcmd = *((unsigned int*)(opaddr)); // Command Register - usbsts = *((unsigned int*)(opaddr + 4)); // Status Register - usbintr = *((unsigned int*)(opaddr + 8)); // Interrupt Enable Register - - DBG("usbcmd=%08x usbsts=%08x usbintr=%08x\n", usbcmd, usbsts, usbintr); - - // read PCI Config 32bit USBLEGSUP (eecp+0) - usblegsup = pci_config_read32(pci_dev->dev.addr, eecp); - - // informational only - isBIOSowned = !!((usblegsup) & (1 << (16))); - isOSowned = !!((usblegsup) & (1 << (24))); - - // read PCI Config 32bit USBLEGCTLSTS (eecp+4) - usblegctlsts = pci_config_read32(pci_dev->dev.addr, eecp + 4); - - DBG("usblegsup=%08x isOSowned=%d isBIOSowned=%d usblegctlsts=%08x\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); - - // Reset registers to Legacy OFF - DBG("Clearing USBLEGCTLSTS\n"); - pci_config_write32(pci_dev->dev.addr, eecp + 4, 0); //usblegctlsts - - // if delay value is in milliseconds it doesn't appear to work. - // setting value to anything up to 65535 does not add the expected delay here. - delay(100); - - usbcmd = *((unsigned int*)(opaddr)); - usbsts = *((unsigned int*)(opaddr + 4)); - usbintr = *((unsigned int*)(opaddr + 8)); - - DBG("usbcmd=%08x usbsts=%08x usbintr=%08x\n", usbcmd, usbsts, usbintr); - - DBG("Clearing Registers\n"); - - // clear registers to default - usbcmd = (usbcmd & 0xffffff00); - *((unsigned int*)(opaddr)) = usbcmd; - *((unsigned int*)(opaddr + 8)) = 0; //usbintr - clear interrupt registers - *((unsigned int*)(opaddr + 4)) = 0x1000; //usbsts - clear status registers - pci_config_write32(pci_dev->dev.addr, eecp, 1); //usblegsup - - // get the results - usbcmd = *((unsigned int*)(opaddr)); - usbsts = *((unsigned int*)(opaddr + 4)); - usbintr = *((unsigned int*)(opaddr + 8)); - - DBG("usbcmd=%08x usbsts=%08x usbintr=%08x\n", usbcmd, usbsts, usbintr); - - // read 32bit USBLEGSUP (eecp+0) - usblegsup = pci_config_read32(pci_dev->dev.addr, eecp); - - // informational only - isBIOSowned = !!((usblegsup) & (1 << (16))); - isOSowned = !!((usblegsup) & (1 << (24))); - - // read 32bit USBLEGCTLSTS (eecp+4) - usblegctlsts = pci_config_read32(pci_dev->dev.addr, eecp + 4); - - DBG("usblegsup=%08x isOSowned=%d isBIOSowned=%d usblegctlsts=%08x\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); - - verbose("Legacy USB Off Done\n"); - return 1; -} - -int ehci_acquire (pci_dt_t *pci_dev) -{ - int j, k; - uint32_t base; - uint8_t eecp; - uint8_t legacy[8]; - bool isOwnershipConflict; - bool alwaysHardBIOSReset; - - alwaysHardBIOSReset = false; - if (!getBoolForKey(kEHCIhard, &alwaysHardBIOSReset, &bootInfo->bootConfig)) { - alwaysHardBIOSReset = true; - } - - pci_config_write16(pci_dev->dev.addr, 0x04, 0x0002); - base = pci_config_read32(pci_dev->dev.addr, 0x10); - - verbose("EHCI controller [%04x:%04x] at %02x:%2x.%x DMA @%x\n", - pci_dev->vendor_id, pci_dev->device_id, - pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func, - base); - - if (*((unsigned char*)base) < 0xc) - { - DBG("Config space too small: no legacy implementation\n"); - return 1; - } - eecp = *((unsigned char*)(base + 9)); - if (!eecp) { - DBG("No extended capabilities: no legacy implementation\n"); - return 1; - } - - DBG("eecp=%x\n",eecp); - - // bad way to do it - // pci_conf_write(pci_dev->dev.addr, eecp, 4, 0x01000001); - for (j = 0; j < 8; j++) { - legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); - DBG("%02x ", legacy[j]); - } - DBG("\n"); - - //Real Job: based on orByte's AppleUSBEHCI.cpp - //We try soft reset first - some systems hang on reboot with hard reset - // Definitely needed during reboot on 10.4.6 - - isOwnershipConflict = ((legacy[3] & 1 != 0) && (legacy[2] & 1 != 0)); - if (!alwaysHardBIOSReset && isOwnershipConflict) { - DBG("EHCI - Ownership conflict - attempting soft reset ...\n"); - DBG("EHCI - toggle OS Ownership to 0\n"); - pci_config_write8(pci_dev->dev.addr, eecp + 3, 0); - for (k = 0; k < 25; k++) { - for (j = 0; j < 8; j++) { - legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); - } - if (legacy[3] == 0) { - break; - } - delay(10); - } - } - - DBG("Found USBLEGSUP_ID - value %x:%x - writing OSOwned\n", legacy[3],legacy[2]); - pci_config_write8(pci_dev->dev.addr, eecp + 3, 1); - - // wait for kEHCI_USBLEGSUP_BIOSOwned bit to clear - for (k = 0; k < 25; k++) { - for (j = 0;j < 8; j++) { - legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); - } - DBG ("%x:%x,",legacy[3],legacy[2]); - if (legacy[2] == 0) { - break; - } - delay(10); - } - - for (j = 0;j < 8; j++) { - legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); - } - isOwnershipConflict = ((legacy[2]) != 0); - if (isOwnershipConflict) { - // Soft reset has failed. Assume SMI being ignored - // Hard reset - // Force Clear BIOS BIT - DBG("EHCI - Ownership conflict - attempting hard reset ...\n"); - DBG ("%x:%x\n",legacy[3],legacy[2]); - DBG("EHCI - Force BIOS Ownership to 0\n"); - - pci_config_write8(pci_dev->dev.addr, eecp + 2, 0); - for (k = 0; k < 25; k++) { - for (j = 0; j < 8; j++) { - legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); - } - DBG ("%x:%x,",legacy[3],legacy[2]); - - if ((legacy[2]) == 0) { - break; - } - delay(10); - } - // Disable further SMI events - for (j = 4; j < 8; j++) { - pci_config_write8(pci_dev->dev.addr, eecp + j, 0); - } - } - - for (j = 0; j < 8; j++) { - legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); - } - - DBG ("%x:%x\n",legacy[3],legacy[2]); - - // Final Ownership Resolution Check... - if (legacy[2] & 1) { - DBG("EHCI controller unable to take control from BIOS\n"); - return 0; - } - - DBG("EHCI Acquire OS Ownership done\n"); - return 1; -} - -int uhci_reset (pci_dt_t *pci_dev) -{ - uint32_t base, port_base; - - base = pci_config_read32(pci_dev->dev.addr, 0x20); - port_base = (base >> 5) & 0x07ff; - - verbose("UHCI controller [%04x:%04x] at %02x:%2x.%x base %x(%x)\n", - pci_dev->vendor_id, pci_dev->device_id, - pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func, - port_base, base); - - pci_config_write16(pci_dev->dev.addr, 0xc0, 0x8f00); - - outw (port_base, 0x0002); - delay(10); - outw (port_base+4,0); - delay(10); - outw (port_base,0); - return 1; -} Index: branches/meklort/i386/libsaio/hpet.c =================================================================== --- branches/meklort/i386/libsaio/hpet.c (revision 542) +++ branches/meklort/i386/libsaio/hpet.c (revision 543) @@ -1,173 +0,0 @@ -/* - * Force HPET enabled - * - * via fix from http://forum.voodooprojects.org/index.php/topic,1596.0.html - */ - -#include "libsaio.h" -#include "pci.h" -#include "hpet.h" - -#ifndef DEBUG_HPET -#define DEBUG_HPET 0 -#endif - -#if DEBUG_HPET -#define DBG(x...) printf(x) -#else -#define DBG(x...) -#endif - -void force_enable_hpet_intel(pci_dt_t *lpc_dev); -void force_enable_hpet_via(pci_dt_t *lpc_dev); - -static struct lpc_controller_t lpc_controllers_intel[] = { - - // Default unknown chipset - { 0, 0, "" }, - - // Intel - { 0x8086, 0x24dc, "ICH5" }, - { 0x8086, 0x2640, "ICH6" }, - { 0x8086, 0x2641, "ICH6M" }, - - { 0x8086, 0x27b0, "ICH7 DH" }, - { 0x8086, 0x27b8, "ICH7" }, - { 0x8086, 0x27b9, "ICH7M" }, - { 0x8086, 0x27bd, "ICH7M DH" }, - - { 0x8086, 0x2810, "ICH8R" }, - { 0x8086, 0x2811, "ICH8M-E" }, - { 0x8086, 0x2812, "ICH8DH" }, - { 0x8086, 0x2814, "ICH8DO" }, - { 0x8086, 0x2815, "ICH8M" }, - - { 0x8086, 0x2912, "ICH9DH" }, - { 0x8086, 0x2914, "ICH9DO" }, - { 0x8086, 0x2916, "ICH9R" }, - { 0x8086, 0x2917, "ICH9M-E" }, - { 0x8086, 0x2918, "ICH9" }, - { 0x8086, 0x2919, "ICH9M" }, - - { 0x8086, 0x3a14, "ICH10DO" }, - { 0x8086, 0x3a16, "ICH10R" }, - { 0x8086, 0x3a18, "ICH10" }, - { 0x8086, 0x3a1a, "ICH10D" }, -}; - -static struct lpc_controller_t lpc_controllers_via[] = { - // Default unknown chipset - { 0, 0, "" }, - - { 0x1106, 0x3372, "VT8237S" }, -}; - - -void force_enable_hpet(pci_dt_t *lpc_dev) -{ - switch(lpc_dev->vendor_id) - { - case 0x8086: - force_enable_hpet_intel(lpc_dev); - break; - - case 0x1106: - force_enable_hpet_via(lpc_dev); - break; - } - - -#if DEBUG_HPET - printf("Press [Enter] to continue...\n"); - getc(); -#endif -} - -void force_enable_hpet_via(pci_dt_t *lpc_dev) -{ - uint32_t val, hpet_address = 0xFED00000; - int i; - - /* LPC on Intel ICH is always (?) at 00:1f.0 */ - for(i = 1; i < sizeof(lpc_controllers_via) / sizeof(lpc_controllers_via[0]); i++) - { - if ( (lpc_controllers_via[i].vendor == lpc_dev->vendor_id) - && (lpc_controllers_via[i].device == lpc_dev->device_id)) - { - val = pci_config_read32(lpc_dev->dev.addr, 0x68); - - DBG("VIA %s LPC Interface [%04x:%04x], MMIO\n", - lpc_controllers[i].name, lpc_dev->vendor_id, lpc_dev->device_id); - - if (val & 0x80) { - hpet_address = (val & ~0x3ff); - DBG("HPET at 0x%lx\n", hpet_address); - } - else - { - val = 0xfed00000 | 0x80; - pci_config_write32(lpc_dev->dev.addr, 0x68, val); - val = pci_config_read32(lpc_dev->dev.addr, 0x68); - if (val & 0x80) { - hpet_address = (val & ~0x3ff); - DBG("Force enabled HPET at 0x%lx\n", hpet_address); - } - else { - DBG("Unable to enable HPET"); - } - } - } - } -} - - - -void force_enable_hpet_intel(pci_dt_t *lpc_dev) -{ - uint32_t val, hpet_address = 0xFED00000; - int i; - void *rcba; - - /* LPC on Intel ICH is always (?) at 00:1f.0 */ - for(i = 1; i < sizeof(lpc_controllers_intel) / sizeof(lpc_controllers_intel[0]); i++) - { - if ( (lpc_controllers_intel[i].vendor == lpc_dev->vendor_id) - && (lpc_controllers_intel[i].device == lpc_dev->device_id)) - { - - rcba = (void *)(pci_config_read32(lpc_dev->dev.addr, 0xF0) & 0xFFFFC000); - - DBG("Intel(R) %s LPC Interface [%04x:%04x], MMIO @ 0x%lx\n", - lpc_controllers[i].name, lpc_dev->vendor_id, lpc_dev->device_id, rcba); - - if (rcba == 0) - printf(" RCBA disabled; cannot force enable HPET\n"); - else - { - val = REG32(rcba, 0x3404); - if (val & 0x80) - { - // HPET is enabled in HPTC. Just not reported by BIOS - DBG(" HPET is enabled in HPTC, just not reported by BIOS\n"); - hpet_address |= (val & 3) << 12 ; - DBG(" HPET MMIO @ 0x%lx\n", hpet_address); - } - else - { - // HPET disabled in HPTC. Trying to enable - DBG(" HPET is disabled in HPTC, trying to enable\n"); - REG32(rcba, 0x3404) = val | 0x80; - hpet_address |= (val & 3) << 12 ; - DBG(" Force enabled HPET, MMIO @ 0x%lx\n", hpet_address); - } - - // verify if the job is done - val = REG32(rcba, 0x3404); - if (!(val & 0x80)) - printf(" Failed to force enable HPET\n"); - } - break; - - } - } -} \ No newline at end of file Index: branches/meklort/i386/libsaio/hpet.h =================================================================== --- branches/meklort/i386/libsaio/hpet.h (revision 542) +++ branches/meklort/i386/libsaio/hpet.h (revision 543) @@ -1,20 +0,0 @@ -/* - * - */ - -#ifndef __LIBSAIO_HPET_H -#define __LIBSAIO_HPET_H - -#include "libsaio.h" - -#define REG32(base, reg) ((volatile uint32_t *)base)[(reg) >> 2] - -void force_enable_hpet(pci_dt_t *lpc_dev); - -struct lpc_controller_t { - unsigned vendor; - unsigned device; - char *name; -}; - -#endif /* !__LIBSAIO_HPET_H */ Index: branches/meklort/i386/libsaio/asm.s =================================================================== --- branches/meklort/i386/libsaio/asm.s (revision 542) +++ branches/meklort/i386/libsaio/asm.s (revision 543) @@ -418,6 +418,7 @@ ret #ifndef BOOT1 +#if UNUSED // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // loader() // @@ -459,6 +460,7 @@ leave ret #endif +#endif #if UNUSED // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: branches/meklort/i386/libsaio/vbe.c =================================================================== --- branches/meklort/i386/libsaio/vbe.c (revision 542) +++ branches/meklort/i386/libsaio/vbe.c (revision 543) @@ -29,36 +29,6 @@ #include "libsaio.h" #include "vbe.h" -/* - * Various inline routines for video I/O - */ -static inline void -outi (int port, int index, int val) -{ - outw (port, (val << 8) | index); -} - -static inline void -outib (int port, int index, int val) -{ - outb (port, index); - outb (port + 1, val); -} - -static inline int -ini (int port, int index) -{ - outb (port, index); - return inb (port + 1); -} - -static inline void -rmwi (int port, int index, int clear, int set) -{ - outb (port, index); - outb (port + 1, (inb (port + 1) & ~clear) | set); -} - /* * Globals */ @@ -84,7 +54,7 @@ bios(&bb); return(bb.eax.r.h); } - +#if UNUSED int getVBEDACFormat(unsigned char *format) { bb.intno = 0x10; @@ -104,6 +74,7 @@ bios(&bb); return(bb.eax.r.h); } +#endif int getEDID( void * edidBlock, UInt8 block) { @@ -141,7 +112,7 @@ /* * from http://www.azillionmonkeys.com/qed/sqroot.html */ - +#if UNUSED double Sqrt( double y ) { double x, z, tempf; @@ -266,6 +237,8 @@ return 0; } +#endif + int setVBEMode(unsigned short mode, const VBECRTCInfoBlock * timing) { bb.intno = 0x10; @@ -279,6 +252,7 @@ return(bb.eax.r.h); } + int setVBEPalette(void *palette) { bb.intno = 0x10; @@ -292,6 +266,8 @@ return(bb.eax.r.h); } +#if UNUSED + int getVBEPalette(void *palette) { bb.intno = 0x10; @@ -325,3 +301,4 @@ *pixelClock = bb.ecx.rx; return(bb.eax.r.h); } +#endif Index: branches/meklort/i386/libsaio/Makefile =================================================================== --- branches/meklort/i386/libsaio/Makefile (revision 542) +++ branches/meklort/i386/libsaio/Makefile (revision 543) @@ -41,7 +41,7 @@ xml.o ntfs.o msdos.o md5c.o device_tree.o \ cpu.o platform.o \ fake_efi.o ext2fs.o \ - hpet.o usb.o pci_setup.o \ + pci_setup.o \ device_inject.o pci_root.o \ convert.o Index: branches/meklort/i386/libsaio/ufs.c =================================================================== --- branches/meklort/i386/libsaio/ufs.c (revision 542) +++ branches/meklort/i386/libsaio/ufs.c (revision 543) @@ -26,7 +26,6 @@ * * DRI: Josh de Cesare */ - #include #include "ufs.h" @@ -532,4 +531,4 @@ } return bytesLeft; -} +} \ No newline at end of file Index: branches/meklort/i386/libsaio/smbios_patcher.c =================================================================== --- branches/meklort/i386/libsaio/smbios_patcher.c (revision 542) +++ branches/meklort/i386/libsaio/smbios_patcher.c (revision 543) @@ -141,13 +141,13 @@ const SMStrEntryPair* sm_defaults; if (platformCPUFeature(CPU_FEATURE_MOBILE)) { - if (Platform.CPU.NoCores > 1) { + if (Platform->CPU.NoCores > 1) { sm_defaults=sm_macbookpro_defaults; } else { sm_defaults=sm_macbook_defaults; } } else { - switch (Platform.CPU.NoCores) + switch (Platform->CPU.NoCores) { case 1: sm_defaults=sm_macmini_defaults; @@ -157,11 +157,11 @@ break; default: { - switch (Platform.CPU.Family) + switch (Platform->CPU.Family) { case 0x06: { - switch (Platform.CPU.Model) + switch (Platform->CPU.Model) { case CPU_MODEL_FIELDS: // Intel Core i5, i7 LGA1156 (45nm) case CPU_MODEL_DALES: // Intel Core i5, i7 LGA1156 (45nm) ??? @@ -204,23 +204,23 @@ static int sm_get_fsb(const char *name, int table_num) { - return Platform.CPU.FSBFrequency/1000000; + return Platform->CPU.FSBFrequency/1000000; } static int sm_get_cpu (const char *name, int table_num) { - return Platform.CPU.CPUFrequency/1000000; + return Platform->CPU.CPUFrequency/1000000; } static int sm_get_bus_speed (const char *name, int table_num) { - if (Platform.CPU.Vendor == 0x756E6547) // Intel + if (Platform->CPU.Vendor == 0x756E6547) // Intel { - switch (Platform.CPU.Family) + switch (Platform->CPU.Family) { case 0x06: { - switch (Platform.CPU.Model) + switch (Platform->CPU.Model) { case 0x0D: // ? case CPU_MODEL_YONAH: // Yonah 0x0E @@ -275,7 +275,7 @@ qpimult = pci_config_read32(PCIADDR(nhm_bus, 2, 1), 0x50); qpimult &= 0x7F; DBG("qpimult %d\n", qpimult); - qpibusspeed = (qpimult * 2 * (Platform.CPU.FSBFrequency/1000000)); + qpibusspeed = (qpimult * 2 * (Platform->CPU.FSBFrequency/1000000)); // Rek: rounding decimals to match original mac profile info if (qpibusspeed%100 != 0)qpibusspeed = ((qpibusspeed+50)/100)*100; DBG("qpibusspeed %d\n", qpibusspeed); @@ -290,11 +290,11 @@ static int sm_get_simplecputype() { - if (Platform.CPU.NoCores >= 4) + if (Platform->CPU.NoCores >= 4) { return 0x0501; // Quad-Core Xeon } - else if (Platform.CPU.NoCores == 1) + else if (Platform->CPU.NoCores == 1) { return 0x0201; // Core Solo }; @@ -306,18 +306,18 @@ { static bool done = false; - if (Platform.CPU.Vendor == 0x756E6547) // Intel + if (Platform->CPU.Vendor == 0x756E6547) // Intel { if (!done) { - verbose("CPU is %s, family 0x%x, model 0x%x\n", Platform.CPU.BrandString, Platform.CPU.Family, Platform.CPU.Model); + verbose("CPU is %s, family 0x%x, model 0x%x\n", Platform->CPU.BrandString, Platform->CPU.Family, Platform->CPU.Model); done = true; } - switch (Platform.CPU.Family) + switch (Platform->CPU.Family) { case 0x06: { - switch (Platform.CPU.Model) + switch (Platform->CPU.Model) { case 0x0D: // ? case CPU_MODEL_YONAH: // Yonah @@ -330,19 +330,19 @@ return 0x0701; // Core i7 case CPU_MODEL_FIELDS: // Lynnfield, Clarksfield, Jasper - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform->CPU.BrandString, "Core(TM) i5")) return 0x601; // Core i5 return 0x701; // Core i7 case CPU_MODEL_DALES: // Intel Core i5, i7 LGA1156 (45nm) (Havendale, Auburndale) - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform->CPU.BrandString, "Core(TM) i5")) return 0x601; // Core i5 return 0x0701; // Core i7 case CPU_MODEL_DALES_32NM: // Intel Core i3, i5, i7 LGA1156 (32nm) (Clarkdale, Arrandale) - if (strstr(Platform.CPU.BrandString, "Core(TM) i3")) + if (strstr(Platform->CPU.BrandString, "Core(TM) i3")) return 0x901; // Core i3 - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform->CPU.BrandString, "Core(TM) i5")) return 0x601; // Core i5 return 0x0701; // Core i7 @@ -365,10 +365,10 @@ int map; if (table_num < MAX_RAM_SLOTS) { - map = Platform.DMI.DIMM[table_num]; - if (Platform.RAM.DIMM[map].InUse && Platform.RAM.DIMM[map].Type != 0) { - DBG("RAM Detected Type = %d\n", Platform.RAM.DIMM[map].Type); - return Platform.RAM.DIMM[map].Type; + map = Platform->DMI.DIMM[table_num]; + if (Platform->RAM.DIMM[map].InUse && Platform->RAM.DIMM[map].Type != 0) { + DBG("RAM Detected Type = %d\n", Platform->RAM.DIMM[map].Type); + return Platform->RAM.DIMM[map].Type; } } @@ -380,10 +380,10 @@ int map; if (table_num < MAX_RAM_SLOTS) { - map = Platform.DMI.DIMM[table_num]; - if (Platform.RAM.DIMM[map].InUse && Platform.RAM.DIMM[map].Frequency != 0) { - DBG("RAM Detected Freq = %d Mhz\n", Platform.RAM.DIMM[map].Frequency); - return Platform.RAM.DIMM[map].Frequency; + map = Platform->DMI.DIMM[table_num]; + if (Platform->RAM.DIMM[map].InUse && Platform->RAM.DIMM[map].Frequency != 0) { + DBG("RAM Detected Freq = %d Mhz\n", Platform->RAM.DIMM[map].Frequency); + return Platform->RAM.DIMM[map].Frequency; } } @@ -395,10 +395,10 @@ int map; if (table_num < MAX_RAM_SLOTS) { - map = Platform.DMI.DIMM[table_num]; - if (Platform.RAM.DIMM[map].InUse && strlen(Platform.RAM.DIMM[map].Vendor) > 0) { - DBG("RAM Detected Vendor[%d]='%s'\n", table_num, Platform.RAM.DIMM[map].Vendor); - return Platform.RAM.DIMM[map].Vendor; + map = Platform->DMI.DIMM[table_num]; + if (Platform->RAM.DIMM[map].InUse && strlen(Platform->RAM.DIMM[map].Vendor) > 0) { + DBG("RAM Detected Vendor[%d]='%s'\n", table_num, Platform->RAM.DIMM[map].Vendor); + return Platform->RAM.DIMM[map].Vendor; } } return "N/A"; @@ -409,11 +409,11 @@ int map; if (table_num < MAX_RAM_SLOTS) { - map = Platform.DMI.DIMM[table_num]; - if (Platform.RAM.DIMM[map].InUse && strlen(Platform.RAM.DIMM[map].SerialNo) > 0) { + map = Platform->DMI.DIMM[table_num]; + if (Platform->RAM.DIMM[map].InUse && strlen(Platform->RAM.DIMM[map].SerialNo) > 0) { DBG("name = %s, map=%d, RAM Detected SerialNo[%d]='%s'\n", name ? name : "", - map, table_num, Platform.RAM.DIMM[map].SerialNo); - return Platform.RAM.DIMM[map].SerialNo; + map, table_num, Platform->RAM.DIMM[map].SerialNo); + return Platform->RAM.DIMM[map].SerialNo; } } return "N/A"; @@ -424,10 +424,10 @@ int map; if (table_num < MAX_RAM_SLOTS) { - map = Platform.DMI.DIMM[table_num]; - if (Platform.RAM.DIMM[map].InUse && strlen(Platform.RAM.DIMM[map].PartNo) > 0) { - DBG("Ram Detected PartNo[%d]='%s'\n", table_num, Platform.RAM.DIMM[map].PartNo); - return Platform.RAM.DIMM[map].PartNo; + map = Platform->DMI.DIMM[table_num]; + if (Platform->RAM.DIMM[map].InUse && strlen(Platform->RAM.DIMM[map].PartNo) > 0) { + DBG("Ram Detected PartNo[%d]='%s'\n", table_num, Platform->RAM.DIMM[map].PartNo); + return Platform->RAM.DIMM[map].PartNo; } } return "N/A"; Index: branches/meklort/i386/libsaio/pci_root.c =================================================================== --- branches/meklort/i386/libsaio/pci_root.c (revision 542) +++ branches/meklort/i386/libsaio/pci_root.c (revision 543) @@ -18,31 +18,6 @@ static int rootuid = 10; //value means function wasnt ran yet -static unsigned int findrootuid(unsigned char * dsdt, int len) -{ - int i; - for (i=0; i<64 && ivendor_id, eth_dev->device_id, devicepath); - - if (!string) - string = devprop_create_string(); - - device = devprop_add_device(string, devicepath); - if(device) - { - verbose("Setting up lan keys\n"); - devprop_add_network_template(device, eth_dev->vendor_id); - stringdata = (uint8_t*)malloc(sizeof(uint8_t) * string->length); - if(stringdata) - { - memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); - stringlength = string->length; - } - } -} +} \ No newline at end of file Index: branches/meklort/i386/libsaio/sys.c =================================================================== --- branches/meklort/i386/libsaio/sys.c (revision 542) +++ branches/meklort/i386/libsaio/sys.c (revision 543) @@ -1034,16 +1034,21 @@ bvr = bvr1 = NULL; // Try resolving "rd" and "bt" devices first. +#ifndef OPTION_ROM if (biosdev == kPseudoBIOSDevRAMDisk) { if (gRAMDiskVolume) bvr1 = gRAMDiskVolume; } - else if (biosdev == kPseudoBIOSDevBooter) + else +#endif + if (biosdev == kPseudoBIOSDevBooter) { +#ifndef OPTION_ROM if (gRAMDiskVolume != NULL && gRAMDiskBTAliased) bvr1 = gRAMDiskVolume; else +#endif bvr1 = gBIOSBootVolume; } else Index: branches/meklort/i386/libsaio/nbp.c =================================================================== --- branches/meklort/i386/libsaio/nbp.c (revision 542) +++ branches/meklort/i386/libsaio/nbp.c (revision 543) @@ -21,7 +21,7 @@ * * @APPLE_LICENSE_HEADER_END@ */ - +#ifndef OPTION_ROM #include "libsaio.h" /* This NBP code is pretty useless because it just blindly calls INT 2B. @@ -134,7 +134,6 @@ return gNetBVR; } #else -#ifndef OPTION_ROM BVRef nbpScanBootVolumes( int biosdev, int * countPtr ) { return NULL; Index: branches/meklort/i386/libsaio/disk.c =================================================================== --- branches/meklort/i386/libsaio/disk.c (revision 542) +++ branches/meklort/i386/libsaio/disk.c (revision 543) @@ -1920,6 +1920,7 @@ length, (void *) addr ); } +#ifndef OPTION_ROM int rawDiskRead( BVRef bvr, unsigned int secno, void *buffer, unsigned int len ) { @@ -1995,8 +1996,8 @@ return 0; } +#endif - int diskIsCDROM(BVRef bvr) { struct driveInfo di; Index: branches/meklort/i386/libsaio/pci_setup.c =================================================================== --- branches/meklort/i386/libsaio/pci_setup.c (revision 542) +++ branches/meklort/i386/libsaio/pci_setup.c (revision 543) @@ -4,41 +4,15 @@ #include "pci.h" #include "modules.h" -extern void set_eth_builtin(pci_dt_t *eth_dev); -extern void notify_usb_dev(pci_dt_t *pci_dev); -extern void force_enable_hpet(pci_dt_t *lpc_dev); - - void setup_pci_devs(pci_dt_t *pci_dt) { - bool do_eth_devprop, do_enable_hpet; pci_dt_t *current = pci_dt; - do_eth_devprop = do_enable_hpet = false; - getBoolForKey(kEthernetBuiltIn, &do_eth_devprop, &bootInfo->bootConfig); - getBoolForKey(kForceHPET, &do_enable_hpet, &bootInfo->bootConfig); - while (current) { execute_hook("PCIDevice", current, NULL, NULL, NULL); - - switch (current->class_id) { - case PCI_CLASS_NETWORK_ETHERNET: - if (do_eth_devprop) - set_eth_builtin(current); - break; - - case PCI_CLASS_SERIAL_USB: - notify_usb_dev(current); - break; - - case PCI_CLASS_BRIDGE_ISA: - if (do_enable_hpet) - force_enable_hpet(current); - break; - } - + setup_pci_devs(current->children); current = current->next; } Index: branches/meklort/i386/libsaio/convert.c =================================================================== --- branches/meklort/i386/libsaio/convert.c (revision 542) +++ branches/meklort/i386/libsaio/convert.c (revision 543) @@ -7,6 +7,7 @@ #include "convert.h" +#ifndef OPTION_ROM /** Transform a 16 bytes hexadecimal value UUID to a string */ const char * getStringFromUUID(const EFI_CHAR8* eUUID) { @@ -20,7 +21,7 @@ uuid[12],uuid[13],uuid[14],uuid[15]); return msg ; } - +#endif /** Parse an UUID string into an (EFI_CHAR8*) buffer */ EFI_CHAR8* getUUIDFromString(const char *source) { Index: branches/meklort/i386/libsaio/fake_efi.c =================================================================== --- branches/meklort/i386/libsaio/fake_efi.c (revision 542) +++ branches/meklort/i386/libsaio/fake_efi.c (revision 543) @@ -519,8 +519,9 @@ if (!ret) // no bios dmi UUID available, set a fixed value for system-id ret=getUUIDFromString((sysId = (const char*) SYSTEM_ID)); - +#ifndef OPTION_ROM verbose("Customizing SystemID with : %s\n", getStringFromUUID(ret)); // apply a nice formatting to the displayed output +#endif return ret; } @@ -535,7 +536,7 @@ if (node == 0) stop("Couldn't get root node"); // we need to write this property after facp parsing // Export system-type only if it has been overrriden by the SystemType option - DT__AddProperty(node, SYSTEM_TYPE_PROP, sizeof(Platform.Type), &Platform.Type); + DT__AddProperty(node, SYSTEM_TYPE_PROP, sizeof(Platform->Type), &Platform->Type); } void setupEfiDeviceTree(void) @@ -597,15 +598,15 @@ // the value in the fsbFrequency global and not an malloc'd pointer // because the DT_AddProperty function does not copy its args. - if (Platform.CPU.FSBFrequency != 0) - DT__AddProperty(efiPlatformNode, FSB_Frequency_prop, sizeof(uint64_t), &Platform.CPU.FSBFrequency); + if (Platform->CPU.FSBFrequency != 0) + DT__AddProperty(efiPlatformNode, FSB_Frequency_prop, sizeof(uint64_t), &Platform->CPU.FSBFrequency); // Export TSC and CPU frequencies for use by the kernel or KEXTs - if (Platform.CPU.TSCFrequency != 0) - DT__AddProperty(efiPlatformNode, TSC_Frequency_prop, sizeof(uint64_t), &Platform.CPU.TSCFrequency); + if (Platform->CPU.TSCFrequency != 0) + DT__AddProperty(efiPlatformNode, TSC_Frequency_prop, sizeof(uint64_t), &Platform->CPU.TSCFrequency); - if (Platform.CPU.CPUFrequency != 0) - DT__AddProperty(efiPlatformNode, CPU_Frequency_prop, sizeof(uint64_t), &Platform.CPU.CPUFrequency); + if (Platform->CPU.CPUFrequency != 0) + DT__AddProperty(efiPlatformNode, CPU_Frequency_prop, sizeof(uint64_t), &Platform->CPU.CPUFrequency); // Export system-id. Can be disabled with SystemId=No in com.apple.Boot.plist if ((ret=getSystemID())) Index: branches/meklort/i386/boot2/resume.c =================================================================== --- branches/meklort/i386/boot2/resume.c (revision 542) +++ branches/meklort/i386/boot2/resume.c (revision 543) @@ -159,7 +159,9 @@ uint8_t progressSaveUnder[kIOHibernateProgressCount][kIOHibernateProgressSaveUnderSize]; ReadFileAtOffset (image_filename, (char *)buffer, sizeof(IOHibernateImageHeader), preview_offset+header->previewSize); +#ifndef OPTION_ROM drawPreview ((void *)(long)(buffer+preview_offset + header->previewPageListSize), &(progressSaveUnder[0][0])); +#endif previewTotalSectors = (imageSize-(preview_offset+header->previewSize))/512; previewLoadedSectors = 0; previewSaveunder = &(progressSaveUnder[0][0]); Index: branches/meklort/i386/boot2/graphics.c =================================================================== --- branches/meklort/i386/boot2/graphics.c (revision 542) +++ branches/meklort/i386/boot2/graphics.c (revision 543) @@ -46,136 +46,10 @@ #define MIN(x, y) ((x) < (y) ? (x) : (y)) -//========================================================================== -// getVBEInfoString +#ifndef OPTION_ROM +#endif -char *getVBEInfoString() -{ - VBEInfoBlock vbeInfo; - int err, small; - char *buff = malloc(sizeof(char)*256); - if(!buff) return 0; - - 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); - - sprintf(buff, "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; -} - //========================================================================== -// - -void -printVBEModeInfo() -{ - VBEInfoBlock vbeInfo; - unsigned short * modePtr; - VBEModeInfoBlock modeInfo; - int err; - int line; - - bzero( &vbeInfo, sizeof(vbeInfo) ); - strcpy( (char*)&vbeInfo, "VBE2" ); - err = getVBEInfo( &vbeInfo ); - if ( err != errSuccess ) - return; - - line = 0; - - // Activate and clear page 1 - setActiveDisplayPage(1); - clearScreenRows(0, 24); - setCursorPosition( 0, 0, 1 ); - - printf( getVBEInfoString() ); - printf("Video modes supported:\n", VBEDecodeFP(const char *, vbeInfo.OEMStringPtr)); - - // Loop through the mode list, and find the matching mode. - - 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; - } - - printf("Mode %x: %dx%dx%d mm:%d attr:%x\n", - *modePtr, modeInfo.XResolution, modeInfo.YResolution, - modeInfo.BitsPerPixel, modeInfo.MemoryModel, - modeInfo.ModeAttributes); - - if (line++ >= 20) { - pause(); - line = 0; - clearScreenRows(0, 24); - setCursorPosition( 0, 0, 1 ); - } - } - if (line != 0) { - pause(); - } - setActiveDisplayPage(0); -} - -char *getVBEModeInfoString() -{ - VBEInfoBlock vbeInfo; - unsigned short * modePtr; - VBEModeInfoBlock modeInfo; - int err; - - bzero( &vbeInfo, sizeof(vbeInfo) ); - strcpy( (char*)&vbeInfo, "VBE2" ); - err = getVBEInfo( &vbeInfo ); - if ( err != errSuccess ) - return 0; - - char *buff=malloc(sizeof(char)*3072); - if(!buff) return 0; - - // Loop through the mode list, and find the matching mode. - 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; - } - - sprintf(buff+strlen(buff), "Mode %x: %dx%dx%d mm:%d attr:%x\n", - *modePtr, modeInfo.XResolution, modeInfo.YResolution, - modeInfo.BitsPerPixel, modeInfo.MemoryModel, - modeInfo.ModeAttributes); - - } - return buff; -} - -//========================================================================== // getVESAModeWithProperties // // Return the VESA mode that matches the properties specified. @@ -465,170 +339,10 @@ return err; } -int -convertImage( unsigned short width, - unsigned short height, - const unsigned char *imageData, - unsigned char **newImageData ) -{ - int cnt; - unsigned char *img = 0; - unsigned short *img16; - unsigned long *img32; - - switch ( VIDEO(depth) ) { - case 16 : - img16 = malloc(width * height * 2); - if ( !img16 ) break; - for (cnt = 0; cnt < (width * height); cnt++) - img16[cnt] = lookUpCLUTIndex(imageData[cnt], 16); - img = (unsigned char *)img16; - break; - - case 32 : - img32 = malloc(width * height * 4); - if ( !img32 ) break; - for (cnt = 0; cnt < (width * height); cnt++) - img32[cnt] = lookUpCLUTIndex(imageData[cnt], 32); - img = (unsigned char *)img32; - break; - - default : - img = malloc(width * height); - bcopy(imageData, img, width * height); - break; - } - *newImageData = img; - return 0; -} +#ifndef OPTION_ROM -void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, - uint8_t *data) -{ - uint16_t drawWidth; - uint8_t *vram = (uint8_t *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + 4 * x; - - drawWidth = MIN(width, VIDEO(width) - x); - height = MIN(height, VIDEO(height) - y); - while (height--) { - switch (VIDEO (depth)) - { - case 32: /* Optimized version*/ - { - uint32_t s; uint32_t* d; // Source (img) and destination (bkgd) pixels - 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)); - d = (uint32_t*) (vram + pos); - - // Flip B and R in source - // TODO: use XCHG and inline assembly to do this in a faster, saner way - tempB = (s & 0xFF0000); // save B - s = (s & 0xFF00FFFF) | ((s & 0xFF) << 16); // put R in B - s = (s & 0xFFFFFF00) | (tempB >> 16); // put B in R - - a = (s >> 24) + 1; - - dstrb = *d & 0xFF00FF; dstg = *d & 0xFF00; - srcrb = s & 0xFF00FF; srcg = s & 0xFF00; - - drb = srcrb - dstrb; - dg = srcg - dstg; - drb *= a; dg *= a; - drb >>= 8; dg >>= 8; - - rb = (drb + dstrb) & 0xFF00FF; - g = (dg + dstg) & 0xFF00; - - *d = rb | g; - } - } - break; - - default: /*Universal version*/ - { - uint32_t s; - uint32_t a; // Alpha - 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)); - - sb = (s & 0xFF0000) >> 16; - sg = (s & 0xFF00) >> 8; - sr = (s & 0xFF); - - a = (s >> 24) + 1; - - switch (VIDEO (depth)) - { - case 24: - db = ((*(uint32_t *)(vram + bpp*pos))&0xff); - dg = ((*(uint32_t *)(vram + bpp*pos))&0xff00)>>8; - dr = ((*(uint32_t *)(vram + bpp*pos))&0xff0000)>>16; - break; - case 16://16-bit seems to be 15-bit - /* db = ((*(uint16_t *)(vram + bpp*pos))&0x1f)<<3; - dg = ((*(uint16_t *)(vram + bpp*pos))&0x07e0)>>3; - dr = ((*(uint16_t *)(vram + bpp*pos))&0xf800)>>8; - break; */ - case 15: - 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; - default: - return; - } - - dr = (((sr - dr) * a) >> 8) + dr; - dg = (((sg - dg) * a) >> 8) + dg; - db = (((sb - db) * a) >> 8) + db; - switch (VIDEO (depth)) - { - case 24: - *(uint32_t *)(vram + bpp*pos) = (*(uint32_t *)(vram + bpp*pos) &0xff000000) - | (db&0xff) | ((dg&0xff)<<8) | ((dr&0xff)<<16); - break; - case 16: - // *(uint16_t *)(vram + bpp*pos) = ((db&0xf8)>>3) | ((dg&0xfc)<<3) | ((dr&0xf8)<<8); - // break; - case 15: - *(uint16_t *)(vram + bpp*pos) = ((db&0xf8)>>3) | ((dg&0xf8)<<2) | ((dr&0xf8)<<7); - break; - } - - } - } - break; - } - vram += VIDEO(rowBytes); - data += width * 4; - } -} -void drawCheckerBoard() -{ - uint32_t *vram = (uint32_t *) VIDEO(baseAddr); - uint16_t x, y; - uint8_t color; - - for (y = 0; y < VIDEO(height); y++, vram += VIDEO(width)) { - for (x = 0; x < VIDEO(width); x++) { - color = 204 + 51 * (((x / 8) % 2) == ((y / 8) % 2)); - vram[x] = (color << 16) | (color << 8) | color; - } - } -} - //========================================================================== // LookUpCLUTIndex @@ -701,29 +415,6 @@ } } -//========================================================================== -// drawDataRectangle - -void drawDataRectangle( unsigned short x, - unsigned short y, - unsigned short width, - unsigned short height, - unsigned char * data ) -{ - unsigned short drawWidth; - long pixelBytes = VIDEO(depth) / 8; - unsigned char * vram = (unsigned char *) VIDEO(baseAddr) + - VIDEO(rowBytes) * y + pixelBytes * x; - - drawWidth = MIN(width, VIDEO(width) - x); - height = MIN(height, VIDEO(height) - y); - while ( height-- ) { - bcopy( data, vram, drawWidth * pixelBytes ); - vram += VIDEO(rowBytes); - data += width * pixelBytes; - } -} - void loadImageScale (void *input, int iw, int ih, int ip, void *output, int ow, int oh, int op, int or) { @@ -848,7 +539,6 @@ } } } - void updateProgressBar(uint8_t * saveunder, int32_t firstBlob, int32_t select) { uint8_t * screen; @@ -903,6 +593,7 @@ } } } +#endif //========================================================================== @@ -1045,34 +736,10 @@ currentIndicator = 0; } -void getGraphicModeParams(unsigned long params[]) { - - params[3] = 0; - - VBEModeInfoBlock minfo; - - unsigned short vesaVersion; - unsigned short mode = modeEndOfList; - - getNumberArrayFromProperty( kGraphicsModeKey, params, 4); - - mode = getVESAModeWithProperties( params[0], params[1], params[2], - maColorModeBit | - maModeIsSupportedBit | - maGraphicsModeBit | - maLinearFrameBufferAvailBit, - 0, - &minfo, &vesaVersion ); - - params[0] = minfo.XResolution; - params[1] = minfo.YResolution; - params[2] = 32; -} - //========================================================================== // Return the current video mode, VGA_TEXT_MODE or GRAPHICS_MODE. -int getVideoMode(void) +inline int getVideoMode(void) { return bootArgs->Video.v_display; } @@ -1090,7 +757,7 @@ spinActivityIndicator(int sectors) { static unsigned long lastTickTime = 0, currentTickTime; - +#ifndef OPTION_ROM if (previewTotalSectors && previewSaveunder) { int blob, lastBlob; @@ -1103,7 +770,7 @@ updateProgressBar (previewSaveunder, lastBlob, blob); return; } - +#endif currentTickTime = time18(); // late binding if (currentTickTime < lastTickTime + MIN_TICKS) { Index: branches/meklort/i386/boot2/boot.c =================================================================== --- branches/meklort/i386/boot2/boot.c (revision 542) +++ branches/meklort/i386/boot2/boot.c (revision 543) @@ -76,8 +76,6 @@ //int menucount = 0; int gDeviceCount = 0; -bool recoveryMode = false; - BVRef bvr; BVRef menuBVR; BVRef bvChain; @@ -86,7 +84,9 @@ static unsigned long Adler32(unsigned char *buffer, long length); static bool getOSVersion(char *str); +#ifndef OPTION_ROM static bool gUnloadPXEOnExit = false; +#endif /* * How long to wait (in seconds) to load the @@ -184,9 +184,7 @@ printf("Press any key to continue..."); getc(); } - - usb_loop(); - + // If we were in text mode, switch to graphics mode. // This will draw the boot graphics unless we are in // verbose mode. @@ -203,9 +201,7 @@ setupBooterLog(); finalizeBootStruct(); - - usb_loop(); - + execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL); // Notify modules that the kernel is about to be started // Jump to kernel's entry point. There's no going back now. Index: branches/meklort/i386/boot2/drivers.c =================================================================== --- branches/meklort/i386/boot2/drivers.c (revision 542) +++ branches/meklort/i386/boot2/drivers.c (revision 543) @@ -42,28 +42,26 @@ extern char gMacOSVersion; -extern int recoveryMode; - struct Module { - struct Module *nextModule; - long willLoad; - TagPtr dict; - char *plistAddr; - long plistLength; - char *executablePath; - char *bundlePath; - long bundlePathLength; + struct Module *nextModule; + long willLoad; + TagPtr dict; + char *plistAddr; + long plistLength; + char *executablePath; + char *bundlePath; + long bundlePathLength; }; typedef struct Module Module, *ModulePtr; struct DriverInfo { - char *plistAddr; - long plistLength; - void *executableAddr; - long executableLength; - void *bundlePathAddr; - long bundlePathLength; + char *plistAddr; + long plistLength; + void *executableAddr; + long executableLength; + void *bundlePathAddr; + long bundlePathLength; }; typedef struct DriverInfo DriverInfo, *DriverInfoPtr; @@ -71,28 +69,32 @@ #define kDriverPackageSignature2 'MOSX' struct DriversPackage { - unsigned long signature1; - unsigned long signature2; - unsigned long length; - unsigned long alder32; - unsigned long version; - unsigned long numDrivers; - unsigned long reserved1; - unsigned long reserved2; + unsigned long signature1; + unsigned long signature2; + unsigned long length; + unsigned long alder32; + unsigned long version; + unsigned long numDrivers; + unsigned long reserved1; + unsigned long reserved2; }; typedef struct DriversPackage DriversPackage; enum { - kCFBundleType2, - kCFBundleType3 + kCFBundleType2, + kCFBundleType3 }; +#ifndef OPTION_ROM long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p); +#endif static unsigned long Alder32( unsigned char * buffer, long length ); static long FileLoadDrivers(char *dirSpec, long plugin); +#ifndef OPTION_ROM static long NetLoadDrivers(char *dirSpec); +#endif static long LoadDriverMKext(char *fileSpec); static long LoadDriverPList(char *dirSpec, char *name, long bundleType); static long LoadMatchedModules(void); @@ -121,7 +123,7 @@ lowHalf = 1; highHalf = 0; - + for ( cnt = 0; cnt < length; cnt++ ) { if ((cnt % 5000) == 0) @@ -129,16 +131,16 @@ lowHalf %= 65521L; highHalf %= 65521L; } - + lowHalf += buffer[cnt]; highHalf += lowHalf; } - + lowHalf %= 65521L; highHalf %= 65521L; - + result = (highHalf << 16) | lowHalf; - + return result; } @@ -154,10 +156,10 @@ gFileSpec = malloc( 4096 ); gTempSpec = malloc( 4096 ); gFileName = malloc( 4096 ); - + if ( !gExtensionsSpec || !gDriverSpec || !gFileSpec || !gTempSpec || !gFileName ) stop("InitDriverSupport error"); - + return 0; } @@ -167,16 +169,17 @@ long LoadDrivers( char * dirSpec ) { char dirSpecExtra[1024]; - + if ( InitDriverSupport() != 0 ) return 0; - + +#ifndef OPTION_ROM // Load extra drivers if a hook has been installed. if (LoadExtraDrivers_p != NULL) { (*LoadExtraDrivers_p)(&FileLoadDrivers); } - + if ( gBootFileType == kNetworkDeviceType ) { if (NetLoadDrivers(dirSpec) != 0) { @@ -184,42 +187,18 @@ return -1; } } - else if ( gBootFileType == kBlockDeviceType ) - { - // First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0). - if(recoveryMode) + else +#endif + if ( gBootFileType == kBlockDeviceType ) { - verbose("Loading recovery extensions\n"); - - // Next try to load Extra extensions from the selected root partition. - strcpy(dirSpecExtra, "/Extra/"); - if (FileLoadDrivers(dirSpecExtra, 0) != 0) - { - // If failed, then try to load Extra extensions from the boot partition - // in case we have a separate booter partition or a bt(0,0) aliased ramdisk. - if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no) - || (gRAMDiskVolume && gRAMDiskBTAliased) ) - { - // Next try a specfic OS version folder ie 10.5 - sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion); - if (FileLoadDrivers(dirSpecExtra, 0) != 0) - { - // Next we'll try the base - strcpy(dirSpecExtra, "bt(0,0)/Extra/"); - FileLoadDrivers(dirSpecExtra, 0); - } - } - } - - } - else - { + // First try to load Extra extensions from the ramdisk if isn't aliased as bt(0,0). +#ifndef OPTION_ROM if (gRAMDiskVolume && !gRAMDiskBTAliased) { strcpy(dirSpecExtra, "rd(0,0)/Extra/"); FileLoadDrivers(dirSpecExtra, 0); } - +#endif // Next try to load Extra extensions from the selected root partition. strcpy(dirSpecExtra, "/Extra/"); if (FileLoadDrivers(dirSpecExtra, 0) != 0) @@ -227,7 +206,11 @@ // If failed, then try to load Extra extensions from the boot partition // in case we have a separate booter partition or a bt(0,0) aliased ramdisk. if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no) +#ifndef OPTION_ROM || (gRAMDiskVolume && gRAMDiskBTAliased) ) +#else + ) +#endif { // First try a specfic OS version folder ie 10.5 sprintf(dirSpecExtra, "bt(0,0)/Extra/%s/", &gMacOSVersion); @@ -240,50 +223,49 @@ } } + // TODO: fix this, the order does matter, and it's not correct now. + // Also try to load Extensions from boot helper partitions. + if (gBootVolume->flags & kBVFlagBooter) + { + strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/"); + if (FileLoadDrivers(dirSpecExtra, 0) != 0) + { + strcpy(dirSpecExtra, "/com.apple.boot.R/System/Library/"); + if (FileLoadDrivers(dirSpecExtra, 0) != 0) + { + strcpy(dirSpecExtra, "/com.apple.boot.S/System/Library/"); + FileLoadDrivers(dirSpecExtra, 0); + } + } + } + + if (gMKextName[0] != '\0') + { + verbose("LoadDrivers: Loading from [%s]\n", gMKextName); + if ( LoadDriverMKext(gMKextName) != 0 ) + { + error("Could not load %s\n", gMKextName); + return -1; + } + } + else + { + strcpy(gExtensionsSpec, dirSpec); + strcat(gExtensionsSpec, "System/Library/"); + FileLoadDrivers(gExtensionsSpec, 0); + } } - - // Also try to load Extensions from boot helper partitions. - if (gBootVolume->flags & kBVFlagBooter) - { - strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/"); - if (FileLoadDrivers(dirSpecExtra, 0) != 0) - { - strcpy(dirSpecExtra, "/com.apple.boot.R/System/Library/"); - if (FileLoadDrivers(dirSpecExtra, 0) != 0) - { - strcpy(dirSpecExtra, "/com.apple.boot.S/System/Library/"); - FileLoadDrivers(dirSpecExtra, 0); - } - } - } - - if (gMKextName[0] != '\0') - { - verbose("LoadDrivers: Loading from [%s]\n", gMKextName); - if ( LoadDriverMKext(gMKextName) != 0 ) - { - error("Could not load %s\n", gMKextName); - return -1; - } - } - else - { - strcpy(gExtensionsSpec, dirSpec); - strcat(gExtensionsSpec, "System/Library/"); - FileLoadDrivers(gExtensionsSpec, 0); - } - } - else - { - return 0; - } - + else + { + return 0; + } + MatchPersonalities(); - + MatchLibraries(); - + LoadMatchedModules(); - + return 0; } @@ -293,23 +275,23 @@ static long FileLoadMKext( const char * dirSpec, const char * extDirSpec ) { - long ret, flags, time, time2; - char altDirSpec[512]; + long ret, flags, time, time2; + char altDirSpec[512]; - sprintf (altDirSpec, "%s%s", dirSpec, extDirSpec); - ret = GetFileInfo(altDirSpec, "Extensions.mkext", &flags, &time); - if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat)) - { - ret = GetFileInfo(dirSpec, "Extensions", &flags, &time2); - if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeDirectory) || - (((gBootMode & kBootModeSafe) == 0) && (time == (time2 + 1)))) - { - sprintf(gDriverSpec, "%sExtensions.mkext", altDirSpec); - verbose("LoadDrivers: Loading from [%s]\n", gDriverSpec); - if (LoadDriverMKext(gDriverSpec) == 0) return 0; - } - } - return -1; + sprintf (altDirSpec, "%s%s", dirSpec, extDirSpec); + ret = GetFileInfo(altDirSpec, "Extensions.mkext", &flags, &time); + if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat)) + { + ret = GetFileInfo(dirSpec, "Extensions", &flags, &time2); + if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeDirectory) || + (((gBootMode & kBootModeSafe) == 0) && (time == (time2 + 1)))) + { + sprintf(gDriverSpec, "%sExtensions.mkext", altDirSpec); + verbose("LoadDrivers: Loading from [%s]\n", gDriverSpec); + if (LoadDriverMKext(gDriverSpec) == 0) return 0; + } + } + return -1; } //========================================================================== @@ -322,78 +304,78 @@ long long index; long result = -1; const char * name; - + if ( !plugin ) { // First try 10.6's path for loading Extensions.mkext. if (FileLoadMKext(dirSpec, "Caches/com.apple.kext.caches/Startup/") == 0) - return 0; - + return 0; + // Next try the legacy path. else if (FileLoadMKext(dirSpec, "") == 0) - return 0; - + return 0; + strcat(dirSpec, "Extensions"); } - + index = 0; while (1) { ret = GetDirEntry(dirSpec, &index, &name, &flags, &time); if (ret == -1) break; - + // Make sure this is a directory. if ((flags & kFileTypeMask) != kFileTypeDirectory) continue; // Make sure this is a kext. length = strlen(name); if (strcmp(name + length - 5, ".kext")) continue; - + // Save the file name. strcpy(gFileName, name); - + // Determine the bundle type. sprintf(gTempSpec, "%s/%s", dirSpec, gFileName); ret = GetFileInfo(gTempSpec, "Contents", &flags, &time); if (ret == 0) bundleType = kCFBundleType2; else bundleType = kCFBundleType3; - + if (!plugin) sprintf(gDriverSpec, "%s/%s/%sPlugIns", dirSpec, gFileName, (bundleType == kCFBundleType2) ? "Contents/" : ""); - + ret = LoadDriverPList(dirSpec, gFileName, bundleType); - + if (result != 0) - result = ret; - + result = ret; + if (!plugin) - FileLoadDrivers(gDriverSpec, 1); + FileLoadDrivers(gDriverSpec, 1); } - + return result; } //========================================================================== // - +#ifndef OPTION_ROM static long NetLoadDrivers( char * dirSpec ) { long tries; - + #if NODEF long cnt; - + // Get the name of the kernel cnt = strlen(gBootFile); while (cnt--) { if ((gBootFile[cnt] == '\\') || (gBootFile[cnt] == ',')) { - cnt++; - break; + cnt++; + break; } } #endif - + // INTEL modification sprintf(gDriverSpec, "%s%s.mkext", dirSpec, bootInfo->bootFile); @@ -405,10 +387,10 @@ if (LoadDriverMKext(gDriverSpec) == 0) break; } if (tries == -1) return -1; - + return 0; } - +#endif //========================================================================== // loadDriverMKext @@ -419,40 +401,40 @@ long length; char segName[32]; DriversPackage * package; - + #define GetPackageElement(e) OSSwapBigToHostInt32(package->e) - + // Load the MKext. length = LoadThinFatFile(fileSpec, (void **)&package); if (length < sizeof (DriversPackage)) return -1; - + // call hook to notify modules that the mkext has been loaded execute_hook("LoadDriverMKext", (void*)fileSpec, (void*)package, (void*) length, NULL); - + // Verify the MKext. if (( GetPackageElement(signature1) != kDriverPackageSignature1) || ( GetPackageElement(signature2) != kDriverPackageSignature2) || ( GetPackageElement(length) > kLoadSize ) || ( GetPackageElement(alder32) != - Alder32((unsigned char *)&package->version, GetPackageElement(length) - 0x10) ) ) + Alder32((unsigned char *)&package->version, GetPackageElement(length) - 0x10) ) ) { return -1; } - + // Make space for the MKext. driversLength = GetPackageElement(length); driversAddr = AllocateKernelMemory(driversLength); - + // Copy the MKext. memcpy((void *)driversAddr, (void *)package, driversLength); - + // Add the MKext to the memory map. sprintf(segName, "DriversPackage-%lx", driversAddr); AllocateMemoryRange(segName, driversAddr, driversLength, kBootDriverTypeMKEXT); - + return 0; } @@ -469,66 +451,66 @@ char * tmpExecutablePath = 0; char * tmpBundlePath = 0; long ret = -1; - + do { // Save the driver path. sprintf(gFileSpec, "%s/%s/%s", dirSpec, name, (bundleType == kCFBundleType2) ? "Contents/MacOS/" : ""); executablePathLength = strlen(gFileSpec) + 1; - + tmpExecutablePath = malloc(executablePathLength); if (tmpExecutablePath == 0) break; - + strcpy(tmpExecutablePath, gFileSpec); - + sprintf(gFileSpec, "%s/%s", dirSpec, name); bundlePathLength = strlen(gFileSpec) + 1; - + tmpBundlePath = malloc(bundlePathLength); if (tmpBundlePath == 0) break; - + strcpy(tmpBundlePath, gFileSpec); - + // Construct the file spec to the plist, then load it. - + sprintf(gFileSpec, "%s/%s/%sInfo.plist", dirSpec, name, (bundleType == kCFBundleType2) ? "Contents/" : ""); - + length = LoadFile(gFileSpec); if (length == -1) break; - + length = length + 1; buffer = malloc(length); if (buffer == 0) break; - + strlcpy(buffer, (char *)kLoadAddr, length); - + // Parse the plist. - + ret = ParseXML(buffer, &module, &personalities); if (ret != 0) { break; } - + // Allocate memory for the driver path and the plist. - + module->executablePath = tmpExecutablePath; module->bundlePath = tmpBundlePath; module->bundlePathLength = bundlePathLength; module->plistAddr = malloc(length); - + if ((module->executablePath == 0) || (module->bundlePath == 0) || (module->plistAddr == 0)) break; - + // Save the driver path in the module. //strcpy(module->driverPath, tmpDriverPath); tmpExecutablePath = 0; tmpBundlePath = 0; - + // Add the plist to the module. - + strlcpy(module->plistAddr, (char *)kLoadAddr, length); module->plistLength = length; - + // Add the module to the end of the module list. if (gModuleHead == 0) @@ -536,9 +518,9 @@ else gModuleTail->nextModule = module; gModuleTail = module; - + // Add the persionalities to the personality list. - + if (personalities) personalities = personalities->tag; while (personalities != 0) { @@ -558,7 +540,7 @@ if ( buffer ) free( buffer ); if ( tmpExecutablePath ) free( tmpExecutablePath ); if ( tmpBundlePath ) free( tmpBundlePath ); - + return ret; } @@ -575,16 +557,16 @@ DriverInfoPtr driver; long length, driverAddr, driverLength; void *executableAddr = 0; - - + + module = gModuleHead; - + while (module != 0) { if (module->willLoad) { prop = XMLGetProperty(module->dict, kPropCFBundleExecutable); - + if (prop != 0) { fileName = prop->string; @@ -599,22 +581,22 @@ } else length = 0; - + if (length != -1) { - //driverModuleAddr = (void *)kLoadAddr; + //driverModuleAddr = (void *)kLoadAddr; //if (length != 0) //{ - // ThinFatFile(&driverModuleAddr, &length); - //} - + // ThinFatFile(&driverModuleAddr, &length); + //} + // Make make in the image area. execute_hook("LoadMatchedModules", module, &length, executableAddr, NULL); - + driverLength = sizeof(DriverInfo) + module->plistLength + length + module->bundlePathLength; driverAddr = AllocateKernelMemory(driverLength); - + // Set up the DriverInfo. driver = (DriverInfoPtr)driverAddr; driver->plistAddr = (char *)(driverAddr + sizeof(DriverInfo)); @@ -622,7 +604,7 @@ if (length != 0) { driver->executableAddr = (void *)(driverAddr + sizeof(DriverInfo) + - module->plistLength); + module->plistLength); driver->executableLength = length; } else @@ -631,9 +613,9 @@ driver->executableLength = 0; } driver->bundlePathAddr = (void *)(driverAddr + sizeof(DriverInfo) + - module->plistLength + driver->executableLength); + module->plistLength + driver->executableLength); driver->bundlePathLength = module->bundlePathLength; - + // Save the plist, module and bundle. strcpy(driver->plistAddr, module->plistAddr); if (length != 0) @@ -641,7 +623,7 @@ memcpy(driver->executableAddr, executableAddr, length); } strcpy(driver->bundlePathAddr, module->bundlePath); - + // Add an entry to the memory map. sprintf(segName, "Driver-%lx", (unsigned long)driver); AllocateMemoryRange(segName, driverAddr, driverLength, @@ -650,7 +632,7 @@ } module = module->nextModule; } - + return 0; } @@ -673,7 +655,7 @@ TagPtr prop, prop2; ModulePtr module, module2; long done; - + do { done = 1; module = gModuleHead; @@ -709,7 +691,7 @@ } } while (!done); - + return 0; } @@ -746,33 +728,33 @@ long length, pos; TagPtr moduleDict, required; ModulePtr tmpModule; - + pos = 0; - + while (1) { length = XMLParseNextTag(buffer + pos, &moduleDict); if (length == -1) break; - + pos += length; - + if (moduleDict == 0) continue; if (moduleDict->type == kTagTypeDict) break; - + XMLFreeTag(moduleDict); } - + if (length == -1) return -1; - + required = XMLGetProperty(moduleDict, kPropOSBundleRequired); if ( (required == 0) || - (required->type != kTagTypeString) || - !strcmp(required->string, "Safe Boot")) + (required->type != kTagTypeString) || + !strcmp(required->string, "Safe Boot")) { XMLFreeTag(moduleDict); return -2; } - + tmpModule = malloc(sizeof(Module)); if (tmpModule == 0) { @@ -780,17 +762,17 @@ return -1; } tmpModule->dict = moduleDict; - + // For now, load any module that has OSBundleRequired != "Safe Boot". - + tmpModule->willLoad = 1; - + *module = tmpModule; - + // Get the personalities. - + *personalities = XMLGetProperty(moduleDict, kPropIOKitPersonalities); - + return 0; } @@ -806,7 +788,7 @@ u_int32_t uncompressed_size, size; void *buffer; unsigned long len; - + #if 0 printf("kernel header:\n"); printf("signature: 0x%x\n", kernel_header->signature); @@ -816,7 +798,7 @@ printf("compressed_size: 0x%x\n", kernel_header->compressed_size); getc(); #endif - + if (kernel_header->signature == OSSwapBigToHostConstInt32('comp')) { if (kernel_header->compress_type != OSSwapBigToHostConstInt32('lzss')) { error("kernel compression is bad\n"); @@ -828,10 +810,10 @@ if (kernel_header->root_path[0] && strcmp(gBootFile, kernel_header->root_path)) return -1; #endif - + uncompressed_size = OSSwapBigToHostInt32(kernel_header->uncompressed_size); binary = buffer = malloc(uncompressed_size); - + size = decompress_lzss((u_int8_t *) binary, &kernel_header->data[0], OSSwapBigToHostInt32(kernel_header->compressed_size)); if (uncompressed_size != size) { @@ -844,24 +826,24 @@ return -1; } } - - ret = ThinFatFile(&binary, &len); - if (ret == 0 && len == 0 && archCpuType==CPU_TYPE_X86_64) - { - archCpuType=CPU_TYPE_I386; - ret = ThinFatFile(&binary, &len); - } - + + ret = ThinFatFile(&binary, &len); + if (ret == 0 && len == 0 && archCpuType==CPU_TYPE_X86_64) + { + archCpuType=CPU_TYPE_I386; + ret = ThinFatFile(&binary, &len); + } + //patch_kernel(binary); - ret = DecodeMachO(binary, rentry, raddr, rsize); + ret = DecodeMachO(binary, rentry, raddr, rsize); - if (ret<0 && archCpuType==CPU_TYPE_X86_64) - { - archCpuType=CPU_TYPE_I386; - ret = DecodeMachO(binary, rentry, raddr, rsize); - } + if (ret<0 && archCpuType==CPU_TYPE_X86_64) + { + archCpuType=CPU_TYPE_I386; + ret = DecodeMachO(binary, rentry, raddr, rsize); + } - - return ret; + + return ret; } Index: branches/meklort/i386/boot2/prompt.c =================================================================== --- branches/meklort/i386/boot2/prompt.c (revision 542) +++ branches/meklort/i386/boot2/prompt.c (revision 543) @@ -35,7 +35,9 @@ char bootPrompt[] = "Press Enter to start up Darwin/x86 with no options, or you can:\n" " Type -v and press Enter to start up with diagnostic messages\n" +#ifndef OPTION_ROM " Type ? and press Enter to learn about advanced startup options\n\n" +#endif "boot: "; #ifndef OPTION_ROM Index: branches/meklort/i386/boot2/ramdisk.c =================================================================== --- branches/meklort/i386/boot2/ramdisk.c (revision 542) +++ branches/meklort/i386/boot2/ramdisk.c (revision 543) @@ -9,12 +9,14 @@ #include "multiboot.h" #include "ramdisk.h" +#ifndef OPTION_ROM struct multiboot_info * gRAMDiskMI = NULL; // gRAMDiskVolume holds the bvr for the mounted ramdisk image. BVRef gRAMDiskVolume = NULL; bool gRAMDiskBTAliased = false; char gRAMDiskFile[512]; +#endif // Notify OS X that a ramdisk has been setup. XNU with attach this to /dev/md0 void md0Ramdisk() Index: branches/meklort/i386/boot2/options.c =================================================================== --- branches/meklort/i386/boot2/options.c (revision 542) +++ branches/meklort/i386/boot2/options.c (revision 543) @@ -449,6 +449,7 @@ return kn; } +#ifndef OPTION_ROM //========================================================================== void printMemoryInfo(void) @@ -506,7 +507,6 @@ } return buff; } - //========================================================================== void lspci(void) @@ -525,6 +525,7 @@ setActiveDisplayPage(0); } } +#endif //========================================================================== @@ -613,7 +614,6 @@ if (!(gBootMode & kBootModeQuiet)) { // Display banner and show hardware info. printf(bootBanner, (bootInfo->convmem + bootInfo->extmem) / 1024); - printf(getVBEInfoString()); } changeCursor(0, kMenuTopRow, kCursorTypeUnderline, 0); verbose("Scanning device %x...", gBIOSDev); @@ -761,11 +761,15 @@ /* * TODO: this needs to be refactored. */ +#ifndef OPTION_ROM +#ifdef UNUSED if (strcmp( booterCommand, "video" ) == 0) { printVBEModeInfo(); - } - else if ( strcmp( booterCommand, "memory" ) == 0) + } + else +#endif + if ( strcmp( booterCommand, "memory" ) == 0) { printMemoryInfo(); } @@ -773,7 +777,6 @@ { lspci(); } -#ifndef OPTION_ROM else if (strcmp(booterCommand, "more") == 0) { showTextFile(booterParam); Index: branches/meklort/i386/modules/HPET/HPET.c =================================================================== --- branches/meklort/i386/modules/HPET/HPET.c (revision 0) +++ branches/meklort/i386/modules/HPET/HPET.c (revision 543) @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2009 Evan Lojewski. All rights reserved. + * + */ + +#include "libsaio.h" +#include "modules.h" +#include "boot.h" +#include "bootstruct.h" +#include "pci.h" +#include "hpet.h" + +#ifndef DEBUG_HPET +#define DEBUG_HPET 0 +#endif + +#if DEBUG_HPET +#define DBG(x...) printf(x) +#else +#define DBG(x...) +#endif + +void force_enable_hpet_intel(pci_dt_t *lpc_dev); +void force_enable_hpet_via(pci_dt_t *lpc_dev); + + +void HPET_hook(void* arg1, void* arg2, void* arg3, void* arg4) +{ + pci_dt_t* current = arg1; + + if(current->class_id != PCI_CLASS_BRIDGE_ISA) return; + + + bool do_enable_hpet = false; + getBoolForKey(kForceHPET, &do_enable_hpet, &bootInfo->bootConfig); + + if (do_enable_hpet) + force_enable_hpet(current); +} + +void HPET_start() +{ + register_hook_callback("PCIDevice", &HPET_hook); +} + +/* + * Force HPET enabled + * + * via fix from http://forum.voodooprojects.org/index.php/topic,1596.0.html + */ + +static struct lpc_controller_t lpc_controllers_intel[] = { + + // Default unknown chipset + { 0, 0, "" }, + + // Intel + { 0x8086, 0x24dc, "ICH5" }, + { 0x8086, 0x2640, "ICH6" }, + { 0x8086, 0x2641, "ICH6M" }, + + { 0x8086, 0x27b0, "ICH7 DH" }, + { 0x8086, 0x27b8, "ICH7" }, + { 0x8086, 0x27b9, "ICH7M" }, + { 0x8086, 0x27bd, "ICH7M DH" }, + + { 0x8086, 0x2810, "ICH8R" }, + { 0x8086, 0x2811, "ICH8M-E" }, + { 0x8086, 0x2812, "ICH8DH" }, + { 0x8086, 0x2814, "ICH8DO" }, + { 0x8086, 0x2815, "ICH8M" }, + + { 0x8086, 0x2912, "ICH9DH" }, + { 0x8086, 0x2914, "ICH9DO" }, + { 0x8086, 0x2916, "ICH9R" }, + { 0x8086, 0x2917, "ICH9M-E" }, + { 0x8086, 0x2918, "ICH9" }, + { 0x8086, 0x2919, "ICH9M" }, + + { 0x8086, 0x3a14, "ICH10DO" }, + { 0x8086, 0x3a16, "ICH10R" }, + { 0x8086, 0x3a18, "ICH10" }, + { 0x8086, 0x3a1a, "ICH10D" }, +}; + +static struct lpc_controller_t lpc_controllers_via[] = { + // Default unknown chipset + { 0, 0, "" }, + + { 0x1106, 0x3372, "VT8237S" }, +}; + + +void force_enable_hpet(pci_dt_t *lpc_dev) +{ + switch(lpc_dev->vendor_id) + { + case 0x8086: + force_enable_hpet_intel(lpc_dev); + break; + + case 0x1106: + force_enable_hpet_via(lpc_dev); + break; + } + + +#if DEBUG_HPET + printf("Press [Enter] to continue...\n"); + getc(); +#endif +} + +void force_enable_hpet_via(pci_dt_t *lpc_dev) +{ + uint32_t val, hpet_address = 0xFED00000; + int i; + + /* LPC on Intel ICH is always (?) at 00:1f.0 */ + for(i = 1; i < sizeof(lpc_controllers_via) / sizeof(lpc_controllers_via[0]); i++) + { + if ( (lpc_controllers_via[i].vendor == lpc_dev->vendor_id) + && (lpc_controllers_via[i].device == lpc_dev->device_id)) + { + val = pci_config_read32(lpc_dev->dev.addr, 0x68); + + DBG("VIA %s LPC Interface [%04x:%04x], MMIO\n", + lpc_controllers[i].name, lpc_dev->vendor_id, lpc_dev->device_id); + + if (val & 0x80) { + hpet_address = (val & ~0x3ff); + DBG("HPET at 0x%lx\n", hpet_address); + } + else + { + val = 0xfed00000 | 0x80; + pci_config_write32(lpc_dev->dev.addr, 0x68, val); + val = pci_config_read32(lpc_dev->dev.addr, 0x68); + if (val & 0x80) { + hpet_address = (val & ~0x3ff); + DBG("Force enabled HPET at 0x%lx\n", hpet_address); + } + else { + DBG("Unable to enable HPET"); + } + } + } + } +} + + + +void force_enable_hpet_intel(pci_dt_t *lpc_dev) +{ + uint32_t val, hpet_address = 0xFED00000; + int i; + void *rcba; + + /* LPC on Intel ICH is always (?) at 00:1f.0 */ + for(i = 1; i < sizeof(lpc_controllers_intel) / sizeof(lpc_controllers_intel[0]); i++) + { + if ( (lpc_controllers_intel[i].vendor == lpc_dev->vendor_id) + && (lpc_controllers_intel[i].device == lpc_dev->device_id)) + { + + rcba = (void *)(pci_config_read32(lpc_dev->dev.addr, 0xF0) & 0xFFFFC000); + + DBG("Intel(R) %s LPC Interface [%04x:%04x], MMIO @ 0x%lx\n", + lpc_controllers[i].name, lpc_dev->vendor_id, lpc_dev->device_id, rcba); + + if (rcba == 0) + printf(" RCBA disabled; cannot force enable HPET\n"); + else + { + val = REG32(rcba, 0x3404); + if (val & 0x80) + { + // HPET is enabled in HPTC. Just not reported by BIOS + DBG(" HPET is enabled in HPTC, just not reported by BIOS\n"); + hpet_address |= (val & 3) << 12 ; + DBG(" HPET MMIO @ 0x%lx\n", hpet_address); + } + else + { + // HPET disabled in HPTC. Trying to enable + DBG(" HPET is disabled in HPTC, trying to enable\n"); + REG32(rcba, 0x3404) = val | 0x80; + hpet_address |= (val & 3) << 12 ; + DBG(" Force enabled HPET, MMIO @ 0x%lx\n", hpet_address); + } + + // verify if the job is done + val = REG32(rcba, 0x3404); + if (!(val & 0x80)) + printf(" Failed to force enable HPET\n"); + } + break; + + } + } +} \ No newline at end of file Index: branches/meklort/i386/modules/HPET/hpet.h =================================================================== --- branches/meklort/i386/modules/HPET/hpet.h (revision 0) +++ branches/meklort/i386/modules/HPET/hpet.h (revision 543) @@ -0,0 +1,20 @@ +/* + * + */ + +#ifndef __LIBSAIO_HPET_H +#define __LIBSAIO_HPET_H + +#include "libsaio.h" + +#define REG32(base, reg) ((volatile uint32_t *)base)[(reg) >> 2] + +void force_enable_hpet(pci_dt_t *lpc_dev); + +struct lpc_controller_t { + unsigned vendor; + unsigned device; + char *name; +}; + +#endif /* !__LIBSAIO_HPET_H */ Index: branches/meklort/i386/modules/HPET/Makefile =================================================================== --- branches/meklort/i386/modules/HPET/Makefile (revision 0) +++ branches/meklort/i386/modules/HPET/Makefile (revision 543) @@ -0,0 +1,84 @@ + +MODULE_NAME = HPET +MODULE_VERSION = "1.0.0" +MODULE_COMPAT_VERSION = "1.0.0" +MODULE_START = _$(MODULE_NAME)_start +MODULE_DEPENDENCIES = + +DIR = HPET + +include ../../MakePaths.dir + +OBJROOT=../../../obj/i386/modules/$(DIR) +SYMROOT=../../../sym/i386/modules/ +DSTROOT=../../../dst/i386/modules/ + + +UTILDIR = ../../util +LIBSADIR = ../../libsa +LIBSAIODIR = ../../libsaio +BOOT2DIR = ../../boot2 + +INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone + +OPTIM = -Os -Oz +DEBUG = -DNOTHING +#DEBUG = -DDEBUG_HELLO_WORLD=1 +CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ + -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ + -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ + -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ + -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common -mdynamic-no-pic + +DEFINES= +CONFIG = hd +INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR) +ifneq "" "$(wildcard /bin/mkdirs)" + MKDIRS = /bin/mkdirs +else + MKDIRS = /bin/mkdir -p +endif +AS = as +LD = ld +# LIBS= -lc_static +LIBS= + +VPATH = $(OBJROOT):$(SYMROOT) + +HPET_OBJS = HPET.o + + +SFILES = +CFILES = +HFILES = +EXPORTED_HFILES = +INSTALLED_HFILES = +OTHERFILES = Makefile +ALLSRC = $(SFILES) $(CFILES) \ + $(HFILES) $(OTHERFILES) +DIRS_NEEDED = $(OBJROOT) $(SYMROOT) + +all embedtheme optionrom: ${HPET_OBJS} dylib + + +dylib: ${HPET_OBJS} + ld -flat_namespace -arch i386 \ + -undefined suppress \ + -alias $(MODULE_START) start \ + -dylib -read_only_relocs suppress \ + -S -x -Z -dead_strip_dylibs \ + -no_uuid \ + -current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \ + -final_output $(MODULE_NAME) \ + $(OBJROOT)/HPET.o -o $(SYMROOT)/$(MODULE_NAME).dylib + + + +HPET.o: + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "HPET.c" $(INC) -o "$(OBJROOT)/HPET.o" + +include ../../MakeInc.dir + +# dependencies +-include $(OBJROOT)/Makedep Index: branches/meklort/i386/modules/USBFix/USBFix.c =================================================================== --- branches/meklort/i386/modules/USBFix/USBFix.c (revision 0) +++ branches/meklort/i386/modules/USBFix/USBFix.c (revision 543) @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2009 Evan Lojewski. All rights reserved. + * + */ + +#include "libsaio.h" +#include "modules.h" +#include "pci.h" + +int usb_loop(); +void notify_usb_dev(pci_dt_t *pci_dev); + +void USBFix_pci_hook(void* binary, void* arg2, void* arg3, void* arg4) +{ + if(current->class_id != PCI_CLASS_SERIAL_USB) return; + + notify_usb_dev(current); +} + +void USBFix_start_hook(void* binary, void* arg2, void* arg3, void* arg4) +{ + usb_loop(); +} + + +void HelloWorld_start() +{ + //printf("Hooking 'ExecKernel'\n"); + register_hook_callback("PCIDevice", &USBFix_pci_hook); + register_hook_callback("Kernel Start", &USBFix_start_hook); + +} + Index: branches/meklort/i386/modules/USBFix/usb.c =================================================================== --- branches/meklort/i386/modules/USBFix/usb.c (revision 0) +++ branches/meklort/i386/modules/USBFix/usb.c (revision 543) @@ -0,0 +1,345 @@ +/* + * usb.c + * + * + * Created by mackerintel on 12/20/08. + * Copyright 2008 mackerintel. All rights reserved. + * + */ + +#include "libsaio.h" +#include "boot.h" +#include "bootstruct.h" +#include "pci.h" + +#ifndef DEBUG_USB +#define DEBUG_USB 0 +#endif + +#if DEBUG_USB +#define DBG(x...) printf(x) +#else +#define DBG(x...) +#endif + + +struct pciList +{ + pci_dt_t* pciDev; + struct pciList* next; +}; + +struct pciList* usbList = NULL; + +int legacy_off (pci_dt_t *pci_dev); +int ehci_acquire (pci_dt_t *pci_dev); +int uhci_reset (pci_dt_t *pci_dev); + +// Add usb device to the list +void notify_usb_dev(pci_dt_t *pci_dev) +{ + + struct pciList* current = usbList; + if(!usbList) + { + usbList = (struct pciList*)malloc(sizeof(struct pciList)); + usbList->next = NULL; + usbList->pciDev = pci_dev; + + } + else + { + while(current != NULL && current->next != NULL) + { + current = current->next; + } + current->next = (struct pciList*)malloc(sizeof(struct pciList)); + current = current->next; + + current->pciDev = pci_dev; + current->next = NULL; + } +} + +// Loop through the list and call the apropriate patch function +int usb_loop() +{ + int retVal = 1; + bool fix_ehci, fix_uhci, fix_usb, fix_legacy; + fix_ehci = fix_uhci = fix_usb = fix_legacy = false; + + if (getBoolForKey(kUSBBusFix, &fix_usb, &bootInfo->bootConfig)) + { + fix_ehci = fix_uhci = fix_legacy = fix_usb; // Disable all if none set + } + else + { + getBoolForKey(kEHCIacquire, &fix_ehci, &bootInfo->bootConfig); + getBoolForKey(kUHCIreset, &fix_uhci, &bootInfo->bootConfig); + getBoolForKey(kLegacyOff, &fix_legacy, &bootInfo->bootConfig); + } + + struct pciList* current = usbList; + + while(current) + { + switch (pci_config_read8(current->pciDev->dev.addr, PCI_CLASS_PROG)) + { + // EHCI + case 0x20: + if(fix_ehci) retVal &= ehci_acquire(current->pciDev); + if(fix_legacy) retVal &= legacy_off(current->pciDev); + + break; + + // UHCI + case 0x00: + if (fix_uhci) retVal &= uhci_reset(current->pciDev); + + break; + } + + current = current->next; + } + return retVal; +} + +int legacy_off (pci_dt_t *pci_dev) +{ + // Set usb legacy off modification by Signal64 + // NOTE: This *must* be called after the last file is loaded from the drive in the event that we are booting form usb. + // NOTE2: This should be called after any getc() call. (aka, after the Wait=y keyworkd is used) + // AKA: Make this run immediatly before the kernel is called + uint32_t capaddr, opaddr; + uint8_t eecp; + uint32_t usbcmd, usbsts, usbintr; + uint32_t usblegsup, usblegctlsts; + + int isOSowned; + int isBIOSowned; + + verbose("Setting Legacy USB Off on controller [%04x:%04x] at %02x:%2x.%x\n", + pci_dev->vendor_id, pci_dev->device_id, + pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func); + + + // capaddr = Capability Registers = dev.addr + offset stored in dev.addr + 0x10 (USBBASE) + capaddr = pci_config_read32(pci_dev->dev.addr, 0x10); + + // opaddr = Operational Registers = capaddr + offset (8bit CAPLENGTH in Capability Registers + offset 0) + opaddr = capaddr + *((unsigned char*)(capaddr)); + + // eecp = EHCI Extended Capabilities offset = capaddr HCCPARAMS bits 15:8 + eecp=*((unsigned char*)(capaddr + 9)); + + DBG("capaddr=%x opaddr=%x eecp=%x\n", capaddr, opaddr, eecp); + + usbcmd = *((unsigned int*)(opaddr)); // Command Register + usbsts = *((unsigned int*)(opaddr + 4)); // Status Register + usbintr = *((unsigned int*)(opaddr + 8)); // Interrupt Enable Register + + DBG("usbcmd=%08x usbsts=%08x usbintr=%08x\n", usbcmd, usbsts, usbintr); + + // read PCI Config 32bit USBLEGSUP (eecp+0) + usblegsup = pci_config_read32(pci_dev->dev.addr, eecp); + + // informational only + isBIOSowned = !!((usblegsup) & (1 << (16))); + isOSowned = !!((usblegsup) & (1 << (24))); + + // read PCI Config 32bit USBLEGCTLSTS (eecp+4) + usblegctlsts = pci_config_read32(pci_dev->dev.addr, eecp + 4); + + DBG("usblegsup=%08x isOSowned=%d isBIOSowned=%d usblegctlsts=%08x\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); + + // Reset registers to Legacy OFF + DBG("Clearing USBLEGCTLSTS\n"); + pci_config_write32(pci_dev->dev.addr, eecp + 4, 0); //usblegctlsts + + // if delay value is in milliseconds it doesn't appear to work. + // setting value to anything up to 65535 does not add the expected delay here. + delay(100); + + usbcmd = *((unsigned int*)(opaddr)); + usbsts = *((unsigned int*)(opaddr + 4)); + usbintr = *((unsigned int*)(opaddr + 8)); + + DBG("usbcmd=%08x usbsts=%08x usbintr=%08x\n", usbcmd, usbsts, usbintr); + + DBG("Clearing Registers\n"); + + // clear registers to default + usbcmd = (usbcmd & 0xffffff00); + *((unsigned int*)(opaddr)) = usbcmd; + *((unsigned int*)(opaddr + 8)) = 0; //usbintr - clear interrupt registers + *((unsigned int*)(opaddr + 4)) = 0x1000; //usbsts - clear status registers + pci_config_write32(pci_dev->dev.addr, eecp, 1); //usblegsup + + // get the results + usbcmd = *((unsigned int*)(opaddr)); + usbsts = *((unsigned int*)(opaddr + 4)); + usbintr = *((unsigned int*)(opaddr + 8)); + + DBG("usbcmd=%08x usbsts=%08x usbintr=%08x\n", usbcmd, usbsts, usbintr); + + // read 32bit USBLEGSUP (eecp+0) + usblegsup = pci_config_read32(pci_dev->dev.addr, eecp); + + // informational only + isBIOSowned = !!((usblegsup) & (1 << (16))); + isOSowned = !!((usblegsup) & (1 << (24))); + + // read 32bit USBLEGCTLSTS (eecp+4) + usblegctlsts = pci_config_read32(pci_dev->dev.addr, eecp + 4); + + DBG("usblegsup=%08x isOSowned=%d isBIOSowned=%d usblegctlsts=%08x\n", usblegsup, isOSowned, isBIOSowned, usblegctlsts); + + verbose("Legacy USB Off Done\n"); + return 1; +} + +int ehci_acquire (pci_dt_t *pci_dev) +{ + int j, k; + uint32_t base; + uint8_t eecp; + uint8_t legacy[8]; + bool isOwnershipConflict; + bool alwaysHardBIOSReset; + + alwaysHardBIOSReset = false; + if (!getBoolForKey(kEHCIhard, &alwaysHardBIOSReset, &bootInfo->bootConfig)) { + alwaysHardBIOSReset = true; + } + + pci_config_write16(pci_dev->dev.addr, 0x04, 0x0002); + base = pci_config_read32(pci_dev->dev.addr, 0x10); + + verbose("EHCI controller [%04x:%04x] at %02x:%2x.%x DMA @%x\n", + pci_dev->vendor_id, pci_dev->device_id, + pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func, + base); + + if (*((unsigned char*)base) < 0xc) + { + DBG("Config space too small: no legacy implementation\n"); + return 1; + } + eecp = *((unsigned char*)(base + 9)); + if (!eecp) { + DBG("No extended capabilities: no legacy implementation\n"); + return 1; + } + + DBG("eecp=%x\n",eecp); + + // bad way to do it + // pci_conf_write(pci_dev->dev.addr, eecp, 4, 0x01000001); + for (j = 0; j < 8; j++) { + legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); + DBG("%02x ", legacy[j]); + } + DBG("\n"); + + //Real Job: based on orByte's AppleUSBEHCI.cpp + //We try soft reset first - some systems hang on reboot with hard reset + // Definitely needed during reboot on 10.4.6 + + isOwnershipConflict = ((legacy[3] & 1 != 0) && (legacy[2] & 1 != 0)); + if (!alwaysHardBIOSReset && isOwnershipConflict) { + DBG("EHCI - Ownership conflict - attempting soft reset ...\n"); + DBG("EHCI - toggle OS Ownership to 0\n"); + pci_config_write8(pci_dev->dev.addr, eecp + 3, 0); + for (k = 0; k < 25; k++) { + for (j = 0; j < 8; j++) { + legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); + } + if (legacy[3] == 0) { + break; + } + delay(10); + } + } + + DBG("Found USBLEGSUP_ID - value %x:%x - writing OSOwned\n", legacy[3],legacy[2]); + pci_config_write8(pci_dev->dev.addr, eecp + 3, 1); + + // wait for kEHCI_USBLEGSUP_BIOSOwned bit to clear + for (k = 0; k < 25; k++) { + for (j = 0;j < 8; j++) { + legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); + } + DBG ("%x:%x,",legacy[3],legacy[2]); + if (legacy[2] == 0) { + break; + } + delay(10); + } + + for (j = 0;j < 8; j++) { + legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); + } + isOwnershipConflict = ((legacy[2]) != 0); + if (isOwnershipConflict) { + // Soft reset has failed. Assume SMI being ignored + // Hard reset + // Force Clear BIOS BIT + DBG("EHCI - Ownership conflict - attempting hard reset ...\n"); + DBG ("%x:%x\n",legacy[3],legacy[2]); + DBG("EHCI - Force BIOS Ownership to 0\n"); + + pci_config_write8(pci_dev->dev.addr, eecp + 2, 0); + for (k = 0; k < 25; k++) { + for (j = 0; j < 8; j++) { + legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); + } + DBG ("%x:%x,",legacy[3],legacy[2]); + + if ((legacy[2]) == 0) { + break; + } + delay(10); + } + // Disable further SMI events + for (j = 4; j < 8; j++) { + pci_config_write8(pci_dev->dev.addr, eecp + j, 0); + } + } + + for (j = 0; j < 8; j++) { + legacy[j] = pci_config_read8(pci_dev->dev.addr, eecp + j); + } + + DBG ("%x:%x\n",legacy[3],legacy[2]); + + // Final Ownership Resolution Check... + if (legacy[2] & 1) { + DBG("EHCI controller unable to take control from BIOS\n"); + return 0; + } + + DBG("EHCI Acquire OS Ownership done\n"); + return 1; +} + +int uhci_reset (pci_dt_t *pci_dev) +{ + uint32_t base, port_base; + + base = pci_config_read32(pci_dev->dev.addr, 0x20); + port_base = (base >> 5) & 0x07ff; + + verbose("UHCI controller [%04x:%04x] at %02x:%2x.%x base %x(%x)\n", + pci_dev->vendor_id, pci_dev->device_id, + pci_dev->dev.bits.bus, pci_dev->dev.bits.dev, pci_dev->dev.bits.func, + port_base, base); + + pci_config_write16(pci_dev->dev.addr, 0xc0, 0x8f00); + + outw (port_base, 0x0002); + delay(10); + outw (port_base+4,0); + delay(10); + outw (port_base,0); + return 1; +} Index: branches/meklort/i386/modules/USBFix/Makefile =================================================================== --- branches/meklort/i386/modules/USBFix/Makefile (revision 0) +++ branches/meklort/i386/modules/USBFix/Makefile (revision 543) @@ -0,0 +1,89 @@ + +MODULE_NAME = USBFix +MODULE_VERSION = "1.0.0" +MODULE_COMPAT_VERSION = "1.0.0" +MODULE_START = _$(MODULE_NAME)_start +MODULE_DEPENDENCIES = + +DIR = USBFix + +include ../../MakePaths.dir + +OBJROOT=../../../obj/i386/modules/$(DIR) +SYMROOT=../../../sym/i386/modules/ +DSTROOT=../../../dst/i386/modules/ + + +UTILDIR = ../../util +LIBSADIR = ../../libsa +LIBSAIODIR = ../../libsaio +BOOT2DIR = ../../boot2 + +INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone + +OPTIM = -Os -Oz +DEBUG = -DNOTHING +#DEBUG = -DDEBUG_HELLO_WORLD=1 +CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ + -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ + -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ + -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ + -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common -mdynamic-no-pic + +DEFINES= +CONFIG = hd +INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR) +ifneq "" "$(wildcard /bin/mkdirs)" + MKDIRS = /bin/mkdirs +else + MKDIRS = /bin/mkdir -p +endif +AS = as +LD = ld +# LIBS= -lc_static +LIBS= + +VPATH = $(OBJROOT):$(SYMROOT) + +USB_OBJS = USBFix.o usb.o + + +SFILES = +CFILES = +HFILES = +EXPORTED_HFILES = +INSTALLED_HFILES = +OTHERFILES = Makefile +ALLSRC = $(SFILES) $(CFILES) \ + $(HFILES) $(OTHERFILES) +DIRS_NEEDED = $(OBJROOT) $(SYMROOT) + +all embedtheme optionrom: ${USB_OBJS} dylib + + +dylib: ${USB_OBJS} + ld -flat_namespace -arch i386 \ + -undefined suppress \ + -alias $(MODULE_START) start \ + -dylib -read_only_relocs suppress \ + -S -x -Z -dead_strip_dylibs \ + -no_uuid \ + -current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \ + -final_output $(MODULE_NAME) \ + $(OBJROOT)/USBFix.o \ + $(OBJROOT)/usb.o \ + -o $(SYMROOT)/$(MODULE_NAME).dylib + + + +USBFix.o: + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "USBFix.c" $(INC) -o "$(OBJROOT)/USBFix.o" + +usb.o: + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "usb.c" $(INC) -o "$(OBJROOT)/usb.o" + +include ../../MakeInc.dir + +# dependencies +-include $(OBJROOT)/Makedep Index: branches/meklort/i386/modules/ACPIPatcher/acpi_patcher.c =================================================================== --- branches/meklort/i386/modules/ACPIPatcher/acpi_patcher.c (revision 542) +++ branches/meklort/i386/modules/ACPIPatcher/acpi_patcher.c (revision 543) @@ -215,7 +215,7 @@ 0x00, 0x00, 0x00, 0x79, 0x00 }; - if (Platform.CPU.Vendor != 0x756E6547) { + if (Platform->CPU.Vendor != 0x756E6547) { verbose ("Not an Intel platform: C-States will not be generated !!!\n"); return NULL; } @@ -340,12 +340,12 @@ 0x31, 0x03, 0x10, 0x20, /* 1.._ */ }; - if (Platform.CPU.Vendor != 0x756E6547) { + if (Platform->CPU.Vendor != 0x756E6547) { verbose ("Not an Intel platform: P-States will not be generated !!!\n"); return NULL; } - if (!(Platform.CPU.Features & CPU_FEATURE_MSR)) { + if (!(Platform->CPU.Features & CPU_FEATURE_MSR)) { verbose ("Unsupported CPU: P-States will not be generated !!!\n"); return NULL; } @@ -359,10 +359,10 @@ uint8_t p_states_count = 0; // Retrieving P-States, ported from code by superhai (c) - switch (Platform.CPU.Family) { + switch (Platform->CPU.Family) { case 0x06: { - switch (Platform.CPU.Model) + switch (Platform->CPU.Model) { case 0x0D: // ? case CPU_MODEL_YONAH: // Yonah @@ -474,7 +474,7 @@ uint32_t multiplier = p_states[i].FID & 0x1f; // = 0x08 bool half = p_states[i].FID & 0x40; // = 0x01 bool dfsb = p_states[i].FID & 0x80; // = 0x00 - uint32_t fsb = Platform.CPU.FSBFrequency / 1000000; // = 400 + uint32_t fsb = Platform->CPU.FSBFrequency / 1000000; // = 400 uint32_t halffsb = (fsb + 1) >> 1; // = 200 uint32_t frequency = (multiplier * fsb); // = 3200 @@ -568,7 +568,7 @@ const char * value; // Restart Fix - if (Platform.CPU.Vendor == 0x756E6547) { /* Intel */ + if (Platform->CPU.Vendor == 0x756E6547) { /* Intel */ fix_restart = true; getBoolForKey(kRestartFix, &fix_restart, &bootInfo->bootConfig); } else { @@ -594,28 +594,28 @@ // Determine system type / PM_Model if ( (value=getStringForKey(kSystemType, &bootInfo->bootConfig))!=NULL) { - if (Platform.Type > 6) + if (Platform->Type > 6) { if(fadt_mod->PM_Profile<=6) - Platform.Type = fadt_mod->PM_Profile; // get the fadt if correct + Platform->Type = fadt_mod->PM_Profile; // get the fadt if correct else - Platform.Type = 1; /* Set a fixed value (Desktop) */ - verbose("Error: system-type must be 0..6. Defaulting to %d !\n", Platform.Type); + Platform->Type = 1; /* Set a fixed value (Desktop) */ + verbose("Error: system-type must be 0..6. Defaulting to %d !\n", Platform->Type); } else - Platform.Type = (unsigned char) strtoul(value, NULL, 10); + Platform->Type = (unsigned char) strtoul(value, NULL, 10); } // Set PM_Profile from System-type if only user wanted this value to be forced - if (fadt_mod->PM_Profile != Platform.Type) + if (fadt_mod->PM_Profile != Platform->Type) { if (value) { // user has overriden the SystemType so take care of it in FACP - verbose("FADT: changing PM_Profile from 0x%02x to 0x%02x\n", fadt_mod->PM_Profile, Platform.Type); - fadt_mod->PM_Profile = Platform.Type; + verbose("FADT: changing PM_Profile from 0x%02x to 0x%02x\n", fadt_mod->PM_Profile, Platform->Type); + fadt_mod->PM_Profile = Platform->Type; } else { // PM_Profile has a different value and no override has been set, so reflect the user value to ioregs - Platform.Type = fadt_mod->PM_Profile <= 6 ? fadt_mod->PM_Profile : 1; + Platform->Type = fadt_mod->PM_Profile <= 6 ? fadt_mod->PM_Profile : 1; } } // We now have to write the systemm-type in ioregs: we cannot do it before in setupDeviceTree() Index: branches/meklort/i386/modules/ACPIPatcher/ACPIPatcher.c =================================================================== --- branches/meklort/i386/modules/ACPIPatcher/ACPIPatcher.c (revision 542) +++ branches/meklort/i386/modules/ACPIPatcher/ACPIPatcher.c (revision 543) @@ -11,6 +11,8 @@ #include "acpi_patcher.h" int ACPIPatcher_getPciRootUID(void); +unsigned int findpciroot(unsigned char * dsdt,int len); +static unsigned int findrootuid(unsigned char * dsdt, int len); void ACPIPatcher_setupEfiConfigurationTable_hook(void* binary, void* arg2, void* arg3, void* arg4) { @@ -94,3 +96,28 @@ verbose("Using PCI-Root-UID value: %d\n", ACPIPatcher_rootuid); return ACPIPatcher_rootuid; } + +unsigned int findpciroot(unsigned char * dsdt,int len) +{ + int i; + + for (i=0; iVideo.v_ ## x) + +#define MIN(x, y) ((x) < (y) ? (x) : (y)) + + + +int +convertImage( unsigned short width, + unsigned short height, + const unsigned char *imageData, + unsigned char **newImageData ) +{ + int cnt; + unsigned char *img = 0; + unsigned short *img16; + unsigned long *img32; + + switch ( VIDEO(depth) ) { + case 16 : + img16 = malloc(width * height * 2); + if ( !img16 ) break; + for (cnt = 0; cnt < (width * height); cnt++) + img16[cnt] = lookUpCLUTIndex(imageData[cnt], 16); + img = (unsigned char *)img16; + break; + + case 32 : + img32 = malloc(width * height * 4); + if ( !img32 ) break; + for (cnt = 0; cnt < (width * height); cnt++) + img32[cnt] = lookUpCLUTIndex(imageData[cnt], 32); + img = (unsigned char *)img32; + break; + + default : + img = malloc(width * height); + bcopy(imageData, img, width * height); + break; + } + *newImageData = img; + return 0; +} + + +//========================================================================== +// +void +printVBEModeInfo() +{ + VBEInfoBlock vbeInfo; + unsigned short * modePtr; + VBEModeInfoBlock modeInfo; + int err; + int line; + + bzero( &vbeInfo, sizeof(vbeInfo) ); + strcpy( (char*)&vbeInfo, "VBE2" ); + err = getVBEInfo( &vbeInfo ); + if ( err != errSuccess ) + return; + + line = 0; + + // Activate and clear page 1 + setActiveDisplayPage(1); + clearScreenRows(0, 24); + setCursorPosition( 0, 0, 1 ); + + printf("Video modes supported:\n", VBEDecodeFP(const char *, vbeInfo.OEMStringPtr)); + + // Loop through the mode list, and find the matching mode. + + 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; + } + + printf("Mode %x: %dx%dx%d mm:%d attr:%x\n", + *modePtr, modeInfo.XResolution, modeInfo.YResolution, + modeInfo.BitsPerPixel, modeInfo.MemoryModel, + modeInfo.ModeAttributes); + + if (line++ >= 20) { + pause(); + line = 0; + clearScreenRows(0, 24); + setCursorPosition( 0, 0, 1 ); + } + } + if (line != 0) { + pause(); + } + setActiveDisplayPage(0); +} + + + +char *getVBEModeInfoString() +{ + VBEInfoBlock vbeInfo; + unsigned short * modePtr; + VBEModeInfoBlock modeInfo; + int err; + + bzero( &vbeInfo, sizeof(vbeInfo) ); + strcpy( (char*)&vbeInfo, "VBE2" ); + err = getVBEInfo( &vbeInfo ); + if ( err != errSuccess ) + return 0; + + char *buff=malloc(sizeof(char)*3072); + if(!buff) return 0; + + // Loop through the mode list, and find the matching mode. + 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; + } + + sprintf(buff+strlen(buff), "Mode %x: %dx%dx%d mm:%d attr:%x\n", + *modePtr, modeInfo.XResolution, modeInfo.YResolution, + modeInfo.BitsPerPixel, modeInfo.MemoryModel, + modeInfo.ModeAttributes); + + } + return buff; +} + + +void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, + uint8_t *data) +{ + uint16_t drawWidth; + uint8_t *vram = (uint8_t *) VIDEO(baseAddr) + VIDEO(rowBytes) * y + 4 * x; + + drawWidth = MIN(width, VIDEO(width) - x); + height = MIN(height, VIDEO(height) - y); + while (height--) { + switch (VIDEO (depth)) + { + case 32: /* Optimized version*/ + { + uint32_t s; uint32_t* d; // Source (img) and destination (bkgd) pixels + 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)); + d = (uint32_t*) (vram + pos); + + // Flip B and R in source + // TODO: use XCHG and inline assembly to do this in a faster, saner way + tempB = (s & 0xFF0000); // save B + s = (s & 0xFF00FFFF) | ((s & 0xFF) << 16); // put R in B + s = (s & 0xFFFFFF00) | (tempB >> 16); // put B in R + + a = (s >> 24) + 1; + + dstrb = *d & 0xFF00FF; dstg = *d & 0xFF00; + srcrb = s & 0xFF00FF; srcg = s & 0xFF00; + + drb = srcrb - dstrb; + dg = srcg - dstg; + drb *= a; dg *= a; + drb >>= 8; dg >>= 8; + + rb = (drb + dstrb) & 0xFF00FF; + g = (dg + dstg) & 0xFF00; + + *d = rb | g; + } + } + break; + + default: /*Universal version*/ + { + uint32_t s; + uint32_t a; // Alpha + 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)); + + sb = (s & 0xFF0000) >> 16; + sg = (s & 0xFF00) >> 8; + sr = (s & 0xFF); + + a = (s >> 24) + 1; + + switch (VIDEO (depth)) + { + case 24: + db = ((*(uint32_t *)(vram + bpp*pos))&0xff); + dg = ((*(uint32_t *)(vram + bpp*pos))&0xff00)>>8; + dr = ((*(uint32_t *)(vram + bpp*pos))&0xff0000)>>16; + break; + case 16://16-bit seems to be 15-bit + /* db = ((*(uint16_t *)(vram + bpp*pos))&0x1f)<<3; + dg = ((*(uint16_t *)(vram + bpp*pos))&0x07e0)>>3; + dr = ((*(uint16_t *)(vram + bpp*pos))&0xf800)>>8; + break; */ + case 15: + 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; + default: + return; + } + + dr = (((sr - dr) * a) >> 8) + dr; + dg = (((sg - dg) * a) >> 8) + dg; + db = (((sb - db) * a) >> 8) + db; + switch (VIDEO (depth)) + { + case 24: + *(uint32_t *)(vram + bpp*pos) = (*(uint32_t *)(vram + bpp*pos) &0xff000000) + | (db&0xff) | ((dg&0xff)<<8) | ((dr&0xff)<<16); + break; + case 16: + // *(uint16_t *)(vram + bpp*pos) = ((db&0xf8)>>3) | ((dg&0xfc)<<3) | ((dr&0xf8)<<8); + // break; + case 15: + *(uint16_t *)(vram + bpp*pos) = ((db&0xf8)>>3) | ((dg&0xf8)<<2) | ((dr&0xf8)<<7); + break; + } + + } + } + break; + } + vram += VIDEO(rowBytes); + data += width * 4; + } +} + +void drawCheckerBoard() +{ + uint32_t *vram = (uint32_t *) VIDEO(baseAddr); + uint16_t x, y; + uint8_t color; + + for (y = 0; y < VIDEO(height); y++, vram += VIDEO(width)) { + for (x = 0; x < VIDEO(width); x++) { + color = 204 + 51 * (((x / 8) % 2) == ((y / 8) % 2)); + vram[x] = (color << 16) | (color << 8) | color; + } + } +} + + +//========================================================================== +// drawDataRectangle + +void drawDataRectangle( unsigned short x, + unsigned short y, + unsigned short width, + unsigned short height, + unsigned char * data ) +{ + unsigned short drawWidth; + long pixelBytes = VIDEO(depth) / 8; + unsigned char * vram = (unsigned char *) VIDEO(baseAddr) + + VIDEO(rowBytes) * y + pixelBytes * x; + + drawWidth = MIN(width, VIDEO(width) - x); + height = MIN(height, VIDEO(height) - y); + while ( height-- ) { + bcopy( data, vram, drawWidth * pixelBytes ); + vram += VIDEO(rowBytes); + data += width * pixelBytes; + } +} + + + +void getGraphicModeParams(unsigned long params[]) { + + params[3] = 0; + + VBEModeInfoBlock minfo; + + unsigned short vesaVersion; + unsigned short mode = modeEndOfList; + + getNumberArrayFromProperty( kGraphicsModeKey, params, 4); + + mode = getVESAModeWithProperties( params[0], params[1], params[2], + maColorModeBit | + maModeIsSupportedBit | + maGraphicsModeBit | + maLinearFrameBufferAvailBit, + 0, + &minfo, &vesaVersion ); + + params[0] = minfo.XResolution; + params[1] = minfo.YResolution; + params[2] = 32; +} + + +//========================================================================== +// getVBEInfoString + +char *getVBEInfoString() +{ + VBEInfoBlock vbeInfo; + int err, small; + char *buff = malloc(sizeof(char)*256); + if(!buff) return 0; + + 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); + + sprintf(buff, "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; +} + + void blend( const pixmap_t *blendThis, // Source image pixmap_t *blendInto, // Dest image const position_t position) // Where to place the source image Index: branches/meklort/i386/modules/KernelPatcher/kernel_patcher.c =================================================================== --- branches/meklort/i386/modules/KernelPatcher/kernel_patcher.c (revision 542) +++ branches/meklort/i386/modules/KernelPatcher/kernel_patcher.c (revision 543) @@ -7,7 +7,7 @@ #include "kernel_patcher.h" #include "platform.h" #include "modules.h" -extern PlatformInfo_t Platform; +extern PlatformInfo_t* Platform; patchRoutine_t* patches = NULL; kernSymbols_t* kernelSymbols = NULL; @@ -57,16 +57,16 @@ // AKA, don't at 64bit patches if it's a 32bit only machine patchRoutine_t* entry; - // TODO: verify Platform.CPU.Model is populated this early in bootup + // TODO: verify Platform->CPU.Model is populated this early in bootup // Check to ensure that the patch is valid on this machine // If it is not, exit early form this function - if(cpus != Platform.CPU.Model) + if(cpus != Platform->CPU.Model) { if(cpus != CPUID_MODEL_ANY) { if(cpus == CPUID_MODEL_UNKNOWN) { - switch(Platform.CPU.Model) + switch(Platform->CPU.Model) { case 13: case CPUID_MODEL_YONAH: @@ -240,7 +240,7 @@ **/ void patch_cpuid_set_info_all(void* kernelData) { - switch(Platform.CPU.Model) + switch(Platform->CPU.Model) { case CPUID_MODEL_ATOM: if(determineKernelArchitecture(kernelData) == KERNEL_32) Index: branches/meklort/i386/modules/Memory/mem.c =================================================================== --- branches/meklort/i386/modules/Memory/mem.c (revision 542) +++ branches/meklort/i386/modules/Memory/mem.c (revision 543) @@ -110,18 +110,18 @@ struct DMIMemoryDevice* memDev[MAX_RAM_SLOTS]; //17 /* We mainly don't use obsolete tables 5,6 because most of computers don't handle it anymore */ - Platform.DMI.MemoryModules = 0; + Platform->DMI.MemoryModules = 0; /* Now lets peek info rom table 16,17 as for some bios, table 5 & 6 are not used */ physMemArray = (struct DMIPhysicalMemoryArray*) FindFirstDmiTableOfType(16, 4); - Platform.DMI.MaxMemorySlots = physMemArray ? physMemArray->numberOfMemoryDevices : 0; + Platform->DMI.MaxMemorySlots = physMemArray ? physMemArray->numberOfMemoryDevices : 0; i = 0; for(dmihdr = FindFirstDmiTableOfType(17, 4); dmihdr; dmihdr = FindNextDmiTableOfType(17, 4) ) { memDev[i] = (struct DMIMemoryDevice*) dmihdr; - if (memDev[i]->size !=0 ) Platform.DMI.MemoryModules++; - if (memDev[i]->speed>0) Platform.RAM.DIMM[i].Frequency = memDev[i]->speed; // take it here for now but we'll check spd and dmi table 6 as well + if (memDev[i]->size !=0 ) Platform->DMI.MemoryModules++; + if (memDev[i]->speed>0) Platform->RAM.DIMM[i].Frequency = memDev[i]->speed; // take it here for now but we'll check spd and dmi table 6 as well i++; } // for table 6, we only have a look at the current speed @@ -130,8 +130,8 @@ dmihdr; dmihdr = FindNextDmiTableOfType(6, 4) ) { memInfo[i] = (struct DMIMemoryModuleInfo*) dmihdr; - if (memInfo[i]->currentSpeed > Platform.RAM.DIMM[i].Frequency) - Platform.RAM.DIMM[i].Frequency = memInfo[i]->currentSpeed; // favor real overclocked speed if any + if (memInfo[i]->currentSpeed > Platform->RAM.DIMM[i].Frequency) + Platform->RAM.DIMM[i].Frequency = memInfo[i]->currentSpeed; // favor real overclocked speed if any i++; } #if 0 Index: branches/meklort/i386/modules/Memory/spd.c =================================================================== --- branches/meklort/i386/modules/Memory/spd.c (revision 542) +++ branches/meklort/i386/modules/Memory/spd.c (revision 543) @@ -80,7 +80,7 @@ while( inb(base + SMBHSTSTS) & 0x01) { rdtsc(l2, h2); - t = ((h2 - h1) * 0xffffffff + (l2 - l1)) / (Platform.CPU.TSCFrequency / 100); + t = ((h2 - h1) * 0xffffffff + (l2 - l1)) / (Platform->CPU.TSCFrequency / 100); if(t > 50) return 0xFF; // hack, exit if unresponsive. } @@ -93,7 +93,7 @@ while (!( inb(base + SMBHSTSTS) & 0x02)) // wait til command finished { rdtsc(l2, h2); - t = ((h2 - h1) * 0xffffffff + (l2 - l1)) / (Platform.CPU.TSCFrequency / 100); + t = ((h2 - h1) * 0xffffffff + (l2 - l1)) / (Platform->CPU.TSCFrequency / 100); if (t > 5) break; // break after 5ms } @@ -261,13 +261,13 @@ getBoolForKey("DumpSPD", &dump, &bootInfo->bootConfig); bool fullBanks = // needed at least for laptops - Platform.DMI.MemoryModules == Platform.DMI.MaxMemorySlots; + Platform->DMI.MemoryModules == Platform->DMI.MaxMemorySlots; // Search MAX_RAM_SLOTS slots char spdbuf[256]; for (i = 0; i < MAX_RAM_SLOTS; i++){ DBG("Scanning slot %d\n", i); - slot = &Platform.RAM.DIMM[i]; + slot = &Platform->RAM.DIMM[i]; spd_size = smb_read_byte_intel(base, 0x50 + i, 0); // Check spd is present if (spd_size && (spd_size != 0xff) ) { @@ -308,8 +308,8 @@ if (slot->FrequencyFrequency = speed; // pci memory controller if available, is more reliable - if (Platform.RAM.Frequency > 0) { - uint32_t freq = (uint32_t)Platform.RAM.Frequency / 500000; + if (Platform->RAM.Frequency > 0) { + uint32_t freq = (uint32_t)Platform->RAM.Frequency / 500000; // now round off special cases uint32_t fmod100 = freq %100; switch(fmod100) { @@ -337,8 +337,8 @@ } } // laptops sometimes show slot 0 and 2 with slot 1 empty when only 2 slots are presents so: - Platform.DMI.DIMM[i]= - i>0 && Platform.RAM.DIMM[1].InUse==false && fullBanks && Platform.DMI.MaxMemorySlots==2 ? + Platform->DMI.DIMM[i]= + i>0 && Platform->RAM.DIMM[1].InUse==false && fullBanks && Platform->DMI.MaxMemorySlots==2 ? mapping[i] : i; // for laptops case, mapping setup would need to be more generic than this slot->spd = NULL; Index: branches/meklort/i386/modules/Memory/Memory.c =================================================================== --- branches/meklort/i386/modules/Memory/Memory.c (revision 542) +++ branches/meklort/i386/modules/Memory/Memory.c (revision 543) @@ -13,7 +13,7 @@ #include "mem.h" #include "modules.h" -pci_dt_t *dram_controller_dev; +pci_dt_t * dram_controller_dev = NULL; void Memory_hook(void* arg1, void* arg2, void* arg3, void* arg4); Index: branches/meklort/i386/modules/Memory/dram_controllers.c =================================================================== --- branches/meklort/i386/modules/Memory/dram_controllers.c (revision 542) +++ branches/meklort/i386/modules/Memory/dram_controllers.c (revision 543) @@ -159,9 +159,9 @@ DBG("mch_ratio %d\n", mch_ratio); // Compute RAM Frequency - Platform.RAM.Frequency = (Platform.CPU.FSBFrequency * mch_ratio) / 100000; + Platform->RAM.Frequency = (Platform->CPU.FSBFrequency * mch_ratio) / 100000; - DBG("ram_fsb %d\n", Platform.RAM.Frequency); + DBG("ram_fsb %d\n", Platform->RAM.Frequency); } @@ -231,7 +231,7 @@ } // Compute RAM Frequency - Platform.RAM.Frequency = (Platform.CPU.FSBFrequency * mch_ratio) / 100000; + Platform->RAM.Frequency = (Platform->CPU.FSBFrequency * mch_ratio) / 100000; } @@ -245,7 +245,7 @@ mch_ratio = (mc_dimm_clk_ratio & 0x1F); // Compute RAM Frequency - Platform.RAM.Frequency = Platform.CPU.FSBFrequency * mch_ratio / 2; + Platform->RAM.Frequency = Platform->CPU.FSBFrequency * mch_ratio / 2; } /* @@ -290,24 +290,24 @@ Misc_Register = *ptr & 0xFFFFFFFF; // 965 Series only support DDR2 - Platform.RAM.Type = SMB_MEM_TYPE_DDR2; + Platform->RAM.Type = SMB_MEM_TYPE_DDR2; // CAS Latency (tCAS) - Platform.RAM.CAS = ((ODT_Control_Register >> 17) & 7) + 3; + Platform->RAM.CAS = ((ODT_Control_Register >> 17) & 7) + 3; // RAS-To-CAS (tRCD) - Platform.RAM.TRC = (Read_Register >> 16) & 0xF; + Platform->RAM.TRC = (Read_Register >> 16) & 0xF; // RAS Precharge (tRP) - Platform.RAM.TRP = (ACT_Register >> 13) & 0xF; + Platform->RAM.TRP = (ACT_Register >> 13) & 0xF; // RAS Active to precharge (tRAS) - Platform.RAM.RAS = (Precharge_Register >> 11) & 0x1F; + Platform->RAM.RAS = (Precharge_Register >> 11) & 0x1F; if ((c0ckectrl >> 20 & 0xF) && (c1ckectrl >> 20 & 0xF)) - Platform.RAM.Channels = SMB_MEM_CHANNEL_DUAL; + Platform->RAM.Channels = SMB_MEM_CHANNEL_DUAL; else - Platform.RAM.Channels = SMB_MEM_CHANNEL_SINGLE; + Platform->RAM.Channels = SMB_MEM_CHANNEL_SINGLE; } // Get im965 Memory Timings @@ -337,24 +337,24 @@ Precharge_Register = *ptr & 0xFFFFFFFF; // Series only support DDR2 - Platform.RAM.Type = SMB_MEM_TYPE_DDR2; + Platform->RAM.Type = SMB_MEM_TYPE_DDR2; // CAS Latency (tCAS) - Platform.RAM.CAS = ((ODT_Control_Register >> 23) & 7) + 3; + Platform->RAM.CAS = ((ODT_Control_Register >> 23) & 7) + 3; // RAS-To-CAS (tRCD) - Platform.RAM.TRC = ((Precharge_Register >> 5) & 7) + 2; + Platform->RAM.TRC = ((Precharge_Register >> 5) & 7) + 2; // RAS Precharge (tRP) - Platform.RAM.TRP= (Precharge_Register & 7) + 2; + Platform->RAM.TRP= (Precharge_Register & 7) + 2; // RAS Active to precharge (tRAS) - Platform.RAM.RAS = (Precharge_Register >> 21) & 0x1F; + Platform->RAM.RAS = (Precharge_Register >> 21) & 0x1F; if ((c0ckectrl >> 20 & 0xF) && (c1ckectrl >> 20 & 0xF)) - Platform.RAM.Channels = SMB_MEM_CHANNEL_DUAL; + Platform->RAM.Channels = SMB_MEM_CHANNEL_DUAL; else - Platform.RAM.Channels = SMB_MEM_CHANNEL_SINGLE; + Platform->RAM.Channels = SMB_MEM_CHANNEL_SINGLE; } // Get P35 Memory Timings @@ -413,30 +413,30 @@ // Determine DDR-II or DDR-III if (Memory_Check & 1) - Platform.RAM.Type = SMB_MEM_TYPE_DDR2; + Platform->RAM.Type = SMB_MEM_TYPE_DDR2; else - Platform.RAM.Type = SMB_MEM_TYPE_DDR3; + Platform->RAM.Type = SMB_MEM_TYPE_DDR3; // CAS Latency (tCAS) if(dram_dev->device_id > 0x2E00) - Platform.RAM.CAS = ((ODT_Control_Register >> 8) & 0x3F) - 6; + Platform->RAM.CAS = ((ODT_Control_Register >> 8) & 0x3F) - 6; else - Platform.RAM.CAS = ((ODT_Control_Register >> 8) & 0x3F) - 9; + Platform->RAM.CAS = ((ODT_Control_Register >> 8) & 0x3F) - 9; // RAS-To-CAS (tRCD) - Platform.RAM.TRC = (Read_Register >> 17) & 0xF; + Platform->RAM.TRC = (Read_Register >> 17) & 0xF; // RAS Precharge (tRP) - Platform.RAM.TRP = (ACT_Register >> 13) & 0xF; + Platform->RAM.TRP = (ACT_Register >> 13) & 0xF; // RAS Active to precharge (tRAS) - Platform.RAM.RAS = Precharge_Register & 0x3F; + Platform->RAM.RAS = Precharge_Register & 0x3F; // Channel configuration if (((c0ckectrl >> 20) & 0xF) && ((c1ckectrl >> 20) & 0xF)) - Platform.RAM.Channels = SMB_MEM_CHANNEL_DUAL; + Platform->RAM.Channels = SMB_MEM_CHANNEL_DUAL; else - Platform.RAM.Channels = SMB_MEM_CHANNEL_SINGLE; + Platform->RAM.Channels = SMB_MEM_CHANNEL_SINGLE; } // Get Nehalem Memory Timings @@ -450,7 +450,7 @@ mc_control = (mc_control >> 8) & 0x7; // DDR-III - Platform.RAM.Type = SMB_MEM_TYPE_DDR3; + Platform->RAM.Type = SMB_MEM_TYPE_DDR3; // Get the first valid channel if(mc_control & 1) @@ -465,24 +465,24 @@ mc_channel_mrs_value = pci_config_read32(PCIADDR(nhm_bus, fvc_bn, 0), 0x70); // CAS Latency (tCAS) - Platform.RAM.CAS = ((mc_channel_mrs_value >> 4) & 0xF ) + 4; + Platform->RAM.CAS = ((mc_channel_mrs_value >> 4) & 0xF ) + 4; // RAS-To-CAS (tRCD) - Platform.RAM.TRC = (mc_channel_bank_timing >> 9) & 0xF; + Platform->RAM.TRC = (mc_channel_bank_timing >> 9) & 0xF; // RAS Active to precharge (tRAS) - Platform.RAM.RAS = (mc_channel_bank_timing >> 4) & 0x1F; + Platform->RAM.RAS = (mc_channel_bank_timing >> 4) & 0x1F; // RAS Precharge (tRP) - Platform.RAM.TRP = mc_channel_bank_timing & 0xF; + Platform->RAM.TRP = mc_channel_bank_timing & 0xF; // Single , Dual or Triple Channels if (mc_control == 1 || mc_control == 2 || mc_control == 4 ) - Platform.RAM.Channels = SMB_MEM_CHANNEL_SINGLE; + Platform->RAM.Channels = SMB_MEM_CHANNEL_SINGLE; else if (mc_control == 7) - Platform.RAM.Channels = SMB_MEM_CHANNEL_TRIPLE; + Platform->RAM.Channels = SMB_MEM_CHANNEL_TRIPLE; else - Platform.RAM.Channels = SMB_MEM_CHANNEL_DUAL; + Platform->RAM.Channels = SMB_MEM_CHANNEL_DUAL; } static struct mem_controller_t dram_controllers[] = { @@ -552,10 +552,10 @@ dram_controllers[i].poll_speed(dram_dev); verbose("Frequency detected: %d MHz (%d) %s Channel %d-%d-%d-%d\n", - (uint32_t)Platform.RAM.Frequency / 1000000, - (uint32_t)Platform.RAM.Frequency / 500000, - memory_channel_types[Platform.RAM.Channels], - Platform.RAM.CAS, Platform.RAM.TRC, Platform.RAM.TRP, Platform.RAM.RAS + (uint32_t)Platform->RAM.Frequency / 1000000, + (uint32_t)Platform->RAM.Frequency / 500000, + memory_channel_types[Platform->RAM.Channels], + Platform->RAM.CAS, Platform->RAM.TRC, Platform->RAM.TRP, Platform->RAM.RAS ); } Property changes on: branches/meklort/i386/modules/Symbols ___________________________________________________________________ Added: svn:ignore + typedef struct { char* symbol; unsigned int addr; } symbol_t; static char _AllocateKernelMemory_string[] = "_AllocateKernelMemory"; static char _AllocateMemoryRange_string[] = "_AllocateMemoryRange"; static char _BinaryUnicodeCompare_string[] = "_BinaryUnicodeCompare"; static char _CacheInit_string[] = "_CacheInit"; static char _CacheRead_string[] = "_CacheRead"; static char _CacheReset_string[] = "_CacheReset"; static char _CreateUUIDString_string[] = "_CreateUUIDString"; static char _DT__AddChild_string[] = "_DT__AddChild"; static char _DT__AddProperty_string[] = "_DT__AddProperty"; static char _DT__Finalize_string[] = "_DT__Finalize"; static char _DT__FindNode_string[] = "_DT__FindNode"; static char _DT__FlattenDeviceTree_string[] = "_DT__FlattenDeviceTree"; static char _DT__FreeNode_string[] = "_DT__FreeNode"; static char _DT__FreeProperty_string[] = "_DT__FreeProperty"; static char _DT__GetName_string[] = "_DT__GetName"; static char _DT__Initialize_string[] = "_DT__Initialize"; static char _DecodeKernel_string[] = "_DecodeKernel"; static char _DecodeMachO_string[] = "_DecodeMachO"; static char _DecompressData_string[] = "_DecompressData"; static char _FastRelString_string[] = "_FastRelString"; static char _FastUnicodeCompare_string[] = "_FastUnicodeCompare"; static char _FindFirstDmiTableOfType_string[] = "_FindFirstDmiTableOfType"; static char _FindNextDmiTableOfType_string[] = "_FindNextDmiTableOfType"; static char _GPT_BASICDATA2_GUID_string[] = "_GPT_BASICDATA2_GUID"; static char _GPT_BASICDATA_GUID_string[] = "_GPT_BASICDATA_GUID"; static char _GPT_BOOT_GUID_string[] = "_GPT_BOOT_GUID"; static char _GPT_EFISYS_GUID_string[] = "_GPT_EFISYS_GUID"; static char _GPT_HFS_GUID_string[] = "_GPT_HFS_GUID"; static char _Gdt_string[] = "_Gdt"; static char _Gdtr_string[] = "_Gdtr"; static char _GetDirEntry_string[] = "_GetDirEntry"; static char _GetFileBlock_string[] = "_GetFileBlock"; static char _GetFileInfo_string[] = "_GetFileInfo"; static char _HFSFree_string[] = "_HFSFree"; static char _HFSGetDescription_string[] = "_HFSGetDescription"; static char _HFSGetDirEntry_string[] = "_HFSGetDirEntry"; static char _HFSGetFileBlock_string[] = "_HFSGetFileBlock"; static char _HFSGetUUID_string[] = "_HFSGetUUID"; static char _HFSInitPartition_string[] = "_HFSInitPartition"; static char _HFSLoadFile_string[] = "_HFSLoadFile"; static char _HFSProbe_string[] = "_HFSProbe"; static char _HFSReadFile_string[] = "_HFSReadFile"; static char _HibernateBoot_string[] = "_HibernateBoot"; static char _Idtr_prot_string[] = "_Idtr_prot"; static char _Idtr_real_string[] = "_Idtr_real"; static char _LoadDrivers_string[] = "_LoadDrivers"; static char _LoadFile_string[] = "_LoadFile"; static char _LoadThinFatFile_string[] = "_LoadThinFatFile"; static char _LoadVolumeFile_string[] = "_LoadVolumeFile"; static char _MD5Final_string[] = "_MD5Final"; static char _MD5Init_string[] = "_MD5Init"; static char _MD5Pad_string[] = "_MD5Pad"; static char _MD5Update_string[] = "_MD5Update"; static char _MSDOSFree_string[] = "_MSDOSFree"; static char _MSDOSGetDescription_string[] = "_MSDOSGetDescription"; static char _MSDOSGetDirEntry_string[] = "_MSDOSGetDirEntry"; static char _MSDOSGetFileBlock_string[] = "_MSDOSGetFileBlock"; static char _MSDOSGetUUID_string[] = "_MSDOSGetUUID"; static char _MSDOSInitPartition_string[] = "_MSDOSInitPartition"; static char _MSDOSLoadFile_string[] = "_MSDOSLoadFile"; static char _MSDOSProbe_string[] = "_MSDOSProbe"; static char _MSDOSReadFile_string[] = "_MSDOSReadFile"; static char _ParseXMLFile_string[] = "_ParseXMLFile"; static char _Platform_string[] = "_Platform"; static char _ReadFileAtOffset_string[] = "_ReadFileAtOffset"; static char _ReadPCIBusInfo_string[] = "_ReadPCIBusInfo"; static char _Round_string[] = "_Round"; static char _Sqrt_string[] = "_Sqrt"; static char _ThinFatFile_string[] = "_ThinFatFile"; static char _XMLDecode_string[] = "_XMLDecode"; static char _XMLFreeTag_string[] = "_XMLFreeTag"; static char _XMLGetProperty_string[] = "_XMLGetProperty"; static char _XMLParseNextTag_string[] = "_XMLParseNextTag"; static char __DATA__bss__begin_string[] = "__DATA__bss__begin"; static char __DATA__bss__end_string[] = "__DATA__bss__end"; static char __DATA__common__begin_string[] = "__DATA__common__begin"; static char __DATA__common__end_string[] = "__DATA__common__end"; static char ___udivdi3_string[] = "___udivdi3"; static char __bp_string[] = "__bp"; static char __prot_to_real_string[] = "__prot_to_real"; static char __real_to_prot_string[] = "__real_to_prot"; static char __sp_string[] = "__sp"; static char __switch_stack_string[] = "__switch_stack"; static char _addBootArg_string[] = "_addBootArg"; static char _addConfigurationTable_string[] = "_addConfigurationTable"; static char _add_symbol_string[] = "_add_symbol"; static char _archCpuType_string[] = "_archCpuType"; static char _ascii_hex_to_int_string[] = "_ascii_hex_to_int"; static char _atoi_string[] = "_atoi"; static char _b_lseek_string[] = "_b_lseek"; static char _bcopy_string[] = "_bcopy"; static char _bgetc_string[] = "_bgetc"; static char _bind_location_string[] = "_bind_location"; static char _bind_macho_string[] = "_bind_macho"; static char _bios_string[] = "_bios"; static char _biosDevIsCDROM_string[] = "_biosDevIsCDROM"; static char _biosread_string[] = "_biosread"; static char _boot_string[] = "_boot"; static char _bootArgs_string[] = "_bootArgs"; static char _bootBanner_string[] = "_bootBanner"; static char _bootInfo_string[] = "_bootInfo"; static char _bootPrompt_string[] = "_bootPrompt"; static char _booterCommand_string[] = "_booterCommand"; static char _booterParam_string[] = "_booterParam"; static char _build_pci_dt_string[] = "_build_pci_dt"; static char _builtin_set_string[] = "_builtin_set"; static char _bvChain_string[] = "_bvChain"; static char _bvCount_string[] = "_bvCount"; static char _bvr_string[] = "_bvr"; static char _bzero_string[] = "_bzero"; static char _chainbootdev_string[] = "_chainbootdev"; static char _chainbootflag_string[] = "_chainbootflag"; static char _changeCursor_string[] = "_changeCursor"; static char _checksum8_string[] = "_checksum8"; static char _clearActivityIndicator_string[] = "_clearActivityIndicator"; static char _clearBootArgs_string[] = "_clearBootArgs"; static char _clearScreenRows_string[] = "_clearScreenRows"; static char _close_string[] = "_close"; static char _closedir_string[] = "_closedir"; static char _common_boot_string[] = "_common_boot"; static char _convertHexStr2Binary_string[] = "_convertHexStr2Binary"; static char _copyArgument_string[] = "_copyArgument"; static char _crc32_string[] = "_crc32"; static char _cursor_string[] = "_cursor"; static char _decodeRLE_string[] = "_decodeRLE"; static char _decompress_lzss_string[] = "_decompress_lzss"; static char _delay_string[] = "_delay"; static char _devices_number_string[] = "_devices_number"; static char _devprop_add_device_string[] = "_devprop_add_device"; static char _devprop_add_network_template_string[] = "_devprop_add_network_template"; static char _devprop_add_value_string[] = "_devprop_add_value"; static char _devprop_create_string_string[] = "_devprop_create_string"; static char _devprop_free_string_string[] = "_devprop_free_string"; static char _devprop_generate_string_string[] = "_devprop_generate_string"; static char _diskFreeMap_string[] = "_diskFreeMap"; static char _diskIsCDROM_string[] = "_diskIsCDROM"; static char _diskRead_string[] = "_diskRead"; static char _diskResetBootVolumes_string[] = "_diskResetBootVolumes"; static char _diskScanBootVolumes_string[] = "_diskScanBootVolumes"; static char _diskSeek_string[] = "_diskSeek"; static char _dram_controller_dev_string[] = "_dram_controller_dev"; static char _dump_pci_dt_string[] = "_dump_pci_dt"; static char _ebiosEjectMedia_string[] = "_ebiosEjectMedia"; static char _ebiosread_string[] = "_ebiosread"; static char _ebioswrite_string[] = "_ebioswrite"; static char _efi_guid_compare_string[] = "_efi_guid_compare"; static char _efi_guid_is_null_string[] = "_efi_guid_is_null"; static char _efi_guid_unparse_upper_string[] = "_efi_guid_unparse_upper"; static char _efi_inject_get_devprop_string_string[] = "_efi_inject_get_devprop_string"; static char _ehci_acquire_string[] = "_ehci_acquire"; static char _enableA20_string[] = "_enableA20"; static char _enable_pci_devs_string[] = "_enable_pci_devs"; static char _error_string[] = "_error"; static char _execute_hook_string[] = "_execute_hook"; static char _file_size_string[] = "_file_size"; static char _finalizeBootStruct_string[] = "_finalizeBootStruct"; static char _flushKeyboardBuffer_string[] = "_flushKeyboardBuffer"; static char _free_string[] = "_free"; static char _freeFilteredBVChain_string[] = "_freeFilteredBVChain"; static char _gBIOSBootVolume_string[] = "_gBIOSBootVolume"; static char _gBIOSDev_string[] = "_gBIOSDev"; static char _gBinaryAddress_string[] = "_gBinaryAddress"; static char _gBootArgs_string[] = "_gBootArgs"; static char _gBootArgsEnd_string[] = "_gBootArgsEnd"; static char _gBootArgsPtr_string[] = "_gBootArgsPtr"; static char _gBootFileType_string[] = "_gBootFileType"; static char _gBootMode_string[] = "_gBootMode"; static char _gBootVolume_string[] = "_gBootVolume"; static char _gCompareTable_string[] = "_gCompareTable"; static char _gCompareTableCompressed_string[] = "_gCompareTableCompressed"; static char _gDeviceCount_string[] = "_gDeviceCount"; static char _gEfiAcpi20TableGuid_string[] = "_gEfiAcpi20TableGuid"; static char _gEfiAcpiTableGuid_string[] = "_gEfiAcpiTableGuid"; static char _gEfiConfigurationTableNode_string[] = "_gEfiConfigurationTableNode"; static char _gEfiSmbiosTableGuid_string[] = "_gEfiSmbiosTableGuid"; static char _gErrors_string[] = "_gErrors"; static char _gFSLoadAddress_string[] = "_gFSLoadAddress"; static char _gHaveKernelCache_string[] = "_gHaveKernelCache"; static char _gLowerCaseTable_string[] = "_gLowerCaseTable"; static char _gLowerCaseTableCompressed_string[] = "_gLowerCaseTableCompressed"; static char _gMKextName_string[] = "_gMKextName"; static char _gMacOSVersion_string[] = "_gMacOSVersion"; static char _gMemoryMapNode_string[] = "_gMemoryMapNode"; static char _gMenuBottom_string[] = "_gMenuBottom"; static char _gMenuEnd_string[] = "_gMenuEnd"; static char _gMenuHeight_string[] = "_gMenuHeight"; static char _gMenuItemCount_string[] = "_gMenuItemCount"; static char _gMenuItems_string[] = "_gMenuItems"; static char _gMenuRow_string[] = "_gMenuRow"; static char _gMenuSelection_string[] = "_gMenuSelection"; static char _gMenuStart_string[] = "_gMenuStart"; static char _gMenuTop_string[] = "_gMenuTop"; static char _gOverrideKernel_string[] = "_gOverrideKernel"; static char _gPlatformName_string[] = "_gPlatformName"; static char _gRootDevice_string[] = "_gRootDevice"; static char _gST32_string[] = "_gST32"; static char _gST64_string[] = "_gST64"; static char _gVerboseMode_string[] = "_gVerboseMode"; static char _generateCRTCTiming_string[] = "_generateCRTCTiming"; static char _getBVChainForBIOSDev_string[] = "_getBVChainForBIOSDev"; static char _getBoolForKey_string[] = "_getBoolForKey"; static char _getBootOptions_string[] = "_getBootOptions"; static char _getBootVolumeDescription_string[] = "_getBootVolumeDescription"; static char _getBootVolumeRef_string[] = "_getBootVolumeRef"; static char _getColorForKey_string[] = "_getColorForKey"; static char _getConventionalMemorySize_string[] = "_getConventionalMemorySize"; static char _getCursorPositionAndType_string[] = "_getCursorPositionAndType"; static char _getDeviceDescription_string[] = "_getDeviceDescription"; static char _getDimensionForKey_string[] = "_getDimensionForKey"; static char _getEDID_string[] = "_getEDID"; static char _getExtendedMemorySize_string[] = "_getExtendedMemorySize"; static char _getIntForKey_string[] = "_getIntForKey"; static char _getMemoryMap_string[] = "_getMemoryMap"; static char _getNextArg_string[] = "_getNextArg"; static char _getNumberArrayFromProperty_string[] = "_getNumberArrayFromProperty"; static char _getPciRootUID_string[] = "_getPciRootUID"; static char _getPlatformName_string[] = "_getPlatformName"; static char _getSmbios_string[] = "_getSmbios"; static char _getStringForKey_string[] = "_getStringForKey"; static char _getStringFromUUID_string[] = "_getStringFromUUID"; static char _getUUIDFromString_string[] = "_getUUIDFromString"; static char _getVBECurrentMode_string[] = "_getVBECurrentMode"; static char _getVBEDACFormat_string[] = "_getVBEDACFormat"; static char _getVBEInfo_string[] = "_getVBEInfo"; static char _getVBEModeInfo_string[] = "_getVBEModeInfo"; static char _getVBEPalette_string[] = "_getVBEPalette"; static char _getVBEPixelClock_string[] = "_getVBEPixelClock"; static char _getValueForBootKey_string[] = "_getValueForBootKey"; static char _getValueForConfigTableKey_string[] = "_getValueForConfigTableKey"; static char _getValueForKey_string[] = "_getValueForKey"; static char _getVideoMode_string[] = "_getVideoMode"; static char _getVolumeLabelAlias_string[] = "_getVolumeLabelAlias"; static char _get_drive_info_string[] = "_get_drive_info"; static char _get_pci_dev_path_string[] = "_get_pci_dev_path"; static char _getc_string[] = "_getc"; static char _getchar_string[] = "_getchar"; static char _halt_string[] = "_halt"; static char _handle_symtable_string[] = "_handle_symtable"; static char _initBooterLog_string[] = "_initBooterLog"; static char _initGraphicsMode_string[] = "_initGraphicsMode"; static char _initKernBootStruct_string[] = "_initKernBootStruct"; static char _init_module_system_string[] = "_init_module_system"; static char _initialize_runtime_string[] = "_initialize_runtime"; static char _is_module_loaded_string[] = "_is_module_loaded"; static char _is_no_emulation_string[] = "_is_no_emulation"; static char _legacy_off_string[] = "_legacy_off"; static char _loadConfigFile_string[] = "_loadConfigFile"; static char _loadHelperConfig_string[] = "_loadHelperConfig"; static char _loadOverrideConfig_string[] = "_loadOverrideConfig"; static char _loadSystemConfig_string[] = "_loadSystemConfig"; static char _load_all_modules_string[] = "_load_all_modules"; static char _load_module_string[] = "_load_module"; static char _loadedModules_string[] = "_loadedModules"; static char _lookup_all_symbols_string[] = "_lookup_all_symbols"; static char _lookup_symbol_string[] = "_lookup_symbol"; static char _malloc_init_string[] = "_malloc_init"; static char _matchVolumeToString_string[] = "_matchVolumeToString"; static char _md0Ramdisk_string[] = "_md0Ramdisk"; static char _memcmp_string[] = "_memcmp"; static char _memcpy_string[] = "_memcpy"; static char _memset_string[] = "_memset"; static char _menuBVR_string[] = "_menuBVR"; static char _menuItems_string[] = "_menuItems"; static char _moduleCallbacks_string[] = "_moduleCallbacks"; static char _moduleSymbols_string[] = "_moduleSymbols"; static char _module_loaded_string[] = "_module_loaded"; static char _moveCursor_string[] = "_moveCursor"; static char _msgbuf_string[] = "_msgbuf"; static char _msglog_string[] = "_msglog"; static char _newAPMBVRef_string[] = "_newAPMBVRef"; static char _newFilteredBVChain_string[] = "_newFilteredBVChain"; static char _newGPTBVRef_string[] = "_newGPTBVRef"; static char _newString_string[] = "_newString"; static char _newStringForKey_string[] = "_newStringForKey"; static char _notify_usb_dev_string[] = "_notify_usb_dev"; static char _open_string[] = "_open"; static char _open_bvdev_string[] = "_open_bvdev"; static char _opendir_string[] = "_opendir"; static char _openmem_string[] = "_openmem"; static char _p_get_ramdisk_info_string[] = "_p_get_ramdisk_info"; static char _p_ramdiskReadBytes_string[] = "_p_ramdiskReadBytes"; static char _parse_mach_string[] = "_parse_mach"; static char _pause_string[] = "_pause"; static char _pci_config_read16_string[] = "_pci_config_read16"; static char _pci_config_read32_string[] = "_pci_config_read32"; static char _pci_config_read8_string[] = "_pci_config_read8"; static char _pci_config_write16_string[] = "_pci_config_write16"; static char _pci_config_write32_string[] = "_pci_config_write32"; static char _pci_config_write8_string[] = "_pci_config_write8"; static char _platformCPUFeature_string[] = "_platformCPUFeature"; static char _previewLoadedSectors_string[] = "_previewLoadedSectors"; static char _previewSaveunder_string[] = "_previewSaveunder"; static char _previewTotalSectors_string[] = "_previewTotalSectors"; static char _prf_string[] = "_prf"; static char _printMenuItem_string[] = "_printMenuItem"; static char _printf_string[] = "_printf"; static char _processBootArgument_string[] = "_processBootArgument"; static char _processBootOptions_string[] = "_processBootOptions"; static char _ptol_string[] = "_ptol"; static char _putc_string[] = "_putc"; static char _putca_string[] = "_putca"; static char _putchar_string[] = "_putchar"; static char _rawDiskRead_string[] = "_rawDiskRead"; static char _rawDiskWrite_string[] = "_rawDiskWrite"; static char _read_string[] = "_read"; static char _readBootSector_string[] = "_readBootSector"; static char _readKeyboardShiftFlags_string[] = "_readKeyboardShiftFlags"; static char _readKeyboardStatus_string[] = "_readKeyboardStatus"; static char _readdir_string[] = "_readdir"; static char _readdir_ext_string[] = "_readdir_ext"; static char _realloc_string[] = "_realloc"; static char _rebase_location_string[] = "_rebase_location"; static char _rebase_macho_string[] = "_rebase_macho"; static char _register_hook_callback_string[] = "_register_hook_callback"; static char _replace_function_string[] = "_replace_function"; static char _reserveKernBootStruct_string[] = "_reserveKernBootStruct"; static char _restoreCursor_string[] = "_restoreCursor"; static char _root_pci_dev_string[] = "_root_pci_dev"; static char _safe_malloc_string[] = "_safe_malloc"; static char _scanBootVolumes_string[] = "_scanBootVolumes"; static char _scanDisks_string[] = "_scanDisks"; static char _scan_cpu_string[] = "_scan_cpu"; static char _scan_mem_string[] = "_scan_mem"; static char _scan_pci_bus_string[] = "_scan_pci_bus"; static char _scan_platform_string[] = "_scan_platform"; static char _scollPage_string[] = "_scollPage"; static char _selectBootVolume_string[] = "_selectBootVolume"; static char _selectIndex_string[] = "_selectIndex"; static char _setActiveDisplayPage_string[] = "_setActiveDisplayPage"; static char _setBootGlobals_string[] = "_setBootGlobals"; static char _setCursorPosition_string[] = "_setCursorPosition"; static char _setCursorType_string[] = "_setCursorType"; static char _setRootVolume_string[] = "_setRootVolume"; static char _setVBEDACFormat_string[] = "_setVBEDACFormat"; static char _setVBEMode_string[] = "_setVBEMode"; static char _setVBEPalette_string[] = "_setVBEPalette"; static char _setVESAGraphicsMode_string[] = "_setVESAGraphicsMode"; static char _setVideoMode_string[] = "_setVideoMode"; static char _set_eth_builtin_string[] = "_set_eth_builtin"; static char _setupBooterLog_string[] = "_setupBooterLog"; static char _setupDeviceProperties_string[] = "_setupDeviceProperties"; static char _setupEfiDeviceTree_string[] = "_setupEfiDeviceTree"; static char _setupEfiTables32_string[] = "_setupEfiTables32"; static char _setupEfiTables64_string[] = "_setupEfiTables64"; static char _setupFakeEfi_string[] = "_setupFakeEfi"; static char _setupSystemType_string[] = "_setupSystemType"; static char _setup_pci_devs_string[] = "_setup_pci_devs"; static char _shouldboot_string[] = "_shouldboot"; static char _sleep_string[] = "_sleep"; static char _slvprintf_string[] = "_slvprintf"; static char _smbios_p_string[] = "_smbios_p"; static char _smbios_properties_string[] = "_smbios_properties"; static char _smbios_table_descriptions_string[] = "_smbios_table_descriptions"; static char _spinActivityIndicator_string[] = "_spinActivityIndicator"; static char _sprintf_string[] = "_sprintf"; static char _sputc_string[] = "_sputc"; static char _startprog_string[] = "_startprog"; static char _stop_string[] = "_stop"; static char _strbreak_string[] = "_strbreak"; static char _strcat_string[] = "_strcat"; static char _strchr_string[] = "_strchr"; static char _strcmp_string[] = "_strcmp"; static char _strcpy_string[] = "_strcpy"; static char _strdup_string[] = "_strdup"; static char _string_string[] = "_string"; static char _stringLength_string[] = "_stringLength"; static char _stringdata_string[] = "_stringdata"; static char _stringlength_string[] = "_stringlength"; static char _strlcpy_string[] = "_strlcpy"; static char _strlen_string[] = "_strlen"; static char _strncat_string[] = "_strncat"; static char _strncmp_string[] = "_strncmp"; static char _strncpy_string[] = "_strncpy"; static char _strstr_string[] = "_strstr"; static char _strtol_string[] = "_strtol"; static char _strtoul_string[] = "_strtoul"; static char _strtouq_string[] = "_strtouq"; static char _sysConfigValid_string[] = "_sysConfigValid"; static char _systemConfigDir_string[] = "_systemConfigDir"; static char _tell_string[] = "_tell"; static char _testBiosread_string[] = "_testBiosread"; static char _testFAT32EFIBootSector_string[] = "_testFAT32EFIBootSector"; static char _textAddress_string[] = "_textAddress"; static char _textSection_string[] = "_textSection"; static char _time18_string[] = "_time18"; static char _uhci_reset_string[] = "_uhci_reset"; static char _usbList_string[] = "_usbList"; static char _usb_loop_string[] = "_usb_loop"; static char _utf_decodestr_string[] = "_utf_decodestr"; static char _utf_encodestr_string[] = "_utf_encodestr"; static char _verbose_string[] = "_verbose"; static char _video_mode_string[] = "_video_mode"; static char _vol_opendir_string[] = "_vol_opendir"; static char _write_string[] = "_write"; static char _writebyte_string[] = "_writebyte"; static char _writeint_string[] = "_writeint"; static char boot2_string[] = "boot2"; symbol_t symbolList[] = { {.symbol = _AllocateKernelMemory_string, .addr = 0x0002acec}, {.symbol = _AllocateMemoryRange_string, .addr = 0x0002ad64}, {.symbol = _BinaryUnicodeCompare_string, .addr = 0x00031aef}, {.symbol = _CacheInit_string, .addr = 0x0003203e}, {.symbol = _CacheRead_string, .addr = 0x00031efc}, {.symbol = _CacheReset_string, .addr = 0x00031eed}, {.symbol = _CreateUUIDString_string, .addr = 0x000251d5}, {.symbol = _DT__AddChild_string, .addr = 0x0002b63f}, {.symbol = _DT__AddProperty_string, .addr = 0x0002b578}, {.symbol = _DT__Finalize_string, .addr = 0x0002b85b}, {.symbol = _DT__FindNode_string, .addr = 0x0002b8e4}, {.symbol = _DT__FlattenDeviceTree_string, .addr = 0x0002b7ee}, {.symbol = _DT__FreeNode_string, .addr = 0x0002b52f}, {.symbol = _DT__FreeProperty_string, .addr = 0x0002b519}, {.symbol = _DT__GetName_string, .addr = 0x0002b545}, {.symbol = _DT__Initialize_string, .addr = 0x0002b707}, {.symbol = _DecodeKernel_string, .addr = 0x00021fd1}, {.symbol = _DecodeMachO_string, .addr = 0x00025bb6}, {.symbol = _DecompressData_string, .addr = 0x000239a3}, {.symbol = _FastRelString_string, .addr = 0x00031c12}, {.symbol = _FastUnicodeCompare_string, .addr = 0x00031c92}, {.symbol = _FindFirstDmiTableOfType_string, .addr = 0x00030f25}, {.symbol = _FindNextDmiTableOfType_string, .addr = 0x00030de0}, {.symbol = _GPT_BASICDATA2_GUID_string, .addr = 0x00035b2c}, {.symbol = _GPT_BASICDATA_GUID_string, .addr = 0x00035b1c}, {.symbol = _GPT_BOOT_GUID_string, .addr = 0x00035afc}, {.symbol = _GPT_EFISYS_GUID_string, .addr = 0x00035b0c}, {.symbol = _GPT_HFS_GUID_string, .addr = 0x00035aec}, {.symbol = _Gdt_string, .addr = 0x00020458}, {.symbol = _Gdtr_string, .addr = 0x00020438}, {.symbol = _GetDirEntry_string, .addr = 0x000257a0}, {.symbol = _GetFileBlock_string, .addr = 0x00025762}, {.symbol = _GetFileInfo_string, .addr = 0x000257db}, {.symbol = _HFSFree_string, .addr = 0x0002c44b}, {.symbol = _HFSGetDescription_string, .addr = 0x0002d77e}, {.symbol = _HFSGetDirEntry_string, .addr = 0x0002d4c7}, {.symbol = _HFSGetFileBlock_string, .addr = 0x0002d827}, {.symbol = _HFSGetUUID_string, .addr = 0x0002d492}, {.symbol = _HFSInitPartition_string, .addr = 0x0002d10e}, {.symbol = _HFSLoadFile_string, .addr = 0x0002d730}, {.symbol = _HFSProbe_string, .addr = 0x0002d74e}, {.symbol = _HFSReadFile_string, .addr = 0x0002d5af}, {.symbol = _HibernateBoot_string, .addr = 0x0002358f}, {.symbol = _Idtr_prot_string, .addr = 0x00020448}, {.symbol = _Idtr_real_string, .addr = 0x00020440}, {.symbol = _LoadDrivers_string, .addr = 0x00021be3}, {.symbol = _LoadFile_string, .addr = 0x000259cd}, {.symbol = _LoadThinFatFile_string, .addr = 0x000258a3}, {.symbol = _LoadVolumeFile_string, .addr = 0x00024e99}, {.symbol = _MD5Final_string, .addr = 0x0002c254}, {.symbol = _MD5Init_string, .addr = 0x0002b9d3}, {.symbol = _MD5Pad_string, .addr = 0x0002c205}, {.symbol = _MD5Update_string, .addr = 0x0002c149}, {.symbol = _MSDOSFree_string, .addr = 0x0002d8fe}, {.symbol = _MSDOSGetDescription_string, .addr = 0x0002eaf7}, {.symbol = _MSDOSGetDirEntry_string, .addr = 0x0002e682}, {.symbol = _MSDOSGetFileBlock_string, .addr = 0x0002e97c}, {.symbol = _MSDOSGetUUID_string, .addr = 0x0002e2f7}, {.symbol = _MSDOSInitPartition_string, .addr = 0x0002e11e}, {.symbol = _MSDOSLoadFile_string, .addr = 0x0002e5c5}, {.symbol = _MSDOSProbe_string, .addr = 0x0002e5e3}, {.symbol = _MSDOSReadFile_string, .addr = 0x0002e385}, {.symbol = _ParseXMLFile_string, .addr = 0x000281ff}, {.symbol = _Platform_string, .addr = 0x00038a30}, {.symbol = _ReadFileAtOffset_string, .addr = 0x0002598f}, {.symbol = _ReadPCIBusInfo_string, .addr = 0x00029660}, {.symbol = _Round_string, .addr = 0x0002a5a8}, {.symbol = _Sqrt_string, .addr = 0x0002a5be}, {.symbol = _ThinFatFile_string, .addr = 0x00025eb0}, {.symbol = _XMLDecode_string, .addr = 0x0002af4e}, {.symbol = _XMLFreeTag_string, .addr = 0x0002b08c}, {.symbol = _XMLGetProperty_string, .addr = 0x0002ae95}, {.symbol = _XMLParseNextTag_string, .addr = 0x0002b1bb}, {.symbol = __DATA__bss__begin_string, .addr = 0x00036f20}, {.symbol = __DATA__bss__end_string, .addr = 0x000379ac}, {.symbol = __DATA__common__begin_string, .addr = 0x000379b0}, {.symbol = __DATA__common__end_string, .addr = 0x00038c50}, {.symbol = ___udivdi3_string, .addr = 0x00024338}, {.symbol = __bp_string, .addr = 0x0002032f}, {.symbol = __prot_to_real_string, .addr = 0x000202b2}, {.symbol = __real_to_prot_string, .addr = 0x00020264}, {.symbol = __sp_string, .addr = 0x0002032c}, {.symbol = __switch_stack_string, .addr = 0x00020332}, {.symbol = _addBootArg_string, .addr = 0x000228f6}, {.symbol = _addConfigurationTable_string, .addr = 0x000293c5}, {.symbol = _add_symbol_string, .addr = 0x00024460}, {.symbol = _archCpuType_string, .addr = 0x00036784}, {.symbol = _ascii_hex_to_int_string, .addr = 0x00030f8f}, {.symbol = _atoi_string, .addr = 0x0003238a}, {.symbol = _b_lseek_string, .addr = 0x000252b9}, {.symbol = _bcopy_string, .addr = 0x00032234}, {.symbol = _bgetc_string, .addr = 0x00029fdb}, {.symbol = _bind_location_string, .addr = 0x00024224}, {.symbol = _bind_macho_string, .addr = 0x0002471d}, {.symbol = _bios_string, .addr = 0x00020362}, {.symbol = _biosDevIsCDROM_string, .addr = 0x000263b3}, {.symbol = _biosread_string, .addr = 0x00029a8c}, {.symbol = _boot_string, .addr = 0x00020e8e}, {.symbol = _bootArgs_string, .addr = 0x000379b0}, {.symbol = _bootBanner_string, .addr = 0x00036618}, {.symbol = _bootInfo_string, .addr = 0x000379b4}, {.symbol = _bootPrompt_string, .addr = 0x0003667d}, {.symbol = _booterCommand_string, .addr = 0x00037e00}, {.symbol = _booterParam_string, .addr = 0x00038200}, {.symbol = _build_pci_dt_string, .addr = 0x0002efba}, {.symbol = _builtin_set_string, .addr = 0x00036b18}, {.symbol = _bvChain_string, .addr = 0x000379b8}, {.symbol = _bvCount_string, .addr = 0x00036604}, {.symbol = _bvr_string, .addr = 0x000379bc}, {.symbol = _bzero_string, .addr = 0x00032255}, {.symbol = _chainbootdev_string, .addr = 0x00020434}, {.symbol = _chainbootflag_string, .addr = 0x00020435}, {.symbol = _changeCursor_string, .addr = 0x00022996}, {.symbol = _checksum8_string, .addr = 0x0003240a}, {.symbol = _clearActivityIndicator_string, .addr = 0x000215ab}, {.symbol = _clearBootArgs_string, .addr = 0x0002294e}, {.symbol = _clearScreenRows_string, .addr = 0x00029750}, {.symbol = _close_string, .addr = 0x00024eaf}, {.symbol = _closedir_string, .addr = 0x000250e7}, {.symbol = _common_boot_string, .addr = 0x000204c0}, {.symbol = _convertHexStr2Binary_string, .addr = 0x00030fea}, {.symbol = _copyArgument_string, .addr = 0x000220e8}, {.symbol = _crc32_string, .addr = 0x00032fb5}, {.symbol = _cursor_string, .addr = 0x000367a4}, {.symbol = _decodeRLE_string, .addr = 0x000214f0}, {.symbol = _decompress_lzss_string, .addr = 0x000232f2}, {.symbol = _delay_string, .addr = 0x0002962a}, {.symbol = _devices_number_string, .addr = 0x00036b14}, {.symbol = _devprop_add_device_string, .addr = 0x00031689}, {.symbol = _devprop_add_network_template_string, .addr = 0x000315e2}, {.symbol = _devprop_add_value_string, .addr = 0x00031475}, {.symbol = _devprop_create_string_string, .addr = 0x0003163c}, {.symbol = _devprop_free_string_string, .addr = 0x00031200}, {.symbol = _devprop_generate_string_string, .addr = 0x00031273}, {.symbol = _diskFreeMap_string, .addr = 0x0002642a}, {.symbol = _diskIsCDROM_string, .addr = 0x000263d7}, {.symbol = _diskRead_string, .addr = 0x000270ba}, {.symbol = _diskResetBootVolumes_string, .addr = 0x000268f0}, {.symbol = _diskScanBootVolumes_string, .addr = 0x00027420}, {.symbol = _diskSeek_string, .addr = 0x000262e4}, {.symbol = _dram_controller_dev_string, .addr = 0x000367a8}, {.symbol = _dump_pci_dt_string, .addr = 0x0002edff}, {.symbol = _ebiosEjectMedia_string, .addr = 0x0002981b}, {.symbol = _ebiosread_string, .addr = 0x000299b9}, {.symbol = _ebioswrite_string, .addr = 0x000298c8}, {.symbol = _efi_guid_compare_string, .addr = 0x0003300e}, {.symbol = _efi_guid_is_null_string, .addr = 0x00032fe6}, {.symbol = _efi_guid_unparse_upper_string, .addr = 0x0003305f}, {.symbol = _efi_inject_get_devprop_string_string, .addr = 0x00031445}, {.symbol = _ehci_acquire_string, .addr = 0x0002a13b}, {.symbol = _enableA20_string, .addr = 0x00025f5f}, {.symbol = _enable_pci_devs_string, .addr = 0x0002ed33}, {.symbol = _error_string, .addr = 0x00028961}, {.symbol = _execute_hook_string, .addr = 0x00024600}, {.symbol = _file_size_string, .addr = 0x000252e5}, {.symbol = _finalizeBootStruct_string, .addr = 0x00025fc9}, {.symbol = _flushKeyboardBuffer_string, .addr = 0x000227bd}, {.symbol = _free_string, .addr = 0x0003270c}, {.symbol = _freeFilteredBVChain_string, .addr = 0x000263fe}, {.symbol = _gBIOSBootVolume_string, .addr = 0x00036744}, {.symbol = _gBIOSDev_string, .addr = 0x000379c0}, {.symbol = _gBinaryAddress_string, .addr = 0x00038a20}, {.symbol = _gBootArgs_string, .addr = 0x00038600}, {.symbol = _gBootArgsEnd_string, .addr = 0x00036714}, {.symbol = _gBootArgsPtr_string, .addr = 0x00036710}, {.symbol = _gBootFileType_string, .addr = 0x000379c4}, {.symbol = _gBootMode_string, .addr = 0x000379c8}, {.symbol = _gBootVolume_string, .addr = 0x000379cc}, {.symbol = _gCompareTable_string, .addr = 0x00038c48}, {.symbol = _gCompareTableCompressed_string, .addr = 0x00036e14}, {.symbol = _gDeviceCount_string, .addr = 0x00036608}, {.symbol = _gEfiAcpi20TableGuid_string, .addr = 0x000367c8}, {.symbol = _gEfiAcpiTableGuid_string, .addr = 0x000367b8}, {.symbol = _gEfiConfigurationTableNode_string, .addr = 0x000367b4}, {.symbol = _gEfiSmbiosTableGuid_string, .addr = 0x00035c64}, {.symbol = _gErrors_string, .addr = 0x000379d0}, {.symbol = _gFSLoadAddress_string, .addr = 0x00036740}, {.symbol = _gHaveKernelCache_string, .addr = 0x000379d1}, {.symbol = _gLowerCaseTable_string, .addr = 0x00038c4c}, {.symbol = _gLowerCaseTableCompressed_string, .addr = 0x00036b3c}, {.symbol = _gMKextName_string, .addr = 0x000379e0}, {.symbol = _gMacOSVersion_string, .addr = 0x00037be0}, {.symbol = _gMemoryMapNode_string, .addr = 0x00038a24}, {.symbol = _gMenuBottom_string, .addr = 0x00038a00}, {.symbol = _gMenuEnd_string, .addr = 0x00038a04}, {.symbol = _gMenuHeight_string, .addr = 0x00038a08}, {.symbol = _gMenuItemCount_string, .addr = 0x00038a0c}, {.symbol = _gMenuItems_string, .addr = 0x00036718}, {.symbol = _gMenuRow_string, .addr = 0x00038a10}, {.symbol = _gMenuSelection_string, .addr = 0x00038a14}, {.symbol = _gMenuStart_string, .addr = 0x00038a18}, {.symbol = _gMenuTop_string, .addr = 0x00038a1c}, {.symbol = _gOverrideKernel_string, .addr = 0x00037be8}, {.symbol = _gPlatformName_string, .addr = 0x00036600}, {.symbol = _gRootDevice_string, .addr = 0x00037bf0}, {.symbol = _gST32_string, .addr = 0x000367ac}, {.symbol = _gST64_string, .addr = 0x000367b0}, {.symbol = _gVerboseMode_string, .addr = 0x00037df0}, {.symbol = _generateCRTCTiming_string, .addr = 0x0002a989}, {.symbol = _getBVChainForBIOSDev_string, .addr = 0x000262c5}, {.symbol = _getBoolForKey_string, .addr = 0x00028861}, {.symbol = _getBootOptions_string, .addr = 0x00022a38}, {.symbol = _getBootVolumeDescription_string, .addr = 0x00026658}, {.symbol = _getBootVolumeRef_string, .addr = 0x000255ce}, {.symbol = _getColorForKey_string, .addr = 0x000286a2}, {.symbol = _getConventionalMemorySize_string, .addr = 0x00029b65}, {.symbol = _getCursorPositionAndType_string, .addr = 0x00029773}, {.symbol = _getDeviceDescription_string, .addr = 0x00024f81}, {.symbol = _getDimensionForKey_string, .addr = 0x000286eb}, {.symbol = _getEDID_string, .addr = 0x0002a921}, {.symbol = _getExtendedMemorySize_string, .addr = 0x00029b85}, {.symbol = _getIntForKey_string, .addr = 0x000287d0}, {.symbol = _getMemoryMap_string, .addr = 0x00029e48}, {.symbol = _getNextArg_string, .addr = 0x00028163}, {.symbol = _getNumberArrayFromProperty_string, .addr = 0x0002112a}, {.symbol = _getPciRootUID_string, .addr = 0x0003210c}, {.symbol = _getPlatformName_string, .addr = 0x00025f4b}, {.symbol = _getSmbios_string, .addr = 0x0002fc5b}, {.symbol = _getStringForKey_string, .addr = 0x000288ae}, {.symbol = _getStringFromUUID_string, .addr = 0x000310b6}, {.symbol = _getUUIDFromString_string, .addr = 0x0003112d}, {.symbol = _getVBECurrentMode_string, .addr = 0x0002a6ee}, {.symbol = _getVBEDACFormat_string, .addr = 0x0002a85c}, {.symbol = _getVBEInfo_string, .addr = 0x0002a8e0}, {.symbol = _getVBEModeInfo_string, .addr = 0x0002a896}, {.symbol = _getVBEPalette_string, .addr = 0x0002a722}, {.symbol = _getVBEPixelClock_string, .addr = 0x0002a6a0}, {.symbol = _getValueForBootKey_string, .addr = 0x000284ba}, {.symbol = _getValueForConfigTableKey_string, .addr = 0x00028563}, {.symbol = _getValueForKey_string, .addr = 0x000285c0}, {.symbol = _getVideoMode_string, .addr = 0x00020ec7}, {.symbol = _getVolumeLabelAlias_string, .addr = 0x00026566}, {.symbol = _get_drive_info_string, .addr = 0x00029d0b}, {.symbol = _get_pci_dev_path_string, .addr = 0x0002ed62}, {.symbol = _getc_string, .addr = 0x00028b17}, {.symbol = _getchar_string, .addr = 0x00028be3}, {.symbol = _halt_string, .addr = 0x00020308}, {.symbol = _handle_symtable_string, .addr = 0x0002424b}, {.symbol = _initBooterLog_string, .addr = 0x00028bb0}, {.symbol = _initGraphicsMode_string, .addr = 0x0002131c}, {.symbol = _initKernBootStruct_string, .addr = 0x0002614d}, {.symbol = _init_module_system_string, .addr = 0x00024e69}, {.symbol = _initialize_runtime_string, .addr = 0x00020e4c}, {.symbol = _is_module_loaded_string, .addr = 0x0002442e}, {.symbol = _is_no_emulation_string, .addr = 0x00029c8c}, {.symbol = _legacy_off_string, .addr = 0x0002a38d}, {.symbol = _loadConfigFile_string, .addr = 0x0002846c}, {.symbol = _loadHelperConfig_string, .addr = 0x0002828c}, {.symbol = _loadOverrideConfig_string, .addr = 0x0002836d}, {.symbol = _loadSystemConfig_string, .addr = 0x000283e9}, {.symbol = _load_all_modules_string, .addr = 0x00024de7}, {.symbol = _load_module_string, .addr = 0x00024ce9}, {.symbol = _loadedModules_string, .addr = 0x00036734}, {.symbol = _lookup_all_symbols_string, .addr = 0x00024667}, {.symbol = _lookup_symbol_string, .addr = 0x0003673c}, {.symbol = _malloc_init_string, .addr = 0x000325a6}, {.symbol = _matchVolumeToString_string, .addr = 0x0002645c}, {.symbol = _md0Ramdisk_string, .addr = 0x00023403}, {.symbol = _memcmp_string, .addr = 0x00032286}, {.symbol = _memcpy_string, .addr = 0x00032211}, {.symbol = _memset_string, .addr = 0x000321fd}, {.symbol = _menuBVR_string, .addr = 0x00037df4}, {.symbol = _menuItems_string, .addr = 0x0003670c}, {.symbol = _moduleCallbacks_string, .addr = 0x00036730}, {.symbol = _moduleSymbols_string, .addr = 0x00036738}, {.symbol = _module_loaded_string, .addr = 0x000243c5}, {.symbol = _moveCursor_string, .addr = 0x000227e3}, {.symbol = _msgbuf_string, .addr = 0x000367a0}, {.symbol = _msglog_string, .addr = 0x00028ab7}, {.symbol = _newAPMBVRef_string, .addr = 0x00026957}, {.symbol = _newFilteredBVChain_string, .addr = 0x00026771}, {.symbol = _newGPTBVRef_string, .addr = 0x000271d6}, {.symbol = _newString_string, .addr = 0x000281cc}, {.symbol = _newStringForKey_string, .addr = 0x000288e6}, {.symbol = _notify_usb_dev_string, .addr = 0x0002a546}, {.symbol = _open_string, .addr = 0x00025736}, {.symbol = _open_bvdev_string, .addr = 0x00025a01}, {.symbol = _opendir_string, .addr = 0x000256d8}, {.symbol = _openmem_string, .addr = 0x00025178}, {.symbol = _p_get_ramdisk_info_string, .addr = 0x0003678c}, {.symbol = _p_ramdiskReadBytes_string, .addr = 0x00036788}, {.symbol = _parse_mach_string, .addr = 0x00024a5c}, {.symbol = _pause_string, .addr = 0x00028c18}, {.symbol = _pci_config_read16_string, .addr = 0x0002ecc1}, {.symbol = _pci_config_read32_string, .addr = 0x0002ecec}, {.symbol = _pci_config_read8_string, .addr = 0x0002ec97}, {.symbol = _pci_config_write16_string, .addr = 0x0002ed04}, {.symbol = _pci_config_write32_string, .addr = 0x0002ef9f}, {.symbol = _pci_config_write8_string, .addr = 0x0002ef71}, {.symbol = _platformCPUFeature_string, .addr = 0x00028c2c}, {.symbol = _previewLoadedSectors_string, .addr = 0x00036610}, {.symbol = _previewSaveunder_string, .addr = 0x00036614}, {.symbol = _previewTotalSectors_string, .addr = 0x0003660c}, {.symbol = _prf_string, .addr = 0x000330ab}, {.symbol = _printMenuItem_string, .addr = 0x000228a1}, {.symbol = _printf_string, .addr = 0x00028a07}, {.symbol = _processBootArgument_string, .addr = 0x0002216f}, {.symbol = _processBootOptions_string, .addr = 0x000221fe}, {.symbol = _ptol_string, .addr = 0x00032368}, {.symbol = _putc_string, .addr = 0x00029891}, {.symbol = _putca_string, .addr = 0x00029851}, {.symbol = _putchar_string, .addr = 0x00028b2e}, {.symbol = _rawDiskRead_string, .addr = 0x00026b2d}, {.symbol = _rawDiskWrite_string, .addr = 0x00026a27}, {.symbol = _read_string, .addr = 0x00025406}, {.symbol = _readBootSector_string, .addr = 0x0002716d}, {.symbol = _readKeyboardShiftFlags_string, .addr = 0x00029c32}, {.symbol = _readKeyboardStatus_string, .addr = 0x00029c59}, {.symbol = _readdir_string, .addr = 0x00024eff}, {.symbol = _readdir_ext_string, .addr = 0x00024f21}, {.symbol = _realloc_string, .addr = 0x00032a39}, {.symbol = _rebase_location_string, .addr = 0x0002420e}, {.symbol = _rebase_macho_string, .addr = 0x00023f94}, {.symbol = _register_hook_callback_string, .addr = 0x000244e5}, {.symbol = _replace_function_string, .addr = 0x000246dc}, {.symbol = _reserveKernBootStruct_string, .addr = 0x00026120}, {.symbol = _restoreCursor_string, .addr = 0x00022971}, {.symbol = _root_pci_dev_string, .addr = 0x00038c38}, {.symbol = _safe_malloc_string, .addr = 0x000328fd}, {.symbol = _scanBootVolumes_string, .addr = 0x0002510d}, {.symbol = _scanDisks_string, .addr = 0x00025b23}, {.symbol = _scan_cpu_string, .addr = 0x0002f019}, {.symbol = _scan_mem_string, .addr = 0x00028c68}, {.symbol = _scan_pci_bus_string, .addr = 0x0002ee57}, {.symbol = _scan_platform_string, .addr = 0x00028c40}, {.symbol = _scollPage_string, .addr = 0x000296f7}, {.symbol = _selectBootVolume_string, .addr = 0x00024fe0}, {.symbol = _selectIndex_string, .addr = 0x00036708}, {.symbol = _setActiveDisplayPage_string, .addr = 0x000296ce}, {.symbol = _setBootGlobals_string, .addr = 0x00025530}, {.symbol = _setCursorPosition_string, .addr = 0x000297e2}, {.symbol = _setCursorType_string, .addr = 0x000297b8}, {.symbol = _setRootVolume_string, .addr = 0x00024f61}, {.symbol = _setVBEDACFormat_string, .addr = 0x0002a824}, {.symbol = _setVBEMode_string, .addr = 0x0002a7d6}, {.symbol = _setVBEPalette_string, .addr = 0x0002a77c}, {.symbol = _setVESAGraphicsMode_string, .addr = 0x000211a0}, {.symbol = _setVideoMode_string, .addr = 0x000213a9}, {.symbol = _set_eth_builtin_string, .addr = 0x00031936}, {.symbol = _setupBooterLog_string, .addr = 0x00028b6a}, {.symbol = _setupDeviceProperties_string, .addr = 0x000319fd}, {.symbol = _setupEfiDeviceTree_string, .addr = 0x00028d7e}, {.symbol = _setupEfiTables32_string, .addr = 0x00029247}, {.symbol = _setupEfiTables64_string, .addr = 0x0002900a}, {.symbol = _setupFakeEfi_string, .addr = 0x0002947d}, {.symbol = _setupSystemType_string, .addr = 0x00028cbb}, {.symbol = _setup_pci_devs_string, .addr = 0x00031a74}, {.symbol = _shouldboot_string, .addr = 0x00036704}, {.symbol = _sleep_string, .addr = 0x0002a031}, {.symbol = _slvprintf_string, .addr = 0x00032a93}, {.symbol = _smbios_p_string, .addr = 0x00038c40}, {.symbol = _smbios_properties_string, .addr = 0x0003681c}, {.symbol = _smbios_table_descriptions_string, .addr = 0x00036a84}, {.symbol = _spinActivityIndicator_string, .addr = 0x00021549}, {.symbol = _sprintf_string, .addr = 0x00032acd}, {.symbol = _sputc_string, .addr = 0x0002893d}, {.symbol = _startprog_string, .addr = 0x00020312}, {.symbol = _stop_string, .addr = 0x00028a7d}, {.symbol = _strbreak_string, .addr = 0x00032424}, {.symbol = _strcat_string, .addr = 0x000324f3}, {.symbol = _strchr_string, .addr = 0x000323eb}, {.symbol = _strcmp_string, .addr = 0x000322ad}, {.symbol = _strcpy_string, .addr = 0x00032302}, {.symbol = _strdup_string, .addr = 0x000324b9}, {.symbol = _string_string, .addr = 0x00036b1c}, {.symbol = _stringLength_string, .addr = 0x000280dd}, {.symbol = _stringdata_string, .addr = 0x00036b20}, {.symbol = _stringlength_string, .addr = 0x00036b24}, {.symbol = _strlcpy_string, .addr = 0x0003233e}, {.symbol = _strlen_string, .addr = 0x00032273}, {.symbol = _strncat_string, .addr = 0x000323bb}, {.symbol = _strncmp_string, .addr = 0x000322ce}, {.symbol = _strncpy_string, .addr = 0x0003231a}, {.symbol = _strstr_string, .addr = 0x0003252d}, {.symbol = _strtol_string, .addr = 0x00032b09}, {.symbol = _strtoul_string, .addr = 0x00032e46}, {.symbol = _strtouq_string, .addr = 0x00032c7a}, {.symbol = _sysConfigValid_string, .addr = 0x00037df8}, {.symbol = _systemConfigDir_string, .addr = 0x00024f45}, {.symbol = _tell_string, .addr = 0x00024ed9}, {.symbol = _testBiosread_string, .addr = 0x000280cb}, {.symbol = _testFAT32EFIBootSector_string, .addr = 0x000270e9}, {.symbol = _textAddress_string, .addr = 0x00036720}, {.symbol = _textSection_string, .addr = 0x00036728}, {.symbol = _time18_string, .addr = 0x00029bf8}, {.symbol = _uhci_reset_string, .addr = 0x0002a0ae}, {.symbol = _usbList_string, .addr = 0x000367d8}, {.symbol = _usb_loop_string, .addr = 0x0002a451}, {.symbol = _utf_decodestr_string, .addr = 0x00031d65}, {.symbol = _utf_encodestr_string, .addr = 0x00031e40}, {.symbol = _verbose_string, .addr = 0x00028988}, {.symbol = _video_mode_string, .addr = 0x00029b3c}, {.symbol = _vol_opendir_string, .addr = 0x00025133}, {.symbol = _write_string, .addr = 0x000253a7}, {.symbol = _writebyte_string, .addr = 0x0002535d}, {.symbol = _writeint_string, .addr = 0x0002530b}, {.symbol = boot2_string, .addr = 0x00020200}, }; Index: branches/meklort/i386/modules/Makefile =================================================================== --- branches/meklort/i386/modules/Makefile (revision 542) +++ branches/meklort/i386/modules/Makefile (revision 543) @@ -27,7 +27,7 @@ # The order of building is important. # TODO: exclude Symbols from find so it isn't compiled twice -SUBDIRS = Symbols Resolution Memory KernelPatcher KextPatcher HelloWorld GUI GraphicsEnabler ACPIPatcher +SUBDIRS = Symbols Resolution Memory KernelPatcher KextPatcher HelloWorld GUI GraphicsEnabler ACPIPatcher HPET all embedtheme optionrom tags debug install installhdrs: @rm -rf $(OBJROOT) Index: branches/meklort/i386/modules/Ethernet/Ethernet.c =================================================================== --- branches/meklort/i386/modules/Ethernet/Ethernet.c (revision 0) +++ branches/meklort/i386/modules/Ethernet/Ethernet.c (revision 543) @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2009 Evan Lojewski. All rights reserved. + * + */ + +#include "libsaio.h" +#include "modules.h" +#include "boot.h" +#include "bootstruct.h" +#include "pci.h" +#include "hpet.h" + +#ifndef DEBUG_HPET +#define DEBUG_HPET 0 +#endif + +#if DEBUG_HPET +#define DBG(x...) printf(x) +#else +#define DBG(x...) +#endif + +void set_eth_builtin(pci_dt_t *eth_dev); + + +void Ethernet_hook(void* arg1, void* arg2, void* arg3, void* arg4) +{ + pci_dt_t* current = arg1; + + if(current->class_id != PCI_CLASS_NETWORK_ETHERNET) return; + + + bool do_eth_devprop = false; + getBoolForKey(kEthernetBuiltIn, &do_eth_devprop, &bootInfo->bootConfig); + + if (do_eth_devprop) + set_eth_builtin(current); +} + +void Ethernet_start() +{ + register_hook_callback("PCIDevice", &Ethernet_hook); +} + +/* a fine place for this code */ + +int devprop_add_network_template(struct DevPropDevice *device, uint16_t vendor_id) +{ + if(!device) + return 0; + uint8_t builtin = 0x0; + if((vendor_id != 0x168c) && (builtin_set == 0)) + { + builtin_set = 1; + builtin = 0x01; + } + if(!devprop_add_value(device, "built-in", (uint8_t*)&builtin, 1)) + return 0; + devices_number++; + return 1; +} + +void set_eth_builtin(pci_dt_t *eth_dev) +{ + char *devicepath = get_pci_dev_path(eth_dev); + struct DevPropDevice *device = (struct DevPropDevice*)malloc(sizeof(struct DevPropDevice)); + + verbose("LAN Controller [%04x:%04x] :: %s\n", eth_dev->vendor_id, eth_dev->device_id, devicepath); + + if (!string) + string = devprop_create_string(); + + device = devprop_add_device(string, devicepath); + if(device) + { + verbose("Setting up lan keys\n"); + devprop_add_network_template(device, eth_dev->vendor_id); + stringdata = (uint8_t*)malloc(sizeof(uint8_t) * string->length); + if(stringdata) + { + memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); + stringlength = string->length; + } + } +} Index: branches/meklort/i386/modules/Ethernet/Makefile =================================================================== --- branches/meklort/i386/modules/Ethernet/Makefile (revision 0) +++ branches/meklort/i386/modules/Ethernet/Makefile (revision 543) @@ -0,0 +1,84 @@ + +MODULE_NAME = Ethernet +MODULE_VERSION = "1.0.0" +MODULE_COMPAT_VERSION = "1.0.0" +MODULE_START = _$(MODULE_NAME)_start +MODULE_DEPENDENCIES = + +DIR = Ethernet + +include ../../MakePaths.dir + +OBJROOT=../../../obj/i386/modules/$(DIR) +SYMROOT=../../../sym/i386/modules/ +DSTROOT=../../../dst/i386/modules/ + + +UTILDIR = ../../util +LIBSADIR = ../../libsa +LIBSAIODIR = ../../libsaio +BOOT2DIR = ../../boot2 + +INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone + +OPTIM = -Os -Oz +DEBUG = -DNOTHING +#DEBUG = -DDEBUG_HELLO_WORLD=1 +CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \ + -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ + -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ + -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ + -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common -mdynamic-no-pic + +DEFINES= +CONFIG = hd +INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR) +ifneq "" "$(wildcard /bin/mkdirs)" + MKDIRS = /bin/mkdirs +else + MKDIRS = /bin/mkdir -p +endif +AS = as +LD = ld +# LIBS= -lc_static +LIBS= + +VPATH = $(OBJROOT):$(SYMROOT) + +ETHERNET_OBJS = Ethernet.o + + +SFILES = +CFILES = +HFILES = +EXPORTED_HFILES = +INSTALLED_HFILES = +OTHERFILES = Makefile +ALLSRC = $(SFILES) $(CFILES) \ + $(HFILES) $(OTHERFILES) +DIRS_NEEDED = $(OBJROOT) $(SYMROOT) + +all embedtheme optionrom: ${ETHERNET_OBJS} dylib + + +dylib: ${ETHERNET_OBJS} + ld -flat_namespace -arch i386 \ + -undefined suppress \ + -alias $(MODULE_START) start \ + -dylib -read_only_relocs suppress \ + -S -x -Z -dead_strip_dylibs \ + -no_uuid \ + -current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \ + -final_output $(MODULE_NAME) \ + $(OBJROOT)/Ethernet.o -o $(SYMROOT)/$(MODULE_NAME).dylib + + + +Ethernet.o: + $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c "Ethernet.c" $(INC) -o "$(OBJROOT)/Ethernet.o" + +include ../../MakeInc.dir + +# dependencies +-include $(OBJROOT)/Makedep Property changes on: branches/meklort ___________________________________________________________________ Modified: svn:ignore - obj sym + typedef struct { char* symbol; unsigned int addr; } symbol_t; static char _AllocateKernelMemory_string[] = "_AllocateKernelMemory"; static char _AllocateMemoryRange_string[] = "_AllocateMemoryRange"; static char _BinaryUnicodeCompare_string[] = "_BinaryUnicodeCompare"; static char _CacheInit_string[] = "_CacheInit"; static char _CacheRead_string[] = "_CacheRead"; static char _CacheReset_string[] = "_CacheReset"; static char _CreateUUIDString_string[] = "_CreateUUIDString"; static char _DT__AddChild_string[] = "_DT__AddChild"; static char _DT__AddProperty_string[] = "_DT__AddProperty"; static char _DT__Finalize_string[] = "_DT__Finalize"; static char _DT__FindNode_string[] = "_DT__FindNode"; static char _DT__FlattenDeviceTree_string[] = "_DT__FlattenDeviceTree"; static char _DT__FreeNode_string[] = "_DT__FreeNode"; static char _DT__FreeProperty_string[] = "_DT__FreeProperty"; static char _DT__GetName_string[] = "_DT__GetName"; static char _DT__Initialize_string[] = "_DT__Initialize"; static char _DecodeKernel_string[] = "_DecodeKernel"; static char _DecodeMachO_string[] = "_DecodeMachO"; static char _DecompressData_string[] = "_DecompressData"; static char _FastRelString_string[] = "_FastRelString"; static char _FastUnicodeCompare_string[] = "_FastUnicodeCompare"; static char _FindFirstDmiTableOfType_string[] = "_FindFirstDmiTableOfType"; static char _FindNextDmiTableOfType_string[] = "_FindNextDmiTableOfType"; static char _GPT_BASICDATA2_GUID_string[] = "_GPT_BASICDATA2_GUID"; static char _GPT_BASICDATA_GUID_string[] = "_GPT_BASICDATA_GUID"; static char _GPT_BOOT_GUID_string[] = "_GPT_BOOT_GUID"; static char _GPT_EFISYS_GUID_string[] = "_GPT_EFISYS_GUID"; static char _GPT_HFS_GUID_string[] = "_GPT_HFS_GUID"; static char _Gdt_string[] = "_Gdt"; static char _Gdtr_string[] = "_Gdtr"; static char _GetDirEntry_string[] = "_GetDirEntry"; static char _GetFileBlock_string[] = "_GetFileBlock"; static char _GetFileInfo_string[] = "_GetFileInfo"; static char _HFSFree_string[] = "_HFSFree"; static char _HFSGetDescription_string[] = "_HFSGetDescription"; static char _HFSGetDirEntry_string[] = "_HFSGetDirEntry"; static char _HFSGetFileBlock_string[] = "_HFSGetFileBlock"; static char _HFSGetUUID_string[] = "_HFSGetUUID"; static char _HFSInitPartition_string[] = "_HFSInitPartition"; static char _HFSLoadFile_string[] = "_HFSLoadFile"; static char _HFSProbe_string[] = "_HFSProbe"; static char _HFSReadFile_string[] = "_HFSReadFile"; static char _HibernateBoot_string[] = "_HibernateBoot"; static char _Idtr_prot_string[] = "_Idtr_prot"; static char _Idtr_real_string[] = "_Idtr_real"; static char _LoadDrivers_string[] = "_LoadDrivers"; static char _LoadFile_string[] = "_LoadFile"; static char _LoadThinFatFile_string[] = "_LoadThinFatFile"; static char _LoadVolumeFile_string[] = "_LoadVolumeFile"; static char _MD5Final_string[] = "_MD5Final"; static char _MD5Init_string[] = "_MD5Init"; static char _MD5Pad_string[] = "_MD5Pad"; static char _MD5Update_string[] = "_MD5Update"; static char _MSDOSFree_string[] = "_MSDOSFree"; static char _MSDOSGetDescription_string[] = "_MSDOSGetDescription"; static char _MSDOSGetDirEntry_string[] = "_MSDOSGetDirEntry"; static char _MSDOSGetFileBlock_string[] = "_MSDOSGetFileBlock"; static char _MSDOSGetUUID_string[] = "_MSDOSGetUUID"; static char _MSDOSInitPartition_string[] = "_MSDOSInitPartition"; static char _MSDOSLoadFile_string[] = "_MSDOSLoadFile"; static char _MSDOSProbe_string[] = "_MSDOSProbe"; static char _MSDOSReadFile_string[] = "_MSDOSReadFile"; static char _ParseXMLFile_string[] = "_ParseXMLFile"; static char _Platform_string[] = "_Platform"; static char _ReadFileAtOffset_string[] = "_ReadFileAtOffset"; static char _ReadPCIBusInfo_string[] = "_ReadPCIBusInfo"; static char _Round_string[] = "_Round"; static char _Sqrt_string[] = "_Sqrt"; static char _ThinFatFile_string[] = "_ThinFatFile"; static char _XMLDecode_string[] = "_XMLDecode"; static char _XMLFreeTag_string[] = "_XMLFreeTag"; static char _XMLGetProperty_string[] = "_XMLGetProperty"; static char _XMLParseNextTag_string[] = "_XMLParseNextTag"; static char __DATA__bss__begin_string[] = "__DATA__bss__begin"; static char __DATA__bss__end_string[] = "__DATA__bss__end"; static char __DATA__common__begin_string[] = "__DATA__common__begin"; static char __DATA__common__end_string[] = "__DATA__common__end"; static char ___udivdi3_string[] = "___udivdi3"; static char __bp_string[] = "__bp"; static char __prot_to_real_string[] = "__prot_to_real"; static char __real_to_prot_string[] = "__real_to_prot"; static char __sp_string[] = "__sp"; static char __switch_stack_string[] = "__switch_stack"; static char _addBootArg_string[] = "_addBootArg"; static char _addConfigurationTable_string[] = "_addConfigurationTable"; static char _add_symbol_string[] = "_add_symbol"; static char _archCpuType_string[] = "_archCpuType"; static char _ascii_hex_to_int_string[] = "_ascii_hex_to_int"; static char _atoi_string[] = "_atoi"; static char _b_lseek_string[] = "_b_lseek"; static char _bcopy_string[] = "_bcopy"; static char _bgetc_string[] = "_bgetc"; static char _bind_location_string[] = "_bind_location"; static char _bind_macho_string[] = "_bind_macho"; static char _bios_string[] = "_bios"; static char _biosDevIsCDROM_string[] = "_biosDevIsCDROM"; static char _biosread_string[] = "_biosread"; static char _boot_string[] = "_boot"; static char _bootArgs_string[] = "_bootArgs"; static char _bootBanner_string[] = "_bootBanner"; static char _bootInfo_string[] = "_bootInfo"; static char _bootPrompt_string[] = "_bootPrompt"; static char _booterCommand_string[] = "_booterCommand"; static char _booterParam_string[] = "_booterParam"; static char _build_pci_dt_string[] = "_build_pci_dt"; static char _builtin_set_string[] = "_builtin_set"; static char _bvChain_string[] = "_bvChain"; static char _bvCount_string[] = "_bvCount"; static char _bvr_string[] = "_bvr"; static char _bzero_string[] = "_bzero"; static char _chainbootdev_string[] = "_chainbootdev"; static char _chainbootflag_string[] = "_chainbootflag"; static char _changeCursor_string[] = "_changeCursor"; static char _checksum8_string[] = "_checksum8"; static char _clearActivityIndicator_string[] = "_clearActivityIndicator"; static char _clearBootArgs_string[] = "_clearBootArgs"; static char _clearScreenRows_string[] = "_clearScreenRows"; static char _close_string[] = "_close"; static char _closedir_string[] = "_closedir"; static char _common_boot_string[] = "_common_boot"; static char _convertHexStr2Binary_string[] = "_convertHexStr2Binary"; static char _copyArgument_string[] = "_copyArgument"; static char _crc32_string[] = "_crc32"; static char _cursor_string[] = "_cursor"; static char _decodeRLE_string[] = "_decodeRLE"; static char _decompress_lzss_string[] = "_decompress_lzss"; static char _delay_string[] = "_delay"; static char _devices_number_string[] = "_devices_number"; static char _devprop_add_device_string[] = "_devprop_add_device"; static char _devprop_add_network_template_string[] = "_devprop_add_network_template"; static char _devprop_add_value_string[] = "_devprop_add_value"; static char _devprop_create_string_string[] = "_devprop_create_string"; static char _devprop_free_string_string[] = "_devprop_free_string"; static char _devprop_generate_string_string[] = "_devprop_generate_string"; static char _diskFreeMap_string[] = "_diskFreeMap"; static char _diskIsCDROM_string[] = "_diskIsCDROM"; static char _diskRead_string[] = "_diskRead"; static char _diskResetBootVolumes_string[] = "_diskResetBootVolumes"; static char _diskScanBootVolumes_string[] = "_diskScanBootVolumes"; static char _diskSeek_string[] = "_diskSeek"; static char _dram_controller_dev_string[] = "_dram_controller_dev"; static char _dump_pci_dt_string[] = "_dump_pci_dt"; static char _ebiosEjectMedia_string[] = "_ebiosEjectMedia"; static char _ebiosread_string[] = "_ebiosread"; static char _ebioswrite_string[] = "_ebioswrite"; static char _efi_guid_compare_string[] = "_efi_guid_compare"; static char _efi_guid_is_null_string[] = "_efi_guid_is_null"; static char _efi_guid_unparse_upper_string[] = "_efi_guid_unparse_upper"; static char _efi_inject_get_devprop_string_string[] = "_efi_inject_get_devprop_string"; static char _ehci_acquire_string[] = "_ehci_acquire"; static char _enableA20_string[] = "_enableA20"; static char _enable_pci_devs_string[] = "_enable_pci_devs"; static char _error_string[] = "_error"; static char _execute_hook_string[] = "_execute_hook"; static char _file_size_string[] = "_file_size"; static char _finalizeBootStruct_string[] = "_finalizeBootStruct"; static char _flushKeyboardBuffer_string[] = "_flushKeyboardBuffer"; static char _free_string[] = "_free"; static char _freeFilteredBVChain_string[] = "_freeFilteredBVChain"; static char _gBIOSBootVolume_string[] = "_gBIOSBootVolume"; static char _gBIOSDev_string[] = "_gBIOSDev"; static char _gBinaryAddress_string[] = "_gBinaryAddress"; static char _gBootArgs_string[] = "_gBootArgs"; static char _gBootArgsEnd_string[] = "_gBootArgsEnd"; static char _gBootArgsPtr_string[] = "_gBootArgsPtr"; static char _gBootFileType_string[] = "_gBootFileType"; static char _gBootMode_string[] = "_gBootMode"; static char _gBootVolume_string[] = "_gBootVolume"; static char _gCompareTable_string[] = "_gCompareTable"; static char _gCompareTableCompressed_string[] = "_gCompareTableCompressed"; static char _gDeviceCount_string[] = "_gDeviceCount"; static char _gEfiAcpi20TableGuid_string[] = "_gEfiAcpi20TableGuid"; static char _gEfiAcpiTableGuid_string[] = "_gEfiAcpiTableGuid"; static char _gEfiConfigurationTableNode_string[] = "_gEfiConfigurationTableNode"; static char _gEfiSmbiosTableGuid_string[] = "_gEfiSmbiosTableGuid"; static char _gErrors_string[] = "_gErrors"; static char _gFSLoadAddress_string[] = "_gFSLoadAddress"; static char _gHaveKernelCache_string[] = "_gHaveKernelCache"; static char _gLowerCaseTable_string[] = "_gLowerCaseTable"; static char _gLowerCaseTableCompressed_string[] = "_gLowerCaseTableCompressed"; static char _gMKextName_string[] = "_gMKextName"; static char _gMacOSVersion_string[] = "_gMacOSVersion"; static char _gMemoryMapNode_string[] = "_gMemoryMapNode"; static char _gMenuBottom_string[] = "_gMenuBottom"; static char _gMenuEnd_string[] = "_gMenuEnd"; static char _gMenuHeight_string[] = "_gMenuHeight"; static char _gMenuItemCount_string[] = "_gMenuItemCount"; static char _gMenuItems_string[] = "_gMenuItems"; static char _gMenuRow_string[] = "_gMenuRow"; static char _gMenuSelection_string[] = "_gMenuSelection"; static char _gMenuStart_string[] = "_gMenuStart"; static char _gMenuTop_string[] = "_gMenuTop"; static char _gOverrideKernel_string[] = "_gOverrideKernel"; static char _gPlatformName_string[] = "_gPlatformName"; static char _gRootDevice_string[] = "_gRootDevice"; static char _gST32_string[] = "_gST32"; static char _gST64_string[] = "_gST64"; static char _gVerboseMode_string[] = "_gVerboseMode"; static char _generateCRTCTiming_string[] = "_generateCRTCTiming"; static char _getBVChainForBIOSDev_string[] = "_getBVChainForBIOSDev"; static char _getBoolForKey_string[] = "_getBoolForKey"; static char _getBootOptions_string[] = "_getBootOptions"; static char _getBootVolumeDescription_string[] = "_getBootVolumeDescription"; static char _getBootVolumeRef_string[] = "_getBootVolumeRef"; static char _getColorForKey_string[] = "_getColorForKey"; static char _getConventionalMemorySize_string[] = "_getConventionalMemorySize"; static char _getCursorPositionAndType_string[] = "_getCursorPositionAndType"; static char _getDeviceDescription_string[] = "_getDeviceDescription"; static char _getDimensionForKey_string[] = "_getDimensionForKey"; static char _getEDID_string[] = "_getEDID"; static char _getExtendedMemorySize_string[] = "_getExtendedMemorySize"; static char _getIntForKey_string[] = "_getIntForKey"; static char _getMemoryMap_string[] = "_getMemoryMap"; static char _getNextArg_string[] = "_getNextArg"; static char _getNumberArrayFromProperty_string[] = "_getNumberArrayFromProperty"; static char _getPciRootUID_string[] = "_getPciRootUID"; static char _getPlatformName_string[] = "_getPlatformName"; static char _getSmbios_string[] = "_getSmbios"; static char _getStringForKey_string[] = "_getStringForKey"; static char _getStringFromUUID_string[] = "_getStringFromUUID"; static char _getUUIDFromString_string[] = "_getUUIDFromString"; static char _getVBECurrentMode_string[] = "_getVBECurrentMode"; static char _getVBEDACFormat_string[] = "_getVBEDACFormat"; static char _getVBEInfo_string[] = "_getVBEInfo"; static char _getVBEModeInfo_string[] = "_getVBEModeInfo"; static char _getVBEPalette_string[] = "_getVBEPalette"; static char _getVBEPixelClock_string[] = "_getVBEPixelClock"; static char _getValueForBootKey_string[] = "_getValueForBootKey"; static char _getValueForConfigTableKey_string[] = "_getValueForConfigTableKey"; static char _getValueForKey_string[] = "_getValueForKey"; static char _getVideoMode_string[] = "_getVideoMode"; static char _getVolumeLabelAlias_string[] = "_getVolumeLabelAlias"; static char _get_drive_info_string[] = "_get_drive_info"; static char _get_pci_dev_path_string[] = "_get_pci_dev_path"; static char _getc_string[] = "_getc"; static char _getchar_string[] = "_getchar"; static char _halt_string[] = "_halt"; static char _handle_symtable_string[] = "_handle_symtable"; static char _initBooterLog_string[] = "_initBooterLog"; static char _initGraphicsMode_string[] = "_initGraphicsMode"; static char _initKernBootStruct_string[] = "_initKernBootStruct"; static char _init_module_system_string[] = "_init_module_system"; static char _initialize_runtime_string[] = "_initialize_runtime"; static char _is_module_loaded_string[] = "_is_module_loaded"; static char _is_no_emulation_string[] = "_is_no_emulation"; static char _legacy_off_string[] = "_legacy_off"; static char _loadConfigFile_string[] = "_loadConfigFile"; static char _loadHelperConfig_string[] = "_loadHelperConfig"; static char _loadOverrideConfig_string[] = "_loadOverrideConfig"; static char _loadSystemConfig_string[] = "_loadSystemConfig"; static char _load_all_modules_string[] = "_load_all_modules"; static char _load_module_string[] = "_load_module"; static char _loadedModules_string[] = "_loadedModules"; static char _lookup_all_symbols_string[] = "_lookup_all_symbols"; static char _lookup_symbol_string[] = "_lookup_symbol"; static char _malloc_init_string[] = "_malloc_init"; static char _matchVolumeToString_string[] = "_matchVolumeToString"; static char _md0Ramdisk_string[] = "_md0Ramdisk"; static char _memcmp_string[] = "_memcmp"; static char _memcpy_string[] = "_memcpy"; static char _memset_string[] = "_memset"; static char _menuBVR_string[] = "_menuBVR"; static char _menuItems_string[] = "_menuItems"; static char _moduleCallbacks_string[] = "_moduleCallbacks"; static char _moduleSymbols_string[] = "_moduleSymbols"; static char _module_loaded_string[] = "_module_loaded"; static char _moveCursor_string[] = "_moveCursor"; static char _msgbuf_string[] = "_msgbuf"; static char _msglog_string[] = "_msglog"; static char _newAPMBVRef_string[] = "_newAPMBVRef"; static char _newFilteredBVChain_string[] = "_newFilteredBVChain"; static char _newGPTBVRef_string[] = "_newGPTBVRef"; static char _newString_string[] = "_newString"; static char _newStringForKey_string[] = "_newStringForKey"; static char _notify_usb_dev_string[] = "_notify_usb_dev"; static char _open_string[] = "_open"; static char _open_bvdev_string[] = "_open_bvdev"; static char _opendir_string[] = "_opendir"; static char _openmem_string[] = "_openmem"; static char _p_get_ramdisk_info_string[] = "_p_get_ramdisk_info"; static char _p_ramdiskReadBytes_string[] = "_p_ramdiskReadBytes"; static char _parse_mach_string[] = "_parse_mach"; static char _pause_string[] = "_pause"; static char _pci_config_read16_string[] = "_pci_config_read16"; static char _pci_config_read32_string[] = "_pci_config_read32"; static char _pci_config_read8_string[] = "_pci_config_read8"; static char _pci_config_write16_string[] = "_pci_config_write16"; static char _pci_config_write32_string[] = "_pci_config_write32"; static char _pci_config_write8_string[] = "_pci_config_write8"; static char _platformCPUFeature_string[] = "_platformCPUFeature"; static char _previewLoadedSectors_string[] = "_previewLoadedSectors"; static char _previewSaveunder_string[] = "_previewSaveunder"; static char _previewTotalSectors_string[] = "_previewTotalSectors"; static char _prf_string[] = "_prf"; static char _printMenuItem_string[] = "_printMenuItem"; static char _printf_string[] = "_printf"; static char _processBootArgument_string[] = "_processBootArgument"; static char _processBootOptions_string[] = "_processBootOptions"; static char _ptol_string[] = "_ptol"; static char _putc_string[] = "_putc"; static char _putca_string[] = "_putca"; static char _putchar_string[] = "_putchar"; static char _rawDiskRead_string[] = "_rawDiskRead"; static char _rawDiskWrite_string[] = "_rawDiskWrite"; static char _read_string[] = "_read"; static char _readBootSector_string[] = "_readBootSector"; static char _readKeyboardShiftFlags_string[] = "_readKeyboardShiftFlags"; static char _readKeyboardStatus_string[] = "_readKeyboardStatus"; static char _readdir_string[] = "_readdir"; static char _readdir_ext_string[] = "_readdir_ext"; static char _realloc_string[] = "_realloc"; static char _rebase_location_string[] = "_rebase_location"; static char _rebase_macho_string[] = "_rebase_macho"; static char _register_hook_callback_string[] = "_register_hook_callback"; static char _replace_function_string[] = "_replace_function"; static char _reserveKernBootStruct_string[] = "_reserveKernBootStruct"; static char _restoreCursor_string[] = "_restoreCursor"; static char _root_pci_dev_string[] = "_root_pci_dev"; static char _safe_malloc_string[] = "_safe_malloc"; static char _scanBootVolumes_string[] = "_scanBootVolumes"; static char _scanDisks_string[] = "_scanDisks"; static char _scan_cpu_string[] = "_scan_cpu"; static char _scan_mem_string[] = "_scan_mem"; static char _scan_pci_bus_string[] = "_scan_pci_bus"; static char _scan_platform_string[] = "_scan_platform"; static char _scollPage_string[] = "_scollPage"; static char _selectBootVolume_string[] = "_selectBootVolume"; static char _selectIndex_string[] = "_selectIndex"; static char _setActiveDisplayPage_string[] = "_setActiveDisplayPage"; static char _setBootGlobals_string[] = "_setBootGlobals"; static char _setCursorPosition_string[] = "_setCursorPosition"; static char _setCursorType_string[] = "_setCursorType"; static char _setRootVolume_string[] = "_setRootVolume"; static char _setVBEDACFormat_string[] = "_setVBEDACFormat"; static char _setVBEMode_string[] = "_setVBEMode"; static char _setVBEPalette_string[] = "_setVBEPalette"; static char _setVESAGraphicsMode_string[] = "_setVESAGraphicsMode"; static char _setVideoMode_string[] = "_setVideoMode"; static char _set_eth_builtin_string[] = "_set_eth_builtin"; static char _setupBooterLog_string[] = "_setupBooterLog"; static char _setupDeviceProperties_string[] = "_setupDeviceProperties"; static char _setupEfiDeviceTree_string[] = "_setupEfiDeviceTree"; static char _setupEfiTables32_string[] = "_setupEfiTables32"; static char _setupEfiTables64_string[] = "_setupEfiTables64"; static char _setupFakeEfi_string[] = "_setupFakeEfi"; static char _setupSystemType_string[] = "_setupSystemType"; static char _setup_pci_devs_string[] = "_setup_pci_devs"; static char _shouldboot_string[] = "_shouldboot"; static char _sleep_string[] = "_sleep"; static char _slvprintf_string[] = "_slvprintf"; static char _smbios_p_string[] = "_smbios_p"; static char _smbios_properties_string[] = "_smbios_properties"; static char _smbios_table_descriptions_string[] = "_smbios_table_descriptions"; static char _spinActivityIndicator_string[] = "_spinActivityIndicator"; static char _sprintf_string[] = "_sprintf"; static char _sputc_string[] = "_sputc"; static char _startprog_string[] = "_startprog"; static char _stop_string[] = "_stop"; static char _strbreak_string[] = "_strbreak"; static char _strcat_string[] = "_strcat"; static char _strchr_string[] = "_strchr"; static char _strcmp_string[] = "_strcmp"; static char _strcpy_string[] = "_strcpy"; static char _strdup_string[] = "_strdup"; static char _string_string[] = "_string"; static char _stringLength_string[] = "_stringLength"; static char _stringdata_string[] = "_stringdata"; static char _stringlength_string[] = "_stringlength"; static char _strlcpy_string[] = "_strlcpy"; static char _strlen_string[] = "_strlen"; static char _strncat_string[] = "_strncat"; static char _strncmp_string[] = "_strncmp"; static char _strncpy_string[] = "_strncpy"; static char _strstr_string[] = "_strstr"; static char _strtol_string[] = "_strtol"; static char _strtoul_string[] = "_strtoul"; static char _strtouq_string[] = "_strtouq"; static char _sysConfigValid_string[] = "_sysConfigValid"; static char _systemConfigDir_string[] = "_systemConfigDir"; static char _tell_string[] = "_tell"; static char _testBiosread_string[] = "_testBiosread"; static char _testFAT32EFIBootSector_string[] = "_testFAT32EFIBootSector"; static char _textAddress_string[] = "_textAddress"; static char _textSection_string[] = "_textSection"; static char _time18_string[] = "_time18"; static char _uhci_reset_string[] = "_uhci_reset"; static char _usbList_string[] = "_usbList"; static char _usb_loop_string[] = "_usb_loop"; static char _utf_decodestr_string[] = "_utf_decodestr"; static char _utf_encodestr_string[] = "_utf_encodestr"; static char _verbose_string[] = "_verbose"; static char _video_mode_string[] = "_video_mode"; static char _vol_opendir_string[] = "_vol_opendir"; static char _write_string[] = "_write"; static char _writebyte_string[] = "_writebyte"; static char _writeint_string[] = "_writeint"; static char boot2_string[] = "boot2"; symbol_t symbolList[] = { {.symbol = _AllocateKernelMemory_string, .addr = 0x0002acec}, {.symbol = _AllocateMemoryRange_string, .addr = 0x0002ad64}, {.symbol = _BinaryUnicodeCompare_string, .addr = 0x00031aef}, {.symbol = _CacheInit_string, .addr = 0x0003203e}, {.symbol = _CacheRead_string, .addr = 0x00031efc}, {.symbol = _CacheReset_string, .addr = 0x00031eed}, {.symbol = _CreateUUIDString_string, .addr = 0x000251d5}, {.symbol = _DT__AddChild_string, .addr = 0x0002b63f}, {.symbol = _DT__AddProperty_string, .addr = 0x0002b578}, {.symbol = _DT__Finalize_string, .addr = 0x0002b85b}, {.symbol = _DT__FindNode_string, .addr = 0x0002b8e4}, {.symbol = _DT__FlattenDeviceTree_string, .addr = 0x0002b7ee}, {.symbol = _DT__FreeNode_string, .addr = 0x0002b52f}, {.symbol = _DT__FreeProperty_string, .addr = 0x0002b519}, {.symbol = _DT__GetName_string, .addr = 0x0002b545}, {.symbol = _DT__Initialize_string, .addr = 0x0002b707}, {.symbol = _DecodeKernel_string, .addr = 0x00021fd1}, {.symbol = _DecodeMachO_string, .addr = 0x00025bb6}, {.symbol = _DecompressData_string, .addr = 0x000239a3}, {.symbol = _FastRelString_string, .addr = 0x00031c12}, {.symbol = _FastUnicodeCompare_string, .addr = 0x00031c92}, {.symbol = _FindFirstDmiTableOfType_string, .addr = 0x00030f25}, {.symbol = _FindNextDmiTableOfType_string, .addr = 0x00030de0}, {.symbol = _GPT_BASICDATA2_GUID_string, .addr = 0x00035b2c}, {.symbol = _GPT_BASICDATA_GUID_string, .addr = 0x00035b1c}, {.symbol = _GPT_BOOT_GUID_string, .addr = 0x00035afc}, {.symbol = _GPT_EFISYS_GUID_string, .addr = 0x00035b0c}, {.symbol = _GPT_HFS_GUID_string, .addr = 0x00035aec}, {.symbol = _Gdt_string, .addr = 0x00020458}, {.symbol = _Gdtr_string, .addr = 0x00020438}, {.symbol = _GetDirEntry_string, .addr = 0x000257a0}, {.symbol = _GetFileBlock_string, .addr = 0x00025762}, {.symbol = _GetFileInfo_string, .addr = 0x000257db}, {.symbol = _HFSFree_string, .addr = 0x0002c44b}, {.symbol = _HFSGetDescription_string, .addr = 0x0002d77e}, {.symbol = _HFSGetDirEntry_string, .addr = 0x0002d4c7}, {.symbol = _HFSGetFileBlock_string, .addr = 0x0002d827}, {.symbol = _HFSGetUUID_string, .addr = 0x0002d492}, {.symbol = _HFSInitPartition_string, .addr = 0x0002d10e}, {.symbol = _HFSLoadFile_string, .addr = 0x0002d730}, {.symbol = _HFSProbe_string, .addr = 0x0002d74e}, {.symbol = _HFSReadFile_string, .addr = 0x0002d5af}, {.symbol = _HibernateBoot_string, .addr = 0x0002358f}, {.symbol = _Idtr_prot_string, .addr = 0x00020448}, {.symbol = _Idtr_real_string, .addr = 0x00020440}, {.symbol = _LoadDrivers_string, .addr = 0x00021be3}, {.symbol = _LoadFile_string, .addr = 0x000259cd}, {.symbol = _LoadThinFatFile_string, .addr = 0x000258a3}, {.symbol = _LoadVolumeFile_string, .addr = 0x00024e99}, {.symbol = _MD5Final_string, .addr = 0x0002c254}, {.symbol = _MD5Init_string, .addr = 0x0002b9d3}, {.symbol = _MD5Pad_string, .addr = 0x0002c205}, {.symbol = _MD5Update_string, .addr = 0x0002c149}, {.symbol = _MSDOSFree_string, .addr = 0x0002d8fe}, {.symbol = _MSDOSGetDescription_string, .addr = 0x0002eaf7}, {.symbol = _MSDOSGetDirEntry_string, .addr = 0x0002e682}, {.symbol = _MSDOSGetFileBlock_string, .addr = 0x0002e97c}, {.symbol = _MSDOSGetUUID_string, .addr = 0x0002e2f7}, {.symbol = _MSDOSInitPartition_string, .addr = 0x0002e11e}, {.symbol = _MSDOSLoadFile_string, .addr = 0x0002e5c5}, {.symbol = _MSDOSProbe_string, .addr = 0x0002e5e3}, {.symbol = _MSDOSReadFile_string, .addr = 0x0002e385}, {.symbol = _ParseXMLFile_string, .addr = 0x000281ff}, {.symbol = _Platform_string, .addr = 0x00038a30}, {.symbol = _ReadFileAtOffset_string, .addr = 0x0002598f}, {.symbol = _ReadPCIBusInfo_string, .addr = 0x00029660}, {.symbol = _Round_string, .addr = 0x0002a5a8}, {.symbol = _Sqrt_string, .addr = 0x0002a5be}, {.symbol = _ThinFatFile_string, .addr = 0x00025eb0}, {.symbol = _XMLDecode_string, .addr = 0x0002af4e}, {.symbol = _XMLFreeTag_string, .addr = 0x0002b08c}, {.symbol = _XMLGetProperty_string, .addr = 0x0002ae95}, {.symbol = _XMLParseNextTag_string, .addr = 0x0002b1bb}, {.symbol = __DATA__bss__begin_string, .addr = 0x00036f20}, {.symbol = __DATA__bss__end_string, .addr = 0x000379ac}, {.symbol = __DATA__common__begin_string, .addr = 0x000379b0}, {.symbol = __DATA__common__end_string, .addr = 0x00038c50}, {.symbol = ___udivdi3_string, .addr = 0x00024338}, {.symbol = __bp_string, .addr = 0x0002032f}, {.symbol = __prot_to_real_string, .addr = 0x000202b2}, {.symbol = __real_to_prot_string, .addr = 0x00020264}, {.symbol = __sp_string, .addr = 0x0002032c}, {.symbol = __switch_stack_string, .addr = 0x00020332}, {.symbol = _addBootArg_string, .addr = 0x000228f6}, {.symbol = _addConfigurationTable_string, .addr = 0x000293c5}, {.symbol = _add_symbol_string, .addr = 0x00024460}, {.symbol = _archCpuType_string, .addr = 0x00036784}, {.symbol = _ascii_hex_to_int_string, .addr = 0x00030f8f}, {.symbol = _atoi_string, .addr = 0x0003238a}, {.symbol = _b_lseek_string, .addr = 0x000252b9}, {.symbol = _bcopy_string, .addr = 0x00032234}, {.symbol = _bgetc_string, .addr = 0x00029fdb}, {.symbol = _bind_location_string, .addr = 0x00024224}, {.symbol = _bind_macho_string, .addr = 0x0002471d}, {.symbol = _bios_string, .addr = 0x00020362}, {.symbol = _biosDevIsCDROM_string, .addr = 0x000263b3}, {.symbol = _biosread_string, .addr = 0x00029a8c}, {.symbol = _boot_string, .addr = 0x00020e8e}, {.symbol = _bootArgs_string, .addr = 0x000379b0}, {.symbol = _bootBanner_string, .addr = 0x00036618}, {.symbol = _bootInfo_string, .addr = 0x000379b4}, {.symbol = _bootPrompt_string, .addr = 0x0003667d}, {.symbol = _booterCommand_string, .addr = 0x00037e00}, {.symbol = _booterParam_string, .addr = 0x00038200}, {.symbol = _build_pci_dt_string, .addr = 0x0002efba}, {.symbol = _builtin_set_string, .addr = 0x00036b18}, {.symbol = _bvChain_string, .addr = 0x000379b8}, {.symbol = _bvCount_string, .addr = 0x00036604}, {.symbol = _bvr_string, .addr = 0x000379bc}, {.symbol = _bzero_string, .addr = 0x00032255}, {.symbol = _chainbootdev_string, .addr = 0x00020434}, {.symbol = _chainbootflag_string, .addr = 0x00020435}, {.symbol = _changeCursor_string, .addr = 0x00022996}, {.symbol = _checksum8_string, .addr = 0x0003240a}, {.symbol = _clearActivityIndicator_string, .addr = 0x000215ab}, {.symbol = _clearBootArgs_string, .addr = 0x0002294e}, {.symbol = _clearScreenRows_string, .addr = 0x00029750}, {.symbol = _close_string, .addr = 0x00024eaf}, {.symbol = _closedir_string, .addr = 0x000250e7}, {.symbol = _common_boot_string, .addr = 0x000204c0}, {.symbol = _convertHexStr2Binary_string, .addr = 0x00030fea}, {.symbol = _copyArgument_string, .addr = 0x000220e8}, {.symbol = _crc32_string, .addr = 0x00032fb5}, {.symbol = _cursor_string, .addr = 0x000367a4}, {.symbol = _decodeRLE_string, .addr = 0x000214f0}, {.symbol = _decompress_lzss_string, .addr = 0x000232f2}, {.symbol = _delay_string, .addr = 0x0002962a}, {.symbol = _devices_number_string, .addr = 0x00036b14}, {.symbol = _devprop_add_device_string, .addr = 0x00031689}, {.symbol = _devprop_add_network_template_string, .addr = 0x000315e2}, {.symbol = _devprop_add_value_string, .addr = 0x00031475}, {.symbol = _devprop_create_string_string, .addr = 0x0003163c}, {.symbol = _devprop_free_string_string, .addr = 0x00031200}, {.symbol = _devprop_generate_string_string, .addr = 0x00031273}, {.symbol = _diskFreeMap_string, .addr = 0x0002642a}, {.symbol = _diskIsCDROM_string, .addr = 0x000263d7}, {.symbol = _diskRead_string, .addr = 0x000270ba}, {.symbol = _diskResetBootVolumes_string, .addr = 0x000268f0}, {.symbol = _diskScanBootVolumes_string, .addr = 0x00027420}, {.symbol = _diskSeek_string, .addr = 0x000262e4}, {.symbol = _dram_controller_dev_string, .addr = 0x000367a8}, {.symbol = _dump_pci_dt_string, .addr = 0x0002edff}, {.symbol = _ebiosEjectMedia_string, .addr = 0x0002981b}, {.symbol = _ebiosread_string, .addr = 0x000299b9}, {.symbol = _ebioswrite_string, .addr = 0x000298c8}, {.symbol = _efi_guid_compare_string, .addr = 0x0003300e}, {.symbol = _efi_guid_is_null_string, .addr = 0x00032fe6}, {.symbol = _efi_guid_unparse_upper_string, .addr = 0x0003305f}, {.symbol = _efi_inject_get_devprop_string_string, .addr = 0x00031445}, {.symbol = _ehci_acquire_string, .addr = 0x0002a13b}, {.symbol = _enableA20_string, .addr = 0x00025f5f}, {.symbol = _enable_pci_devs_string, .addr = 0x0002ed33}, {.symbol = _error_string, .addr = 0x00028961}, {.symbol = _execute_hook_string, .addr = 0x00024600}, {.symbol = _file_size_string, .addr = 0x000252e5}, {.symbol = _finalizeBootStruct_string, .addr = 0x00025fc9}, {.symbol = _flushKeyboardBuffer_string, .addr = 0x000227bd}, {.symbol = _free_string, .addr = 0x0003270c}, {.symbol = _freeFilteredBVChain_string, .addr = 0x000263fe}, {.symbol = _gBIOSBootVolume_string, .addr = 0x00036744}, {.symbol = _gBIOSDev_string, .addr = 0x000379c0}, {.symbol = _gBinaryAddress_string, .addr = 0x00038a20}, {.symbol = _gBootArgs_string, .addr = 0x00038600}, {.symbol = _gBootArgsEnd_string, .addr = 0x00036714}, {.symbol = _gBootArgsPtr_string, .addr = 0x00036710}, {.symbol = _gBootFileType_string, .addr = 0x000379c4}, {.symbol = _gBootMode_string, .addr = 0x000379c8}, {.symbol = _gBootVolume_string, .addr = 0x000379cc}, {.symbol = _gCompareTable_string, .addr = 0x00038c48}, {.symbol = _gCompareTableCompressed_string, .addr = 0x00036e14}, {.symbol = _gDeviceCount_string, .addr = 0x00036608}, {.symbol = _gEfiAcpi20TableGuid_string, .addr = 0x000367c8}, {.symbol = _gEfiAcpiTableGuid_string, .addr = 0x000367b8}, {.symbol = _gEfiConfigurationTableNode_string, .addr = 0x000367b4}, {.symbol = _gEfiSmbiosTableGuid_string, .addr = 0x00035c64}, {.symbol = _gErrors_string, .addr = 0x000379d0}, {.symbol = _gFSLoadAddress_string, .addr = 0x00036740}, {.symbol = _gHaveKernelCache_string, .addr = 0x000379d1}, {.symbol = _gLowerCaseTable_string, .addr = 0x00038c4c}, {.symbol = _gLowerCaseTableCompressed_string, .addr = 0x00036b3c}, {.symbol = _gMKextName_string, .addr = 0x000379e0}, {.symbol = _gMacOSVersion_string, .addr = 0x00037be0}, {.symbol = _gMemoryMapNode_string, .addr = 0x00038a24}, {.symbol = _gMenuBottom_string, .addr = 0x00038a00}, {.symbol = _gMenuEnd_string, .addr = 0x00038a04}, {.symbol = _gMenuHeight_string, .addr = 0x00038a08}, {.symbol = _gMenuItemCount_string, .addr = 0x00038a0c}, {.symbol = _gMenuItems_string, .addr = 0x00036718}, {.symbol = _gMenuRow_string, .addr = 0x00038a10}, {.symbol = _gMenuSelection_string, .addr = 0x00038a14}, {.symbol = _gMenuStart_string, .addr = 0x00038a18}, {.symbol = _gMenuTop_string, .addr = 0x00038a1c}, {.symbol = _gOverrideKernel_string, .addr = 0x00037be8}, {.symbol = _gPlatformName_string, .addr = 0x00036600}, {.symbol = _gRootDevice_string, .addr = 0x00037bf0}, {.symbol = _gST32_string, .addr = 0x000367ac}, {.symbol = _gST64_string, .addr = 0x000367b0}, {.symbol = _gVerboseMode_string, .addr = 0x00037df0}, {.symbol = _generateCRTCTiming_string, .addr = 0x0002a989}, {.symbol = _getBVChainForBIOSDev_string, .addr = 0x000262c5}, {.symbol = _getBoolForKey_string, .addr = 0x00028861}, {.symbol = _getBootOptions_string, .addr = 0x00022a38}, {.symbol = _getBootVolumeDescription_string, .addr = 0x00026658}, {.symbol = _getBootVolumeRef_string, .addr = 0x000255ce}, {.symbol = _getColorForKey_string, .addr = 0x000286a2}, {.symbol = _getConventionalMemorySize_string, .addr = 0x00029b65}, {.symbol = _getCursorPositionAndType_string, .addr = 0x00029773}, {.symbol = _getDeviceDescription_string, .addr = 0x00024f81}, {.symbol = _getDimensionForKey_string, .addr = 0x000286eb}, {.symbol = _getEDID_string, .addr = 0x0002a921}, {.symbol = _getExtendedMemorySize_string, .addr = 0x00029b85}, {.symbol = _getIntForKey_string, .addr = 0x000287d0}, {.symbol = _getMemoryMap_string, .addr = 0x00029e48}, {.symbol = _getNextArg_string, .addr = 0x00028163}, {.symbol = _getNumberArrayFromProperty_string, .addr = 0x0002112a}, {.symbol = _getPciRootUID_string, .addr = 0x0003210c}, {.symbol = _getPlatformName_string, .addr = 0x00025f4b}, {.symbol = _getSmbios_string, .addr = 0x0002fc5b}, {.symbol = _getStringForKey_string, .addr = 0x000288ae}, {.symbol = _getStringFromUUID_string, .addr = 0x000310b6}, {.symbol = _getUUIDFromString_string, .addr = 0x0003112d}, {.symbol = _getVBECurrentMode_string, .addr = 0x0002a6ee}, {.symbol = _getVBEDACFormat_string, .addr = 0x0002a85c}, {.symbol = _getVBEInfo_string, .addr = 0x0002a8e0}, {.symbol = _getVBEModeInfo_string, .addr = 0x0002a896}, {.symbol = _getVBEPalette_string, .addr = 0x0002a722}, {.symbol = _getVBEPixelClock_string, .addr = 0x0002a6a0}, {.symbol = _getValueForBootKey_string, .addr = 0x000284ba}, {.symbol = _getValueForConfigTableKey_string, .addr = 0x00028563}, {.symbol = _getValueForKey_string, .addr = 0x000285c0}, {.symbol = _getVideoMode_string, .addr = 0x00020ec7}, {.symbol = _getVolumeLabelAlias_string, .addr = 0x00026566}, {.symbol = _get_drive_info_string, .addr = 0x00029d0b}, {.symbol = _get_pci_dev_path_string, .addr = 0x0002ed62}, {.symbol = _getc_string, .addr = 0x00028b17}, {.symbol = _getchar_string, .addr = 0x00028be3}, {.symbol = _halt_string, .addr = 0x00020308}, {.symbol = _handle_symtable_string, .addr = 0x0002424b}, {.symbol = _initBooterLog_string, .addr = 0x00028bb0}, {.symbol = _initGraphicsMode_string, .addr = 0x0002131c}, {.symbol = _initKernBootStruct_string, .addr = 0x0002614d}, {.symbol = _init_module_system_string, .addr = 0x00024e69}, {.symbol = _initialize_runtime_string, .addr = 0x00020e4c}, {.symbol = _is_module_loaded_string, .addr = 0x0002442e}, {.symbol = _is_no_emulation_string, .addr = 0x00029c8c}, {.symbol = _legacy_off_string, .addr = 0x0002a38d}, {.symbol = _loadConfigFile_string, .addr = 0x0002846c}, {.symbol = _loadHelperConfig_string, .addr = 0x0002828c}, {.symbol = _loadOverrideConfig_string, .addr = 0x0002836d}, {.symbol = _loadSystemConfig_string, .addr = 0x000283e9}, {.symbol = _load_all_modules_string, .addr = 0x00024de7}, {.symbol = _load_module_string, .addr = 0x00024ce9}, {.symbol = _loadedModules_string, .addr = 0x00036734}, {.symbol = _lookup_all_symbols_string, .addr = 0x00024667}, {.symbol = _lookup_symbol_string, .addr = 0x0003673c}, {.symbol = _malloc_init_string, .addr = 0x000325a6}, {.symbol = _matchVolumeToString_string, .addr = 0x0002645c}, {.symbol = _md0Ramdisk_string, .addr = 0x00023403}, {.symbol = _memcmp_string, .addr = 0x00032286}, {.symbol = _memcpy_string, .addr = 0x00032211}, {.symbol = _memset_string, .addr = 0x000321fd}, {.symbol = _menuBVR_string, .addr = 0x00037df4}, {.symbol = _menuItems_string, .addr = 0x0003670c}, {.symbol = _moduleCallbacks_string, .addr = 0x00036730}, {.symbol = _moduleSymbols_string, .addr = 0x00036738}, {.symbol = _module_loaded_string, .addr = 0x000243c5}, {.symbol = _moveCursor_string, .addr = 0x000227e3}, {.symbol = _msgbuf_string, .addr = 0x000367a0}, {.symbol = _msglog_string, .addr = 0x00028ab7}, {.symbol = _newAPMBVRef_string, .addr = 0x00026957}, {.symbol = _newFilteredBVChain_string, .addr = 0x00026771}, {.symbol = _newGPTBVRef_string, .addr = 0x000271d6}, {.symbol = _newString_string, .addr = 0x000281cc}, {.symbol = _newStringForKey_string, .addr = 0x000288e6}, {.symbol = _notify_usb_dev_string, .addr = 0x0002a546}, {.symbol = _open_string, .addr = 0x00025736}, {.symbol = _open_bvdev_string, .addr = 0x00025a01}, {.symbol = _opendir_string, .addr = 0x000256d8}, {.symbol = _openmem_string, .addr = 0x00025178}, {.symbol = _p_get_ramdisk_info_string, .addr = 0x0003678c}, {.symbol = _p_ramdiskReadBytes_string, .addr = 0x00036788}, {.symbol = _parse_mach_string, .addr = 0x00024a5c}, {.symbol = _pause_string, .addr = 0x00028c18}, {.symbol = _pci_config_read16_string, .addr = 0x0002ecc1}, {.symbol = _pci_config_read32_string, .addr = 0x0002ecec}, {.symbol = _pci_config_read8_string, .addr = 0x0002ec97}, {.symbol = _pci_config_write16_string, .addr = 0x0002ed04}, {.symbol = _pci_config_write32_string, .addr = 0x0002ef9f}, {.symbol = _pci_config_write8_string, .addr = 0x0002ef71}, {.symbol = _platformCPUFeature_string, .addr = 0x00028c2c}, {.symbol = _previewLoadedSectors_string, .addr = 0x00036610}, {.symbol = _previewSaveunder_string, .addr = 0x00036614}, {.symbol = _previewTotalSectors_string, .addr = 0x0003660c}, {.symbol = _prf_string, .addr = 0x000330ab}, {.symbol = _printMenuItem_string, .addr = 0x000228a1}, {.symbol = _printf_string, .addr = 0x00028a07}, {.symbol = _processBootArgument_string, .addr = 0x0002216f}, {.symbol = _processBootOptions_string, .addr = 0x000221fe}, {.symbol = _ptol_string, .addr = 0x00032368}, {.symbol = _putc_string, .addr = 0x00029891}, {.symbol = _putca_string, .addr = 0x00029851}, {.symbol = _putchar_string, .addr = 0x00028b2e}, {.symbol = _rawDiskRead_string, .addr = 0x00026b2d}, {.symbol = _rawDiskWrite_string, .addr = 0x00026a27}, {.symbol = _read_string, .addr = 0x00025406}, {.symbol = _readBootSector_string, .addr = 0x0002716d}, {.symbol = _readKeyboardShiftFlags_string, .addr = 0x00029c32}, {.symbol = _readKeyboardStatus_string, .addr = 0x00029c59}, {.symbol = _readdir_string, .addr = 0x00024eff}, {.symbol = _readdir_ext_string, .addr = 0x00024f21}, {.symbol = _realloc_string, .addr = 0x00032a39}, {.symbol = _rebase_location_string, .addr = 0x0002420e}, {.symbol = _rebase_macho_string, .addr = 0x00023f94}, {.symbol = _register_hook_callback_string, .addr = 0x000244e5}, {.symbol = _replace_function_string, .addr = 0x000246dc}, {.symbol = _reserveKernBootStruct_string, .addr = 0x00026120}, {.symbol = _restoreCursor_string, .addr = 0x00022971}, {.symbol = _root_pci_dev_string, .addr = 0x00038c38}, {.symbol = _safe_malloc_string, .addr = 0x000328fd}, {.symbol = _scanBootVolumes_string, .addr = 0x0002510d}, {.symbol = _scanDisks_string, .addr = 0x00025b23}, {.symbol = _scan_cpu_string, .addr = 0x0002f019}, {.symbol = _scan_mem_string, .addr = 0x00028c68}, {.symbol = _scan_pci_bus_string, .addr = 0x0002ee57}, {.symbol = _scan_platform_string, .addr = 0x00028c40}, {.symbol = _scollPage_string, .addr = 0x000296f7}, {.symbol = _selectBootVolume_string, .addr = 0x00024fe0}, {.symbol = _selectIndex_string, .addr = 0x00036708}, {.symbol = _setActiveDisplayPage_string, .addr = 0x000296ce}, {.symbol = _setBootGlobals_string, .addr = 0x00025530}, {.symbol = _setCursorPosition_string, .addr = 0x000297e2}, {.symbol = _setCursorType_string, .addr = 0x000297b8}, {.symbol = _setRootVolume_string, .addr = 0x00024f61}, {.symbol = _setVBEDACFormat_string, .addr = 0x0002a824}, {.symbol = _setVBEMode_string, .addr = 0x0002a7d6}, {.symbol = _setVBEPalette_string, .addr = 0x0002a77c}, {.symbol = _setVESAGraphicsMode_string, .addr = 0x000211a0}, {.symbol = _setVideoMode_string, .addr = 0x000213a9}, {.symbol = _set_eth_builtin_string, .addr = 0x00031936}, {.symbol = _setupBooterLog_string, .addr = 0x00028b6a}, {.symbol = _setupDeviceProperties_string, .addr = 0x000319fd}, {.symbol = _setupEfiDeviceTree_string, .addr = 0x00028d7e}, {.symbol = _setupEfiTables32_string, .addr = 0x00029247}, {.symbol = _setupEfiTables64_string, .addr = 0x0002900a}, {.symbol = _setupFakeEfi_string, .addr = 0x0002947d}, {.symbol = _setupSystemType_string, .addr = 0x00028cbb}, {.symbol = _setup_pci_devs_string, .addr = 0x00031a74}, {.symbol = _shouldboot_string, .addr = 0x00036704}, {.symbol = _sleep_string, .addr = 0x0002a031}, {.symbol = _slvprintf_string, .addr = 0x00032a93}, {.symbol = _smbios_p_string, .addr = 0x00038c40}, {.symbol = _smbios_properties_string, .addr = 0x0003681c}, {.symbol = _smbios_table_descriptions_string, .addr = 0x00036a84}, {.symbol = _spinActivityIndicator_string, .addr = 0x00021549}, {.symbol = _sprintf_string, .addr = 0x00032acd}, {.symbol = _sputc_string, .addr = 0x0002893d}, {.symbol = _startprog_string, .addr = 0x00020312}, {.symbol = _stop_string, .addr = 0x00028a7d}, {.symbol = _strbreak_string, .addr = 0x00032424}, {.symbol = _strcat_string, .addr = 0x000324f3}, {.symbol = _strchr_string, .addr = 0x000323eb}, {.symbol = _strcmp_string, .addr = 0x000322ad}, {.symbol = _strcpy_string, .addr = 0x00032302}, {.symbol = _strdup_string, .addr = 0x000324b9}, {.symbol = _string_string, .addr = 0x00036b1c}, {.symbol = _stringLength_string, .addr = 0x000280dd}, {.symbol = _stringdata_string, .addr = 0x00036b20}, {.symbol = _stringlength_string, .addr = 0x00036b24}, {.symbol = _strlcpy_string, .addr = 0x0003233e}, {.symbol = _strlen_string, .addr = 0x00032273}, {.symbol = _strncat_string, .addr = 0x000323bb}, {.symbol = _strncmp_string, .addr = 0x000322ce}, {.symbol = _strncpy_string, .addr = 0x0003231a}, {.symbol = _strstr_string, .addr = 0x0003252d}, {.symbol = _strtol_string, .addr = 0x00032b09}, {.symbol = _strtoul_string, .addr = 0x00032e46}, {.symbol = _strtouq_string, .addr = 0x00032c7a}, {.symbol = _sysConfigValid_string, .addr = 0x00037df8}, {.symbol = _systemConfigDir_string, .addr = 0x00024f45}, {.symbol = _tell_string, .addr = 0x00024ed9}, {.symbol = _testBiosread_string, .addr = 0x000280cb}, {.symbol = _testFAT32EFIBootSector_string, .addr = 0x000270e9}, {.symbol = _textAddress_string, .addr = 0x00036720}, {.symbol = _textSection_string, .addr = 0x00036728}, {.symbol = _time18_string, .addr = 0x00029bf8}, {.symbol = _uhci_reset_string, .addr = 0x0002a0ae}, {.symbol = _usbList_string, .addr = 0x000367d8}, {.symbol = _usb_loop_string, .addr = 0x0002a451}, {.symbol = _utf_decodestr_string, .addr = 0x00031d65}, {.symbol = _utf_encodestr_string, .addr = 0x00031e40}, {.symbol = _verbose_string, .addr = 0x00028988}, {.symbol = _video_mode_string, .addr = 0x00029b3c}, {.symbol = _vol_opendir_string, .addr = 0x00025133}, {.symbol = _write_string, .addr = 0x000253a7}, {.symbol = _writebyte_string, .addr = 0x0002535d}, {.symbol = _writeint_string, .addr = 0x0002530b}, {.symbol = boot2_string, .addr = 0x00020200}, };