Index: branches/cparm/TODO =================================================================== --- branches/cparm/TODO (revision 1976) +++ branches/cparm/TODO (revision 1977) @@ -2,7 +2,7 @@ ==================================== - split nvidia, gma and ati code into separate modules -- move device_inject, winfs, bsdfs, ext2fs, befs, and the command lspci, memory, more and video into modules +- move device_inject, MBR (OSX works better on Guid partition theme anyway), winfs, bsdfs, ext2fs, befs, and the command lspci, memory, more and video into modules - Implement a pool allocator, so each module will run and allocate memory in there own pool, de-alloc all allocated memory by the module, will be done simply by destroying the pool - Implement snprintf to avoid buffer overflow in some case Index: branches/cparm/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/cparm/Chameleon.xcodeproj/project.pbxproj (revision 1976) +++ branches/cparm/Chameleon.xcodeproj/project.pbxproj (revision 1977) @@ -450,6 +450,9 @@ AB43B3F814C384040018D529 /* stack_protector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stack_protector.c; sourceTree = ""; }; AB79217514F38CF200F5EB39 /* bootXnu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootXnu.h; sourceTree = ""; }; AB79219214F3919E00F5EB39 /* ModuleHelp.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ModuleHelp.txt; sourceTree = ""; }; + ABA02705156CE81A00F8E5F3 /* ext2fs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ext2fs.c; sourceTree = ""; }; + ABA02706156CE81A00F8E5F3 /* ext2fs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ext2fs.h; sourceTree = ""; }; + ABA02707156CE81A00F8E5F3 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; ABA0C7BF1568190C003440AF /* arc4random-fbsd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "arc4random-fbsd.c"; sourceTree = ""; }; ABA0C7C01568190C003440AF /* lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lib.c; sourceTree = ""; }; ABA0C7C11568190C003440AF /* rtc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rtc.c; sourceTree = ""; }; @@ -1075,6 +1078,7 @@ AB43B34914C37E520018D529 /* ACPICodec */, AB43B35214C37E520018D529 /* ACPIPatcher */, AB43B35914C37E520018D529 /* CPUfreq */, + ABA02704156CE81A00F8E5F3 /* Ext2fs */, AB43B35C14C37E520018D529 /* GraphicsEnabler */, AB43B36614C37E520018D529 /* GUI */, AB43B37014C37E520018D529 /* HelloWorld */, @@ -1387,6 +1391,16 @@ path = Intel_Acpi; sourceTree = ""; }; + ABA02704156CE81A00F8E5F3 /* Ext2fs */ = { + isa = PBXGroup; + children = ( + ABA02705156CE81A00F8E5F3 /* ext2fs.c */, + ABA02706156CE81A00F8E5F3 /* ext2fs.h */, + ABA02707156CE81A00F8E5F3 /* Makefile */, + ); + path = Ext2fs; + sourceTree = ""; + }; B0056CD411F3868000754B65 /* sym */ = { isa = PBXGroup; children = ( Index: branches/cparm/CHANGES =================================================================== --- branches/cparm/CHANGES (revision 1976) +++ branches/cparm/CHANGES (revision 1977) @@ -1,4 +1,14 @@ - security and stability fixes +- Removed useless codes in efistring modules +- Fixed bugs related to device_inject.c +- Fixed bugs related to device_tree.c +- Fixed bugs related to hfs.c +- Fixed a bug in the booterlog introduced in the previous version +- Fixed a bug in randomTheme intoduced in the previous version +- Added LoginToLion Cub Devices (credit to Enzo) + + +- security and stability fixes - Improved Xcode4.3+ and clang compatibility - Fixed a bug in device_inject.c - Updated uthash, utarrey, etc ... to v1.9.6 Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_sl.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_sl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_tiger.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_tiger.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_leo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_leo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_lion_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_lion_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_sl.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_sl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_leo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_leo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_lion_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_lion_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_ml_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_ml_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_tiger_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_tiger_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_ml_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_ml_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_sl_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_sl_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_tiger_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_tiger_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_leo_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_leo_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_sl_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_sl_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_leo_o.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_leo_o.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_lion.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_lion.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_lion.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_lion.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_ml.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_ml.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_tiger.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsraid_tiger.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_ml.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: branches/cparm/artwork/themes/LoginToLion/ALTERNATES/Devices - Cub/device_hfsplus_ml.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: branches/cparm/i386/libsaio/console.c =================================================================== --- branches/cparm/i386/libsaio/console.c (revision 1976) +++ branches/cparm/i386/libsaio/console.c (revision 1977) @@ -95,7 +95,7 @@ } char *getConsoleCursor(void) { - return booterlog.buf; + return booterlog.cursor; } void setConsoleMsg(char *p) { Index: branches/cparm/i386/libsaio/bootstruct.c =================================================================== --- branches/cparm/i386/libsaio/bootstruct.c (revision 1976) +++ branches/cparm/i386/libsaio/bootstruct.c (revision 1977) @@ -43,7 +43,6 @@ /* ... */ PrivateBootInfo_t *bootInfo = NULL; -//Node *gMemoryMapNode = NULL; static char platformName[64]; static MemoryRange memoryMap[kMemoryMapCountMax]; Index: branches/cparm/i386/libsaio/bootstruct.h =================================================================== --- branches/cparm/i386/libsaio/bootstruct.h (revision 1976) +++ branches/cparm/i386/libsaio/bootstruct.h (revision 1977) @@ -41,8 +41,6 @@ extern boot_args_107 *bootArgs107; extern boot_args_108 *bootArgs108; -//extern Node *gMemoryMapNode; - #define VGA_TEXT_MODE 0 #if 0 Index: branches/cparm/i386/libsaio/device_tree.c =================================================================== --- branches/cparm/i386/libsaio/device_tree.c (revision 1976) +++ branches/cparm/i386/libsaio/device_tree.c (revision 1977) @@ -2,7 +2,10 @@ * Copyright (c) 2005 Apple Computer, Inc. All Rights Reserved. */ -#if 1 +#include "libsaio.h" +#include "device_tree.h" + +//#if 1 /* Structures for a Flattened Device Tree @@ -32,11 +35,8 @@ /* length of DTEntryNameBuf = kDTMaxEntryNameLength +1*/ typedef char DTEntryNameBuf[32]; -#endif +//#endif -#include "libsaio.h" -#include "device_tree.h" - #if DEBUG #define DPRINTF(args...) printf(args) void @@ -97,7 +97,7 @@ prop = freeProperties; freeProperties = prop->next; - prop->name = name; + prop->name = newString(name); prop->length = length; prop->value = value; @@ -203,13 +203,15 @@ DPRINTF("DT__Finalize\n"); for (prop = allocedProperties; prop != NULL; prop = prop->next) { - free(prop->value); + if (prop->value) free(prop->value); + if (prop->name) free(prop->name); + } allocedProperties = NULL; freeProperties = NULL; for (node = allocedNodes; node != NULL; node = node->next) { - free((void *)node->children); + if (node->children) free((void *)node->children); } allocedNodes = NULL; freeNodes = NULL; Index: branches/cparm/i386/libsaio/hfs.c =================================================================== --- branches/cparm/i386/libsaio/hfs.c (revision 1976) +++ branches/cparm/i386/libsaio/hfs.c (revision 1977) @@ -49,7 +49,9 @@ static long gBlockSize; static long gCacheBlockSize; static char *gBTreeHeaderBuffer; -static BTHeaderRec *gBTHeaders[2]; +static BTHeaderRec gBaseBTHeaders[2]; +static BTHeaderRec **gBTHeaders = (BTHeaderRec**)gBaseBTHeaders; + static char *gHFSMdbVib; static HFSMasterDirectoryBlock *gHFSMDB; static char *gHFSPlusHeader; @@ -67,7 +69,8 @@ static long gCaseSensitive; static long gCacheBlockSize; static char gBTreeHeaderBuffer[512]; -static BTHeaderRec *gBTHeaders[2]; +static BTHeaderRec gBaseBTHeaders[2]; +static BTHeaderRec **gBTHeaders = (BTHeaderRec**)gBaseBTHeaders; static char gHFSMdbVib[kBlockSize]; static HFSMasterDirectoryBlock *gHFSMDB =(HFSMasterDirectoryBlock*)gHFSMdbVib; static char gHFSPlusHeader[kBlockSize]; @@ -259,7 +262,6 @@ long HFSLoadFile(CICell ih, char * filePath) { - //return HFSReadFile(ih, filePath, (void *)gFSLoadAddress, 0, 0); return HFSReadFile(ih, filePath, (void *)(uint32_t)get_env(envgFSLoadAddress), 0, 0); } Index: branches/cparm/i386/libsaio/device_tree.h =================================================================== --- branches/cparm/i386/libsaio/device_tree.h (revision 1976) +++ branches/cparm/i386/libsaio/device_tree.h (revision 1977) @@ -9,7 +9,7 @@ #include typedef struct _Property { - const char * name; + char * name; uint32_t length; void * value; Index: branches/cparm/i386/libsaio/allocate.c =================================================================== --- branches/cparm/i386/libsaio/allocate.c (revision 1976) +++ branches/cparm/i386/libsaio/allocate.c (revision 1977) @@ -34,22 +34,19 @@ #define RoundPage(x) ((((unsigned)(x)) + kPageSize - 1) & ~(kPageSize - 1)) long -AllocateMemoryRange(char * rangeName, long start, long length) +AllocateMemoryRange(const char * rangeName, long start, long length) { - char *nameBuf; uint32_t *buffer; - - nameBuf = malloc(strlen(rangeName) + 1); - if (nameBuf == 0) return -1; - strcpy(nameBuf, rangeName); - + + if (!rangeName) return -1; + buffer = malloc(2 * sizeof(uint32_t)); - if (buffer == 0) {free(nameBuf);return -1;} + if (buffer == 0) {return -1;} buffer[0] = start; buffer[1] = length; - DT__AddProperty((Node*)(uint32_t)get_env(envMemoryMapNode), nameBuf, 2 * sizeof(uint32_t), (char *)buffer); + DT__AddProperty((Node*)(uint32_t)get_env(envMemoryMapNode), rangeName, 2 * sizeof(uint32_t), (char *)buffer); return 0; } Index: branches/cparm/i386/libsaio/Makefile =================================================================== --- branches/cparm/i386/libsaio/Makefile (revision 1976) +++ branches/cparm/i386/libsaio/Makefile (revision 1977) @@ -6,14 +6,12 @@ LIBSADIR = ../libsa BOOT2DIR = ../boot2 INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone -#SYMROOT= OPTIM = -Os -Oz -DEBUG = -DNOTHING -#DEBUG = -DDEBUG_CPU=1 -DDEBUG_MEM=1 -DDEBUG_SPD=1 -DDEBUG_PCI=1 -DDEBUG_SMBIOS=1 +DEBUG = CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fno-stack-protector \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) -march=pentium4 -msse2 -msoft-float -Qunused-arguments -ffreestanding -DBOOT_CORE -mpreferred-stack-boundary=2 -fno-align-functions -mfpmath=sse DEFINES= @@ -42,6 +40,7 @@ convert.o acpi_tools.o smbios.o uterror.o lzss.o lib.o rtc.o time.o # Options enabled by default: + #CFLAGS += -DNO_WIN_SUPPORT # -7744 bytes SAIO_OBJS += ntfs.o msdos.o exfat.o @@ -54,11 +53,13 @@ #CFLAGS += -DNO_HAIKU_SUPPORT # -256 bytes SAIO_OBJS += befs.o -#CFLAGS += -DNO_SMP_SUPPORT -SAIO_OBJS += smp-imps.o - # Options disabled by default: +CFLAGS += -DNO_BOOT_IMG + +CFLAGS += -DNO_SMP_SUPPORT +#SAIO_OBJS += smp-imps.o + #CFLAGS += -DUFS_SUPPORT # +3616 bytes #SAIO_OBJS += ufs.o ufs_byteorder.o @@ -82,20 +83,9 @@ $(HFILES) $(OTHERFILES) LIBS = libsaio.a DIRS_NEEDED = $(OBJROOT) $(SYMROOT) -#GENFILES = $(SYMROOT)/saio_internal.h \ -# $(SYMROOT)/saio_external.h \ -# $(SYMROOT)/saio_defs.h \ -# $(SYMROOT)/saio_table.c -#SIG = $(SYMROOT)/sig - all embedtheme: $(DIRS_NEEDED) libsaio.h embedded.h $(LIBS) -#libsaio_static.a: $(SAIO_OBJS) -# rm -f $(SYMROOT)/$@ -# ar q $(SYMROOT)/$@ $(SAIO_OBJS) -# ranlib $(SYMROOT)/$@ - fake_efi.o: vers.h vers.h: @echo "#define I386BOOT_VERSION \"5.0.132\"" > $(SYMROOT)/vers.h @@ -111,16 +101,7 @@ embedded.h: @cd $(SYMROOT)/../../doc && xxd -i BootHelp.txt > $(SYMROOT)/embedded.h - -#saio_internal.h: saio_external.h -#saio_table.c: saio_external.h -#saio_defs.h: saio_external.h -#saio_external.h: saio.def -# $(SIG) -d $(SYMROOT) -n saio saio.def -#installhdrs:: $(INSTALLDIR) -# cp $(INSTALLED_HFILES) $(INSTALLDIR) - include ../MakeInc.dir # dependencies Index: branches/cparm/i386/libsaio/ufs.c =================================================================== --- branches/cparm/i386/libsaio/ufs.c (revision 1976) +++ branches/cparm/i386/libsaio/ufs.c (revision 1977) @@ -194,7 +194,6 @@ long UFSLoadFile( CICell ih, char * filePath ) { - //return UFSReadFile(ih, filePath, (void *)gFSLoadAddress, 0, 0); return UFSReadFile(ih, filePath, (void *)(uint32_t)get_env(envgFSLoadAddress), 0, 0); } Index: branches/cparm/i386/libsaio/pci_root.c =================================================================== --- branches/cparm/i386/libsaio/pci_root.c (revision 1976) +++ branches/cparm/i386/libsaio/pci_root.c (revision 1977) @@ -18,7 +18,6 @@ static int rootuid = 10; //value means function wasnt ran yet - int getPciRootUID(void) { const char *val; Index: branches/cparm/i386/libsaio/datatype.h =================================================================== --- branches/cparm/i386/libsaio/datatype.h (revision 1976) +++ branches/cparm/i386/libsaio/datatype.h (revision 1977) @@ -36,8 +36,8 @@ typedef uint32_t U32; typedef uint64_t U64; -/* -//typedef uint32_t bool; +#if 0 +typedef uint32_t bool; #ifndef false #define true 1 #endif @@ -49,6 +49,6 @@ #ifndef NULL #define NULL ((void *) 0) #endif -*/ +#endif #endif /* DATATYPE_H */ Index: branches/cparm/i386/libsaio/device_inject.c =================================================================== --- branches/cparm/i386/libsaio/device_inject.c (revision 1976) +++ branches/cparm/i386/libsaio/device_inject.c (revision 1977) @@ -11,6 +11,7 @@ #include "pci_root.h" #include "device_inject.h" #include "convert.h" +#include "platform.h" #ifndef DEBUG_INJECT #define DEBUG_INJECT 0 @@ -22,13 +23,10 @@ #define DBG(x...) #endif -uint32_t devices_number = 1; -struct DevPropString *string = 0; -uint8_t *stringdata = 0; -uint32_t stringlength = 0; - char *efi_inject_get_devprop_string(uint32_t *len) { + struct DevPropString *string = (struct DevPropString *)(uint32_t)get_env(envEFIString); + if(string) { *len = string->length; @@ -42,6 +40,8 @@ { const char *val; uint8_t *binStr; + uint8_t *kbinStr; + int cnt, cnt2; static char DEVICE_PROPERTIES_PROP[] = "device-properties"; @@ -62,14 +62,20 @@ if (cnt > 1) { - binStr = convertHexStr2Binary(val, &cnt2); - if (cnt2 > 0) DT__AddProperty(node, DEVICE_PROPERTIES_PROP, cnt2, binStr); + binStr = convertHexStr2Binary(val, &cnt2); + + if (cnt2 > 0) + { + kbinStr = (uint8_t*)AllocateKernelMemory(cnt2); + bcopy(binStr,kbinStr,cnt2); + DT__AddProperty(node, DEVICE_PROPERTIES_PROP, cnt2, kbinStr); + } } } struct DevPropString *devprop_create_string(void) { - string = (struct DevPropString*)malloc(sizeof(struct DevPropString)); + struct DevPropString *string = (struct DevPropString*)malloc(sizeof(struct DevPropString)); if(string == NULL) { Index: branches/cparm/i386/libsaio/device_inject.h =================================================================== --- branches/cparm/i386/libsaio/device_inject.h (revision 1976) +++ branches/cparm/i386/libsaio/device_inject.h (revision 1977) @@ -13,10 +13,6 @@ #define MAX_PCI_DEV_PATHS 4 #define MAX_STRING_NUM_ENTRIES 100 -extern struct DevPropString *string; -extern uint8_t *stringdata; -extern uint32_t stringlength; -extern uint32_t devices_number; extern void setupDeviceProperties(Node *node); #define DEV_PATH_HEADER \ @@ -73,7 +69,6 @@ }; char *efi_inject_get_devprop_string(uint32_t *len); -//int devprop_add_network_template(struct DevPropDevice *device, uint16_t vendor_id); struct DevPropString *devprop_create_string(void); struct DevPropDevice *devprop_add_device(struct DevPropString *string, char *path); int devprop_add_value(struct DevPropDevice *device, char *nm, uint8_t *vl, uint32_t len); Index: branches/cparm/i386/libsaio/platform.h =================================================================== --- branches/cparm/i386/libsaio/platform.h (revision 1976) +++ branches/cparm/i386/libsaio/platform.h (revision 1977) @@ -157,6 +157,9 @@ #define envConsoleErr "boot.console.stderr" +#define envDeviceNumber "boot.dev.efi.devcount" +#define envEFIString "boot.dev.efi.efistring" + #define envgBootFileType "boot.disk.Bootfiletype" #define envHFSLoadVerbose "boot.disk.HFSLoadVerbose" #define envgFSLoadAddress "boot.disk.FSLoadAddress" @@ -251,10 +254,4 @@ } PlatformInfo_t; #endif -#ifdef ShowCurrentDate -#include "efi.h" -extern char * Date(void); -extern void rtc_time(EFI_TIME *time); -#endif - #endif /* !__LIBSAIO_PLATFORM_H */ Index: branches/cparm/i386/libsaio/disk.c =================================================================== --- branches/cparm/i386/libsaio/disk.c (revision 1976) +++ branches/cparm/i386/libsaio/disk.c (revision 1977) @@ -886,8 +886,7 @@ // turbo - we want the booter type scanned also case FDISK_BOOTER: - if (part->bootid & FDISK_ACTIVE) { - /*gBIOSBootVolume =*/ + if (part->bootid & FDISK_ACTIVE) { safe_set_env(envgBIOSBootVolume, (uint32_t)newFDiskBVRef( biosdev, partno, part->relsect, @@ -1512,7 +1511,6 @@ #endif default: if (biosdev == (int)get_env(envgBIOSDev)) - //gBIOSBootVolume = bvr; safe_set_env(envgBIOSBootVolume, (uint32_t)bvr); break; } Index: branches/cparm/i386/libsaio/msdos.c =================================================================== --- branches/cparm/i386/libsaio/msdos.c (revision 1976) +++ branches/cparm/i386/libsaio/msdos.c (revision 1977) @@ -866,7 +866,6 @@ long MSDOSLoadFile(CICell ih, char * filePath) { - //return MSDOSReadFile(ih, filePath, (void *)gFSLoadAddress, 0, 0); return MSDOSReadFile(ih, filePath, (void *)(uint32_t)get_env(envgFSLoadAddress), 0, 0); } Index: branches/cparm/i386/libsaio/fake_efi.c =================================================================== --- branches/cparm/i386/libsaio/fake_efi.c (revision 1976) +++ branches/cparm/i386/libsaio/fake_efi.c (revision 1977) @@ -696,7 +696,7 @@ kType = get_env(envType); DT__AddProperty(node, SYSTEM_TYPE_PROP, sizeof(uint8_t), &kType); } - +#ifdef NO_BOOT_IMG struct boot_progress_element { unsigned int width; unsigned int height; @@ -705,7 +705,7 @@ unsigned char data[0]; }; typedef struct boot_progress_element boot_progress_element; - +#endif static VOID setupEfiDeviceTree(void) { Node *node; @@ -713,7 +713,8 @@ node = DT__FindNode("/", false); if (node == 0) stop("Couldn't get root node"); - + +#ifndef NO_BOOT_IMG { long size; { @@ -722,7 +723,12 @@ long clut = AllocateKernelMemory(size); bcopy(&appleClut8, (void*)clut, size); - AllocateMemoryRange( "BootCLUT", clut, size); + if (((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] == '8') + { + AllocateMemoryRange( "FailedCLUT", clut, size); + + } else + AllocateMemoryRange( "BootCLUT", clut, size); } @@ -730,8 +736,12 @@ #include "failedboot.h" size = 32 + kFailedBootWidth * kFailedBootHeight; long bootPict = AllocateKernelMemory(size); + if (((BVRef)(uint32_t)get_env(envgBootVolume))->OSVersion[3] == '8') + { + AllocateMemoryRange( "FailedImage", bootPict, size); - AllocateMemoryRange( "Pict-FailedBoot", bootPict, size); + } else + AllocateMemoryRange( "Pict-FailedBoot", bootPict, size); ((boot_progress_element *)bootPict)->width = kFailedBootWidth; ((boot_progress_element *)bootPict)->height = kFailedBootHeight; @@ -743,7 +753,7 @@ bcopy((char *)gFailedBootPict, (char *)(bootPict + 32), size - 32); } } - +#endif //Fix an error with the Lion's (DP2+) installer if (execute_hook("getboardproductPatched", NULL, NULL, NULL, NULL, NULL, NULL) != EFI_SUCCESS) { @@ -1004,9 +1014,7 @@ void *mps_p = imps_probe(&num_cpus); if (mps_p) - { - //uint64_t mps = ((uint64_t)((uint32_t)mps_p)); - + { addConfigurationTable(&gEfiMpsTableGuid, ((uint64_t*)((uint32_t)mps_p)), NULL); } Index: branches/cparm/i386/libsaio/saio_internal.h =================================================================== --- branches/cparm/i386/libsaio/saio_internal.h (revision 1976) +++ branches/cparm/i386/libsaio/saio_internal.h (revision 1977) @@ -167,17 +167,11 @@ extern long AllocateKernelMemory( long inSize ); extern long -AllocateMemoryRange(char * rangeName, long start, long length); +AllocateMemoryRange(const char * rangeName, long start, long length); /* misc.c */ extern void enableA20(void); extern void turnOffFloppy(void); -#if UNUSED -extern void random_free (struct ran_obj* self); -extern int random (struct ran_obj* self); -extern struct ran_obj* random_init (int rmin, int rmax); -extern void usefixedrandom (bool opt); -#endif extern void getPlatformName(char *nameBuf); Index: branches/cparm/i386/MakeInc.dir =================================================================== --- branches/cparm/i386/MakeInc.dir (revision 1976) +++ branches/cparm/i386/MakeInc.dir (revision 1977) @@ -40,22 +40,22 @@ .SUFFIXES: .s .i .c .o .c.o .m.o: - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o + $(CC) $(CPPFLAGS) $(GFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o $(OBJROOT)/%.o: %.c - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o + $(CC) $(CPPFLAGS) $(GFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o $(OBJROOT)/%.o: %.m - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o + $(CC) $(CPPFLAGS) $(GFLAGS) $(CFLAGS) $(DEFINES) -c $(INC) $< -o $(OBJROOT)/$*.o .s.o: - $(CC) $(CPPFLAGS) -no-integrated-as -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< + $(CC) $(CPPFLAGS) $(GFLAGS) -no-integrated-as -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< boot2.o: - $(CC) $(CPPFLAGS) -Wa,-n -c $(INC) -no-integrated-as -arch i386 -o $(OBJROOT)/$(@F) boot2.s + $(CC) $(CPPFLAGS)$(GFLAGS) -Wa,-n -c $(INC) -no-integrated-as -arch i386 -o $(OBJROOT)/$(@F) boot2.s $(OBJROOT)/%.o: %.s - $(CC) $(CPPFLAGS) -no-integrated-as -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< + $(CC) $(CPPFLAGS) $(GFLAGS) -no-integrated-as -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $< $(DIRS_NEEDED) $(INSTALLDIR) $(SRCROOT): $(MKDIRS) $@ Index: branches/cparm/i386/boot2/boot.c =================================================================== --- branches/cparm/i386/boot2/boot.c (revision 1976) +++ branches/cparm/i386/boot2/boot.c (revision 1977) @@ -495,7 +495,6 @@ bvChain = newFilteredBVChain(0x80, 0xFF, allowBVFlags, denyBVFlags, &devcnt); safe_set_env(envgDeviceCount,devcnt); - //gBootVolume = selectBootVolume(bvChain); safe_set_env(envgBootVolume, (uint32_t)selectBootVolume(bvChain)); @@ -564,8 +563,10 @@ if (status == -1) continue; status = processBootOptions(); +#ifndef NO_MULTIBOOT_SUPPORT // Status==1 means to chainboot if ( status == 1 ) break; +#endif // Status==-1 means that the config file couldn't be loaded or that gBootVolume is NULL if ( status == -1 ) { @@ -790,7 +791,8 @@ } } } - + +#ifndef NO_MULTIBOOT_SUPPORT // chainboot if (status==1) { @@ -801,6 +803,12 @@ } } +#else + printf("No proper Darwin Partition found, reseting ... \n"); + pause(); + common_boot(biosdev); +#endif + #ifdef NBP_SUPPORT if ((get_env(envgBootFileType) == kNetworkDeviceType) && gUnloadPXEOnExit) { Index: branches/cparm/i386/boot2/boot2.s =================================================================== --- branches/cparm/i386/boot2/boot2.s (revision 1976) +++ branches/cparm/i386/boot2/boot2.s (revision 1977) @@ -90,7 +90,7 @@ pushl %edx # bootdev call _boot - +#ifndef NO_MULTIBOOT_SUPPORT testb $0xff, _chainbootflag jnz start_chain_boot # Jump to a foreign booter @@ -342,5 +342,5 @@ _Gdtr_high: .word GDTLIMIT .long vtop(_Gdt + OFFSET_1MEG) - +#endif /**/ Index: branches/cparm/i386/boot2/options.c =================================================================== --- branches/cparm/i386/boot2/options.c (revision 1976) +++ branches/cparm/i386/boot2/options.c (revision 1977) @@ -585,7 +585,7 @@ int optionKey; // Initialize default menu selection entry. - /*gBootVolume =*/ menuBVR = selectBootVolume(getBvChain()); + menuBVR = selectBootVolume(getBvChain()); safe_set_env(envgBootVolume, (uint32_t)menuBVR); if (biosDevIsCDROM((int)get_env(envgBIOSDev))) { @@ -746,7 +746,6 @@ // Look at partitions hosting OS X other than the CD-ROM for (bvr = getBvChain(); bvr; bvr=bvr->next) { if ((bvr->flags & kBVFlagSystemVolume) && bvr->biosdev != (int)get_env(envgBIOSDev)) { - //gBootVolume = bvr; safe_set_env(envgBootVolume, (uint32_t)bvr); } } @@ -891,7 +890,6 @@ showBootPrompt(nextRow, showPrompt); break; } - //gBootVolume = menuBVR; safe_set_env(envgBootVolume, (uint32_t)menuBVR); setRootVolume(menuBVR); safe_set_env(envgBIOSDev,menuBVR->biosdev); @@ -946,9 +944,6 @@ //========================================================================== -extern unsigned char chainbootdev; -extern unsigned char chainbootflag; - bool copyArgument(const char *argName, const char *val, int cnt, char **argP, int *cntRemainingP) { int argLen = argName ? strlen(argName) : 0; @@ -1000,6 +995,7 @@ if ( ((BVRef)(uint32_t)get_env(envgBootVolume)) ) { +#ifndef NO_MULTIBOOT_SUPPORT if (!( ((BVRef)(uint32_t)get_env(envgBootVolume))->flags & kBVFlagNativeBoot )) { readBootSector( ((BVRef)(uint32_t)get_env(envgBootVolume))->biosdev, ((BVRef)(uint32_t)get_env(envgBootVolume))->part_boff, @@ -1010,12 +1006,15 @@ // foreign booter. // + extern unsigned char chainbootdev; + extern unsigned char chainbootflag; + chainbootdev = ((BVRef)(uint32_t)get_env(envgBootVolume))->biosdev; chainbootflag = 1; return 1; } - +#endif setRootVolume(((BVRef)(uint32_t)get_env(envgBootVolume))); } Index: branches/cparm/i386/boot2/Makefile =================================================================== --- branches/cparm/i386/boot2/Makefile (revision 1976) +++ branches/cparm/i386/boot2/Makefile (revision 1977) @@ -25,10 +25,11 @@ OPTIM = -Os -Oz CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror -fno-stack-protector \ - -fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \ + -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -Qunused-arguments -ffreestanding -DBOOT_CORE +GFLAGS = DEFINES= CONFIG = hd SYMDIR = $(SYMROOT) @@ -54,7 +55,7 @@ # The ordering is important; # boot2.o must be first. -OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o mboot.o +OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o # button.o browser.o scrollbar.o == NOTYET UTILDIR = ../util @@ -70,6 +71,9 @@ CFLAGS += -DSAFE_MALLOC +#GFLAGS += -DNO_MULTIBOOT_SUPPORT +OBJS += mboot.o + # CFLAGS += -DBOOT_HELPER_SUPPORT # +992 bytes # CFLAGS += -DNBP_SUPPORT Index: branches/cparm/i386/modules/NetbookInstaller/NBI.c =================================================================== --- branches/cparm/i386/modules/NetbookInstaller/NBI.c (revision 1976) +++ branches/cparm/i386/modules/NetbookInstaller/NBI.c (revision 1977) @@ -129,7 +129,6 @@ } // Force arch=i386 + -v - //archCpuType = CPU_TYPE_I386; safe_set_env(envarchCpuType, CPU_TYPE_I386); safe_set_env(envgVerboseMode, true); } Index: branches/cparm/i386/modules/NetbookInstaller/Makefile =================================================================== --- branches/cparm/i386/modules/NetbookInstaller/Makefile (revision 1976) +++ branches/cparm/i386/modules/NetbookInstaller/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/RamDiskLoader/Makefile =================================================================== --- branches/cparm/i386/modules/RamDiskLoader/Makefile (revision 1976) +++ branches/cparm/i386/modules/RamDiskLoader/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/YellowIconFixer/YellowIconFixer.c =================================================================== --- branches/cparm/i386/modules/YellowIconFixer/YellowIconFixer.c (revision 1976) +++ branches/cparm/i386/modules/YellowIconFixer/YellowIconFixer.c (revision 1977) @@ -8,6 +8,7 @@ #include "bootstruct.h" #include "pci.h" #include "device_inject.h" +#include "platform.h" #ifndef DEBUG_SATA #define DEBUG_SATA 0 @@ -31,28 +32,37 @@ pci_dt_t* current = arg1; struct DevPropDevice *device; char *devicepath; + struct DevPropString *string; if (current && current->class_id == PCI_CLASS_STORAGE_SATA) { devicepath = get_pci_dev_path(current); if (devicepath) - { - verbose("SATA device : [%04x:%04x :: %04x] :: %s\n", - current->vendor_id, current->device_id,current->class_id, - devicepath); - + { + + string = (struct DevPropString *)(uint32_t)get_env(envEFIString); + if (!string) { string = devprop_create_string(); + if (!string) return; + safe_set_env(envEFIString,(uint32_t)string); } device = devprop_add_device(string, devicepath); - - devprop_add_value(device, "device-id", default_SATA_ID, SATA_ID_LEN); - - - stringdata = malloc(sizeof(uint8_t) * string->length); - memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); - stringlength = string->length; - + if (!device) return; + +#if PROOFOFCONCEPT + uint16_t vendor_id = current->vendor_id & 0xFFFF; + uint16_t device_id = current->device_id & 0xFFFF; + + devprop_add_value(device, "vendor-id", (uint8_t*)&vendor_id, 4); + devprop_add_value(device, "device-id", (uint8_t*)&device_id, 4); +#else + devprop_add_value(device, "device-id", default_SATA_ID, SATA_ID_LEN); + +#endif + verbose("SATA device : [%04x:%04x :: %04x] :: %s\n", + current->vendor_id, current->device_id,current->class_id, + devicepath); } } Index: branches/cparm/i386/modules/YellowIconFixer/Makefile =================================================================== --- branches/cparm/i386/modules/YellowIconFixer/Makefile (revision 1976) +++ branches/cparm/i386/modules/YellowIconFixer/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/KextPatcher/Makefile =================================================================== --- branches/cparm/i386/modules/KextPatcher/Makefile (revision 1976) +++ branches/cparm/i386/modules/KextPatcher/Makefile (revision 1977) @@ -24,8 +24,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/ACPIPatcher/Makefile =================================================================== --- branches/cparm/i386/modules/ACPIPatcher/Makefile (revision 1976) +++ branches/cparm/i386/modules/ACPIPatcher/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/GUI/gui.c =================================================================== --- branches/cparm/i386/modules/GUI/gui.c (revision 1976) +++ branches/cparm/i386/modules/GUI/gui.c (revision 1977) @@ -114,6 +114,8 @@ static int unloadGraphics(void); static int freeBackBuffer( window_t *window ); static bool is_image_loaded(int i); +static bool GUI_getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size ); +static bool GUI_getColorForKey( const char *key, unsigned int *value, config_file_t *config ); #define LOADPNG(src, img, alt_img) if (loadThemeImage(src, #img, alt_img) != 0) { return 1; } @@ -324,7 +326,7 @@ * */ -bool getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size ) +static bool GUI_getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size ) { const char *val; @@ -384,7 +386,7 @@ return false; } -static bool getColorForKey( const char *key, unsigned int *value, config_file_t *config ) +static bool GUI_getColorForKey( const char *key, unsigned int *value, config_file_t *config ) { const char *val; int size; @@ -849,10 +851,10 @@ gui.devicelist.height = ((images[iSelection].image->height + font_console.chars[0]->height + gui.devicelist.iconspacing) * MIN(gui.maxdevices, devcnt) + (images[iDeviceScrollPrev].image->height + images[iDeviceScrollNext].image->height) + gui.devicelist.iconspacing); gui.devicelist.width = (images[iSelection].image->width + gui.devicelist.iconspacing); - if(getDimensionForKey("devices_pos_x", &pixel, theme, gui.screen.width , images[iSelection].image->width ) ) + if(GUI_getDimensionForKey("devices_pos_x", &pixel, theme, gui.screen.width , images[iSelection].image->width ) ) gui.devicelist.pos.x = pixel; - if(getDimensionForKey("devices_pos_y", &pixel, theme, gui.screen.height , gui.devicelist.height ) ) + if(GUI_getDimensionForKey("devices_pos_y", &pixel, theme, gui.screen.height , gui.devicelist.height ) ) gui.devicelist.pos.y = pixel; break; @@ -861,19 +863,19 @@ gui.devicelist.width = ((images[iSelection].image->width + gui.devicelist.iconspacing) * MIN(gui.maxdevices, devcnt) + (images[iDeviceScrollPrev].image->width + images[iDeviceScrollNext].image->width) + gui.devicelist.iconspacing); gui.devicelist.height = (images[iSelection].image->height + font_console.chars[0]->height + gui.devicelist.iconspacing); - if(getDimensionForKey("devices_pos_x", &pixel, theme, gui.screen.width , gui.devicelist.width ) ) + if(GUI_getDimensionForKey("devices_pos_x", &pixel, theme, gui.screen.width , gui.devicelist.width ) ) gui.devicelist.pos.x = pixel; else gui.devicelist.pos.x = ( gui.screen.width - gui.devicelist.width ) / 2; - if(getDimensionForKey("devices_pos_y", &pixel, theme, gui.screen.height , images[iSelection].image->height ) ) + if(GUI_getDimensionForKey("devices_pos_y", &pixel, theme, gui.screen.height , images[iSelection].image->height ) ) gui.devicelist.pos.y = pixel; else gui.devicelist.pos.y = ( gui.screen.height - gui.devicelist.height ) / 2; break; } - if(getColorForKey("devices_bgcolor", &color, theme)) + if(GUI_getColorForKey("devices_bgcolor", &color, theme)) gui.devicelist.bgcolor = (color & 0x00FFFFFF); if(getIntForKey("devices_transparency", &alpha, theme)) @@ -898,7 +900,7 @@ /* * Parse screen parameters */ - if(getColorForKey("screen_bgcolor", &color, theme )) + if(GUI_getColorForKey("screen_bgcolor", &color, theme )) gui.screen.bgcolor = (color & 0x00FFFFFF); if(getIntForKey("screen_textmargin_h", &val, theme)) @@ -910,37 +912,37 @@ /* * Parse background parameters */ - if(getDimensionForKey("background_pos_x", &pixel, theme, screen_width , images[iBackground].image->width ) ) + if(GUI_getDimensionForKey("background_pos_x", &pixel, theme, screen_width , images[iBackground].image->width ) ) gui.background.pos.x = pixel; - if(getDimensionForKey("background_pos_y", &pixel, theme, screen_height , images[iBackground].image->height ) ) + if(GUI_getDimensionForKey("background_pos_y", &pixel, theme, screen_height , images[iBackground].image->height ) ) gui.background.pos.y = pixel; /* * Parse logo parameters */ - if(getDimensionForKey("logo_pos_x", &pixel, theme, screen_width , images[iLogo].image->width ) ) + if(GUI_getDimensionForKey("logo_pos_x", &pixel, theme, screen_width , images[iLogo].image->width ) ) gui.logo.pos.x = pixel; - if(getDimensionForKey("logo_pos_y", &pixel, theme, screen_height , images[iLogo].image->height ) ) + if(GUI_getDimensionForKey("logo_pos_y", &pixel, theme, screen_height , images[iLogo].image->height ) ) gui.logo.pos.y = pixel; /* * Parse progress bar parameters */ - if(getDimensionForKey("progressbar_pos_x", &pixel, theme, screen_width , 0 ) ) + if(GUI_getDimensionForKey("progressbar_pos_x", &pixel, theme, screen_width , 0 ) ) gui.progressbar.pos.x = pixel; - if(getDimensionForKey("progressbar_pos_y", &pixel, theme, screen_height , 0 ) ) + if(GUI_getDimensionForKey("progressbar_pos_y", &pixel, theme, screen_height , 0 ) ) gui.progressbar.pos.y = pixel; /* * Parse countdown text parameters */ - if(getDimensionForKey("countdown_pos_x", &pixel, theme, screen_width , 0 ) ) + if(GUI_getDimensionForKey("countdown_pos_x", &pixel, theme, screen_width , 0 ) ) gui.countdown.pos.x = pixel; - if(getDimensionForKey("countdown_pos_y", &pixel, theme, screen_height , 0 ) ) + if(GUI_getDimensionForKey("countdown_pos_y", &pixel, theme, screen_height , 0 ) ) gui.countdown.pos.y = pixel; /* @@ -957,10 +959,10 @@ if(getIntForKey("infobox_height", &val, theme) && val >= 0) gui.infobox.height = MIN( screen_height , (unsigned)val ); - if(getDimensionForKey("infobox_pos_x", &pixel, theme, screen_width , gui.infobox.width ) ) + if(GUI_getDimensionForKey("infobox_pos_x", &pixel, theme, screen_width , gui.infobox.width ) ) gui.infobox.pos.x = pixel; - if(getDimensionForKey("infobox_pos_y", &pixel, theme, screen_height , gui.infobox.height ) ) + if(GUI_getDimensionForKey("infobox_pos_y", &pixel, theme, screen_height , gui.infobox.height ) ) gui.infobox.pos.y = pixel; if(getIntForKey("infobox_textmargin_h", &val, theme)) @@ -969,7 +971,7 @@ if(getIntForKey("infobox_textmargin_v", &val, theme)) gui.infobox.vborder = MIN( gui.infobox.height , val ); - if(getColorForKey("infobox_bgcolor", &color, theme)) + if(GUI_getColorForKey("infobox_bgcolor", &color, theme)) gui.infobox.bgcolor = (color & 0x00FFFFFF); if(getIntForKey("infobox_transparency", &alpha, theme)) @@ -978,20 +980,20 @@ /* * Parse menu parameters */ - if(getDimensionForKey("menu_width", &pixel, theme, gui.screen.width , 0 ) ) + if(GUI_getDimensionForKey("menu_width", &pixel, theme, gui.screen.width , 0 ) ) gui.menu.width = pixel; else gui.menu.width = images[iMenuSelection].image->width; - if(getDimensionForKey("menu_height", &pixel, theme, gui.screen.height , 0 ) ) + if(GUI_getDimensionForKey("menu_height", &pixel, theme, gui.screen.height , 0 ) ) gui.menu.height = pixel; else gui.menu.height = (infoMenuItemsCount) * images[iMenuSelection].image->height; - if(getDimensionForKey("menu_pos_x", &pixel, theme, screen_width , gui.menu.width ) ) + if(GUI_getDimensionForKey("menu_pos_x", &pixel, theme, screen_width , gui.menu.width ) ) gui.menu.pos.x = pixel; - if(getDimensionForKey("menu_pos_y", &pixel, theme, screen_height , gui.menu.height ) ) + if(GUI_getDimensionForKey("menu_pos_y", &pixel, theme, screen_height , gui.menu.height ) ) gui.menu.pos.y = pixel; if(getIntForKey("menu_textmargin_h", &val, theme)) @@ -1000,7 +1002,7 @@ if(getIntForKey("menu_textmargin_v", &val, theme)) gui.menu.vborder = MIN( gui.menu.height , val ); - if(getColorForKey("menu_bgcolor", &color, theme)) + if(GUI_getColorForKey("menu_bgcolor", &color, theme)) gui.menu.bgcolor = (color & 0x00FFFFFF); if(getIntForKey("menu_transparency", &alpha, theme)) @@ -1009,16 +1011,16 @@ /* * Parse bootprompt parameters */ - if(getDimensionForKey("bootprompt_width", &pixel, theme, screen_width , 0 ) ) + if(GUI_getDimensionForKey("bootprompt_width", &pixel, theme, screen_width , 0 ) ) gui.bootprompt.width = pixel; if(getIntForKey("bootprompt_height", &val, theme) && val >= 0) gui.bootprompt.height = MIN( screen_height , (unsigned)val ); - if(getDimensionForKey("bootprompt_pos_x", &pixel, theme, screen_width , gui.bootprompt.width ) ) + if(GUI_getDimensionForKey("bootprompt_pos_x", &pixel, theme, screen_width , gui.bootprompt.width ) ) gui.bootprompt.pos.x = pixel; - if(getDimensionForKey("bootprompt_pos_y", &pixel, theme, screen_height , gui.bootprompt.height ) ) + if(GUI_getDimensionForKey("bootprompt_pos_y", &pixel, theme, screen_height , gui.bootprompt.height ) ) gui.bootprompt.pos.y = pixel; if(getIntForKey("bootprompt_textmargin_h", &val, theme) && val >= 0) @@ -1027,16 +1029,16 @@ if(getIntForKey("bootprompt_textmargin_v", &val, theme) && val >= 0) gui.bootprompt.vborder = MIN( gui.bootprompt.height , (unsigned)val ); - if(getColorForKey("bootprompt_bgcolor", &color, theme)) + if(GUI_getColorForKey("bootprompt_bgcolor", &color, theme)) gui.bootprompt.bgcolor = (color & 0x00FFFFFF); if(getIntForKey("bootprompt_transparency", &alpha, theme)) gui.bootprompt.bgcolor = gui.bootprompt.bgcolor | (( 255 - ( alpha & 0xFF) ) << 24); - if(getColorForKey("font_small_color", &color, theme)) + if(GUI_getColorForKey("font_small_color", &color, theme)) gui.screen.font_small_color = (color & 0x00FFFFFF); - if(getColorForKey("font_console_color", &color, theme)) + if(GUI_getColorForKey("font_console_color", &color, theme)) gui.screen.font_console_color = (color & 0x00FFFFFF); } @@ -1118,36 +1120,30 @@ if (i) { - uint8_t choosen = arc4random_uniform(i+1); - + uint8_t choosen = arc4random_uniform(i); +#if DEBUG_GUI + printf("choosen number (nb = %d), i = %d \n", choosen, i); +#endif themeList_t* entry = themeList; while(entry) { - if (entry->nb == choosen) break; - - entry = entry->next; - } - - if (entry) { + if (entry->nb == choosen) { #if DEBUG_GUI - - printf("choosen theme %s (nb = %d)\n", entry->theme, entry->nb); - sleep(1); + + printf("choosen theme %s (nb = %d)\n", entry->theme, entry->nb); + sleep(1); #endif - *theme = entry->theme; + *theme = entry->theme; + + sta = startGUI(); + + break; + } - sta = startGUI(); - - - } -#if DEBUG_GUI - else { - goto out; - } -#endif - + entry = entry->next; + } free_theme_list(); @@ -1160,16 +1156,6 @@ } #endif return sta; - -#if DEBUG_GUI -out: - printf("random theme failed !!\n"); - - sleep(1); -#endif - return sta; - - } int initGUI(void) @@ -1254,7 +1240,12 @@ ret = randomTheme(dirsrc, &theme_name); - if (ret) printf("randomTheme Failed !! \n"); + if (ret) { + printf("randomTheme Failed !! \n"); +//#if DEBUG_GUI + getc(); +//#endif + } #if DEBUG_GUI else { Index: branches/cparm/i386/modules/GUI/GUI_module.c =================================================================== --- branches/cparm/i386/modules/GUI/GUI_module.c (revision 1976) +++ branches/cparm/i386/modules/GUI/GUI_module.c (revision 1977) @@ -699,7 +699,7 @@ int devcnt = (int)get_env(envgDeviceCount); // Initialize default menu selection entry. - /*gBootVolume =*/ menuBVR = selectBootVolume(getBvChain()); + menuBVR = selectBootVolume(getBvChain()); safe_set_env(envgBootVolume, (uint32_t)menuBVR); if (biosDevIsCDROM((int)get_env(envgBIOSDev))) @@ -889,7 +889,6 @@ // Look at partitions hosting OS X other than the CD-ROM for (bvr = getBvChain(); bvr; bvr=bvr->next) { if ((bvr->flags & kBVFlagSystemVolume) && bvr->biosdev != (int)get_env(envgBIOSDev)) { - //gBootVolume = bvr; safe_set_env(envgBootVolume, (uint32_t)bvr); } } @@ -1095,7 +1094,6 @@ GUI_showBootPrompt(nextRow, showPrompt); break; } - //gBootVolume = menuBVR; safe_set_env(envgBootVolume, (uint32_t)menuBVR); setRootVolume(menuBVR); safe_set_env(envgBIOSDev,menuBVR->biosdev); @@ -1111,7 +1109,6 @@ // if the user enabled rescanning the optical drive. // Otherwise boot the default boot volume. if (get_env(envgEnableCDROMRescan)) { - //gBootVolume = NULL; safe_set_env(envgBootVolume, (uint32_t)NULL); GUI_clearBootArgs(); } @@ -1124,7 +1121,6 @@ #else scanDisks(); #endif - //gBootVolume = NULL; safe_set_env(envgBootVolume, (uint32_t)NULL); GUI_clearBootArgs(); Index: branches/cparm/i386/modules/GUI/Makefile =================================================================== --- branches/cparm/i386/modules/GUI/Makefile (revision 1976) +++ branches/cparm/i386/modules/GUI/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common #-fstack-protector-all Index: branches/cparm/i386/modules/KernelPatcher/Makefile =================================================================== --- branches/cparm/i386/modules/KernelPatcher/Makefile (revision 1976) +++ branches/cparm/i386/modules/KernelPatcher/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -O3 DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/Networking/Networking.c =================================================================== --- branches/cparm/i386/modules/Networking/Networking.c (revision 1976) +++ branches/cparm/i386/modules/Networking/Networking.c (revision 1977) @@ -8,6 +8,7 @@ #include "bootstruct.h" #include "pci.h" #include "device_inject.h" +#include "platform.h" #ifndef DEBUG_ETHERNET #define DEBUG_ETHERNET 0 @@ -73,6 +74,7 @@ if(device) { + uint32_t devices_number; if((vendor_id != 0x168c) && (builtin_set == 0)) { @@ -85,7 +87,13 @@ return 0; } - devices_number++; + if (!(devices_number = (uint32_t)get_env(envDeviceNumber))) { + devices_number = 1; + } + + + safe_set_env(envDeviceNumber,devices_number+1); + return 1; } else @@ -101,24 +109,24 @@ if (!devicepath) { return ; } - struct DevPropDevice *device /*= (struct DevPropDevice*)malloc(sizeof(struct DevPropDevice))*/; - + struct DevPropDevice *device; + struct DevPropString *string = (struct DevPropString *)(uint32_t)get_env(envEFIString); + verbose("LAN Controller [%04x:%04x] :: %s\n", eth_dev->vendor_id, eth_dev->device_id, devicepath); if (!string) + { string = devprop_create_string(); - + if (!string) return; + safe_set_env(envEFIString,(uint32_t)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; - } + devprop_generate_string(string); } } @@ -145,13 +153,18 @@ if (!devicepath) { return ; } - struct DevPropDevice *device /*= (struct DevPropDevice*)malloc(sizeof(struct DevPropDevice))*/; - + struct DevPropDevice *device ; + struct DevPropString *string = (struct DevPropString *)(uint32_t)get_env(envEFIString); + verbose("Wifi Controller [%04x:%04x] :: %s\n", wlan_dev->vendor_id, wlan_dev->device_id, devicepath); if (!string) + { string = devprop_create_string(); - + if (!string) return; + safe_set_env(envEFIString,(uint32_t)string); + } + device = devprop_add_device(string, devicepath); if(device) { @@ -168,20 +181,8 @@ { verbose("Setting up wifi keys\n"); - devprop_add_value(device, "model", (uint8_t*)known_wifi_cards[i].model, (strlen(known_wifi_cards[i].model) + 1)); - - // NOTE: I would set the subsystem id and subsystem vendor id here, - // however, those values seem to be ovverriden in the boot process. - // A batter method would be injecting the DTGP dsdt method - // and then injectinve the subsystem id there. - - stringdata = (uint8_t*)malloc(sizeof(uint8_t) * string->length); - if(stringdata) - { - memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); - stringlength = string->length; - } - + devprop_add_value(device, "model", (uint8_t*)known_wifi_cards[i].model, (strlen(known_wifi_cards[i].model) + 1)); + return; } Index: branches/cparm/i386/modules/Networking/Makefile =================================================================== --- branches/cparm/i386/modules/Networking/Makefile (revision 1976) +++ branches/cparm/i386/modules/Networking/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/GraphicsEnabler/gma.c =================================================================== --- branches/cparm/i386/modules/GraphicsEnabler/gma.c (revision 1976) +++ branches/cparm/i386/modules/GraphicsEnabler/gma.c (revision 1977) @@ -112,8 +112,14 @@ verbose("Intel %s [%04x:%04x] :: %s\n", model, gma_dev->vendor_id, gma_dev->device_id, devicepath); + struct DevPropString *string = (struct DevPropString *)(uint32_t)get_env(envEFIString); if (!string) + { string = devprop_create_string(); + if (!string) return false; + safe_set_env(envEFIString,(uint32_t)string); + } + struct DevPropDevice *device = devprop_add_device(string, devicepath); if(!device) @@ -170,19 +176,6 @@ else if (strcmp(model, "Intel HD Graphics 3000") == 0) { devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20); - } - - - stringdata = malloc(sizeof(uint8_t) * string->length); - if(!stringdata) - { - printf("No stringdata press a key...\n"); - getc(); - return false; - } - - memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); - stringlength = string->length; - + } return true; } Index: branches/cparm/i386/modules/GraphicsEnabler/nvidia.c =================================================================== --- branches/cparm/i386/modules/GraphicsEnabler/nvidia.c (revision 1976) +++ branches/cparm/i386/modules/GraphicsEnabler/nvidia.c (revision 1977) @@ -1192,10 +1192,18 @@ return 0; // Rek : Dont use sprintf return, it does not WORK !! our custom sprintf() always return 0! // len = sprintf(tmp, "Slot-%x", devices_number); - sprintf(tmp, "Slot-%x",devices_number); - devprop_add_value(device, "AAPL,slot-name", (uint8_t *) tmp, strlen(tmp)); - devices_number++; - + { + uint32_t devices_number; + + if (!(devices_number = (uint32_t)get_env(envDeviceNumber))) { + devices_number = 1; + } + + sprintf(tmp, "Slot-%x",devices_number); + devprop_add_value(device, "AAPL,slot-name", (uint8_t *) tmp, strlen(tmp)); + safe_set_env(envDeviceNumber,devices_number+1); + } + return 1; } @@ -1290,7 +1298,9 @@ char *model; const char *value; bool doit; - + + struct DevPropString *string = (struct DevPropString *)(uint32_t)get_env(envEFIString); + static const dcfg_t default_dcfg [] = { {0xff,0xff,0xff,0xff}, }; @@ -1405,12 +1415,15 @@ //return false; } } - DBG("nvidia model : %s\n",model); - - - if (!string) { + DBG("nvidia model : %s\n",model); + + if (!string) + { string = devprop_create_string(); - } + if (!string) {free(rom);return false;} + safe_set_env(envEFIString,(uint32_t)string); + } + device = devprop_add_device(string, devicepath); /* FIXME: for primary graphics card only */ @@ -1520,15 +1533,5 @@ devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (uint32_t)(rom[2] * 512)); } - stringdata = malloc(sizeof(uint8_t) * string->length); - if (!stringdata) { - free(rom); - free(version_str); - printf("Couldn't allocate momory for device stringdata\n"); - return false; - } - memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); - stringlength = string->length; - return true; } Index: branches/cparm/i386/modules/GraphicsEnabler/Makefile =================================================================== --- branches/cparm/i386/modules/GraphicsEnabler/Makefile (revision 1976) +++ branches/cparm/i386/modules/GraphicsEnabler/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/GraphicsEnabler/ati.c =================================================================== --- branches/cparm/i386/modules/GraphicsEnabler/ati.c (revision 1976) +++ branches/cparm/i386/modules/GraphicsEnabler/ati.c (revision 1977) @@ -1535,12 +1535,15 @@ bool setup_ati_devprop(pci_dt_t *ati_dev) { char *devicepath; - - // ------------------------------------------------- - // Find a better way to do this (in device_inject.c) + + struct DevPropString *string = (struct DevPropString *)(uint32_t)get_env(envEFIString); if (!string) + { string = devprop_create_string(); - + if (!string) return false; + safe_set_env(envEFIString,(uint32_t)string); + } + devicepath = get_pci_dev_path(ati_dev); if (!devicepath) { return false; @@ -1564,16 +1567,8 @@ devprop_add_value(card->device, "ATY,IOSpaceOffset", &io, 8); #endif - devprop_add_list(ati_devprop_list); - - // ------------------------------------------------- - // Find a better way to do this (in device_inject.c) - //Azi: XXX tried to fix a malloc error in vain; this is related to XCode 4 compilation! - stringdata = malloc(sizeof(uint8_t) * string->length); - memcpy(stringdata, (uint8_t*)devprop_generate_string(string), string->length); - stringlength = string->length; - // ------------------------------------------------- - + devprop_add_list(ati_devprop_list); + verbose("%s %dMB [%04x:%04x] (subsys [%04x:%04x]) (%s:%s) :: %s\n", card->info->model_name, (uint32_t)(card->vram_size / (1024 * 1024)), ati_dev->vendor_id, ati_dev->device_id, Index: branches/cparm/i386/modules/SMBiosGetters/Makefile =================================================================== --- branches/cparm/i386/modules/SMBiosGetters/Makefile (revision 1976) +++ branches/cparm/i386/modules/SMBiosGetters/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common #-fstack-protector-all Index: branches/cparm/i386/modules/SMBiosGetters/README =================================================================== --- branches/cparm/i386/modules/SMBiosGetters/README (revision 1976) +++ branches/cparm/i386/modules/SMBiosGetters/README (revision 1977) @@ -1 +1 @@ -please do not use SMBiosGetters and SMBiosPatcher together, you have to chose one of them, this issue will be fixed in the next versions \ No newline at end of file +WARNING : For now, SMBiosPatcher is highly recommended \ No newline at end of file Index: branches/cparm/i386/modules/HibernateEnabler/Makefile =================================================================== --- branches/cparm/i386/modules/HibernateEnabler/Makefile (revision 1976) +++ branches/cparm/i386/modules/HibernateEnabler/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/Keymapper/Makefile =================================================================== --- branches/cparm/i386/modules/Keymapper/Makefile (revision 1976) +++ branches/cparm/i386/modules/Keymapper/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/USBFix/Makefile =================================================================== --- branches/cparm/i386/modules/USBFix/Makefile (revision 1976) +++ branches/cparm/i386/modules/USBFix/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/HPET/Makefile =================================================================== --- branches/cparm/i386/modules/HPET/Makefile (revision 1976) +++ branches/cparm/i386/modules/HPET/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/SMBiosPatcher/Makefile =================================================================== --- branches/cparm/i386/modules/SMBiosPatcher/Makefile (revision 1976) +++ branches/cparm/i386/modules/SMBiosPatcher/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/SMBiosPatcher/README =================================================================== --- branches/cparm/i386/modules/SMBiosPatcher/README (revision 1976) +++ branches/cparm/i386/modules/SMBiosPatcher/README (revision 1977) @@ -1 +1 @@ -please do not use SMBiosGetters and SMBiosPatcher together, you have to chose one of them , this issue will be fixed in the next versions \ No newline at end of file +WARNING : For now, SMBiosPatcher is highly recommended \ No newline at end of file Index: branches/cparm/i386/modules/Resolution/Makefile =================================================================== --- branches/cparm/i386/modules/Resolution/Makefile (revision 1976) +++ branches/cparm/i386/modules/Resolution/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/CPUfreq/Makefile =================================================================== --- branches/cparm/i386/modules/CPUfreq/Makefile (revision 1976) +++ branches/cparm/i386/modules/CPUfreq/Makefile (revision 1977) @@ -36,8 +36,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/Memory/Makefile =================================================================== --- branches/cparm/i386/modules/Memory/Makefile (revision 1976) +++ branches/cparm/i386/modules/Memory/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/i386/modules/ACPICodec/Makefile =================================================================== --- branches/cparm/i386/modules/ACPICodec/Makefile (revision 1976) +++ branches/cparm/i386/modules/ACPICodec/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common -D__BUNDLE_ID__=\"$(BUNDLE_ID)\" Index: branches/cparm/i386/modules/HelloWorld/Makefile =================================================================== --- branches/cparm/i386/modules/HelloWorld/Makefile (revision 1976) +++ branches/cparm/i386/modules/HelloWorld/Makefile (revision 1977) @@ -37,8 +37,8 @@ OPTIM = -Os -Oz DEBUG = -DNOTHING CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -fstack-protector-all \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ - -DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \ + -D__ARCHITECTURE__=\"i386\" \ + $(DEBUG) \ -fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common Index: branches/cparm/xcode3_sym.zip =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream