Index: branches/iFabio/Chameleon/Chameleon.xcodeproj/project.pbxproj =================================================================== --- branches/iFabio/Chameleon/Chameleon.xcodeproj/project.pbxproj (revision 297) +++ branches/iFabio/Chameleon/Chameleon.xcodeproj/project.pbxproj (revision 298) @@ -15,6 +15,288 @@ 0172D0DC11FB66820030222E /* dram_controllers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dram_controllers.h; sourceTree = ""; }; 0172D0DD11FB66820030222E /* dram_controllers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dram_controllers.c; sourceTree = ""; }; 019DFBAF11FB94090013E8CC /* MEMTEST86_LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MEMTEST86_LICENSE; sourceTree = ""; }; + 0389369E137D4A74004AD9DC /* HelloWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HelloWorld.cpp; sourceTree = ""; }; + 038936A0137D4A74004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 038936A2137D4A74004AD9DC /* modules */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = modules; sourceTree = ""; }; + 038936A3137D4A74004AD9DC /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; + 038936A5137D4A74004AD9DC /* __ashldi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __ashldi3.c; sourceTree = ""; }; + 038936A6137D4A74004AD9DC /* __ashrdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __ashrdi3.c; sourceTree = ""; }; + 038936A7137D4A74004AD9DC /* __clzsi2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __clzsi2.c; sourceTree = ""; }; + 038936A8137D4A74004AD9DC /* __divdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __divdi3.c; sourceTree = ""; }; + 038936A9137D4A74004AD9DC /* __divsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __divsi3.c; sourceTree = ""; }; + 038936AA137D4A74004AD9DC /* __lshrdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __lshrdi3.c; sourceTree = ""; }; + 038936AB137D4A74004AD9DC /* __moddi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __moddi3.c; sourceTree = ""; }; + 038936AC137D4A74004AD9DC /* __modsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __modsi3.c; sourceTree = ""; }; + 038936AD137D4A74004AD9DC /* __udivdi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivdi3.c; sourceTree = ""; }; + 038936AE137D4A74004AD9DC /* __udivmoddi4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivmoddi4.c; sourceTree = ""; }; + 038936AF137D4A74004AD9DC /* __udivmodsi4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivmodsi4.c; sourceTree = ""; }; + 038936B0137D4A74004AD9DC /* __udivsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __udivsi3.c; sourceTree = ""; }; + 038936B1137D4A74004AD9DC /* __umoddi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __umoddi3.c; sourceTree = ""; }; + 038936B2137D4A74004AD9DC /* __umodsi3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = __umodsi3.c; sourceTree = ""; }; + 038936B3137D4A74004AD9DC /* atexit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atexit.c; sourceTree = ""; }; + 038936B4137D4A74004AD9DC /* atexit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atexit.h; sourceTree = ""; }; + 038936B5137D4A74004AD9DC /* atoi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atoi.c; sourceTree = ""; }; + 038936B6137D4A74004AD9DC /* atol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atol.c; sourceTree = ""; }; + 038936B7137D4A74004AD9DC /* atoll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atoll.c; sourceTree = ""; }; + 038936B8137D4A74004AD9DC /* atox.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atox.c; sourceTree = ""; }; + 038936B9137D4A74004AD9DC /* bsearch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bsearch.c; sourceTree = ""; }; + 038936BA137D4A74004AD9DC /* calloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = calloc.c; sourceTree = ""; }; + 038936BB137D4A74004AD9DC /* exit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = exit.c; sourceTree = ""; }; + 038936BC137D4A74004AD9DC /* jrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jrand48.c; sourceTree = ""; }; + 038936BD137D4A74004AD9DC /* klibc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = klibc.c; sourceTree = ""; }; + 038936BE137D4A74004AD9DC /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 038936BF137D4A74004AD9DC /* limits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = limits.h; sourceTree = ""; }; + 038936C0137D4A74004AD9DC /* lrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lrand48.c; sourceTree = ""; }; + 038936C1137D4A74004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 038936C2137D4A74004AD9DC /* memccpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memccpy.c; sourceTree = ""; }; + 038936C3137D4A74004AD9DC /* memchr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memchr.c; sourceTree = ""; }; + 038936C4137D4A74004AD9DC /* memmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memmem.c; sourceTree = ""; }; + 038936C5137D4A74004AD9DC /* memmove.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memmove.c; sourceTree = ""; }; + 038936C6137D4A74004AD9DC /* memrchr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memrchr.c; sourceTree = ""; }; + 038936C7137D4A74004AD9DC /* memswap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memswap.c; sourceTree = ""; }; + 038936C8137D4A74004AD9DC /* mrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mrand48.c; sourceTree = ""; }; + 038936C9137D4A74004AD9DC /* nrand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nrand48.c; sourceTree = ""; }; + 038936CA137D4A74004AD9DC /* onexit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = onexit.c; sourceTree = ""; }; + 038936CB137D4A74004AD9DC /* qsort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = qsort.c; sourceTree = ""; }; + 038936CC137D4A74004AD9DC /* seed48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = seed48.c; sourceTree = ""; }; + 038936CD137D4A74004AD9DC /* sha1hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sha1hash.c; sourceTree = ""; }; + 038936CE137D4A74004AD9DC /* snprintf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = snprintf.c; sourceTree = ""; }; + 038936CF137D4A74004AD9DC /* srand48.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = srand48.c; sourceTree = ""; }; + 038936D0137D4A74004AD9DC /* sscanf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sscanf.c; sourceTree = ""; }; + 038936D1137D4A74004AD9DC /* strcasecmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strcasecmp.c; sourceTree = ""; }; + 038936D2137D4A74004AD9DC /* strdup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strdup.c; sourceTree = ""; }; + 038936D3137D4A74004AD9DC /* strlcat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strlcat.c; sourceTree = ""; }; + 038936D4137D4A74004AD9DC /* strncasecmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strncasecmp.c; sourceTree = ""; }; + 038936D5137D4A74004AD9DC /* strndup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strndup.c; sourceTree = ""; }; + 038936D6137D4A74004AD9DC /* strnlen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strnlen.c; sourceTree = ""; }; + 038936D7137D4A74004AD9DC /* strntoimax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strntoimax.c; sourceTree = ""; }; + 038936D8137D4A74004AD9DC /* strntoumax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strntoumax.c; sourceTree = ""; }; + 038936D9137D4A74004AD9DC /* strpbrk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strpbrk.c; sourceTree = ""; }; + 038936DA137D4A74004AD9DC /* strsep.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strsep.c; sourceTree = ""; }; + 038936DB137D4A74004AD9DC /* strtoimax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoimax.c; sourceTree = ""; }; + 038936DC137D4A74004AD9DC /* strtok.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtok.c; sourceTree = ""; }; + 038936DD137D4A74004AD9DC /* strtok_r.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtok_r.c; sourceTree = ""; }; + 038936DE137D4A74004AD9DC /* strtol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtol.c; sourceTree = ""; }; + 038936DF137D4A74004AD9DC /* strtoll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoll.c; sourceTree = ""; }; + 038936E0137D4A74004AD9DC /* strtotimespec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtotimespec.c; sourceTree = ""; }; + 038936E1137D4A74004AD9DC /* strtotimeval.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtotimeval.c; sourceTree = ""; }; + 038936E2137D4A74004AD9DC /* strtotimex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtotimex.c; sourceTree = ""; }; + 038936E3137D4A74004AD9DC /* strtoul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoul.c; sourceTree = ""; }; + 038936E4137D4A74004AD9DC /* strtoull.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoull.c; sourceTree = ""; }; + 038936E5137D4A74004AD9DC /* strtoumax.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtoumax.c; sourceTree = ""; }; + 038936E6137D4A74004AD9DC /* strtox.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtox.c; sourceTree = ""; }; + 038936E7137D4A74004AD9DC /* strxspn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strxspn.c; sourceTree = ""; }; + 038936E8137D4A74004AD9DC /* strxspn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strxspn.h; sourceTree = ""; }; + 038936E9137D4A74004AD9DC /* version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = version; sourceTree = ""; }; + 038936EA137D4A74004AD9DC /* vsnprintf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vsnprintf.c; sourceTree = ""; }; + 038936EB137D4A74004AD9DC /* vsscanf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vsscanf.c; sourceTree = ""; }; + 038936EC137D4A74004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 038936ED137D4A74004AD9DC /* MakeInc.dir */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MakeInc.dir; sourceTree = ""; }; + 038936EF137D4A74004AD9DC /* algorithm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = algorithm; sourceTree = ""; }; + 038936F0137D4A74004AD9DC /* associative_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = associative_base; sourceTree = ""; }; + 038936F1137D4A74004AD9DC /* basic_definitions */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = basic_definitions; sourceTree = ""; }; + 038936F2137D4A74004AD9DC /* bitset */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitset; sourceTree = ""; }; + 038936F3137D4A74004AD9DC /* cassert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cassert; sourceTree = ""; }; + 038936F4137D4A74004AD9DC /* cctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cctype; sourceTree = ""; }; + 038936F5137D4A74004AD9DC /* cerrno */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cerrno; sourceTree = ""; }; + 038936F6137D4A74004AD9DC /* cfloat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cfloat; sourceTree = ""; }; + 038936F7137D4A74004AD9DC /* char_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = char_traits; sourceTree = ""; }; + 038936F8137D4A74004AD9DC /* climits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = climits; sourceTree = ""; }; + 038936F9137D4A74004AD9DC /* clocale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = clocale; sourceTree = ""; }; + 038936FA137D4A74004AD9DC /* cmath */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cmath; sourceTree = ""; }; + 038936FB137D4A74004AD9DC /* complex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = complex; sourceTree = ""; }; + 038936FC137D4A74004AD9DC /* csetjmp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csetjmp; sourceTree = ""; }; + 038936FD137D4A74004AD9DC /* csignal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csignal; sourceTree = ""; }; + 038936FE137D4A74004AD9DC /* cstdarg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdarg; sourceTree = ""; }; + 038936FF137D4A74004AD9DC /* cstddef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstddef; sourceTree = ""; }; + 03893700137D4A74004AD9DC /* cstdio */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdio; sourceTree = ""; }; + 03893701137D4A74004AD9DC /* cstdlib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdlib; sourceTree = ""; }; + 03893702137D4A74004AD9DC /* cstring */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstring; sourceTree = ""; }; + 03893703137D4A74004AD9DC /* ctime */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ctime; sourceTree = ""; }; + 03893704137D4A74004AD9DC /* cwchar */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwchar; sourceTree = ""; }; + 03893705137D4A74004AD9DC /* cwctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwctype; sourceTree = ""; }; + 03893706137D4A74004AD9DC /* deque */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = deque; sourceTree = ""; }; + 03893707137D4A74004AD9DC /* edid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = edid.h; sourceTree = ""; }; + 03893708137D4A74004AD9DC /* exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = exception; sourceTree = ""; }; + 03893709137D4A74004AD9DC /* fstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fstream; sourceTree = ""; }; + 0389370A137D4A74004AD9DC /* func_exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = func_exception; sourceTree = ""; }; + 0389370B137D4A74004AD9DC /* functional */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = functional; sourceTree = ""; }; + 0389370C137D4A74004AD9DC /* iomanip */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iomanip; sourceTree = ""; }; + 0389370D137D4A74004AD9DC /* ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ios; sourceTree = ""; }; + 0389370E137D4A74004AD9DC /* iosfwd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iosfwd; sourceTree = ""; }; + 0389370F137D4A74004AD9DC /* iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iostream; sourceTree = ""; }; + 03893710137D4A74004AD9DC /* istream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream; sourceTree = ""; }; + 03893711137D4A74004AD9DC /* istream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream_helpers; sourceTree = ""; }; + 03893712137D4A74004AD9DC /* iterator */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator; sourceTree = ""; }; + 03893713137D4A74004AD9DC /* iterator_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator_base; sourceTree = ""; }; + 03893714137D4A75004AD9DC /* limits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = limits; sourceTree = ""; }; + 03893715137D4A75004AD9DC /* list */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = list; sourceTree = ""; }; + 03893716137D4A75004AD9DC /* locale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locale; sourceTree = ""; }; + 03893717137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03893718137D4A75004AD9DC /* map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map; sourceTree = ""; }; + 03893719137D4A75004AD9DC /* map.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map.old; sourceTree = ""; }; + 0389371A137D4A75004AD9DC /* memory */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = memory; sourceTree = ""; }; + 0389371B137D4A75004AD9DC /* new */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = new; sourceTree = ""; }; + 0389371C137D4A75004AD9DC /* numeric */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = numeric; sourceTree = ""; }; + 0389371D137D4A75004AD9DC /* ostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream; sourceTree = ""; }; + 0389371E137D4A75004AD9DC /* ostream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream_helpers; sourceTree = ""; }; + 0389371F137D4A75004AD9DC /* queue */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = queue; sourceTree = ""; }; + 03893720137D4A75004AD9DC /* set */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set; sourceTree = ""; }; + 03893721137D4A75004AD9DC /* set.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set.old; sourceTree = ""; }; + 03893722137D4A75004AD9DC /* sstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sstream; sourceTree = ""; }; + 03893723137D4A75004AD9DC /* stack */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stack; sourceTree = ""; }; + 03893724137D4A75004AD9DC /* stdexcept */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stdexcept; sourceTree = ""; }; + 03893725137D4A75004AD9DC /* streambuf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = streambuf; sourceTree = ""; }; + 03893726137D4A75004AD9DC /* string */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string; sourceTree = ""; }; + 03893727137D4A75004AD9DC /* string_iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string_iostream; sourceTree = ""; }; + 03893728137D4A75004AD9DC /* support */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = support; sourceTree = ""; }; + 03893729137D4A75004AD9DC /* system_configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = system_configuration.h; sourceTree = ""; }; + 0389372A137D4A75004AD9DC /* type_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = type_traits; sourceTree = ""; }; + 0389372B137D4A75004AD9DC /* typeinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = typeinfo; sourceTree = ""; }; + 0389372C137D4A75004AD9DC /* types */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = types; sourceTree = ""; }; + 0389372D137D4A75004AD9DC /* unwind-cxx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "unwind-cxx.h"; sourceTree = ""; }; + 0389372E137D4A75004AD9DC /* utility */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utility; sourceTree = ""; }; + 0389372F137D4A75004AD9DC /* valarray */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valarray; sourceTree = ""; }; + 03893730137D4A75004AD9DC /* vector */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vector; sourceTree = ""; }; + 03893731137D4A75004AD9DC /* Modules.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Modules.txt; sourceTree = ""; }; + 03893733137D4A75004AD9DC /* 915resolution.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = 915resolution.c; sourceTree = ""; }; + 03893734137D4A75004AD9DC /* 915resolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 915resolution.h; sourceTree = ""; }; + 03893735137D4A75004AD9DC /* edid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = edid.c; sourceTree = ""; }; + 03893737137D4A75004AD9DC /* edid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = edid.h; sourceTree = ""; }; + 03893738137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03893739137D4A75004AD9DC /* Resolution.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Resolution.c; sourceTree = ""; }; + 0389373A137D4A75004AD9DC /* shortatombios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shortatombios.h; sourceTree = ""; }; + 0389373D137D4A75004AD9DC /* abi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abi.cpp; sourceTree = ""; }; + 0389373E137D4A75004AD9DC /* algorithm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = algorithm.cpp; sourceTree = ""; }; + 0389373F137D4A75004AD9DC /* associative_base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = associative_base.cpp; sourceTree = ""; }; + 03893740137D4A75004AD9DC /* bitset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bitset.cpp; sourceTree = ""; }; + 03893741137D4A75004AD9DC /* char_traits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = char_traits.cpp; sourceTree = ""; }; + 03893742137D4A75004AD9DC /* complex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = complex.cpp; sourceTree = ""; }; + 03893743137D4A75004AD9DC /* del_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_op.cpp; sourceTree = ""; }; + 03893744137D4A75004AD9DC /* del_opnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_opnt.cpp; sourceTree = ""; }; + 03893745137D4A75004AD9DC /* del_opv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_opv.cpp; sourceTree = ""; }; + 03893746137D4A75004AD9DC /* del_opvnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = del_opvnt.cpp; sourceTree = ""; }; + 03893747137D4A75004AD9DC /* deque.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = deque.cpp; sourceTree = ""; }; + 03893748137D4A75004AD9DC /* eh_alloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eh_alloc.cpp; sourceTree = ""; }; + 03893749137D4A75004AD9DC /* eh_globals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = eh_globals.cpp; sourceTree = ""; }; + 0389374A137D4A75004AD9DC /* exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = exception.cpp; sourceTree = ""; }; + 0389374B137D4A75004AD9DC /* fstream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fstream.cpp; sourceTree = ""; }; + 0389374C137D4A75004AD9DC /* func_exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = func_exception.cpp; sourceTree = ""; }; + 0389374E137D4A75004AD9DC /* algorithm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = algorithm; sourceTree = ""; }; + 0389374F137D4A75004AD9DC /* associative_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = associative_base; sourceTree = ""; }; + 03893750137D4A75004AD9DC /* basic_definitions */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = basic_definitions; sourceTree = ""; }; + 03893751137D4A75004AD9DC /* bitset */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bitset; sourceTree = ""; }; + 03893752137D4A75004AD9DC /* cassert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cassert; sourceTree = ""; }; + 03893753137D4A75004AD9DC /* cctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cctype; sourceTree = ""; }; + 03893754137D4A75004AD9DC /* cerrno */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cerrno; sourceTree = ""; }; + 03893755137D4A75004AD9DC /* cfloat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cfloat; sourceTree = ""; }; + 03893756137D4A75004AD9DC /* char_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = char_traits; sourceTree = ""; }; + 03893757137D4A75004AD9DC /* climits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = climits; sourceTree = ""; }; + 03893758137D4A75004AD9DC /* clocale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = clocale; sourceTree = ""; }; + 03893759137D4A75004AD9DC /* cmath */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cmath; sourceTree = ""; }; + 0389375A137D4A75004AD9DC /* complex */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = complex; sourceTree = ""; }; + 0389375B137D4A75004AD9DC /* csetjmp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csetjmp; sourceTree = ""; }; + 0389375C137D4A75004AD9DC /* csignal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = csignal; sourceTree = ""; }; + 0389375D137D4A75004AD9DC /* cstdarg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdarg; sourceTree = ""; }; + 0389375E137D4A75004AD9DC /* cstddef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstddef; sourceTree = ""; }; + 0389375F137D4A75004AD9DC /* cstdio */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdio; sourceTree = ""; }; + 03893760137D4A75004AD9DC /* cstdlib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstdlib; sourceTree = ""; }; + 03893761137D4A75004AD9DC /* cstring */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cstring; sourceTree = ""; }; + 03893762137D4A75004AD9DC /* ctime */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ctime; sourceTree = ""; }; + 03893763137D4A75004AD9DC /* cwchar */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwchar; sourceTree = ""; }; + 03893764137D4A75004AD9DC /* cwctype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cwctype; sourceTree = ""; }; + 03893765137D4A75004AD9DC /* deque */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = deque; sourceTree = ""; }; + 03893766137D4A75004AD9DC /* exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = exception; sourceTree = ""; }; + 03893767137D4A75004AD9DC /* fstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fstream; sourceTree = ""; }; + 03893768137D4A75004AD9DC /* func_exception */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = func_exception; sourceTree = ""; }; + 03893769137D4A75004AD9DC /* functional */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = functional; sourceTree = ""; }; + 0389376A137D4A75004AD9DC /* iomanip */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iomanip; sourceTree = ""; }; + 0389376B137D4A75004AD9DC /* ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ios; sourceTree = ""; }; + 0389376C137D4A75004AD9DC /* iosfwd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iosfwd; sourceTree = ""; }; + 0389376D137D4A75004AD9DC /* iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iostream; sourceTree = ""; }; + 0389376E137D4A75004AD9DC /* istream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream; sourceTree = ""; }; + 0389376F137D4A75004AD9DC /* istream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = istream_helpers; sourceTree = ""; }; + 03893770137D4A75004AD9DC /* iterator */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator; sourceTree = ""; }; + 03893771137D4A75004AD9DC /* iterator_base */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = iterator_base; sourceTree = ""; }; + 03893772137D4A75004AD9DC /* limits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = limits; sourceTree = ""; }; + 03893773137D4A75004AD9DC /* list */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = list; sourceTree = ""; }; + 03893774137D4A75004AD9DC /* locale */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = locale; sourceTree = ""; }; + 03893775137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03893776137D4A75004AD9DC /* map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map; sourceTree = ""; }; + 03893777137D4A75004AD9DC /* map.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = map.old; sourceTree = ""; }; + 03893778137D4A75004AD9DC /* memory */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = memory; sourceTree = ""; }; + 03893779137D4A75004AD9DC /* new */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = new; sourceTree = ""; }; + 0389377A137D4A75004AD9DC /* numeric */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = numeric; sourceTree = ""; }; + 0389377B137D4A75004AD9DC /* ostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream; sourceTree = ""; }; + 0389377C137D4A75004AD9DC /* ostream_helpers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ostream_helpers; sourceTree = ""; }; + 0389377D137D4A75004AD9DC /* queue */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = queue; sourceTree = ""; }; + 0389377E137D4A75004AD9DC /* set */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set; sourceTree = ""; }; + 0389377F137D4A75004AD9DC /* set.old */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = set.old; sourceTree = ""; }; + 03893780137D4A75004AD9DC /* sstream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sstream; sourceTree = ""; }; + 03893781137D4A75004AD9DC /* stack */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stack; sourceTree = ""; }; + 03893782137D4A75004AD9DC /* stdexcept */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stdexcept; sourceTree = ""; }; + 03893783137D4A75004AD9DC /* streambuf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = streambuf; sourceTree = ""; }; + 03893784137D4A75004AD9DC /* string */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string; sourceTree = ""; }; + 03893785137D4A75004AD9DC /* string_iostream */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = string_iostream; sourceTree = ""; }; + 03893786137D4A75004AD9DC /* support */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = support; sourceTree = ""; }; + 03893787137D4A75004AD9DC /* system_configuration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = system_configuration.h; sourceTree = ""; }; + 03893788137D4A75004AD9DC /* type_traits */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = type_traits; sourceTree = ""; }; + 03893789137D4A75004AD9DC /* typeinfo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = typeinfo; sourceTree = ""; }; + 0389378A137D4A75004AD9DC /* types */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = types; sourceTree = ""; }; + 0389378B137D4A75004AD9DC /* unwind-cxx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "unwind-cxx.h"; sourceTree = ""; }; + 0389378C137D4A75004AD9DC /* utility */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utility; sourceTree = ""; }; + 0389378D137D4A75004AD9DC /* valarray */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valarray; sourceTree = ""; }; + 0389378E137D4A75004AD9DC /* vector */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vector; sourceTree = ""; }; + 0389378F137D4A75004AD9DC /* iomanip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iomanip.cpp; sourceTree = ""; }; + 03893790137D4A75004AD9DC /* ios.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ios.cpp; sourceTree = ""; }; + 03893791137D4A75004AD9DC /* iostream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iostream.cpp; sourceTree = ""; }; + 03893792137D4A75004AD9DC /* istream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = istream.cpp; sourceTree = ""; }; + 03893793137D4A75004AD9DC /* iterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iterator.cpp; sourceTree = ""; }; + 03893794137D4A75004AD9DC /* limits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = limits.cpp; sourceTree = ""; }; + 03893795137D4A75004AD9DC /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = list.cpp; sourceTree = ""; }; + 03893796137D4A75004AD9DC /* locale.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locale.cpp; sourceTree = ""; }; + 03893797137D4A75004AD9DC /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03893798137D4A75004AD9DC /* map.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = map.cpp; sourceTree = ""; }; + 03893799137D4A75004AD9DC /* new_handler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_handler.cpp; sourceTree = ""; }; + 0389379A137D4A75004AD9DC /* new_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_op.cpp; sourceTree = ""; }; + 0389379B137D4A75004AD9DC /* new_opnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_opnt.cpp; sourceTree = ""; }; + 0389379C137D4A75004AD9DC /* new_opv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_opv.cpp; sourceTree = ""; }; + 0389379D137D4A75004AD9DC /* new_opvnt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = new_opvnt.cpp; sourceTree = ""; }; + 0389379E137D4A75004AD9DC /* numeric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = numeric.cpp; sourceTree = ""; }; + 0389379F137D4A75004AD9DC /* ostream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ostream.cpp; sourceTree = ""; }; + 038937A0137D4A75004AD9DC /* queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = queue.cpp; sourceTree = ""; }; + 038937A1137D4A75004AD9DC /* set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = set.cpp; sourceTree = ""; }; + 038937A2137D4A75004AD9DC /* sstream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sstream.cpp; sourceTree = ""; }; + 038937A3137D4A75004AD9DC /* stack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stack.cpp; sourceTree = ""; }; + 038937A4137D4A75004AD9DC /* stdexcept.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stdexcept.cpp; sourceTree = ""; }; + 038937A5137D4A75004AD9DC /* streambuf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = streambuf.cpp; sourceTree = ""; }; + 038937A6137D4A75004AD9DC /* string.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string.cpp; sourceTree = ""; }; + 038937A7137D4A75004AD9DC /* support.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = support.cpp; sourceTree = ""; }; + 038937A8137D4A75004AD9DC /* typeinfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = typeinfo.cpp; sourceTree = ""; }; + 038937A9137D4A75004AD9DC /* uClibc++.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "uClibc++.c"; sourceTree = ""; }; + 038937AA137D4A75004AD9DC /* utility.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utility.cpp; sourceTree = ""; }; + 038937AB137D4A75004AD9DC /* valarray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = valarray.cpp; sourceTree = ""; }; + 038937AC137D4A75004AD9DC /* vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vector.cpp; sourceTree = ""; }; + 03DA89351389338300B43B35 /* AMDGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = AMDGraphicsEnabler.c; sourceTree = ""; }; + 03DA89361389338300B43B35 /* ati.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ati.c; sourceTree = ""; }; + 03DA89371389338300B43B35 /* ati_reg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ati_reg.h; sourceTree = ""; }; + 03DA89381389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03DA89391389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = ""; }; + 03DA893B1389338300B43B35 /* ati.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ati.c; sourceTree = ""; }; + 03DA893C1389338300B43B35 /* ati.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ati.h; sourceTree = ""; }; + 03DA893D1389338300B43B35 /* ATiGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ATiGraphicsEnabler.c; sourceTree = ""; }; + 03DA893E1389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03DA89401389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = ""; }; + 03DA89421389338300B43B35 /* gma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gma.c; sourceTree = ""; }; + 03DA89431389338300B43B35 /* gma.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gma.h; sourceTree = ""; }; + 03DA89441389338300B43B35 /* IntelGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IntelGraphicsEnabler.c; sourceTree = ""; }; + 03DA89451389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03DA89461389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = ""; }; + 03DA89481389338300B43B35 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + 03DA89491389338300B43B35 /* nvidia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nvidia.c; sourceTree = ""; }; + 03DA894A1389338300B43B35 /* nvidia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nvidia.h; sourceTree = ""; }; + 03DA894B1389338300B43B35 /* NVIDIAGraphicsEnabler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = NVIDIAGraphicsEnabler.c; sourceTree = ""; }; + 03DA894C1389338300B43B35 /* Readme.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.txt; sourceTree = ""; }; 1D145307137073F40050C0CD /* bootargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootargs.h; sourceTree = ""; }; 1D2A1AF513743A2600787720 /* bootargs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bootargs.h; sourceTree = ""; }; 65ED53931204B83200B22507 /* disk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = disk.h; sourceTree = ""; }; @@ -290,6 +572,399 @@ /* End PBXFileReference section */ /* Begin PBXGroup section */ + 0389368B137D4A74004AD9DC /* modules */ = { + isa = PBXGroup; + children = ( + 03DA89341389338300B43B35 /* AMDGraphicsEnabler */, + 03DA893A1389338300B43B35 /* ATiGraphicsEnabler */, + 03DA89411389338300B43B35 /* IntelGraphicsEnabler */, + 03DA89471389338300B43B35 /* NVIDIAGraphicsEnabler */, + 0389369D137D4A74004AD9DC /* HelloWorld */, + 038936A1137D4A74004AD9DC /* include */, + 038936A4137D4A74004AD9DC /* klibc */, + 038936EC137D4A74004AD9DC /* Makefile */, + 038936ED137D4A74004AD9DC /* MakeInc.dir */, + 038936EE137D4A74004AD9DC /* module_includes */, + 03893731137D4A75004AD9DC /* Modules.txt */, + 03893732137D4A75004AD9DC /* Resolution */, + 0389373C137D4A75004AD9DC /* uClibc++ */, + ); + path = modules; + sourceTree = ""; + }; + 0389369D137D4A74004AD9DC /* HelloWorld */ = { + isa = PBXGroup; + children = ( + 0389369E137D4A74004AD9DC /* HelloWorld.cpp */, + 0389369F137D4A74004AD9DC /* include */, + 038936A0137D4A74004AD9DC /* Makefile */, + ); + path = HelloWorld; + sourceTree = ""; + }; + 0389369F137D4A74004AD9DC /* include */ = { + isa = PBXGroup; + children = ( + ); + path = include; + sourceTree = ""; + }; + 038936A1137D4A74004AD9DC /* include */ = { + isa = PBXGroup; + children = ( + 038936A2137D4A74004AD9DC /* modules */, + 038936A3137D4A74004AD9DC /* types.h */, + ); + path = include; + sourceTree = ""; + }; + 038936A4137D4A74004AD9DC /* klibc */ = { + isa = PBXGroup; + children = ( + 038936A5137D4A74004AD9DC /* __ashldi3.c */, + 038936A6137D4A74004AD9DC /* __ashrdi3.c */, + 038936A7137D4A74004AD9DC /* __clzsi2.c */, + 038936A8137D4A74004AD9DC /* __divdi3.c */, + 038936A9137D4A74004AD9DC /* __divsi3.c */, + 038936AA137D4A74004AD9DC /* __lshrdi3.c */, + 038936AB137D4A74004AD9DC /* __moddi3.c */, + 038936AC137D4A74004AD9DC /* __modsi3.c */, + 038936AD137D4A74004AD9DC /* __udivdi3.c */, + 038936AE137D4A74004AD9DC /* __udivmoddi4.c */, + 038936AF137D4A74004AD9DC /* __udivmodsi4.c */, + 038936B0137D4A74004AD9DC /* __udivsi3.c */, + 038936B1137D4A74004AD9DC /* __umoddi3.c */, + 038936B2137D4A74004AD9DC /* __umodsi3.c */, + 038936B3137D4A74004AD9DC /* atexit.c */, + 038936B4137D4A74004AD9DC /* atexit.h */, + 038936B5137D4A74004AD9DC /* atoi.c */, + 038936B6137D4A74004AD9DC /* atol.c */, + 038936B7137D4A74004AD9DC /* atoll.c */, + 038936B8137D4A74004AD9DC /* atox.c */, + 038936B9137D4A74004AD9DC /* bsearch.c */, + 038936BA137D4A74004AD9DC /* calloc.c */, + 038936BB137D4A74004AD9DC /* exit.c */, + 038936BC137D4A74004AD9DC /* jrand48.c */, + 038936BD137D4A74004AD9DC /* klibc.c */, + 038936BE137D4A74004AD9DC /* LICENSE */, + 038936BF137D4A74004AD9DC /* limits.h */, + 038936C0137D4A74004AD9DC /* lrand48.c */, + 038936C1137D4A74004AD9DC /* Makefile */, + 038936C2137D4A74004AD9DC /* memccpy.c */, + 038936C3137D4A74004AD9DC /* memchr.c */, + 038936C4137D4A74004AD9DC /* memmem.c */, + 038936C5137D4A74004AD9DC /* memmove.c */, + 038936C6137D4A74004AD9DC /* memrchr.c */, + 038936C7137D4A74004AD9DC /* memswap.c */, + 038936C8137D4A74004AD9DC /* mrand48.c */, + 038936C9137D4A74004AD9DC /* nrand48.c */, + 038936CA137D4A74004AD9DC /* onexit.c */, + 038936CB137D4A74004AD9DC /* qsort.c */, + 038936CC137D4A74004AD9DC /* seed48.c */, + 038936CD137D4A74004AD9DC /* sha1hash.c */, + 038936CE137D4A74004AD9DC /* snprintf.c */, + 038936CF137D4A74004AD9DC /* srand48.c */, + 038936D0137D4A74004AD9DC /* sscanf.c */, + 038936D1137D4A74004AD9DC /* strcasecmp.c */, + 038936D2137D4A74004AD9DC /* strdup.c */, + 038936D3137D4A74004AD9DC /* strlcat.c */, + 038936D4137D4A74004AD9DC /* strncasecmp.c */, + 038936D5137D4A74004AD9DC /* strndup.c */, + 038936D6137D4A74004AD9DC /* strnlen.c */, + 038936D7137D4A74004AD9DC /* strntoimax.c */, + 038936D8137D4A74004AD9DC /* strntoumax.c */, + 038936D9137D4A74004AD9DC /* strpbrk.c */, + 038936DA137D4A74004AD9DC /* strsep.c */, + 038936DB137D4A74004AD9DC /* strtoimax.c */, + 038936DC137D4A74004AD9DC /* strtok.c */, + 038936DD137D4A74004AD9DC /* strtok_r.c */, + 038936DE137D4A74004AD9DC /* strtol.c */, + 038936DF137D4A74004AD9DC /* strtoll.c */, + 038936E0137D4A74004AD9DC /* strtotimespec.c */, + 038936E1137D4A74004AD9DC /* strtotimeval.c */, + 038936E2137D4A74004AD9DC /* strtotimex.c */, + 038936E3137D4A74004AD9DC /* strtoul.c */, + 038936E4137D4A74004AD9DC /* strtoull.c */, + 038936E5137D4A74004AD9DC /* strtoumax.c */, + 038936E6137D4A74004AD9DC /* strtox.c */, + 038936E7137D4A74004AD9DC /* strxspn.c */, + 038936E8137D4A74004AD9DC /* strxspn.h */, + 038936E9137D4A74004AD9DC /* version */, + 038936EA137D4A74004AD9DC /* vsnprintf.c */, + 038936EB137D4A74004AD9DC /* vsscanf.c */, + ); + path = klibc; + sourceTree = ""; + }; + 038936EE137D4A74004AD9DC /* module_includes */ = { + isa = PBXGroup; + children = ( + 038936EF137D4A74004AD9DC /* algorithm */, + 038936F0137D4A74004AD9DC /* associative_base */, + 038936F1137D4A74004AD9DC /* basic_definitions */, + 038936F2137D4A74004AD9DC /* bitset */, + 038936F3137D4A74004AD9DC /* cassert */, + 038936F4137D4A74004AD9DC /* cctype */, + 038936F5137D4A74004AD9DC /* cerrno */, + 038936F6137D4A74004AD9DC /* cfloat */, + 038936F7137D4A74004AD9DC /* char_traits */, + 038936F8137D4A74004AD9DC /* climits */, + 038936F9137D4A74004AD9DC /* clocale */, + 038936FA137D4A74004AD9DC /* cmath */, + 038936FB137D4A74004AD9DC /* complex */, + 038936FC137D4A74004AD9DC /* csetjmp */, + 038936FD137D4A74004AD9DC /* csignal */, + 038936FE137D4A74004AD9DC /* cstdarg */, + 038936FF137D4A74004AD9DC /* cstddef */, + 03893700137D4A74004AD9DC /* cstdio */, + 03893701137D4A74004AD9DC /* cstdlib */, + 03893702137D4A74004AD9DC /* cstring */, + 03893703137D4A74004AD9DC /* ctime */, + 03893704137D4A74004AD9DC /* cwchar */, + 03893705137D4A74004AD9DC /* cwctype */, + 03893706137D4A74004AD9DC /* deque */, + 03893707137D4A74004AD9DC /* edid.h */, + 03893708137D4A74004AD9DC /* exception */, + 03893709137D4A74004AD9DC /* fstream */, + 0389370A137D4A74004AD9DC /* func_exception */, + 0389370B137D4A74004AD9DC /* functional */, + 0389370C137D4A74004AD9DC /* iomanip */, + 0389370D137D4A74004AD9DC /* ios */, + 0389370E137D4A74004AD9DC /* iosfwd */, + 0389370F137D4A74004AD9DC /* iostream */, + 03893710137D4A74004AD9DC /* istream */, + 03893711137D4A74004AD9DC /* istream_helpers */, + 03893712137D4A74004AD9DC /* iterator */, + 03893713137D4A74004AD9DC /* iterator_base */, + 03893714137D4A75004AD9DC /* limits */, + 03893715137D4A75004AD9DC /* list */, + 03893716137D4A75004AD9DC /* locale */, + 03893717137D4A75004AD9DC /* Makefile */, + 03893718137D4A75004AD9DC /* map */, + 03893719137D4A75004AD9DC /* map.old */, + 0389371A137D4A75004AD9DC /* memory */, + 0389371B137D4A75004AD9DC /* new */, + 0389371C137D4A75004AD9DC /* numeric */, + 0389371D137D4A75004AD9DC /* ostream */, + 0389371E137D4A75004AD9DC /* ostream_helpers */, + 0389371F137D4A75004AD9DC /* queue */, + 03893720137D4A75004AD9DC /* set */, + 03893721137D4A75004AD9DC /* set.old */, + 03893722137D4A75004AD9DC /* sstream */, + 03893723137D4A75004AD9DC /* stack */, + 03893724137D4A75004AD9DC /* stdexcept */, + 03893725137D4A75004AD9DC /* streambuf */, + 03893726137D4A75004AD9DC /* string */, + 03893727137D4A75004AD9DC /* string_iostream */, + 03893728137D4A75004AD9DC /* support */, + 03893729137D4A75004AD9DC /* system_configuration.h */, + 0389372A137D4A75004AD9DC /* type_traits */, + 0389372B137D4A75004AD9DC /* typeinfo */, + 0389372C137D4A75004AD9DC /* types */, + 0389372D137D4A75004AD9DC /* unwind-cxx.h */, + 0389372E137D4A75004AD9DC /* utility */, + 0389372F137D4A75004AD9DC /* valarray */, + 03893730137D4A75004AD9DC /* vector */, + ); + path = module_includes; + sourceTree = ""; + }; + 03893732137D4A75004AD9DC /* Resolution */ = { + isa = PBXGroup; + children = ( + 03893733137D4A75004AD9DC /* 915resolution.c */, + 03893734137D4A75004AD9DC /* 915resolution.h */, + 03893735137D4A75004AD9DC /* edid.c */, + 03893736137D4A75004AD9DC /* include */, + 03893738137D4A75004AD9DC /* Makefile */, + 03893739137D4A75004AD9DC /* Resolution.c */, + 0389373A137D4A75004AD9DC /* shortatombios.h */, + ); + path = Resolution; + sourceTree = ""; + }; + 03893736137D4A75004AD9DC /* include */ = { + isa = PBXGroup; + children = ( + 03893737137D4A75004AD9DC /* edid.h */, + ); + path = include; + sourceTree = ""; + }; + 0389373C137D4A75004AD9DC /* uClibc++ */ = { + isa = PBXGroup; + children = ( + 0389373D137D4A75004AD9DC /* abi.cpp */, + 0389373E137D4A75004AD9DC /* algorithm.cpp */, + 0389373F137D4A75004AD9DC /* associative_base.cpp */, + 03893740137D4A75004AD9DC /* bitset.cpp */, + 03893741137D4A75004AD9DC /* char_traits.cpp */, + 03893742137D4A75004AD9DC /* complex.cpp */, + 03893743137D4A75004AD9DC /* del_op.cpp */, + 03893744137D4A75004AD9DC /* del_opnt.cpp */, + 03893745137D4A75004AD9DC /* del_opv.cpp */, + 03893746137D4A75004AD9DC /* del_opvnt.cpp */, + 03893747137D4A75004AD9DC /* deque.cpp */, + 03893748137D4A75004AD9DC /* eh_alloc.cpp */, + 03893749137D4A75004AD9DC /* eh_globals.cpp */, + 0389374A137D4A75004AD9DC /* exception.cpp */, + 0389374B137D4A75004AD9DC /* fstream.cpp */, + 0389374C137D4A75004AD9DC /* func_exception.cpp */, + 0389374D137D4A75004AD9DC /* include */, + 0389378F137D4A75004AD9DC /* iomanip.cpp */, + 03893790137D4A75004AD9DC /* ios.cpp */, + 03893791137D4A75004AD9DC /* iostream.cpp */, + 03893792137D4A75004AD9DC /* istream.cpp */, + 03893793137D4A75004AD9DC /* iterator.cpp */, + 03893794137D4A75004AD9DC /* limits.cpp */, + 03893795137D4A75004AD9DC /* list.cpp */, + 03893796137D4A75004AD9DC /* locale.cpp */, + 03893797137D4A75004AD9DC /* Makefile */, + 03893798137D4A75004AD9DC /* map.cpp */, + 03893799137D4A75004AD9DC /* new_handler.cpp */, + 0389379A137D4A75004AD9DC /* new_op.cpp */, + 0389379B137D4A75004AD9DC /* new_opnt.cpp */, + 0389379C137D4A75004AD9DC /* new_opv.cpp */, + 0389379D137D4A75004AD9DC /* new_opvnt.cpp */, + 0389379E137D4A75004AD9DC /* numeric.cpp */, + 0389379F137D4A75004AD9DC /* ostream.cpp */, + 038937A0137D4A75004AD9DC /* queue.cpp */, + 038937A1137D4A75004AD9DC /* set.cpp */, + 038937A2137D4A75004AD9DC /* sstream.cpp */, + 038937A3137D4A75004AD9DC /* stack.cpp */, + 038937A4137D4A75004AD9DC /* stdexcept.cpp */, + 038937A5137D4A75004AD9DC /* streambuf.cpp */, + 038937A6137D4A75004AD9DC /* string.cpp */, + 038937A7137D4A75004AD9DC /* support.cpp */, + 038937A8137D4A75004AD9DC /* typeinfo.cpp */, + 038937A9137D4A75004AD9DC /* uClibc++.c */, + 038937AA137D4A75004AD9DC /* utility.cpp */, + 038937AB137D4A75004AD9DC /* valarray.cpp */, + 038937AC137D4A75004AD9DC /* vector.cpp */, + ); + path = "uClibc++"; + sourceTree = ""; + }; + 0389374D137D4A75004AD9DC /* include */ = { + isa = PBXGroup; + children = ( + 0389374E137D4A75004AD9DC /* algorithm */, + 0389374F137D4A75004AD9DC /* associative_base */, + 03893750137D4A75004AD9DC /* basic_definitions */, + 03893751137D4A75004AD9DC /* bitset */, + 03893752137D4A75004AD9DC /* cassert */, + 03893753137D4A75004AD9DC /* cctype */, + 03893754137D4A75004AD9DC /* cerrno */, + 03893755137D4A75004AD9DC /* cfloat */, + 03893756137D4A75004AD9DC /* char_traits */, + 03893757137D4A75004AD9DC /* climits */, + 03893758137D4A75004AD9DC /* clocale */, + 03893759137D4A75004AD9DC /* cmath */, + 0389375A137D4A75004AD9DC /* complex */, + 0389375B137D4A75004AD9DC /* csetjmp */, + 0389375C137D4A75004AD9DC /* csignal */, + 0389375D137D4A75004AD9DC /* cstdarg */, + 0389375E137D4A75004AD9DC /* cstddef */, + 0389375F137D4A75004AD9DC /* cstdio */, + 03893760137D4A75004AD9DC /* cstdlib */, + 03893761137D4A75004AD9DC /* cstring */, + 03893762137D4A75004AD9DC /* ctime */, + 03893763137D4A75004AD9DC /* cwchar */, + 03893764137D4A75004AD9DC /* cwctype */, + 03893765137D4A75004AD9DC /* deque */, + 03893766137D4A75004AD9DC /* exception */, + 03893767137D4A75004AD9DC /* fstream */, + 03893768137D4A75004AD9DC /* func_exception */, + 03893769137D4A75004AD9DC /* functional */, + 0389376A137D4A75004AD9DC /* iomanip */, + 0389376B137D4A75004AD9DC /* ios */, + 0389376C137D4A75004AD9DC /* iosfwd */, + 0389376D137D4A75004AD9DC /* iostream */, + 0389376E137D4A75004AD9DC /* istream */, + 0389376F137D4A75004AD9DC /* istream_helpers */, + 03893770137D4A75004AD9DC /* iterator */, + 03893771137D4A75004AD9DC /* iterator_base */, + 03893772137D4A75004AD9DC /* limits */, + 03893773137D4A75004AD9DC /* list */, + 03893774137D4A75004AD9DC /* locale */, + 03893775137D4A75004AD9DC /* Makefile */, + 03893776137D4A75004AD9DC /* map */, + 03893777137D4A75004AD9DC /* map.old */, + 03893778137D4A75004AD9DC /* memory */, + 03893779137D4A75004AD9DC /* new */, + 0389377A137D4A75004AD9DC /* numeric */, + 0389377B137D4A75004AD9DC /* ostream */, + 0389377C137D4A75004AD9DC /* ostream_helpers */, + 0389377D137D4A75004AD9DC /* queue */, + 0389377E137D4A75004AD9DC /* set */, + 0389377F137D4A75004AD9DC /* set.old */, + 03893780137D4A75004AD9DC /* sstream */, + 03893781137D4A75004AD9DC /* stack */, + 03893782137D4A75004AD9DC /* stdexcept */, + 03893783137D4A75004AD9DC /* streambuf */, + 03893784137D4A75004AD9DC /* string */, + 03893785137D4A75004AD9DC /* string_iostream */, + 03893786137D4A75004AD9DC /* support */, + 03893787137D4A75004AD9DC /* system_configuration.h */, + 03893788137D4A75004AD9DC /* type_traits */, + 03893789137D4A75004AD9DC /* typeinfo */, + 0389378A137D4A75004AD9DC /* types */, + 0389378B137D4A75004AD9DC /* unwind-cxx.h */, + 0389378C137D4A75004AD9DC /* utility */, + 0389378D137D4A75004AD9DC /* valarray */, + 0389378E137D4A75004AD9DC /* vector */, + ); + path = include; + sourceTree = ""; + }; + 03DA89341389338300B43B35 /* AMDGraphicsEnabler */ = { + isa = PBXGroup; + children = ( + 03DA89351389338300B43B35 /* AMDGraphicsEnabler.c */, + 03DA89361389338300B43B35 /* ati.c */, + 03DA89371389338300B43B35 /* ati_reg.h */, + 03DA89381389338300B43B35 /* Makefile */, + 03DA89391389338300B43B35 /* Readme.txt */, + ); + path = AMDGraphicsEnabler; + sourceTree = ""; + }; + 03DA893A1389338300B43B35 /* ATiGraphicsEnabler */ = { + isa = PBXGroup; + children = ( + 03DA893B1389338300B43B35 /* ati.c */, + 03DA893C1389338300B43B35 /* ati.h */, + 03DA893D1389338300B43B35 /* ATiGraphicsEnabler.c */, + 03DA893E1389338300B43B35 /* Makefile */, + 03DA89401389338300B43B35 /* Readme.txt */, + ); + path = ATiGraphicsEnabler; + sourceTree = ""; + }; + 03DA89411389338300B43B35 /* IntelGraphicsEnabler */ = { + isa = PBXGroup; + children = ( + 03DA89421389338300B43B35 /* gma.c */, + 03DA89431389338300B43B35 /* gma.h */, + 03DA89441389338300B43B35 /* IntelGraphicsEnabler.c */, + 03DA89451389338300B43B35 /* Makefile */, + 03DA89461389338300B43B35 /* Readme.txt */, + ); + path = IntelGraphicsEnabler; + sourceTree = ""; + }; + 03DA89471389338300B43B35 /* NVIDIAGraphicsEnabler */ = { + isa = PBXGroup; + children = ( + 03DA89481389338300B43B35 /* Makefile */, + 03DA89491389338300B43B35 /* nvidia.c */, + 03DA894A1389338300B43B35 /* nvidia.h */, + 03DA894B1389338300B43B35 /* NVIDIAGraphicsEnabler.c */, + 03DA894C1389338300B43B35 /* Readme.txt */, + ); + path = NVIDIAGraphicsEnabler; + sourceTree = ""; + }; 08FB7794FE84155DC02AAC07 /* Chameleon */ = { isa = PBXGroup; children = ( @@ -313,6 +988,7 @@ B0056CE511F3868000754B65 /* i386 */ = { isa = PBXGroup; children = ( + 0389368B137D4A74004AD9DC /* modules */, B0056CE611F3868000754B65 /* boot0 */, B0056CEA11F3868000754B65 /* boot1 */, B0056CF211F3868000754B65 /* boot2 */, Index: branches/iFabio/Chameleon/i386/libsaio/xml.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/xml.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/xml.c (revision 298) @@ -67,8 +67,7 @@ return ""; } - -struct Module { +struct Module { struct Module *nextModule; long willLoad; TagPtr dict; @@ -151,7 +150,6 @@ return 0; } - // XMLGetTag(int index) // XMLTagCount( TagPtr dict ) @@ -305,41 +303,41 @@ { long length, pos; char * tagName; - - length = GetNextTag(buffer, &tagName, 0); - if (length == -1) return -1; - + + length = GetNextTag(buffer, &tagName, 0); + if (length == -1) return -1; + pos = length; - if (!strncmp(tagName, kXMLTagPList, 6)) - { - length = 0; - } + if (!strncmp(tagName, kXMLTagPList, 6)) + { + length = 0; + } /***** dict ****/ - else if (!strcmp(tagName, kXMLTagDict)) - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); - } - else if (!strncmp(tagName, kXMLTagDict, strlen(kXMLTagDict)) && tagName[strlen(tagName)-1] == '/') - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1); - } - else if (!strncmp(tagName, kXMLTagDict " ", strlen(kXMLTagDict " "))) - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); - } + else if (!strcmp(tagName, kXMLTagDict)) + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); + } + else if (!strncmp(tagName, kXMLTagDict, strlen(kXMLTagDict)) && tagName[strlen(tagName)-1] == '/') + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1); + } + else if (!strncmp(tagName, kXMLTagDict " ", strlen(kXMLTagDict " "))) + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); + } /***** key ****/ - else if (!strcmp(tagName, kXMLTagKey)) - { - length = ParseTagKey(buffer + pos, tag); - } - + else if (!strcmp(tagName, kXMLTagKey)) + { + length = ParseTagKey(buffer + pos, tag); + } + /***** string ****/ - else if (!strcmp(tagName, kXMLTagString)) - { - length = ParseTagString(buffer + pos, tag); - } - else if (!strncmp(tagName, kXMLTagString " ", strlen(kXMLTagString " "))) - { + else if (!strcmp(tagName, kXMLTagString)) + { + length = ParseTagString(buffer + pos, tag); + } + else if (!strncmp(tagName, kXMLTagString " ", strlen(kXMLTagString " "))) + { // TODO: save tag if if found if(!strncmp(tagName + strlen(kXMLTagString " "), kXMLStringID, strlen(kXMLStringID))) { @@ -360,9 +358,7 @@ printf("ParseStringID error (0x%x)\n", *val); getc(); return -1; - } - } length = ParseTagString(buffer + pos, tag); @@ -377,7 +373,7 @@ tagName[cnt] = 0; char* val = tagName + strlen(kXMLTagString " " kXMLStringIDRef "\""); while(*val) - { + { if ((*val >= '0' && *val <= '9')) // 0 - 9 { id = (id * 10) + (*val++ - '0'); @@ -387,9 +383,7 @@ printf("ParseStringIDREF error (0x%x)\n", *val); getc(); return -1; - } - } char* str = GetRefString(id); @@ -404,16 +398,15 @@ length = 0; //printf("Located IDREF, id = %d, string = %s\n", id, str); } - - } + } /***** integer ****/ - else if (!strcmp(tagName, kXMLTagInteger)) - { - length = ParseTagInteger(buffer + pos, tag); - } - else if (!strncmp(tagName, kXMLTagInteger " ", strlen(kXMLTagInteger " "))) - { + else if (!strcmp(tagName, kXMLTagInteger)) + { + length = ParseTagInteger(buffer + pos, tag); + } + else if (!strncmp(tagName, kXMLTagInteger " ", strlen(kXMLTagInteger " "))) + { if(!strncmp(tagName + strlen(kXMLTagInteger " "), kXMLStringID, strlen(kXMLStringID))) { // ID= @@ -433,9 +426,7 @@ printf("ParseIntegerID error (0x%x)\n", *val); getc(); return -1; - } - } length = ParseTagInteger(buffer + pos, tag); @@ -450,7 +441,7 @@ tagName[cnt] = 0; char* val = tagName + strlen(kXMLTagInteger " " kXMLStringIDRef "\""); while(*val) - { + { if ((*val >= '0' && *val <= '9')) // 0 - 9 { id = (id * 10) + (*val++ - '0'); @@ -460,9 +451,7 @@ printf("ParseStringIDREF error (0x%x)\n", *val); getc(); return -1; - } - } int integer = (int)GetRefString(id); @@ -477,68 +466,68 @@ length = 0; //printf("Located IDREF, id = %d, string = %s\n", id, str); - } - else + } + else { length = ParseTagInteger(buffer + pos, tag); } } /***** data ****/ - else if (!strcmp(tagName, kXMLTagData)) - { - length = ParseTagData(buffer + pos, tag); - } + else if (!strcmp(tagName, kXMLTagData)) + { + length = ParseTagData(buffer + pos, tag); + } else if (!strncmp(tagName, kXMLTagData " ", strlen(kXMLTagData " "))) - { - length = ParseTagData(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagDate)) - { - length = ParseTagDate(buffer + pos, tag); - } - + { + length = ParseTagData(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagDate)) + { + length = ParseTagDate(buffer + pos, tag); + } + /***** date ****/ else if (!strncmp(tagName, kXMLTagDate " ", strlen(kXMLTagDate " "))) - { - length = ParseTagDate(buffer + pos, tag); - } - + { + length = ParseTagDate(buffer + pos, tag); + } + /***** false ****/ - else if (!strcmp(tagName, kXMLTagFalse)) - { - length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse); - } + else if (!strcmp(tagName, kXMLTagFalse)) + { + length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse); + } /***** true ****/ - else if (!strcmp(tagName, kXMLTagTrue)) - { - length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue); - } - + else if (!strcmp(tagName, kXMLTagTrue)) + { + length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue); + } + /***** array ****/ - else if (!strcmp(tagName, kXMLTagArray)) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); - } + else if (!strcmp(tagName, kXMLTagArray)) + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); + } else if (!strncmp(tagName, kXMLTagArray " ", strlen(kXMLTagArray " "))) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); - } - else if (!strcmp(tagName, kXMLTagArray "/")) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1); - } - + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); + } + else if (!strcmp(tagName, kXMLTagArray "/")) + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1); + } + /***** unknown ****/ - else - { - *tag = 0; - length = 0; - } - - if (length == -1) return -1; - - return pos + length; + else + { + *tag = 0; + length = 0; + } + + if (length == -1) return -1; + + return pos + length; } //========================================================================== @@ -678,7 +667,7 @@ char* val = buffer; int size; - if(buffer[0] == '<') + if(buffer[0] == '<') { printf("Warning integer is non existant\n"); getc(); @@ -724,9 +713,7 @@ printf("ParseTagInteger hex error (0x%x) in buffer %s\n", *val, buffer); getc(); return -1; - } - } } else if ( size ) // Decimal value @@ -1034,7 +1021,7 @@ #if DOFREE static void FreeSymbol( char * string ) -{ +{ SymbolPtr symbol, prev; prev = 0; @@ -1124,7 +1111,6 @@ } } - bool XMLCastBoolean(TagPtr dict) { if(!dict) return false; Index: branches/iFabio/Chameleon/i386/libsaio/console.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/console.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/console.c (revision 298) @@ -52,14 +52,14 @@ bool gVerboseMode; bool gErrors; -/* Kabyl: BooterLog */ -//Azi: Doubled log available size. -// 64kb are not enough to hold the full log while booting with -f argument (ignore caches). -// It also seems to fix some reported problems while booting with the mentioned argument. -// Note: 96kb are enough to hold full log, booting with -f; even so, this depends on how much -// we "play" at the boot prompt, with what patches we're playing and how much they print to the log, -// kexts loaded, etc... -// Please remove this comment when this gets checked by a "true" dev. +/** Kabyl: BooterLog + +Azi: Doubled available log size; this seems to fix some hangs and instant reboots caused by +booting with -f (ignore caches). 96kb are enough to hold full log, booting with -f; even so, +this depends on how much we "play" at the boot prompt and with what patches we're playing, +depending on how much they print to the log. +**/ //Azi: closing **/ alows colapse/expand... is this desirable?? colapsing an entire page + // will also colapse comments.... #define BOOTER_LOG_SIZE (128 * 1024) #define SAFE_LOG_SIZE 134 @@ -71,15 +71,17 @@ char * last_str; }; -static void sputc(int c, struct putc_info * pi) +static int +sputc(int c, struct putc_info * pi) //Azi: exists on printf.c & gui.c { - if (pi->last_str) + if (pi->last_str) if (pi->str == pi->last_str) { *(pi->str) = '\0'; - return; + return 0; } - *(pi->str)++ = c; + *(pi->str)++ = c; + return c; } void initBooterLog(void) @@ -122,20 +124,22 @@ /* * write one character to console */ -void putchar(int c) +int putchar(int c) { if ( c == '\t' ) { - for (c = 0; c < 8; c++) putc(' '); - return; + for (c = 0; c < 8; c++) bios_putchar(' '); + return c; } if ( c == '\n' ) { - putc('\r'); + bios_putchar('\r'); } - putc(c); + bios_putchar(c); + + return c; } int getc() @@ -172,7 +176,7 @@ vprf(fmt, ap); { - /* Kabyl: BooterLog */ + // Kabyl: BooterLog struct putc_info pi; if (!msgbuf) @@ -204,7 +208,7 @@ } { - /* Kabyl: BooterLog */ + // Kabyl: BooterLog struct putc_info pi; if (!msgbuf) Index: branches/iFabio/Chameleon/i386/libsaio/bootstruct.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/bootstruct.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/bootstruct.c (revision 298) @@ -43,64 +43,64 @@ void initKernBootStruct( void ) { - Node *node; - int nameLen; - static int init_done = 0; - - if ( !init_done ) - { - bootArgs = (boot_args *)malloc(sizeof(boot_args)); - bootArgsPreLion = (boot_args_pre_lion *)malloc(sizeof(boot_args_pre_lion)); - bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t)); - if (bootArgs == 0 || bootInfo == 0) - stop("Couldn't allocate boot info\n"); - - bzero(bootArgs, sizeof(boot_args)); - bzero(bootArgsPreLion, sizeof(boot_args_pre_lion)); - bzero(bootInfo, sizeof(PrivateBootInfo_t)); - - // Get system memory map. Also update the size of the - // conventional/extended memory for backwards compatibility. - - bootInfo->memoryMapCount = - getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax, - (unsigned long *) &bootInfo->convmem, - (unsigned long *) &bootInfo->extmem ); - - if ( bootInfo->memoryMapCount == 0 ) - { - // BIOS did not provide a memory map, systems with - // discontiguous memory or unusual memory hole locations - // may have problems. - - bootInfo->convmem = getConventionalMemorySize(); - bootInfo->extmem = getExtendedMemorySize(); - } - - bootInfo->configEnd = bootInfo->config; - bootArgs->Video.v_display = VGA_TEXT_MODE; - - DT__Initialize(); - - node = DT__FindNode("/", true); - if (node == 0) { - stop("Couldn't create root node"); - } - getPlatformName(platformName); - nameLen = strlen(platformName) + 1; - DT__AddProperty(node, "compatible", nameLen, platformName); - DT__AddProperty(node, "model", nameLen, platformName); - - gMemoryMapNode = DT__FindNode("/chosen/memory-map", true); - - bootArgs->Version = kBootArgsVersion; - bootArgs->Revision = kBootArgsRevision; - bootArgsPreLion->Version = kBootArgsPreLionVersion; - bootArgsPreLion->Revision = kBootArgsPreLionRevision; - - init_done = 1; - } - + Node *node; + int nameLen; + static int init_done = 0; + + if ( !init_done ) + { + bootArgs = (boot_args *)malloc(sizeof(boot_args)); + bootArgsPreLion = (boot_args_pre_lion *)malloc(sizeof(boot_args_pre_lion)); + bootInfo = (PrivateBootInfo_t *)malloc(sizeof(PrivateBootInfo_t)); + if (bootArgs == 0 || bootInfo == 0) + stop("Couldn't allocate boot info\n"); + + bzero(bootArgs, sizeof(boot_args)); + bzero(bootArgsPreLion, sizeof(boot_args_pre_lion)); + bzero(bootInfo, sizeof(PrivateBootInfo_t)); + + // Get system memory map. Also update the size of the + // conventional/extended memory for backwards compatibility. + + bootInfo->memoryMapCount = + getMemoryMap( bootInfo->memoryMap, kMemoryMapCountMax, + (unsigned long *) &bootInfo->convmem, + (unsigned long *) &bootInfo->extmem ); + + if ( bootInfo->memoryMapCount == 0 ) + { + // BIOS did not provide a memory map, systems with + // discontiguous memory or unusual memory hole locations + // may have problems. + + bootInfo->convmem = getConventionalMemorySize(); + bootInfo->extmem = getExtendedMemorySize(); + } + + bootInfo->configEnd = bootInfo->config; + bootArgs->Video.v_display = VGA_TEXT_MODE; + + DT__Initialize(); + + node = DT__FindNode("/", true); + if (node == 0) { + stop("Couldn't create root node"); + } + getPlatformName(platformName); + nameLen = strlen(platformName) + 1; + DT__AddProperty(node, "compatible", nameLen, platformName); + DT__AddProperty(node, "model", nameLen, platformName); + + gMemoryMapNode = DT__FindNode("/chosen/memory-map", true); + + bootArgs->Version = kBootArgsVersion; + bootArgs->Revision = kBootArgsRevision; + + bootArgsPreLion->Version = kBootArgsPreLionVersion; + bootArgsPreLion->Revision = kBootArgsPreLionRevision; + + init_done = 1; + } } @@ -109,8 +109,9 @@ void reserveKernBootStruct(void) { - if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0') && (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7')) - { + if ((gMacOSVersion[0] == '1') && (gMacOSVersion[1] == '0') + && (gMacOSVersion[2] == '.') && (gMacOSVersion[3] == '7')) + { void *oldAddr = bootArgs; bootArgs = (boot_args *)AllocateKernelMemory(sizeof(boot_args)); bcopy(oldAddr, bootArgs, sizeof(boot_args)); @@ -125,28 +126,28 @@ void finalizeBootStruct(void) { - uint32_t size; - void *addr; - int i; - EfiMemoryRange *memoryMap; - MemoryRange *range; - int memoryMapCount = bootInfo->memoryMapCount; - - if (memoryMapCount == 0) { - // XXX could make a two-part map here - stop("Unable to convert memory map into proper format\n"); - } - - // convert memory map to boot_args memory map - memoryMap = (EfiMemoryRange *)AllocateKernelMemory(sizeof(EfiMemoryRange) * memoryMapCount); - bootArgs->MemoryMap = (uint32_t)memoryMap; - bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount; - bootArgs->MemoryMapDescriptorSize = sizeof(EfiMemoryRange); - bootArgs->MemoryMapDescriptorVersion = 0; - - for (i=0; imemoryMap[i]; - switch(range->type) { + uint32_t size; + void *addr; + int i; + EfiMemoryRange *memoryMap; + MemoryRange *range; + int memoryMapCount = bootInfo->memoryMapCount; + + if (memoryMapCount == 0) { + // XXX could make a two-part map here + stop("Unable to convert memory map into proper format\n"); + } + + // convert memory map to boot_args memory map + memoryMap = (EfiMemoryRange *)AllocateKernelMemory(sizeof(EfiMemoryRange) * memoryMapCount); + bootArgs->MemoryMap = (uint32_t)memoryMap; + bootArgs->MemoryMapSize = sizeof(EfiMemoryRange) * memoryMapCount; + bootArgs->MemoryMapDescriptorSize = sizeof(EfiMemoryRange); + bootArgs->MemoryMapDescriptorVersion = 0; + + for (i=0; imemoryMap[i]; + switch(range->type) { case kMemoryRangeACPI: memoryMap->Type = kEfiACPIReclaimMemory; break; @@ -160,30 +161,30 @@ default: memoryMap->Type = kEfiReservedMemoryType; break; - } - memoryMap->PhysicalStart = range->base; - memoryMap->VirtualStart = range->base; - memoryMap->NumberOfPages = range->length >> I386_PGSHIFT; - memoryMap->Attribute = 0; - } - - // copy bootFile into device tree - // XXX - - // add PCI info somehow into device tree - // XXX - - // Flatten device tree - DT__FlattenDeviceTree(0, &size); - addr = (void *)AllocateKernelMemory(size); - if (addr == 0) { - stop("Couldn't allocate device tree\n"); - } - - DT__FlattenDeviceTree((void **)&addr, &size); - bootArgs->deviceTreeP = (uint32_t)addr; - bootArgs->deviceTreeLength = size; - + } + memoryMap->PhysicalStart = range->base; + memoryMap->VirtualStart = range->base; + memoryMap->NumberOfPages = range->length >> I386_PGSHIFT; + memoryMap->Attribute = 0; + } + + // copy bootFile into device tree + // XXX + + // add PCI info somehow into device tree + // XXX + + // Flatten device tree + DT__FlattenDeviceTree(0, &size); + addr = (void *)AllocateKernelMemory(size); + if (addr == 0) { + stop("Couldn't allocate device tree\n"); + } + + DT__FlattenDeviceTree((void **)&addr, &size); + bootArgs->deviceTreeP = (uint32_t)addr; + bootArgs->deviceTreeLength = size; + // Copy BootArgs values to older structure memcpy(&bootArgsPreLion->CommandLine, &bootArgs->CommandLine, BOOT_LINE_LENGTH); @@ -194,7 +195,7 @@ bootArgsPreLion->MemoryMapDescriptorSize = bootArgs->MemoryMapDescriptorSize; bootArgsPreLion->MemoryMapDescriptorVersion = bootArgs->MemoryMapDescriptorVersion; - bootArgsPreLion->deviceTreeP = bootArgs->deviceTreeP; + bootArgsPreLion->deviceTreeP = bootArgs->deviceTreeP; bootArgsPreLion->deviceTreeLength = bootArgs->deviceTreeLength; bootArgsPreLion->kaddr = bootArgs->kaddr; @@ -209,5 +210,4 @@ bootArgsPreLion->performanceDataStart = bootArgs->performanceDataStart; bootArgsPreLion->performanceDataSize = bootArgs->performanceDataSize; bootArgsPreLion->efiRuntimeServicesVirtualPageStart = bootArgs->efiRuntimeServicesVirtualPageStart; - } Index: branches/iFabio/Chameleon/i386/libsaio/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/Makefile (revision 298) @@ -23,7 +23,7 @@ -fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -nostdinc -include $(SRCROOT)/autoconf.h - + CPPFLAGS := $(CPPFLAGS) -nostdinc++ INC = -I. -I$(SYMROOT) -I$(LIBSADIR) -I$(BOOT2DIR) -I${SRCROOT}/i386/include @@ -57,7 +57,7 @@ @ar q $@ $^ &> /dev/null @echo "\t[RANLIB] $(@F)" @ranlib $(SYMROOT)/$(@F) - + # dependencies -include $(OBJROOT)/Makedep Index: branches/iFabio/Chameleon/i386/libsaio/usb.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/usb.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/usb.c (revision 298) @@ -38,7 +38,6 @@ // Add usb device to the list void notify_usb_dev(pci_dt_t *pci_dev) { - struct pciList* current = usbList; if(!usbList) { Index: branches/iFabio/Chameleon/i386/libsaio/nvidia.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/nvidia.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/nvidia.c (revision 298) @@ -1076,7 +1076,6 @@ default_NVCAP[16], default_NVCAP[17], default_NVCAP[18], default_NVCAP[19]); #endif - devprop_add_nvidia_template(device); devprop_add_value(device, "NVCAP", default_NVCAP, NVCAP_LEN); devprop_add_value(device, "VRAM,totalsize", (uint8_t*)&videoRam, 4); Index: branches/iFabio/Chameleon/i386/libsaio/ati.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/ati.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/ati.c (revision 298) @@ -296,6 +296,7 @@ { 0x94C3, 0x22471787, CHIP_FAMILY_RV610, "ATI Radeon HD 2400 LE", kNull }, { 0x94C3, 0x01011A93, CHIP_FAMILY_RV610, "Qimonda Radeon HD 2400 PRO", kNull }, + { 0x9501, 0x30001002, CHIP_FAMILY_RV670, "ATI Radeon HD 3690", kNull }, { 0x9501, 0x25421002, CHIP_FAMILY_RV670, "ATI Radeon HD 3870", kNull }, { 0x9501, 0x4750174B, CHIP_FAMILY_RV670, "ATI Radeon HD 4750", kNull }, @@ -501,7 +502,6 @@ { 0x6898, 0x00000000, CHIP_FAMILY_CYPRESS, "ATI Radeon HD 5800 Series", kUakari }, { 0x6899, 0x00000000, CHIP_FAMILY_CYPRESS, "ATI Radeon HD 5800 Series", kUakari }, { 0x689E, 0x00000000, CHIP_FAMILY_CYPRESS, "ATI Radeon HD 5800 Series", kUakari }, - { 0x689C, 0x00000000, CHIP_FAMILY_HEMLOCK, "ATI Radeon HD 5900 Series", kUakari }, { 0x68B9, 0x00000000, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5600 Series", kVervet }, @@ -1117,7 +1117,7 @@ if (radeon_cards[i].device_id == pci_dev->device_id) { card->info = &radeon_cards[i]; - if ((radeon_cards[i].subsys_id == 0x00000000) || + if ((radeon_cards[i].subsys_id == 0x00000000) || (radeon_cards[i].subsys_id == pci_dev->subsys_id.subsys_id)) break; } Index: branches/iFabio/Chameleon/i386/libsaio/cpu.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/cpu.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/cpu.c (revision 298) @@ -254,7 +254,6 @@ if (bus_ratio_max) { fsbFrequency = (tscFrequency / bus_ratio_max); } - //valv: Turbo Ratio Limit if ((intelCPU != 0x2e) && (intelCPU != 0x2f)) { msr = rdmsr64(MSR_TURBO_RATIO_LIMIT); Index: branches/iFabio/Chameleon/i386/libsaio/platform.h =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/platform.h (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/platform.h (revision 298) @@ -90,15 +90,15 @@ #define UUID_LEN 16 typedef struct _RamSlotInfo_t { - uint32_t ModuleSize; // Size of Module in MB - uint32_t Frequency; // in Mhz + uint32_t ModuleSize; // Size of Module in MB + uint32_t Frequency; // in Mhz const char* Vendor; const char* PartNo; const char* SerialNo; - char* spd; // SPD Dump + char* spd; // SPD Dump bool InUse; uint8_t Type; - uint8_t BankConnections; // table type 6, see (3.3.7) + uint8_t BankConnections; // table type 6, see (3.3.7) uint8_t BankConnCnt; } RamSlotInfo_t; Index: branches/iFabio/Chameleon/i386/libsaio/smbios.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/smbios.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/smbios.c (revision 298) @@ -607,6 +607,8 @@ for (i = 0; i < numOfSetters; i++) if ((structPtr->orig->type == SMBSetters[i].type) && (SMBSetters[i].fieldOffset < structPtr->orig->length)) { + if (SMBSetters[i].fieldOffset > structPtr->orig->length) + continue; setterFound = true; setSMBValue(structPtr, i, (returnType *)((uint8_t *)structPtr->new + SMBSetters[i].fieldOffset)); } Index: branches/iFabio/Chameleon/i386/libsaio/biosfn.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/biosfn.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/biosfn.c (revision 298) @@ -446,7 +446,7 @@ return bb.eax.r.h; } -void putc(int ch) +void bios_putchar(int ch) { bb.intno = 0x10; bb.ebx.r.h = 0x00; /* background black */ @@ -470,56 +470,55 @@ /* Check to see if the passed-in drive is in El Torito no-emulation mode. */ int is_no_emulation(int drive) { - struct packet { - unsigned char packet_size; - unsigned char media_type; - unsigned char drive_num; - unsigned char ctrlr_index; - unsigned long lba; - unsigned short device_spec; - unsigned short buffer_segment; - unsigned short load_segment; - unsigned short sector_count; - unsigned char cyl_count; - unsigned char sec_count; - unsigned char head_count; - unsigned char reseved; - } __attribute__((packed)); - static struct packet pkt; - - bzero(&pkt, sizeof(pkt)); - pkt.packet_size = 0x13; - - bb.intno = 0x13; - bb.eax.r.h = 0x4b; - bb.eax.r.l = 0x01; // subfunc: get info - bb.edx.r.l = drive; - bb.esi.rr = NORMALIZED_OFFSET((unsigned)&pkt); - bb.ds = NORMALIZED_SEGMENT((unsigned)&pkt); - - bios(&bb); + struct packet { + unsigned char packet_size; + unsigned char media_type; + unsigned char drive_num; + unsigned char ctrlr_index; + unsigned long lba; + unsigned short device_spec; + unsigned short buffer_segment; + unsigned short load_segment; + unsigned short sector_count; + unsigned char cyl_count; + unsigned char sec_count; + unsigned char head_count; + unsigned char reseved; + } __attribute__((packed)); + static struct packet pkt; + + bzero(&pkt, sizeof(pkt)); + pkt.packet_size = 0x13; + + bb.intno = 0x13; + bb.eax.r.h = 0x4b; + bb.eax.r.l = 0x01; // subfunc: get info + bb.edx.r.l = drive; + bb.esi.rr = NORMALIZED_OFFSET((unsigned)&pkt); + bb.ds = NORMALIZED_SEGMENT((unsigned)&pkt); + + bios(&bb); #if DEBUG - printf("el_torito info drive %x\n", drive); - - printf("--> cf %x, eax %x\n", bb.flags.cf, bb.eax.rr); - - printf("pkt_size: %x\n", pkt.packet_size); - printf("media_type: %x\n", pkt.media_type); - printf("drive_num: %x\n", pkt.drive_num); - printf("device_spec: %x\n", pkt.device_spec); - printf("press a key->\n");getc(); + printf("el_torito info drive %x\n", drive); + + printf("--> cf %x, eax %x\n", bb.flags.cf, bb.eax.rr); + + printf("pkt_size: %x\n", pkt.packet_size); + printf("media_type: %x\n", pkt.media_type); + printf("drive_num: %x\n", pkt.drive_num); + printf("device_spec: %x\n", pkt.device_spec); + printf("press a key->\n");getc(); #endif - - /* Some BIOSes erroneously return cf = 1 */ - /* Just check to see if the drive number is the same. */ - if (pkt.drive_num == drive) { - if ((pkt.media_type & 0x0F) == 0) { - /* We are in no-emulation mode. */ - return 1; + + /* Some BIOSes erroneously return cf = 1 */ + /* Just check to see if the drive number is the same. */ + if (pkt.drive_num == drive) { + if ((pkt.media_type & 0x0F) == 0) { + /* We are in no-emulation mode. */ + return 1; + } } - } - - return 0; + return 0; } #if DEBUG @@ -528,157 +527,159 @@ */ void print_drive_info(boot_drive_info_t *dp) { - // printf("buf_size = %x\n", dp->params.buf_size); - printf("info_flags = %x\n", dp->params.info_flags); - printf(" phys_cyls = %lx\n", dp->params. phys_cyls); - printf(" phys_heads = %lx\n", dp->params. phys_heads); - printf(" phys_spt = %lx\n", dp->params. phys_spt); - printf("phys_sectors = %lx%lx\n", ((unsigned long *)(&dp->params.phys_sectors))[1], - ((unsigned long *)(&dp->params.phys_sectors))[0]); - printf("phys_nbps = %x\n", dp->params.phys_nbps); - // printf("dpte_offset = %x\n", dp->params.dpte_offset); - // printf("dpte_segment = %x\n", dp->params.dpte_segment); - // printf("key = %x\n", dp->params.key); - // printf("path_len = %x\n", dp->params. path_len); - // printf("reserved1 = %x\n", dp->params. reserved1); - // printf("reserved2 = %x\n", dp->params.reserved2); - //printf("bus_type[4] = %x\n", dp->params. bus_type[4]); - //printf("interface_type[8] = %x\n", dp->params. interface_type[8]); - //printf("interface_path[8] = %x\n", dp->params. interface_path[8]); - //printf("dev_path[8] = %x\n", dp->params. dev_path[8]); - // printf("reserved3 = %x\n", dp->params. reserved3); - // printf("checksum = %x\n", dp->params. checksum); - - printf(" io_port_base = %x\n", dp->dpte.io_port_base); - printf(" control_port_base = %x\n", dp->dpte.control_port_base); - printf(" head_flags = %x\n", dp->dpte. head_flags); - printf(" vendor_info = %x\n", dp->dpte. vendor_info); - printf(" irq = %x\n", dp->dpte. irq); - // printf(" irq_unused = %x\n", dp->dpte. irq_unused); - printf(" block_count = %x\n", dp->dpte. block_count); - printf(" dma_channe = %x\n", dp->dpte. dma_channel); - printf(" dma_type = %x\n", dp->dpte. dma_type); - printf(" pio_type = %x\n", dp->dpte. pio_type); - printf(" pio_unused = %x\n", dp->dpte. pio_unused); - printf(" option_flags = %x\n", dp->dpte.option_flags); - // printf(" reserved = %x\n", dp->dpte.reserved); - printf(" revision = %x\n", dp->dpte. revision); - // printf(" checksum = %x\n", dp->dpte. checksum); +// printf("buf_size = %x\n", dp->params.buf_size); + printf("info_flags = %x\n", dp->params.info_flags); + printf("phys_cyls = %lx\n", dp->params. phys_cyls); + printf("phys_heads = %lx\n", dp->params. phys_heads); + printf("phys_spt = %lx\n", dp->params. phys_spt); + printf("phys_sectors = %lx%lx\n", ((unsigned long *)(&dp->params.phys_sectors))[1], + ((unsigned long *)(&dp->params.phys_sectors))[0]); + printf("phys_nbps = %x\n", dp->params.phys_nbps); +// printf("dpte_offset = %x\n", dp->params.dpte_offset); +// printf("dpte_segment = %x\n", dp->params.dpte_segment); +// printf("key = %x\n", dp->params.key); +// printf("path_len = %x\n", dp->params. path_len); +// printf("reserved1 = %x\n", dp->params. reserved1); +// printf("reserved2 = %x\n", dp->params.reserved2); +// printf("bus_type[4] = %x\n", dp->params. bus_type[4]); +// printf("interface_type[8] = %x\n", dp->params. interface_type[8]); +// printf("interface_path[8] = %x\n", dp->params. interface_path[8]); +// printf("dev_path[8] = %x\n", dp->params. dev_path[8]); +// printf("reserved3 = %x\n", dp->params. reserved3); +// printf("checksum = %x\n", dp->params. checksum); + printf("io_port_base = %x\n", dp->dpte.io_port_base); + printf("control_port_base = %x\n", dp->dpte.control_port_base); + printf("head_flags = %x\n", dp->dpte. head_flags); + printf("vendor_info = %x\n", dp->dpte. vendor_info); + printf("irq = %x\n", dp->dpte. irq); +// printf("irq_unused = %x\n", dp->dpte. irq_unused); + printf("block_count = %x\n", dp->dpte. block_count); + printf("dma_channe = %x\n", dp->dpte. dma_channel); + printf("dma_type = %x\n", dp->dpte. dma_type); + printf("pio_type = %x\n", dp->dpte. pio_type); + printf("pio_unused = %x\n", dp->dpte. pio_unused); + printf("option_flags = %x\n", dp->dpte.option_flags); +// printf("reserved = %x\n", dp->dpte.reserved); + printf("revision = %x\n", dp->dpte. revision); +// printf("checksum = %x\n", dp->dpte. checksum); } #endif int get_drive_info(int drive, struct driveInfo *dp) { - boot_drive_info_t *di = &dp->di; - int ret = 0; - + boot_drive_info_t *di = &dp->di; + int ret = 0; + #if UNUSED - if (maxhd == 0) { - bb.intno = 0x13; - bb.eax.r.h = 0x08; - bb.edx.r.l = 0x80; - bios(&bb); - if (bb.flags.cf == 0) - maxhd = 0x7f + bb.edx.r.l; - }; - - if (drive > maxhd) - return 0; + if (maxhd == 0) { + bb.intno = 0x13; + bb.eax.r.h = 0x08; + bb.edx.r.l = 0x80; + bios(&bb); + if (bb.flags.cf == 0) + maxhd = 0x7f + bb.edx.r.l; + }; + + if (drive > maxhd) + return 0; #endif + + bzero(dp, sizeof(struct driveInfo)); + dp->biosdev = drive; + + /* Check for El Torito no-emulation mode. */ + dp->no_emulation = is_no_emulation(drive); - bzero(dp, sizeof(struct driveInfo)); - dp->biosdev = drive; - - /* Check for El Torito no-emulation mode. */ - dp->no_emulation = is_no_emulation(drive); - - /* Check drive for EBIOS support. */ - bb.intno = 0x13; - bb.eax.r.h = 0x41; - bb.edx.r.l = drive; - bb.ebx.rr = 0x55aa; - bios(&bb); - if((bb.ebx.rr == 0xaa55) && (bb.flags.cf == 0)) { - /* Get flags for supported operations. */ - dp->uses_ebios = bb.ecx.r.l; - } - - if (dp->uses_ebios & (EBIOS_ENHANCED_DRIVE_INFO | EBIOS_LOCKING_ACCESS | EBIOS_FIXED_DISK_ACCESS)) { - /* Get EBIOS drive info. */ - static struct drive_params params; - - params.buf_size = sizeof(params); - bb.intno = 0x13; - bb.eax.r.h = 0x48; - bb.edx.r.l = drive; - bb.esi.rr = NORMALIZED_OFFSET((unsigned)¶ms); - bb.ds = NORMALIZED_SEGMENT((unsigned)¶ms); - bios(&bb); - if(bb.flags.cf != 0 /* || params.phys_sectors < 2097152 */) { - dp->uses_ebios = 0; - di->params.buf_size = 1; - } else { - bcopy(¶ms, &di->params, sizeof(params)); - - if (drive >= BASE_HD_DRIVE && - (dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && - di->params.buf_size >= 30 && - !(di->params.dpte_offset == 0xFFFF && di->params.dpte_segment == 0xFFFF)) { - void *ptr = (void *)(di->params.dpte_offset + ((unsigned int)di->params.dpte_segment << 4)); - bcopy(ptr, &di->dpte, sizeof(di->dpte)); - } + /* Check drive for EBIOS support. */ + bb.intno = 0x13; + bb.eax.r.h = 0x41; + bb.edx.r.l = drive; + bb.ebx.rr = 0x55aa; + bios(&bb); + + if ((bb.ebx.rr == 0xaa55) && (bb.flags.cf == 0)) { + /* Get flags for supported operations. */ + dp->uses_ebios = bb.ecx.r.l; } - } + + if (dp->uses_ebios & (EBIOS_ENHANCED_DRIVE_INFO | EBIOS_LOCKING_ACCESS | EBIOS_FIXED_DISK_ACCESS)) { + /* Get EBIOS drive info. */ + static struct drive_params params; + + params.buf_size = sizeof(params); + bb.intno = 0x13; + bb.eax.r.h = 0x48; + bb.edx.r.l = drive; + bb.esi.rr = NORMALIZED_OFFSET((unsigned)¶ms); + bb.ds = NORMALIZED_SEGMENT((unsigned)¶ms); + bios(&bb); + + if (bb.flags.cf != 0 /* || params.phys_sectors < 2097152 */) { + dp->uses_ebios = 0; + di->params.buf_size = 1; + } + else + { + bcopy(¶ms, &di->params, sizeof(params)); + + if (drive >= BASE_HD_DRIVE && + (dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && + di->params.buf_size >= 30 && + !(di->params.dpte_offset == 0xFFFF && di->params.dpte_segment == 0xFFFF)) { + void *ptr = (void *)(di->params.dpte_offset + ((unsigned int)di->params.dpte_segment << 4)); + bcopy(ptr, &di->dpte, sizeof(di->dpte)); + } + } + } /* * zef: This code will fail on recent JMicron and Intel option ROMs */ -// if (di->params.phys_heads == 0 || di->params.phys_spt == 0) { -// /* Either it's not EBIOS, or EBIOS didn't tell us. */ -// bb.intno = 0x13; -// bb.eax.r.h = 0x08; -// bb.edx.r.l = drive; -// bios(&bb); -// if (bb.flags.cf == 0 && bb.eax.r.h == 0) { -// unsigned long cyl; -// unsigned long sec; -// unsigned long hds; -// -// hds = bb.edx.r.h; -// sec = bb.ecx.r.l & 0x3F; -// if((dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && (sec != 0)) { -// cyl = (di->params.phys_sectors / ((hds + 1) * sec)) - 1; -// } -// else { -// cyl = bb.ecx.r.h | ((bb.ecx.r.l & 0xC0) << 2); -// } -// di->params.phys_heads = hds; -// di->params.phys_spt = sec; -// di->params.phys_cyls = cyl; -// } else { -// ret = -1; +// if (di->params.phys_heads == 0 || di->params.phys_spt == 0) { +// /* Either it's not EBIOS, or EBIOS didn't tell us. */ +// bb.intno = 0x13; +// bb.eax.r.h = 0x08; +// bb.edx.r.l = drive; +// bios(&bb); +// if (bb.flags.cf == 0 && bb.eax.r.h == 0) { +// unsigned long cyl; +// unsigned long sec; +// unsigned long hds; +// +// hds = bb.edx.r.h; +// sec = bb.ecx.r.l & 0x3F; +// if ((dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && (sec != 0)) { +// cyl = (di->params.phys_sectors / ((hds + 1) * sec)) - 1; +// } else { +// cyl = bb.ecx.r.h | ((bb.ecx.r.l & 0xC0) << 2); +// } +// di->params.phys_heads = hds; +// di->params.phys_spt = sec; +// di->params.phys_cyls = cyl; +// } else { +// ret = -1; +// } // } -// } - if (dp->no_emulation) { - /* Some BIOSes give us erroneous EBIOS support information. - * Assume that if you're on a CD, then you can use - * EBIOS disk calls. - */ - dp->uses_ebios |= EBIOS_FIXED_DISK_ACCESS; - } + if (dp->no_emulation) { + /* Some BIOSes give us erroneous EBIOS support information. + * Assume that if you're on a CD, then you can use + * EBIOS disk calls. + */ + dp->uses_ebios |= EBIOS_FIXED_DISK_ACCESS; + } #if DEBUG - print_drive_info(di); - printf("uses_ebios = 0x%x\n", dp->uses_ebios); - printf("result %d\n", ret); - printf("press a key->\n");getc(); + print_drive_info(di); + printf("uses_ebios = 0x%x\n", dp->uses_ebios); + printf("result %d\n", ret); + printf("press a key->\n");getc(); #endif - if (ret == 0) { - dp->valid = 1; - } - return ret; + if (ret == 0) { + dp->valid = 1; + } + return ret; } int ebiosEjectMedia(int biosdev) Index: branches/iFabio/Chameleon/i386/libsaio/pci.h =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/pci.h (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/pci.h (revision 298) @@ -23,24 +23,24 @@ } pci_dev_t; typedef struct pci_dt_t { - pci_dev_t dev; + pci_dev_t dev; - uint16_t vendor_id; - uint16_t device_id; + uint16_t vendor_id; + uint16_t device_id; union { struct { uint16_t vendor_id; uint16_t device_id; - } subsys; - uint32_t subsys_id; + } subsys; + uint32_t subsys_id; } subsys_id; - uint16_t class_id; + uint16_t class_id; - struct pci_dt_t *parent; - struct pci_dt_t *children; - struct pci_dt_t *next; + struct pci_dt_t *parent; + struct pci_dt_t *children; + struct pci_dt_t *next; } pci_dt_t; #define PCIADDR(bus, dev, func) (1 << 31) | (bus << 16) | (dev << 11) | (func << 8) @@ -396,57 +396,59 @@ /* Message Signaled Interrupts registers */ #define PCI_MSI_FLAGS 2 /* Various flags */ -#define PCI_MSI_FLAGS_MASK_BIT 0x100 /* interrupt masking & reporting supported */ +#define PCI_MSI_FLAGS_MASK_BIT 0x100 /* interrupt masking & reporting supported */ #define PCI_MSI_FLAGS_64BIT 0x080 /* 64-bit addresses allowed */ #define PCI_MSI_FLAGS_QSIZE 0x070 /* Message queue size configured */ #define PCI_MSI_FLAGS_QMASK 0x00e /* Maximum queue size available */ -#define PCI_MSI_FLAGS_ENABLE 0x001 /* MSI feature enabled */ -#define PCI_MSI_RFU 3 /* Rest of capability flags */ -#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ -#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ -#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ -#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ -#define PCI_MSI_MASK_BIT_32 12 /* per-vector masking for 32-bit devices */ -#define PCI_MSI_MASK_BIT_64 16 /* per-vector masking for 64-bit devices */ -#define PCI_MSI_PENDING_32 16 /* per-vector interrupt pending for 32-bit devices */ -#define PCI_MSI_PENDING_64 20 /* per-vector interrupt pending for 64-bit devices */ +#define PCI_MSI_FLAGS_ENABLE 0x001 /* MSI feature enabled */ +#define PCI_MSI_RFU 3 /* Rest of capability flags */ +#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ +#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ +#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ +#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ +#define PCI_MSI_MASK_BIT_32 12 /* per-vector masking for 32-bit devices */ +#define PCI_MSI_MASK_BIT_64 16 /* per-vector masking for 64-bit devices */ +#define PCI_MSI_PENDING_32 16 /* per-vector interrupt pending for 32-bit devices */ +#define PCI_MSI_PENDING_64 20 /* per-vector interrupt pending for 64-bit devices */ /* PCI-X */ -#define PCI_PCIX_COMMAND 2 /* Command register offset */ -#define PCI_PCIX_COMMAND_DPERE 0x0001 /* Data Parity Error Recover Enable */ -#define PCI_PCIX_COMMAND_ERO 0x0002 /* Enable Relaxed Ordering */ -#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT 0x000c /* Maximum Memory Read Byte Count */ -#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS 0x0070 -#define PCI_PCIX_COMMAND_RESERVED 0xf80 -#define PCI_PCIX_STATUS 4 /* Status register offset */ -#define PCI_PCIX_STATUS_FUNCTION 0x00000007 -#define PCI_PCIX_STATUS_DEVICE 0x000000f8 -#define PCI_PCIX_STATUS_BUS 0x0000ff00 -#define PCI_PCIX_STATUS_64BIT 0x00010000 -#define PCI_PCIX_STATUS_133MHZ 0x00020000 -#define PCI_PCIX_STATUS_SC_DISCARDED 0x00040000 /* Split Completion Discarded */ -#define PCI_PCIX_STATUS_UNEXPECTED_SC 0x00080000 /* Unexpected Split Completion */ -#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY 0x00100000 /* 0 = simple device, 1 = bridge device */ -#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT 0x00600000 /* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */ -#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS 0x03800000 -#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE 0x1c000000 -#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS 0x20000000 /* Received Split Completion Error Message */ -#define PCI_PCIX_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ -#define PCI_PCIX_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ -#define PCI_PCIX_SIZEOF 4 +#define PCI_PCIX_COMMAND 2 /* Command register offset */ +#define PCI_PCIX_COMMAND_DPERE 0x0001 /* Data Parity Error Recover Enable */ +#define PCI_PCIX_COMMAND_ERO 0x0002 /* Enable Relaxed Ordering */ +#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT 0x000c /* Maximum Memory Read Byte Count */ +#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS 0x0070 +#define PCI_PCIX_COMMAND_RESERVED 0xf80 +#define PCI_PCIX_STATUS 4 /* Status register offset */ +#define PCI_PCIX_STATUS_FUNCTION 0x00000007 +#define PCI_PCIX_STATUS_DEVICE 0x000000f8 +#define PCI_PCIX_STATUS_BUS 0x0000ff00 +#define PCI_PCIX_STATUS_64BIT 0x00010000 +#define PCI_PCIX_STATUS_133MHZ 0x00020000 +#define PCI_PCIX_STATUS_SC_DISCARDED 0x00040000 /* Split Completion Discarded */ +#define PCI_PCIX_STATUS_UNEXPECTED_SC 0x00080000 /* Unexpected Split Completion */ +#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY 0x00100000 /* 0 = simple device, 1 = bridge device */ +#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT 0x00600000 /* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */ +#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS 0x03800000 +#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE 0x1c000000 +#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS 0x20000000 /* Received Split Completion Error Message */ +#define PCI_PCIX_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ +#define PCI_PCIX_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ +#define PCI_PCIX_SIZEOF 4 +//Azi: check this gui top to bottom!! + /* PCI-X Bridges */ -#define PCI_PCIX_BRIDGE_SEC_STATUS 2 /* Secondary bus status register offset */ -#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT 0x0001 -#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ 0x0002 -#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED 0x0004 /* Split Completion Discarded on secondary bus */ -#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC 0x0008 /* Unexpected Split Completion on secondary bus */ -#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN 0x0010 /* Split Completion Overrun on secondary bus */ -#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED 0x0020 -#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ 0x01c0 -#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED 0xfe00 -#define PCI_PCIX_BRIDGE_STATUS 4 /* Primary bus status register offset */ -#define PCI_PCIX_BRIDGE_STATUS_FUNCTION 0x00000007 +#define PCI_PCIX_BRIDGE_SEC_STATUS 2 /* Secondary bus status register offset */ +#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT 0x0001 +#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ 0x0002 +#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED 0x0004 /* Split Completion Discarded on secondary bus */ +#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC 0x0008 /* Unexpected Split Completion on secondary bus */ +#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN 0x0010 /* Split Completion Overrun on secondary bus */ +#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED 0x0020 +#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ 0x01c0 +#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED 0xfe00 +#define PCI_PCIX_BRIDGE_STATUS 4 /* Primary bus status register offset */ +#define PCI_PCIX_BRIDGE_STATUS_FUNCTION 0x00000007 #define PCI_PCIX_BRIDGE_STATUS_DEVICE 0x000000f8 #define PCI_PCIX_BRIDGE_STATUS_BUS 0x0000ff00 #define PCI_PCIX_BRIDGE_STATUS_64BIT 0x00010000 @@ -463,166 +465,166 @@ #define PCI_PCIX_BRIDGE_SIZEOF 12 /* PCI Express */ -#define PCI_EXP_FLAGS 0x2 /* Capabilities register */ -#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ -#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ -#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ -#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ -#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ -#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ -#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ -#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ -#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIE Bridge */ -#define PCI_EXP_TYPE_ROOT_INT_EP 0x9 /* Root Complex Integrated Endpoint */ -#define PCI_EXP_TYPE_ROOT_EC 0xa /* Root Complex Event Collector */ -#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ -#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ -#define PCI_EXP_DEVCAP 0x4 /* Device capabilities */ -#define PCI_EXP_DEVCAP_PAYLOAD 0x07 /* Max_Payload_Size */ -#define PCI_EXP_DEVCAP_PHANTOM 0x18 /* Phantom functions */ -#define PCI_EXP_DEVCAP_EXT_TAG 0x20 /* Extended tags */ -#define PCI_EXP_DEVCAP_L0S 0x1c0 /* L0s Acceptable Latency */ -#define PCI_EXP_DEVCAP_L1 0xe00 /* L1 Acceptable Latency */ -#define PCI_EXP_DEVCAP_ATN_BUT 0x1000 /* Attention Button Present */ -#define PCI_EXP_DEVCAP_ATN_IND 0x2000 /* Attention Indicator Present */ -#define PCI_EXP_DEVCAP_PWR_IND 0x4000 /* Power Indicator Present */ -#define PCI_EXP_DEVCAP_RBE 0x8000 /* Role-Based Error Reporting */ -#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ -#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ -#define PCI_EXP_DEVCAP_FLRESET 0x10000000 /* Function-Level Reset */ -#define PCI_EXP_DEVCTL 0x8 /* Device Control */ -#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ -#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ -#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ -#define PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */ -#define PCI_EXP_DEVCTL_RELAXED 0x0010 /* Enable Relaxed Ordering */ -#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */ -#define PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */ -#define PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */ -#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ -#define PCI_EXP_DEVCTL_NOSNOOP 0x0800 /* Enable No Snoop */ -#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ -#define PCI_EXP_DEVCTL_BCRE 0x8000 /* Bridge Configuration Retry Enable */ -#define PCI_EXP_DEVCTL_FLRESET 0x8000 /* Function-Level Reset [bit shared with BCRE] */ -#define PCI_EXP_DEVSTA 0xa /* Device Status */ -#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ -#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ -#define PCI_EXP_DEVSTA_FED 0x04 /* Fatal Error Detected */ -#define PCI_EXP_DEVSTA_URD 0x08 /* Unsupported Request Detected */ -#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ -#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ -#define PCI_EXP_LNKCAP 0xc /* Link Capabilities */ -#define PCI_EXP_LNKCAP_SPEED 0x0000f /* Maximum Link Speed */ -#define PCI_EXP_LNKCAP_WIDTH 0x003f0 /* Maximum Link Width */ -#define PCI_EXP_LNKCAP_ASPM 0x00c00 /* Active State Power Management */ -#define PCI_EXP_LNKCAP_L0S 0x07000 /* L0s Acceptable Latency */ -#define PCI_EXP_LNKCAP_L1 0x38000 /* L1 Acceptable Latency */ -#define PCI_EXP_LNKCAP_CLOCKPM 0x40000 /* Clock Power Management */ -#define PCI_EXP_LNKCAP_SURPRISE 0x80000 /* Surprise Down Error Reporting */ -#define PCI_EXP_LNKCAP_DLLA 0x100000 /* Data Link Layer Active Reporting */ -#define PCI_EXP_LNKCAP_LBNC 0x200000 /* Link Bandwidth Notification Capability */ -#define PCI_EXP_LNKCAP_PORT 0xff000000 /* Port Number */ -#define PCI_EXP_LNKCTL 0x10 /* Link Control */ -#define PCI_EXP_LNKCTL_ASPM 0x0003 /* ASPM Control */ -#define PCI_EXP_LNKCTL_RCB 0x0008 /* Read Completion Boundary */ -#define PCI_EXP_LNKCTL_DISABLE 0x0010 /* Link Disable */ -#define PCI_EXP_LNKCTL_RETRAIN 0x0020 /* Retrain Link */ -#define PCI_EXP_LNKCTL_CLOCK 0x0040 /* Common Clock Configuration */ -#define PCI_EXP_LNKCTL_XSYNCH 0x0080 /* Extended Synch */ -#define PCI_EXP_LNKCTL_CLOCKPM 0x0100 /* Clock Power Management */ -#define PCI_EXP_LNKCTL_HWAUTWD 0x0200 /* Hardware Autonomous Width Disable */ -#define PCI_EXP_LNKCTL_BWMIE 0x0400 /* Bandwidth Mgmt Interrupt Enable */ -#define PCI_EXP_LNKCTL_AUTBWIE 0x0800 /* Autonomous Bandwidth Mgmt Interrupt Enable */ -#define PCI_EXP_LNKSTA 0x12 /* Link Status */ -#define PCI_EXP_LNKSTA_SPEED 0x000f /* Negotiated Link Speed */ -#define PCI_EXP_LNKSTA_WIDTH 0x03f0 /* Negotiated Link Width */ -#define PCI_EXP_LNKSTA_TR_ERR 0x0400 /* Training Error (obsolete) */ -#define PCI_EXP_LNKSTA_TRAIN 0x0800 /* Link Training */ -#define PCI_EXP_LNKSTA_SL_CLK 0x1000 /* Slot Clock Configuration */ -#define PCI_EXP_LNKSTA_DL_ACT 0x2000 /* Data Link Layer in DL_Active State */ -#define PCI_EXP_LNKSTA_BWMGMT 0x4000 /* Bandwidth Mgmt Status */ -#define PCI_EXP_LNKSTA_AUTBW 0x8000 /* Autonomous Bandwidth Mgmt Status */ -#define PCI_EXP_SLTCAP 0x14 /* Slot Capabilities */ -#define PCI_EXP_SLTCAP_ATNB 0x0001 /* Attention Button Present */ -#define PCI_EXP_SLTCAP_PWRC 0x0002 /* Power Controller Present */ -#define PCI_EXP_SLTCAP_MRL 0x0004 /* MRL Sensor Present */ -#define PCI_EXP_SLTCAP_ATNI 0x0008 /* Attention Indicator Present */ -#define PCI_EXP_SLTCAP_PWRI 0x0010 /* Power Indicator Present */ -#define PCI_EXP_SLTCAP_HPS 0x0020 /* Hot-Plug Surprise */ -#define PCI_EXP_SLTCAP_HPC 0x0040 /* Hot-Plug Capable */ -#define PCI_EXP_SLTCAP_PWR_VAL 0x00007f80 /* Slot Power Limit Value */ -#define PCI_EXP_SLTCAP_PWR_SCL 0x00018000 /* Slot Power Limit Scale */ -#define PCI_EXP_SLTCAP_INTERLOCK 0x020000 /* Electromechanical Interlock Present */ -#define PCI_EXP_SLTCAP_NOCMDCOMP 0x040000 /* No Command Completed Support */ -#define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */ -#define PCI_EXP_SLTCTL 0x18 /* Slot Control */ -#define PCI_EXP_SLTCTL_ATNB 0x0001 /* Attention Button Pressed Enable */ -#define PCI_EXP_SLTCTL_PWRF 0x0002 /* Power Fault Detected Enable */ -#define PCI_EXP_SLTCTL_MRLS 0x0004 /* MRL Sensor Changed Enable */ -#define PCI_EXP_SLTCTL_PRSD 0x0008 /* Presence Detect Changed Enable */ -#define PCI_EXP_SLTCTL_CMDC 0x0010 /* Command Completed Interrupt Enable */ -#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ -#define PCI_EXP_SLTCTL_ATNI 0x00c0 /* Attention Indicator Control */ -#define PCI_EXP_SLTCTL_PWRI 0x0300 /* Power Indicator Control */ -#define PCI_EXP_SLTCTL_PWRC 0x0400 /* Power Controller Control */ -#define PCI_EXP_SLTCTL_INTERLOCK 0x0800 /* Electromechanical Interlock Control */ -#define PCI_EXP_SLTCTL_LLCHG 0x1000 /* Data Link Layer State Changed Enable */ -#define PCI_EXP_SLTSTA 0x1a /* Slot Status */ -#define PCI_EXP_SLTSTA_ATNB 0x0001 /* Attention Button Pressed */ -#define PCI_EXP_SLTSTA_PWRF 0x0002 /* Power Fault Detected */ -#define PCI_EXP_SLTSTA_MRLS 0x0004 /* MRL Sensor Changed */ -#define PCI_EXP_SLTSTA_PRSD 0x0008 /* Presence Detect Changed */ -#define PCI_EXP_SLTSTA_CMDC 0x0010 /* Command Completed */ -#define PCI_EXP_SLTSTA_MRL_ST 0x0020 /* MRL Sensor State */ -#define PCI_EXP_SLTSTA_PRES 0x0040 /* Presence Detect State */ -#define PCI_EXP_SLTSTA_INTERLOCK 0x0080 /* Electromechanical Interlock Status */ -#define PCI_EXP_SLTSTA_LLCHG 0x0100 /* Data Link Layer State Changed */ -#define PCI_EXP_RTCTL 0x1c /* Root Control */ -#define PCI_EXP_RTCTL_SECEE 0x0001 /* System Error on Correctable Error */ -#define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */ -#define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */ -#define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ -#define PCI_EXP_RTCTL_CRSVIS 0x0010 /* Configuration Request Retry Status Visible to SW */ -#define PCI_EXP_RTCAP 0x1e /* Root Capabilities */ -#define PCI_EXP_RTCAP_CRSVIS 0x0010 /* Configuration Request Retry Status Visible to SW */ -#define PCI_EXP_RTSTA 0x20 /* Root Status */ -#define PCI_EXP_RTSTA_PME_REQID 0x0000ffff /* PME Requester ID */ -#define PCI_EXP_RTSTA_PME_STATUS 0x00010000 /* PME Status */ -#define PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */ -#define PCI_EXP_DEVCAP2 0x24 /* Device capabilities 2 */ -#define PCI_EXP_DEVCTL2 0x28 /* Device Control */ -#define PCI_EXP_DEV2_TIMEOUT_RANGE(x) ((x) & 0xf) /* Completion Timeout Ranges Supported */ -#define PCI_EXP_DEV2_TIMEOUT_VALUE(x) ((x) & 0xf) /* Completion Timeout Value */ -#define PCI_EXP_DEV2_TIMEOUT_DIS 0x0010 /* Completion Timeout Disable Supported */ -#define PCI_EXP_DEV2_ARI 0x0020 /* ARI Forwarding */ -#define PCI_EXP_DEVSTA2 0x2a /* Device Status */ -#define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities */ -#define PCI_EXP_LNKCTL2 0x30 /* Link Control */ -#define PCI_EXP_LNKCTL2_SPEED(x) ((x) & 0xf) /* Target Link Speed */ -#define PCI_EXP_LNKCTL2_CMPLNC 0x0010 /* Enter Compliance */ -#define PCI_EXP_LNKCTL2_SPEED_DIS 0x0020 /* Hardware Autonomous Speed Disable */ -#define PCI_EXP_LNKCTL2_DEEMPHASIS(x) (((x) >> 6) & 1) /* Selectable De-emphasis */ -#define PCI_EXP_LNKCTL2_MARGIN(x) (((x) >> 7) & 7) /* Transmit Margin */ -#define PCI_EXP_LNKCTL2_MOD_CMPLNC 0x0400 /* Enter Modified Compliance */ -#define PCI_EXP_LNKCTL2_CMPLNC_SOS 0x0800 /* Compliance SOS */ -#define PCI_EXP_LNKCTL2_COM_DEEMPHASIS(x) (((x) >> 12) & 1) /* Compliance De-emphasis */ -#define PCI_EXP_LNKSTA2 0x32 /* Link Status */ -#define PCI_EXP_LINKSTA2_DEEMPHASIS(x) ((x) & 1) /* Current De-emphasis Level */ -#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities */ -#define PCI_EXP_SLTCTL2 0x38 /* Slot Control */ -#define PCI_EXP_SLTSTA2 0x3a /* Slot Status */ +#define PCI_EXP_FLAGS 0x2 /* Capabilities register */ +#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ +#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ +#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ +#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ +#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ +#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ +#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ +#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ +#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIE Bridge */ +#define PCI_EXP_TYPE_ROOT_INT_EP 0x9 /* Root Complex Integrated Endpoint */ +#define PCI_EXP_TYPE_ROOT_EC 0xa /* Root Complex Event Collector */ +#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ +#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ +#define PCI_EXP_DEVCAP 0x4 /* Device capabilities */ +#define PCI_EXP_DEVCAP_PAYLOAD 0x07 /* Max_Payload_Size */ +#define PCI_EXP_DEVCAP_PHANTOM 0x18 /* Phantom functions */ +#define PCI_EXP_DEVCAP_EXT_TAG 0x20 /* Extended tags */ +#define PCI_EXP_DEVCAP_L0S 0x1c0 /* L0s Acceptable Latency */ +#define PCI_EXP_DEVCAP_L1 0xe00 /* L1 Acceptable Latency */ +#define PCI_EXP_DEVCAP_ATN_BUT 0x1000 /* Attention Button Present */ +#define PCI_EXP_DEVCAP_ATN_IND 0x2000 /* Attention Indicator Present */ +#define PCI_EXP_DEVCAP_PWR_IND 0x4000 /* Power Indicator Present */ +#define PCI_EXP_DEVCAP_RBE 0x8000 /* Role-Based Error Reporting */ +#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ +#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ +#define PCI_EXP_DEVCAP_FLRESET 0x10000000 /* Function-Level Reset */ +#define PCI_EXP_DEVCTL 0x8 /* Device Control */ +#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ +#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ +#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ +#define PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */ +#define PCI_EXP_DEVCTL_RELAXED 0x0010 /* Enable Relaxed Ordering */ +#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */ +#define PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */ +#define PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */ +#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ +#define PCI_EXP_DEVCTL_NOSNOOP 0x0800 /* Enable No Snoop */ +#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ +#define PCI_EXP_DEVCTL_BCRE 0x8000 /* Bridge Configuration Retry Enable */ +#define PCI_EXP_DEVCTL_FLRESET 0x8000 /* Function-Level Reset [bit shared with BCRE] */ +#define PCI_EXP_DEVSTA 0xa /* Device Status */ +#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ +#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ +#define PCI_EXP_DEVSTA_FED 0x04 /* Fatal Error Detected */ +#define PCI_EXP_DEVSTA_URD 0x08 /* Unsupported Request Detected */ +#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ +#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ +#define PCI_EXP_LNKCAP 0xc /* Link Capabilities */ +#define PCI_EXP_LNKCAP_SPEED 0x0000f /* Maximum Link Speed */ +#define PCI_EXP_LNKCAP_WIDTH 0x003f0 /* Maximum Link Width */ +#define PCI_EXP_LNKCAP_ASPM 0x00c00 /* Active State Power Management */ +#define PCI_EXP_LNKCAP_L0S 0x07000 /* L0s Acceptable Latency */ +#define PCI_EXP_LNKCAP_L1 0x38000 /* L1 Acceptable Latency */ +#define PCI_EXP_LNKCAP_CLOCKPM 0x40000 /* Clock Power Management */ +#define PCI_EXP_LNKCAP_SURPRISE 0x80000 /* Surprise Down Error Reporting */ +#define PCI_EXP_LNKCAP_DLLA 0x100000 /* Data Link Layer Active Reporting */ +#define PCI_EXP_LNKCAP_LBNC 0x200000 /* Link Bandwidth Notification Capability */ +#define PCI_EXP_LNKCAP_PORT 0xff000000 /* Port Number */ +#define PCI_EXP_LNKCTL 0x10 /* Link Control */ +#define PCI_EXP_LNKCTL_ASPM 0x0003 /* ASPM Control */ +#define PCI_EXP_LNKCTL_RCB 0x0008 /* Read Completion Boundary */ +#define PCI_EXP_LNKCTL_DISABLE 0x0010 /* Link Disable */ +#define PCI_EXP_LNKCTL_RETRAIN 0x0020 /* Retrain Link */ +#define PCI_EXP_LNKCTL_CLOCK 0x0040 /* Common Clock Configuration */ +#define PCI_EXP_LNKCTL_XSYNCH 0x0080 /* Extended Synch */ +#define PCI_EXP_LNKCTL_CLOCKPM 0x0100 /* Clock Power Management */ +#define PCI_EXP_LNKCTL_HWAUTWD 0x0200 /* Hardware Autonomous Width Disable */ +#define PCI_EXP_LNKCTL_BWMIE 0x0400 /* Bandwidth Mgmt Interrupt Enable */ +#define PCI_EXP_LNKCTL_AUTBWIE 0x0800 /* Autonomous Bandwidth Mgmt Interrupt Enable */ +#define PCI_EXP_LNKSTA 0x12 /* Link Status */ +#define PCI_EXP_LNKSTA_SPEED 0x000f /* Negotiated Link Speed */ +#define PCI_EXP_LNKSTA_WIDTH 0x03f0 /* Negotiated Link Width */ +#define PCI_EXP_LNKSTA_TR_ERR 0x0400 /* Training Error (obsolete) */ +#define PCI_EXP_LNKSTA_TRAIN 0x0800 /* Link Training */ +#define PCI_EXP_LNKSTA_SL_CLK 0x1000 /* Slot Clock Configuration */ +#define PCI_EXP_LNKSTA_DL_ACT 0x2000 /* Data Link Layer in DL_Active State */ +#define PCI_EXP_LNKSTA_BWMGMT 0x4000 /* Bandwidth Mgmt Status */ +#define PCI_EXP_LNKSTA_AUTBW 0x8000 /* Autonomous Bandwidth Mgmt Status */ +#define PCI_EXP_SLTCAP 0x14 /* Slot Capabilities */ +#define PCI_EXP_SLTCAP_ATNB 0x0001 /* Attention Button Present */ +#define PCI_EXP_SLTCAP_PWRC 0x0002 /* Power Controller Present */ +#define PCI_EXP_SLTCAP_MRL 0x0004 /* MRL Sensor Present */ +#define PCI_EXP_SLTCAP_ATNI 0x0008 /* Attention Indicator Present */ +#define PCI_EXP_SLTCAP_PWRI 0x0010 /* Power Indicator Present */ +#define PCI_EXP_SLTCAP_HPS 0x0020 /* Hot-Plug Surprise */ +#define PCI_EXP_SLTCAP_HPC 0x0040 /* Hot-Plug Capable */ +#define PCI_EXP_SLTCAP_PWR_VAL 0x00007f80 /* Slot Power Limit Value */ +#define PCI_EXP_SLTCAP_PWR_SCL 0x00018000 /* Slot Power Limit Scale */ +#define PCI_EXP_SLTCAP_INTERLOCK 0x020000 /* Electromechanical Interlock Present */ +#define PCI_EXP_SLTCAP_NOCMDCOMP 0x040000 /* No Command Completed Support */ +#define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */ +#define PCI_EXP_SLTCTL 0x18 /* Slot Control */ +#define PCI_EXP_SLTCTL_ATNB 0x0001 /* Attention Button Pressed Enable */ +#define PCI_EXP_SLTCTL_PWRF 0x0002 /* Power Fault Detected Enable */ +#define PCI_EXP_SLTCTL_MRLS 0x0004 /* MRL Sensor Changed Enable */ +#define PCI_EXP_SLTCTL_PRSD 0x0008 /* Presence Detect Changed Enable */ +#define PCI_EXP_SLTCTL_CMDC 0x0010 /* Command Completed Interrupt Enable */ +#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ +#define PCI_EXP_SLTCTL_ATNI 0x00c0 /* Attention Indicator Control */ +#define PCI_EXP_SLTCTL_PWRI 0x0300 /* Power Indicator Control */ +#define PCI_EXP_SLTCTL_PWRC 0x0400 /* Power Controller Control */ +#define PCI_EXP_SLTCTL_INTERLOCK 0x0800 /* Electromechanical Interlock Control */ +#define PCI_EXP_SLTCTL_LLCHG 0x1000 /* Data Link Layer State Changed Enable */ +#define PCI_EXP_SLTSTA 0x1a /* Slot Status */ +#define PCI_EXP_SLTSTA_ATNB 0x0001 /* Attention Button Pressed */ +#define PCI_EXP_SLTSTA_PWRF 0x0002 /* Power Fault Detected */ +#define PCI_EXP_SLTSTA_MRLS 0x0004 /* MRL Sensor Changed */ +#define PCI_EXP_SLTSTA_PRSD 0x0008 /* Presence Detect Changed */ +#define PCI_EXP_SLTSTA_CMDC 0x0010 /* Command Completed */ +#define PCI_EXP_SLTSTA_MRL_ST 0x0020 /* MRL Sensor State */ +#define PCI_EXP_SLTSTA_PRES 0x0040 /* Presence Detect State */ +#define PCI_EXP_SLTSTA_INTERLOCK 0x0080 /* Electromechanical Interlock Status */ +#define PCI_EXP_SLTSTA_LLCHG 0x0100 /* Data Link Layer State Changed */ +#define PCI_EXP_RTCTL 0x1c /* Root Control */ +#define PCI_EXP_RTCTL_SECEE 0x0001 /* System Error on Correctable Error */ +#define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */ +#define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */ +#define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ +#define PCI_EXP_RTCTL_CRSVIS 0x0010 /* Configuration Request Retry Status Visible to SW */ +#define PCI_EXP_RTCAP 0x1e /* Root Capabilities */ +#define PCI_EXP_RTCAP_CRSVIS 0x0010 /* Configuration Request Retry Status Visible to SW */ +#define PCI_EXP_RTSTA 0x20 /* Root Status */ +#define PCI_EXP_RTSTA_PME_REQID 0x0000ffff /* PME Requester ID */ +#define PCI_EXP_RTSTA_PME_STATUS 0x00010000 /* PME Status */ +#define PCI_EXP_RTSTA_PME_PENDING 0x00020000 /* PME is Pending */ +#define PCI_EXP_DEVCAP2 0x24 /* Device capabilities 2 */ +#define PCI_EXP_DEVCTL2 0x28 /* Device Control */ +#define PCI_EXP_DEV2_TIMEOUT_RANGE(x) ((x) & 0xf) /* Completion Timeout Ranges Supported */ +#define PCI_EXP_DEV2_TIMEOUT_VALUE(x) ((x) & 0xf) /* Completion Timeout Value */ +#define PCI_EXP_DEV2_TIMEOUT_DIS 0x0010 /* Completion Timeout Disable Supported */ +#define PCI_EXP_DEV2_ARI 0x0020 /* ARI Forwarding */ +#define PCI_EXP_DEVSTA2 0x2a /* Device Status */ +#define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities */ +#define PCI_EXP_LNKCTL2 0x30 /* Link Control */ +#define PCI_EXP_LNKCTL2_SPEED(x) ((x) & 0xf) /* Target Link Speed */ +#define PCI_EXP_LNKCTL2_CMPLNC 0x0010 /* Enter Compliance */ +#define PCI_EXP_LNKCTL2_SPEED_DIS 0x0020 /* Hardware Autonomous Speed Disable */ +#define PCI_EXP_LNKCTL2_DEEMPHASIS(x) (((x) >> 6) & 1) /* Selectable De-emphasis */ +#define PCI_EXP_LNKCTL2_MARGIN(x) (((x) >> 7) & 7) /* Transmit Margin */ +#define PCI_EXP_LNKCTL2_MOD_CMPLNC 0x0400 /* Enter Modified Compliance */ +#define PCI_EXP_LNKCTL2_CMPLNC_SOS 0x0800 /* Compliance SOS */ +#define PCI_EXP_LNKCTL2_COM_DEEMPHASIS(x) (((x) >> 12) & 1) /* Compliance De-emphasis */ +#define PCI_EXP_LNKSTA2 0x32 /* Link Status */ +#define PCI_EXP_LINKSTA2_DEEMPHASIS(x) ((x) & 1) /* Current De-emphasis Level */ +#define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities */ +#define PCI_EXP_SLTCTL2 0x38 /* Slot Control */ +#define PCI_EXP_SLTSTA2 0x3a /* Slot Status */ /* MSI-X */ -#define PCI_MSIX_ENABLE 0x8000 -#define PCI_MSIX_MASK 0x4000 -#define PCI_MSIX_TABSIZE 0x03ff -#define PCI_MSIX_TABLE 4 -#define PCI_MSIX_PBA 8 -#define PCI_MSIX_BIR 0x7 +#define PCI_MSIX_ENABLE 0x8000 +#define PCI_MSIX_MASK 0x4000 +#define PCI_MSIX_TABSIZE 0x03ff +#define PCI_MSIX_TABLE 4 +#define PCI_MSIX_PBA 8 +#define PCI_MSIX_BIR 0x7 /* Subsystem vendor/device ID for PCI bridges */ -#define PCI_SSVID_VENDOR 4 -#define PCI_SSVID_DEVICE 6 +#define PCI_SSVID_VENDOR 4 +#define PCI_SSVID_DEVICE 6 /* Advanced Error Reporting */ #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ @@ -665,24 +667,24 @@ #define PCI_ERR_ROOT_SRC 54 /* Virtual Channel */ -#define PCI_VC_PORT_REG1 4 -#define PCI_VC_PORT_REG2 8 -#define PCI_VC_PORT_CTRL 12 -#define PCI_VC_PORT_STATUS 14 -#define PCI_VC_RES_CAP 16 -#define PCI_VC_RES_CTRL 20 -#define PCI_VC_RES_STATUS 26 +#define PCI_VC_PORT_REG1 4 +#define PCI_VC_PORT_REG2 8 +#define PCI_VC_PORT_CTRL 12 +#define PCI_VC_PORT_STATUS 14 +#define PCI_VC_RES_CAP 16 +#define PCI_VC_RES_CTRL 20 +#define PCI_VC_RES_STATUS 26 /* Power Budgeting */ -#define PCI_PWR_DSR 4 /* Data Select Register */ -#define PCI_PWR_DATA 8 /* Data Register */ +#define PCI_PWR_DSR 4 /* Data Select Register */ +#define PCI_PWR_DATA 8 /* Data Register */ #define PCI_PWR_DATA_BASE(x) ((x) & 0xff) /* Base Power */ #define PCI_PWR_DATA_SCALE(x) (((x) >> 8) & 3) /* Data Scale */ #define PCI_PWR_DATA_PM_SUB(x) (((x) >> 10) & 7) /* PM Sub State */ #define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3) /* PM State */ #define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7) /* Type */ #define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */ -#define PCI_PWR_CAP 12 /* Capability */ +#define PCI_PWR_CAP 12 /* Capability */ #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ /* Access Control Services */ @@ -713,40 +715,40 @@ #define PCI_ARI_CTRL 0x06 /* ARI Control Register */ #define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */ #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ -#define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ +#define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ /* Address Translation Service */ -#define PCI_ATS_CAP 0x04 /* ATS Capability Register */ -#define PCI_ATS_CAP_IQD(x) ((x) & 0x1f) /* Invalidate Queue Depth */ +#define PCI_ATS_CAP 0x04 /* ATS Capability Register */ +#define PCI_ATS_CAP_IQD(x) ((x) & 0x1f) /* Invalidate Queue Depth */ #define PCI_ATS_CTRL 0x06 /* ATS Control Register */ -#define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ -#define PCI_ATS_CTRL_ENABLE 0x8000 /* ATS Enable */ +#define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ +#define PCI_ATS_CTRL_ENABLE 0x8000 /* ATS Enable */ /* Single Root I/O Virtualization */ -#define PCI_IOV_CAP 0x04 /* SR-IOV Capability Register */ -#define PCI_IOV_CAP_VFM 0x00000001 /* VF Migration Capable */ -#define PCI_IOV_CAP_IMN(x) ((x) >> 21) /* VF Migration Interrupt Message Number */ -#define PCI_IOV_CTRL 0x08 /* SR-IOV Control Register */ -#define PCI_IOV_CTRL_VFE 0x0001 /* VF Enable */ -#define PCI_IOV_CTRL_VFME 0x0002 /* VF Migration Enable */ -#define PCI_IOV_CTRL_VFMIE 0x0004 /* VF Migration Interrupt Enable */ -#define PCI_IOV_CTRL_MSE 0x0008 /* VF MSE */ -#define PCI_IOV_CTRL_ARI 0x0010 /* ARI Capable Hierarchy */ -#define PCI_IOV_STATUS 0x0a /* SR-IOV Status Register */ -#define PCI_IOV_STATUS_MS 0x0001 /* VF Migration Status */ -#define PCI_IOV_INITIALVF 0x0c /* Number of VFs that are initially associated */ -#define PCI_IOV_TOTALVF 0x0e /* Maximum number of VFs that could be associated */ -#define PCI_IOV_NUMVF 0x10 /* Number of VFs that are available */ -#define PCI_IOV_FDL 0x12 /* Function Dependency Link */ -#define PCI_IOV_OFFSET 0x14 /* First VF Offset */ -#define PCI_IOV_STRIDE 0x16 /* Routing ID offset from one VF to the next one */ -#define PCI_IOV_DID 0x1a /* VF Device ID */ -#define PCI_IOV_SUPPS 0x1c /* Supported Page Sizes */ -#define PCI_IOV_SYSPS 0x20 /* System Page Size */ -#define PCI_IOV_BAR_BASE 0x24 /* VF BAR0, VF BAR1, ... VF BAR5 */ -#define PCI_IOV_NUM_BAR 6 /* Number of VF BARs */ -#define PCI_IOV_MSAO 0x3c /* VF Migration State Array Offset */ -#define PCI_IOV_MSA_BIR(x) ((x) & 7) /* VF Migration State BIR */ +#define PCI_IOV_CAP 0x04 /* SR-IOV Capability Register */ +#define PCI_IOV_CAP_VFM 0x00000001 /* VF Migration Capable */ +#define PCI_IOV_CAP_IMN(x) ((x) >> 21) /* VF Migration Interrupt Message Number */ +#define PCI_IOV_CTRL 0x08 /* SR-IOV Control Register */ +#define PCI_IOV_CTRL_VFE 0x0001 /* VF Enable */ +#define PCI_IOV_CTRL_VFME 0x0002 /* VF Migration Enable */ +#define PCI_IOV_CTRL_VFMIE 0x0004 /* VF Migration Interrupt Enable */ +#define PCI_IOV_CTRL_MSE 0x0008 /* VF MSE */ +#define PCI_IOV_CTRL_ARI 0x0010 /* ARI Capable Hierarchy */ +#define PCI_IOV_STATUS 0x0a /* SR-IOV Status Register */ +#define PCI_IOV_STATUS_MS 0x0001 /* VF Migration Status */ +#define PCI_IOV_INITIALVF 0x0c /* Number of VFs that are initially associated */ +#define PCI_IOV_TOTALVF 0x0e /* Maximum number of VFs that could be associated */ +#define PCI_IOV_NUMVF 0x10 /* Number of VFs that are available */ +#define PCI_IOV_FDL 0x12 /* Function Dependency Link */ +#define PCI_IOV_OFFSET 0x14 /* First VF Offset */ +#define PCI_IOV_STRIDE 0x16 /* Routing ID offset from one VF to the next one */ +#define PCI_IOV_DID 0x1a /* VF Device ID */ +#define PCI_IOV_SUPPS 0x1c /* Supported Page Sizes */ +#define PCI_IOV_SYSPS 0x20 /* System Page Size */ +#define PCI_IOV_BAR_BASE 0x24 /* VF BAR0, VF BAR1, ... VF BAR5 */ +#define PCI_IOV_NUM_BAR 6 /* Number of VF BARs */ +#define PCI_IOV_MSAO 0x3c /* VF Migration State Array Offset */ +#define PCI_IOV_MSA_BIR(x) ((x) & 7) /* VF Migration State BIR */ #define PCI_IOV_MSA_OFFSET(x) ((x) & 0xfffffff8) /* VF Migration State Offset */ /* @@ -758,8 +760,8 @@ * 2:0 = function */ #define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) -#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) -#define PCI_FUNC(devfn) ((devfn) & 0x07) +#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) +#define PCI_FUNC(devfn) ((devfn) & 0x07) /* Device classes and subclasses */ Index: branches/iFabio/Chameleon/i386/libsaio/msdos.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/msdos.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/msdos.c (revision 298) @@ -45,7 +45,6 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #define tolower(c) (((c)>='A' && c<='Z')?((c) | 0x20):(c)) #include "libsaio.h" #include "sl.h" Index: branches/iFabio/Chameleon/i386/libsaio/fake_efi.c =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/fake_efi.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/fake_efi.c (revision 298) @@ -22,19 +22,19 @@ /* * Modern Darwin kernels require some amount of EFI because Apple machines all - * have EFI. Modifying the kernel source to not require EFI is of course + * have EFI. Modifying the kernel source to not require EFI is of course * possible but would have to be maintained as a separate patch because it is * unlikely that Apple wishes to add legacy support to their kernel. * * As you can see from the Apple-supplied code in bootstruct.c, it seems that * the intention was clearly to modify this booter to provide EFI-like structures - * to the kernel rather than modifying the kernel to handle non-EFI stuff. This + * to the kernel rather than modifying the kernel to handle non-EFI stuff. This * makes a lot of sense from an engineering point of view as it means the kernel * for the as yet unreleased EFI-only Macs could still be booted by the non-EFI * DTK systems so long as the kernel checked to ensure the boot tables were - * filled in appropriately. Modern xnu requires a system table and a runtime + * filled in appropriately. Modern xnu requires a system table and a runtime * services table and performs no checks whatsoever to ensure the pointers to - * these tables are non-NULL. Therefore, any modern xnu kernel will page fault + * these tables are non-NULL. Therefore, any modern xnu kernel will page fault * early on in the boot process if the system table pointer is zero. * * Even before that happens, the tsc_init function in modern xnu requires the FSB @@ -43,7 +43,7 @@ * * As of this writing, the current implementation found here is good enough * to make the currently available xnu kernel boot without modification on a - * system with an appropriate processor. With a minor source modification to + * system with an appropriate processor. With a minor source modification to * the tsc_init function to remove the explicit check for Core or Core 2 * processors the kernel can be made to boot on other processors so long as * the code can be executed by the processor and the machine contains the @@ -53,7 +53,6 @@ /*========================================================================== * Utility function to make a device tree string from an EFI_GUID */ - static inline char * mallocStringForGuid(EFI_GUID const *pGuid) { char *string = malloc(37); @@ -64,7 +63,6 @@ /*========================================================================== * Function to map 32 bit physical address to 64 bit virtual address */ - static uint64_t ptov64(uint32_t addr) { return ((uint64_t)addr | 0xFFFFFF8000000000ULL); @@ -152,7 +150,6 @@ * Because we build against modern headers with kBootArgsRevision 4 we * also take care to set efiMode = 32. */ - void setupEfiTables32(void) { // We use the fake_efi_pages struct so that we only need to do one kernel @@ -409,14 +406,14 @@ #define SMBIOS_ANCHOR_UINT32_LE 0x5f4d535f #define EFI_ACPI_TABLE_GUID \ - { \ +{ \ 0xeb9d2d30, 0x2d88, 0x11d3, { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ - } +} #define EFI_ACPI_20_TABLE_GUID \ - { \ +{ \ 0x8868e871, 0xe4f1, 0x11d3, { 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ - } +} EFI_GUID gEfiAcpiTableGuid = EFI_ACPI_TABLE_GUID; EFI_GUID gEfiAcpi20TableGuid = EFI_ACPI_20_TABLE_GUID; @@ -441,7 +438,6 @@ /* * Get an smbios option string option to convert to EFI_CHAR16 string */ - static EFI_CHAR16* getSmbiosChar16(const char * key, size_t* len) { const char *src = getStringForKey(key, &bootInfo->smbiosConfig); @@ -461,7 +457,6 @@ /* * Get the SystemID from the bios dmi info */ - static EFI_CHAR8* getSmbiosUUID() { static EFI_CHAR8 uuid[UUID_LEN]; @@ -490,7 +485,6 @@ * return a binary UUID value from the overriden SystemID and SMUUID if found, * or from the bios if not, or from a fixed value if no bios value is found */ - static EFI_CHAR8* getSystemID() { // unable to determine UUID for host. Error: 35 fix @@ -516,7 +510,6 @@ * Must be called AFTER setup Acpi because we need to take care of correct * facp content to reflect in ioregs */ - void setupSystemType() { Node *node = DT__FindNode("/", false); @@ -614,23 +607,21 @@ /* * Must be called AFTER getSmbios */ - void setupBoardId() { - Node *node; - node = DT__FindNode("/", false); - if (node == 0) { - stop("Couldn't get root node"); - } - const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig); - if (boardid) - DT__AddProperty(node, BOARDID_PROP, strlen(boardid)+1, (EFI_CHAR16*)boardid); -} + Node *node; + node = DT__FindNode("/", false); + if (node == 0) { + stop("Couldn't get root node"); + } + const char *boardid = getStringForKey("SMboardproduct", &bootInfo->smbiosConfig); + if (boardid) + DT__AddProperty(node, BOARDID_PROP, strlen(boardid)+1, (EFI_CHAR16*)boardid); +} /* * Load the smbios.plist override config file if any */ - static void setupSmbiosConfigFile(const char *filename) { char dirSpecSMBIOS[128] = ""; @@ -665,14 +656,12 @@ // get a chance to scan mem dynamically if user asks for it while having the config options loaded as well, // as opposed to when it was in scan_platform(); also load the orig. smbios so that we can access dmi info without // patching the smbios yet - scan_mem(); } /* * Installs all the needed configuration table entries */ - static void setupEfiConfigurationTable() { smbios_p = (EFI_PTR32)getSmbios(SMBIOS_PATCHED); @@ -728,7 +717,6 @@ /* * Entrypoint from boot.c */ - void setupFakeEfi(void) { // Generate efi device strings Index: branches/iFabio/Chameleon/i386/libsaio/saio_internal.h =================================================================== --- branches/iFabio/Chameleon/i386/libsaio/saio_internal.h (revision 297) +++ branches/iFabio/Chameleon/i386/libsaio/saio_internal.h (revision 298) @@ -47,7 +47,7 @@ extern int ebioswrite(int dev, long sec, int count); extern int get_drive_info(int drive, struct driveInfo *dp); extern int ebiosEjectMedia(int biosdev); -extern void putc(int ch); +extern void bios_putchar(int ch); extern void putca(int ch, int attr, int repeat); extern int getc(void); extern void pause(); @@ -91,7 +91,7 @@ extern bool gErrors; extern void initBooterLog(void); extern void setupBooterLog(void); -extern void putchar(int ch); +extern int putchar(int ch); extern int getchar(void); extern void msglog(const char * format, ...); extern int printf(const char *format, ...); Index: branches/iFabio/Chameleon/i386/boot2/graphics.c =================================================================== --- branches/iFabio/Chameleon/i386/boot2/graphics.c (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/graphics.c (revision 298) @@ -1209,8 +1209,8 @@ { currentIndicator = 0; } - putc(indicator[currentIndicator++]); - putc('\b'); + putchar(indicator[currentIndicator++]); + putchar('\b'); } } @@ -1219,8 +1219,8 @@ { if ( getVideoMode() == VGA_TEXT_MODE ) { - putc(' '); - putc('\b'); + putchar(' '); + putchar('\b'); } } Index: branches/iFabio/Chameleon/i386/boot2/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/boot2/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/Makefile (revision 298) @@ -7,6 +7,8 @@ IMGSKELROOT = $(SRCROOT)/imgskel CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot +VPATH = $(SYMROOT) + # Makefile for i386 boot program # define FLOPPY and SMALL using DEFINES macro as necessary @@ -21,7 +23,7 @@ -fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float -nostdinc -include $(SRCROOT)/autoconf.h - + CPPFLAGS := $(CPPFLAGS) -nostdinc++ -include $(SRCROOT)/autoconf.h DEFINES= @@ -41,7 +43,7 @@ # The ordering is important; # boot2.o must be first. OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o lzss.o mboot.o \ - ramdisk.o picopng.o resume.o bmdecompress.o graphic_utils.o gui.o modules.o modules_support.o + ramdisk.o picopng.o resume.o bmdecompress.o graphic_utils.o gui.o modules.o modules_support.o boot_modules.o # button.o browser.o scrollbar.o == NOTYET UTILDIR = ../util @@ -61,7 +63,6 @@ PATCH_ADDR = $(shell echo ${SYMBOL_ADDR}-${DATA_ADDR}+${DATA_OFFSET} | bc) - all: $(DIRS_NEEDED) boot ifeq (${CONFIG_EMBED_THEME}, y) @@ -75,10 +76,11 @@ endif + @${MKDIRS} $(OBJROOT)/../boot2_modules/ @echo "\t[LD] boot.sys" - @$(CC) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \ - -nostdlib -arch i386 -Wl,-segalign,20 \ - -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext + @$(CC) -Wl,-segaddr,__INIT,$(BOOT2ADDR) -Wl,-segalign,20 -Wl,-preload \ + -nostdlib -arch i386 -static \ + -o $(SYMROOT)/boot.sys $(filter %.o,$^) `find $(OBJROOT)/../boot2_modules/ -name \*.o` $(LIBS) -lcc_kext ifeq (${CONFIG_MODULES}, y) @@ -92,7 +94,7 @@ @$(CC) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \ -nostdlib -arch i386 -Wl,-segalign,20 \ -Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \ - -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext + -o $(SYMROOT)/boot.sys $(filter %.o,$^) `find $(OBJROOT)/../boot2_modules/ -name \*.o` $(LIBS) -lcc_kext @# Second pass, fixup global var locations @${RM} $(SYMROOT)/${SYMBOLS_MODULE} @@ -106,7 +108,7 @@ @$(CC) -static -Wl,-preload -Wl,-segaddr,__INIT,$(BOOT2ADDR) \ -nostdlib -arch i386 -Wl,-segalign,20 \ -Wl,-sectcreate,__DATA,__Symbols,$(SYMROOT)/Symbols.dylib \ - -o $(SYMROOT)/boot.sys $(filter %.o,$^) $(LIBS) -lcc_kext + -o $(SYMROOT)/boot.sys $(filter %.o,$^) `find $(OBJROOT)/../boot2_modules/ -name \*.o` $(LIBS) -lcc_kext @$(LD) -arch i386 \ -undefined dynamic_lookup \ @@ -118,17 +120,12 @@ -macosx_version_min 10.6 \ -o $(OBJROOT)/Symbols_LINKER_ONLY.dylib - - - - endif @make embed_symbols # this is done in a sub process after boot.sys exists so the strings are populated correctly @${RM} $(SYMROOT)/boot2.sys - @##size $(SYMROOT)/boot.sys @ls -l $(SYMROOT)/boot @( size=`ls -l $(SYMROOT)/boot | awk '{ print $$5}'` ; \ @@ -139,7 +136,7 @@ exit 1;\ fi) - + embed_symbols: ifeq (${CONFIG_MODULES}, y) @echo ================= Embedding Symbols.dylib ================= @@ -152,7 +149,7 @@ @echo "\t[MACHOCONV] boot" @$(SYMROOT)/machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot - + $(SYMROOT)/vers.h: @echo "#define I386BOOT_VERSION \"5.0.132\"" > $(SYMROOT)/vers.h @echo "#define I386BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $(SYMROOT)/vers.h Index: branches/iFabio/Chameleon/i386/boot2/boot.c =================================================================== --- branches/iFabio/Chameleon/i386/boot2/boot.c (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/boot.c (revision 298) @@ -134,82 +134,82 @@ static int ExecKernel(void *binary) { - entry_t kernelEntry; - int ret; - - bootArgs->kaddr = bootArgs->ksize = 0; + entry_t kernelEntry; + int ret; + + bootArgs->kaddr = bootArgs->ksize = 0; execute_hook("ExecKernel", (void*)binary, NULL, NULL, NULL); - - ret = DecodeKernel(binary, - &kernelEntry, - (char **) &bootArgs->kaddr, - (int *)&bootArgs->ksize ); - - if ( ret != 0 ) - return ret; - - // Reserve space for boot args - reserveKernBootStruct(); - + + ret = DecodeKernel(binary, + &kernelEntry, + (char **) &bootArgs->kaddr, + (int *)&bootArgs->ksize ); + + if ( ret != 0 ) + return ret; + + // Reserve space for boot args + reserveKernBootStruct(); + // Notify modules that the kernel has been decoded execute_hook("DecodedKernel", (void*)binary, NULL, NULL, NULL); - // Load boot drivers from the specifed root path. - if (!gHaveKernelCache) + // Load boot drivers from the specifed root path. + if (!gHaveKernelCache) LoadDrivers("/"); - - - clearActivityIndicator(); - - if (gErrors) { - printf("Errors encountered while starting up the computer.\n"); - printf("Pausing %d seconds...\n", kBootErrorTimeout); - sleep(kBootErrorTimeout); - } - - setupFakeEfi(); - - md0Ramdisk(); - - verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64"); - - // Cleanup the PXE base code. - - if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) { + + + clearActivityIndicator(); + + if (gErrors) { + printf("Errors encountered while starting up the computer.\n"); + printf("Pausing %d seconds...\n", kBootErrorTimeout); + sleep(kBootErrorTimeout); + } + + setupFakeEfi(); + + md0Ramdisk(); + + verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64"); + + // Cleanup the PXE base code. + + if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) { if ( (ret = nbpUnloadBaseCode()) != nbpStatusSuccess ) - { - printf("nbpUnloadBaseCode error %d\n", (int) ret); - sleep(2); - } - } - - bool dummyVal; + { + printf("nbpUnloadBaseCode error %d\n", (int) ret); + sleep(2); + } + } + + bool dummyVal; if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) { printf("Press any key to continue..."); getc(); } - + usb_loop(); - + execute_hook("Kernel Start", (void*)kernelEntry, (void*)bootArgs, NULL, NULL); // Notify modules that the kernel is about to be started - // If we were in text mode, switch to graphics mode. - // This will draw the boot graphics unless we are in - // verbose mode. - - if(gVerboseMode) - setVideoMode( GRAPHICS_MODE, 0 ); - else - drawBootGraphics(); + // If we were in text mode, switch to graphics mode. + // This will draw the boot graphics unless we are in + // verbose mode. + if(gVerboseMode) + setVideoMode( GRAPHICS_MODE, 0 ); + else + drawBootGraphics(); + setupBooterLog(); - finalizeBootStruct(); - + finalizeBootStruct(); + if (checkOSVersion("10.7")) { // Masking out so that Lion doesn't doublefault - outb(0x21, 0xff); /* Maskout all interrupts Pic1 */ - outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */ + outb(0x21, 0xff); /* Maskout all interrupts Pic1 */ + outb(0xa1, 0xff); /* Maskout all interrupts Pic2 */ // Jump to kernel's entry point. There's no going back now. @@ -221,9 +221,8 @@ startprog( kernelEntry, bootArgsPreLion ); } - // Not reached - - return 0; + // Not reached + return 0; } //========================================================================== @@ -492,12 +491,16 @@ else if (checkOSVersion("10.6")) { sprintf(gBootKernelCacheFile, "kernelcache_%s", (archCpuType == CPU_TYPE_I386) ? "i386" : "x86_64"); int lnam = sizeof(gBootKernelCacheFile) + 9; //with adler32 - //Slice - TODO - /* - - but the name is longer .adler32 and more... - kernelcache_i386.E102928C.qSs0 - so will opendir and scan for some files - */ + //Slice - TODO ??? + // e.g. kernelcache_i386.E102928C.qSs0 = "unsaved" cache file. + // + // See kext_tools-180.2.1/kextcache_main.c: + // "Source directory has changed since starting; " + // "not saving cache file %s." + // or + // "Source kernel has changed since starting; " + // "not saving cache file %s." + char* name; long prev_time = 0; @@ -567,7 +570,9 @@ do { if (trycache) { bootFile = gBootKernelCacheFile; + verbose("Loading kernel cache %s\n", bootFile); + if (checkOSVersion("10.7")) { ret = LoadThinFatFile(bootFile, &binary); } @@ -575,10 +580,13 @@ ret = LoadFile(bootFile); binary = (void *)kLoadAddr; } + if (ret >= 0) break; + verbose("Kernel cache did not loaded %s\n ", bootFile); } + bootFile = bootInfo->bootFile; // Try to load kernel image from alternate locations on boot helper partitions. @@ -622,7 +630,6 @@ ret = LoadThinFatFile(bootFileSpec, &binary); } } - } while (0); clearActivityIndicator(); @@ -649,9 +656,9 @@ // chainboot if (status==1) { - if (getVideoMode() == GRAPHICS_MODE) { // if we are already in graphics-mode, - setVideoMode(VGA_TEXT_MODE, 0); // switch back to text mode - } + if (getVideoMode() == GRAPHICS_MODE) { // if we are already in graphics-mode, + setVideoMode(VGA_TEXT_MODE, 0); // switch back to text mode + } } if ((gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit) { Index: branches/iFabio/Chameleon/i386/boot2/boot.h =================================================================== --- branches/iFabio/Chameleon/i386/boot2/boot.h (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/boot.h (revision 298) @@ -60,7 +60,6 @@ #define kWaitForKeypressKey "Wait" #define kUseAtiROM "UseAtiROM" /* ati.c */ - #define kAtiConfig "AtiConfig" /* ati.c */ #define kATYbinimage "ATYbinimage" /* ati.c */ @@ -70,10 +69,10 @@ #define kProductVersion "ProductVersion" /* boot.c */ #define karch "arch" /* boot.c */ #define kUseKernelCache "UseKernelCache" /* boot.c */ + #define kDSDT "DSDT" /* acpi_patcher.c */ #define kDropSSDT "DropSSDT" /* acpi_patcher.c */ #define kRestartFix "RestartFix" /* acpi_patcher.c */ - #define kGeneratePStates "GeneratePStates" /* acpi_patcher.c */ #define kGenerateCStates "GenerateCStates" /* acpi_patcher.c */ #define kEnableC2States "EnableC2State" /* acpi_patcher.c */ @@ -169,15 +168,15 @@ extern void spinActivityIndicator(); extern void clearActivityIndicator(); extern void drawColorRectangle( unsigned short x, - unsigned short y, - unsigned short width, - unsigned short height, - unsigned char colorIndex ); + unsigned short y, + unsigned short width, + unsigned short height, + unsigned char colorIndex ); extern void drawDataRectangle( unsigned short x, - unsigned short y, - unsigned short width, - unsigned short height, - unsigned char * data ); + unsigned short y, + unsigned short width, + unsigned short height, + unsigned char * data ); extern int convertImage( unsigned short width, unsigned short height, Index: branches/iFabio/Chameleon/i386/boot2/modules.c =================================================================== --- branches/iFabio/Chameleon/i386/boot2/modules.c (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/modules.c (revision 298) @@ -10,6 +10,7 @@ #include "boot.h" #include "bootstruct.h" #include "modules.h" +#include "boot_modules.h" #if CONFIG_MODULE_DEBUG @@ -40,6 +41,10 @@ */ int init_module_system() { + // Start any modules that were compiled in first. + start_built_in_modules(); + + int retVal = 0; void (*module_start)(void) = NULL; char* module_data = symbols_module_start + BOOT2_ADDR; @@ -87,7 +92,14 @@ return retVal; } +void start_built_in_module(char* name, void(*start_function)(void)) +{ + start_function(); + // Notify the module system that this module really exists, specificaly, let other module link with it + module_loaded(name /*, moduleName, moduleVersion, moduleCompat*/); +} + /* * Load all modules in the /Extra/modules/ directory * Module depencdies will be loaded first Index: branches/iFabio/Chameleon/i386/boot2/modules.h =================================================================== --- branches/iFabio/Chameleon/i386/boot2/modules.h (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/modules.h (revision 298) @@ -4,6 +4,7 @@ * */ +#include #include #include @@ -53,6 +54,7 @@ int init_module_system(); void load_all_modules(); +void start_built_in_module(char* name, void(*start_function)(void)); int load_module(char* module); @@ -105,4 +107,4 @@ /********************************************************************************/ void dyld_stub_binder(); -#endif /* __BOOT_MODULES_H */ \ No newline at end of file +#endif /* __BOOT_MODULES_H */ Index: branches/iFabio/Chameleon/i386/boot2/gui.c =================================================================== --- branches/iFabio/Chameleon/i386/boot2/gui.c (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/gui.c (revision 298) @@ -180,7 +180,8 @@ static bool infoMenuNativeBoot = false; -static unsigned long screen_params[4] = {DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, 32, 0}; // here we store the used screen resolution +// here we store the used screen resolution +static unsigned long screen_params[4] = {DEFAULT_SCREEN_WIDTH, DEFAULT_SCREEN_HEIGHT, 32, 0}; static int getImageIndexByName(const char *name) { @@ -202,13 +203,13 @@ int result; // NOTE: This algorithm assumes that the embedded images are sorted. - // This is currently done using the make file. If the array is ever - // manually generated, this *will* fail to work properly. + // This is currently done using the make file. If the array is + // generated manualy, this *will* fail to work properly. while((result = strcmp(name, embeddedImages[compareIndex].name)) != 0) { - if(result > 0) // We need to search a HIGHER index + if (result > 0) // We need to search a HIGHER index { - if(compareIndex != lowerLimit) + if (compareIndex != lowerLimit) { lowerLimit = compareIndex; } @@ -220,7 +221,7 @@ } else // We Need to search a LOWER index { - if(compareIndex != upperLimit) + if (compareIndex != upperLimit) { upperLimit = compareIndex; } @@ -1062,15 +1063,16 @@ char * last_str; }; -static void -sputc(int c, struct putc_info * pi) +static int +sputc(int c, struct putc_info * pi) //Azi: exists on console.c & printf.c { if (pi->last_str) if (pi->str == pi->last_str) { *(pi->str) = '\0'; - return; + return 0; } *(pi->str)++ = c; + return c; } int gprintf( window_t * window, const char * fmt, ...) Index: branches/iFabio/Chameleon/i386/boot2/options.c =================================================================== --- branches/iFabio/Chameleon/i386/boot2/options.c (revision 297) +++ branches/iFabio/Chameleon/i386/boot2/options.c (revision 298) @@ -1486,7 +1486,7 @@ default: if (isxdigit(key & kASCIIKeyMask) && digitsI < 2) { - putc(key & kASCIIKeyMask); + putchar(key & kASCIIKeyMask); digits[digitsI++] = key & kASCIIKeyMask; } else { // TODO: Beep or something Index: branches/iFabio/Chameleon/i386/config/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/config/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/config/Makefile (revision 298) @@ -47,7 +47,7 @@ config: $(DIRS_NEEDED) $(SYMPROG) @cd ${SRCROOT} && $(SYMPROG) $(SRCROOT)/Cconfig - + rebuild_config: $(DIRS_NEEDED) $(SYMPROG) @cd ${SRCROOT} && $(SYMPROG) $(SRCROOT)/Cconfig rebuild @@ -55,4 +55,4 @@ .PHONY: config #dependencies --include $(OBJROOT)/Makedep \ No newline at end of file +-include $(OBJROOT)/Makedep Index: branches/iFabio/Chameleon/i386/modules/Resolution/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/modules/Resolution/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/modules/Resolution/Makefile (revision 298) @@ -1,7 +1,7 @@ MODULE_NAME = Resolution MODULE_VERSION = "1.0.0" MODULE_COMPAT_VERSION = "1.0.0" -MODULE_START = _$(MODULE_NAME)_start +MODULE_START = $(MODULE_NAME)_start MODULE_DEPENDENCIES = @@ -9,41 +9,4 @@ MODULE_OBJS = Resolution.o edid.o 915resolution.o -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 - -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) - -SFILES = -CFILES = -HFILES = -EXPORTED_HFILES = -INSTALLED_HFILES = -OTHERFILES = Makefile -ALLSRC = $(SFILES) $(CFILES) \ - $(HFILES) $(OTHERFILES) -DIRS_NEEDED = $(OBJROOT) $(SYMROOT) - -all embedtheme optionrom: dylib - -include ../MakeInc.dir \ No newline at end of file +include ../MakeInc.dir Index: branches/iFabio/Chameleon/i386/modules/MakeInc.dir =================================================================== --- branches/iFabio/Chameleon/i386/modules/MakeInc.dir (revision 297) +++ branches/iFabio/Chameleon/i386/modules/MakeInc.dir (revision 298) @@ -7,17 +7,30 @@ IMGSKELROOT = $(SRCROOT)/imgskel CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot + +ifeq ($(BUILT_IN),yes) +override OBJROOT = $(SRCROOT)/obj/i386/boot2_modules/$(DIR) +override SYMROOT = $(SRCROOT)/sym/i386/ +endif + include ${SRCROOT}/Make.rules -UTILDIR = ../../util -LIBSADIR = ../../libsa -LIBSAIODIR = ../../libsaio -BOOT2DIR = ../../boot2 +ifeq ($(BUILT_IN),yes) -INC = -I$(SRCROOT)/i386/modules/include/ -Iinclude/ -I$(SRCROOT)/i386/modules/module_includes/ -I$(SRCROOT)/i386/libsaio/ -I$(SRCROOT)/i386/libsa/ -I$(SRCROOT)/i386/include/ -I$(SRCROOT)/i386/boot2/ -DEFINES := -D__KLIBC__ $(DEFINES) +CFLAGS := $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ + -fno-builtin -DSAIO_INTERNAL_USER -static $(OMIT_FRAME_POINTER_CFLAG) \ + -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ + -march=pentium4 -msse2 -mfpmath=sse -msoft-float -nostdinc -include $(SRCROOT)/autoconf.h + +CPPFLAGS := $(CPPFLAGS) -arch i386 -static -nostdinc++ -Wmost -Werror \ + -fno-builtin -mpreferred-stack-boundary=2 \ + -fno-align-functions -fno-stack-protector \ + -march=pentium4 -msse2 -mfpmath=sse -msoft-float \ + -arch i386 -include $(SRCROOT)/autoconf.h +else + CFLAGS := $(CLFAGS) -nostdinc -Wmost -Werror \ -fno-builtin -mpreferred-stack-boundary=2 \ -fno-align-functions -fno-stack-protector \ @@ -30,18 +43,67 @@ -march=pentium4 -msse2 -mfpmath=sse -msoft-float \ -arch i386 -include $(SRCROOT)/autoconf.h +endif + + +UTILDIR = ../../util +LIBSADIR = ../../libsa +LIBSAIODIR = ../../libsaio +BOOT2DIR = ../../boot2 + +INC = -I$(SRCROOT)/i386/modules/include/ -Iinclude/ -I$(SRCROOT)/i386/modules/module_includes/ -I$(SRCROOT)/i386/libsaio/ -I$(SRCROOT)/i386/libsa/ -I$(SRCROOT)/i386/include/ -I$(SRCROOT)/i386/boot2/ +DEFINES := -D__KLIBC__ $(DEFINES) + MODULE_DEPENDENCIES := $(foreach x,$(MODULE_DEPENDENCIES),-weak_library $(SYMROOT)/modules/$(x).dylib) INSTALLDIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/B/PrivateHeaders/standalone +##$(error DEFINED AS $(MODULE_DEFINITION)) + +MODULE_DEFINITION := $(CONFIG_$(shell echo $(MODULE_NAME) | tr '[:lower:]' '[:upper:]')_MODULE) + + +ifeq ($(MODULE_DEFINITION),m) +ifneq ($(BUILT_IN),yes) + +# Make this as a *MODULE* +all: dylib + +else +# Module not selected to be compiled as a module +all: + +endif + +else + +ifeq ($(MODULE_DEFINITION),y) +ifeq ($(BUILT_IN),yes) + +# Make this *BUILT IN* +all: ${OBJROOT} ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) $(SYMROOT)/boot_modules.h $(SYMROOT)/boot_modules.c + +else +# Module not selected to be built in +all: + +endif +else + +# Don't compile this module +all: + +endif +endif + dylib: ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) $(SYMROOT)/modules/$(MODULE_NAME).dylib $(SYMROOT)/modules/$(MODULE_NAME).dylib: @echo "\t[LD] $(MODULE_NAME).dylib" @ld -arch i386 \ - -alias $(MODULE_START) start \ + -alias _$(MODULE_START) start \ -dylib -read_only_relocs suppress \ -S -x -Z -dead_strip_dylibs \ -no_uuid \ @@ -75,7 +137,15 @@ +.PHONY: $(SYMROOT)/boot_modules.h +.PHONY: $(SYMROOT)/boot_modules.c +$(SYMROOT)/boot_modules.c: + @echo "\tstart_built_in_module(\"$(MODULE_NAME)\", &$(MODULE_START));" >> $@ + +$(SYMROOT)/boot_modules.h: + @echo "void $(MODULE_START)(); // $(MODULE_NAME)" >> $@ + + #dependencies -#-include $(OBJROOT)/Makedep - +-include $(OBJROOT)/Makedep Index: branches/iFabio/Chameleon/i386/modules/klibc/klibc.c =================================================================== --- branches/iFabio/Chameleon/i386/modules/klibc/klibc.c (revision 297) +++ branches/iFabio/Chameleon/i386/modules/klibc/klibc.c (revision 298) @@ -12,8 +12,10 @@ { } -void _exit() +void _exit(int status) { + stop("exit() called\n"); + while(1) halt(); // this is never reached } char __toupper(char c) Index: branches/iFabio/Chameleon/i386/modules/klibc/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/modules/klibc/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/modules/klibc/Makefile (revision 298) @@ -1,7 +1,7 @@ MODULE_NAME = klibc MODULE_VERSION = "1.5.20" MODULE_COMPAT_VERSION = "1.5.20" -MODULE_START = _$(MODULE_NAME)_start +MODULE_START = $(MODULE_NAME)_start MODULE_DEPENDENCIES = DIR = klibc @@ -11,8 +11,8 @@ __lshrdi3.o __moddi3.o __modsi3.o __udivdi3.o \ __udivmoddi4.o __udivmodsi4.o __udivsi3.o \ __umoddi3.o __umodsi3.o \ - strntoumax.o strntoimax.o atoi.o atol.o atoll.o \ - strcasecmp.o strncasecmp.o strdup.o strlcat.o strndup.o strnlen.o \ + strntoumax.o strntoimax.o atol.o atoll.o \ + strcasecmp.o strncasecmp.o strlcat.o strndup.o strnlen.o \ strsep.o strtoimax.o strtok_r.o strtok.o strtol.o strtoll.o strtotimespec.o strtotimeval.o \ strtoul.o strtoull.o strtoumax.o strxspn.o strpbrk.o \ bsearch.o calloc.o \ @@ -21,44 +21,4 @@ qsort.o sha1hash.o onexit.o atexit.o exit.o \ snprintf.o vsnprintf.o sscanf.o vsscanf.o\ -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 - -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) - - - - -SFILES = -CFILES = -HFILES = -EXPORTED_HFILES = -INSTALLED_HFILES = -OTHERFILES = Makefile -ALLSRC = $(SFILES) $(CFILES) \ - $(HFILES) $(OTHERFILES) -DIRS_NEEDED = $(OBJROOT) $(SYMROOT) - -all embedtheme optionrom: dylib - -include ../MakeInc.dir \ No newline at end of file +include ../MakeInc.dir Index: branches/iFabio/Chameleon/i386/modules/uClibc++/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/modules/uClibc++/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/modules/uClibc++/Makefile (revision 298) @@ -1,8 +1,8 @@ -MODULE_NAME = uClibc++ +MODULE_NAME = uClibcxx MODULE_VERSION = "0.2.2" MODULE_COMPAT_VERSION = "0.2.2" -MODULE_START = _uClibcxx_start +MODULE_START = $(MODULE_NAME)_start MODULE_DEPENDENCIES = klibc DIR = uClibc++ @@ -18,41 +18,4 @@ utility.o valarray.o vector.o support.o \ ios.o iostream.o istream.o ostream.o -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 - -DEFINES= -CONFIG = hd -INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR) -Iinclude -ifneq "" "$(wildcard /bin/mkdirs)" - MKDIRS = /bin/mkdirs -else - MKDIRS = /bin/mkdir -p -endif -AS = as -LD = ld -# LIBS= -lc_static -LIBS= - -VPATH = $(OBJROOT):$(SYMROOT) - -SFILES = -CFILES = -HFILES = -EXPORTED_HFILES = -INSTALLED_HFILES = -OTHERFILES = Makefile -ALLSRC = $(SFILES) $(CFILES) \ - $(HFILES) $(OTHERFILES) -DIRS_NEEDED = $(OBJROOT) $(SYMROOT) - -all embedtheme optionrom: dylib - -include ../MakeInc.dir \ No newline at end of file +include ../MakeInc.dir Index: branches/iFabio/Chameleon/i386/modules/Cconfig =================================================================== --- branches/iFabio/Chameleon/i386/modules/Cconfig (revision 297) +++ branches/iFabio/Chameleon/i386/modules/Cconfig (revision 298) @@ -7,4 +7,8 @@ source "i386/modules/klibc/Cconfig" source "i386/modules/uClibc++/Cconfig" source "i386/modules/HelloWorld/Cconfig" -endmenu \ No newline at end of file +source "i386/modules/AMDGraphicsEnabler/Cconfig" +source "i386/modules/ATiGraphicsEnabler/Cconfig" +source "i386/modules/IntelGraphicsEnabler/Cconfig" +source "i386/modules/NVIDIAGraphicsEnabler/Cconfig" +endmenu Index: branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/modules/HelloWorld/Makefile (revision 298) @@ -1,7 +1,7 @@ MODULE_NAME = HelloWorld MODULE_VERSION = "1.0.0" MODULE_COMPAT_VERSION = "1.0.0" -#MODULE_START = _$(MODULE_NAME)_start +#MODULE_START = $(MODULE_NAME)_start MODULE_START = __Z16HelloWorld_startv MODULE_DEPENDENCIES = uClibc++ @@ -9,35 +9,4 @@ MODULE_OBJS = HelloWorld.o -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 - -DEFINES= -CONFIG = hd -INC = -I. -I.. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(BOOT2DIR) -LIBS= - -VPATH = $(OBJROOT):$(SYMROOT) - - - -SFILES = -CFILES = -HFILES = -EXPORTED_HFILES = -INSTALLED_HFILES = -OTHERFILES = Makefile -ALLSRC = $(SFILES) $(CFILES) \ - $(HFILES) $(OTHERFILES) -DIRS_NEEDED = $(OBJROOT) $(SYMROOT) - -all embedtheme optionrom: dylib - -include ../MakeInc.dir \ No newline at end of file +include ../MakeInc.dir Index: branches/iFabio/Chameleon/i386/modules/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/modules/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/modules/Makefile (revision 298) @@ -11,7 +11,8 @@ include ${SRCROOT}/Make.rules # The order of building is important. -SUBDIRS = klibc uClibc++ Resolution +SUBDIRS = klibc uClibc++ Resolution HelloWorld \ + ATiGraphicsEnabler AMDGraphicsEnabler NVIDIAGraphicsEnabler IntelGraphicsEnabler CFLAGS= -O3 $(MORECPP) -arch i386 -g -static @@ -22,7 +23,7 @@ ifeq (${CONFIG_MODULES}, y) -all install: $(SYMROOT) $(OBJROOT) objroot_dirs +all: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h @for i in ${SUBDIRS}; \ do \ echo ================= make $@ for $$i =================; \ @@ -37,13 +38,36 @@ "RC_CFLAGS=$(RC_CFLAGS)" $@ \ ) || exit $$?; \ done + + @# Finish up boot_modules.c + @echo "}" >> $(SYMROOT)/boot_modules.c + + else -all: +all: $(SYMROOT) $(OBJROOT) objroot_dirs $(SYMROOT)/boot_modules.c $(SYMROOT)/boot_modules.h + @# Finish up boot_modules.c + @echo "}" >> $(SYMROOT)/boot_modules.c + endif .PHONY: objroot_dirs +.PHONY: $(SYMROOT)/boot_modules.h +.PHONY: $(SYMROOT)/boot_modules.c + objroot_dirs: @rm -rf module_includes @mkdir module_includes @rm -rf "$(SYMROOT)/modules/" - @mkdir "$(SYMROOT)/modules/" \ No newline at end of file + @mkdir "$(SYMROOT)/modules/" + + +$(SYMROOT)/boot_modules.c: ${OBJROOT} ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) + @echo "// Autogenerated - do not modify" > $@ + @echo "#include " >> $@ + @echo "#include \"boot_modules.h\"" >> $@ + @echo "void start_built_in_modules() {" >> $@ + +$(SYMROOT)/boot_modules.h: ${OBJROOT} ${SYMROOT}/modules/ ${OBJROOT} $(addprefix $(OBJROOT)/, ${MODULE_OBJS}) + @echo "// Autogenerated - do not modify" > $@ + @echo "void start_built_in_modules(); " > $@ + Index: branches/iFabio/Chameleon/i386/cdboot/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/cdboot/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/cdboot/Makefile (revision 298) @@ -6,7 +6,7 @@ IMGROOT = $(SRCROOT)/sym/cache IMGSKELROOT = $(SRCROOT)/imgskel CDBOOT = ${IMGROOT}/usr/standalone/i386/cdboot - + DIR = cdboot include ${SRCROOT}/Make.rules Index: branches/iFabio/Chameleon/i386/libsa/libsa.h =================================================================== --- branches/iFabio/Chameleon/i386/libsa/libsa.h (revision 297) +++ branches/iFabio/Chameleon/i386/libsa/libsa.h (revision 298) @@ -99,7 +99,7 @@ extern char * strstr(const char *in, const char *str); extern int atoi(const char * str); extern int ptol(const char * str); -extern int strlen(const char * str); +extern size_t strlen(const char * str); extern char * strcat(char * s1, const char * s2); extern char * strncat(char * s1, const char * s2, size_t n); extern char * strdup(const char *s1); @@ -129,7 +129,7 @@ /* * prf.c */ -extern void prf(const char * fmt, va_list ap, void (*putfn_p)(), +extern void prf(const char * fmt, va_list ap, int (*putfn_p)(), void * putfn_arg); /* Index: branches/iFabio/Chameleon/i386/libsa/printf.c =================================================================== --- branches/iFabio/Chameleon/i386/libsa/printf.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsa/printf.c (revision 298) @@ -33,15 +33,16 @@ char * last_str; }; -static void -sputc(int c, struct putc_info * pi) +static int +sputc(int c, struct putc_info * pi) //Azi: exists on console.c & gui.c { if (pi->last_str) if (pi->str == pi->last_str) { *(pi->str) = '\0'; - return; + return 0; } *(pi->str)++ = c; + return c; } /*VARARGS1*/ Index: branches/iFabio/Chameleon/i386/libsa/string.c =================================================================== --- branches/iFabio/Chameleon/i386/libsa/string.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsa/string.c (revision 298) @@ -95,31 +95,31 @@ void bzero(void * dst, size_t len) { asm volatile ( "xorl %%eax, %%eax \n\t" - "cld \n\t" - "movl %%ecx, %%edx \n\t" - "shrl $2, %%ecx \n\t" - "rep; stosl \n\t" - "movl %%edx, %%ecx \n\t" - "andl $3, %%ecx \n\t" - "rep; stosb \n\t" - : - : "c" (len), "D" (dst) - : "memory", "%eax" ); + "cld \n\t" + "movl %%ecx, %%edx \n\t" + "shrl $2, %%ecx \n\t" + "rep; stosl \n\t" + "movl %%edx, %%ecx \n\t" + "andl $3, %%ecx \n\t" + "rep; stosb \n\t" + : + : "c" (len), "D" (dst) + : "memory", "%eax" ); } void __bzero(void * dst, size_t len) { asm volatile ( "xorl %%eax, %%eax \n\t" - "cld \n\t" - "movl %%ecx, %%edx \n\t" - "shrl $2, %%ecx \n\t" - "rep; stosl \n\t" - "movl %%edx, %%ecx \n\t" - "andl $3, %%ecx \n\t" - "rep; stosb \n\t" - : - : "c" (len), "D" (dst) - : "memory", "%eax" ); + "cld \n\t" + "movl %%ecx, %%edx \n\t" + "shrl $2, %%ecx \n\t" + "rep; stosl \n\t" + "movl %%edx, %%ecx \n\t" + "andl $3, %%ecx \n\t" + "rep; stosb \n\t" + : + : "c" (len), "D" (dst) + : "memory", "%eax" ); } #endif @@ -129,7 +129,7 @@ #define tolower(c) ((int)((c) & ~0x20)) #define toupper(c) ((int)((c) | 0x20)) -int strlen(const char * s) +size_t strlen(const char * s) { int n = 0; while (*s++) n++; Index: branches/iFabio/Chameleon/i386/libsa/prf.c =================================================================== --- branches/iFabio/Chameleon/i386/libsa/prf.c (revision 297) +++ branches/iFabio/Chameleon/i386/libsa/prf.c (revision 298) @@ -60,7 +60,7 @@ printn(n, b, flag, minwidth, putfn_p, putfn_arg) u_long n; int b, flag, minwidth; - void (*putfn_p)(); + int (*putfn_p)(); void *putfn_arg; { char prbuf[11]; @@ -93,7 +93,7 @@ void prf( char *fmt, unsigned int *adx, - void (*putfn_p)(), + int (*putfn_p)(), void *putfn_arg ) { Index: branches/iFabio/Chameleon/i386/libsa/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/libsa/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/libsa/Makefile (revision 298) @@ -17,7 +17,7 @@ -mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \ -march=pentium4 -msse2 -mfpmath=sse -msoft-float \ -nostdinc -include $(SRCROOT)/autoconf.h - + CPPFLAGS := $(CPPFLAGS) -nostdinc++ INC = -I. -I$(SYMROOT) -I$(LIBSAIODIR) -I${SRCROOT}/i386/include Index: branches/iFabio/Chameleon/i386/Makefile =================================================================== --- branches/iFabio/Chameleon/i386/Makefile (revision 297) +++ branches/iFabio/Chameleon/i386/Makefile (revision 298) @@ -1,5 +1,4 @@ # Makefile for i386 boot program -# define FLOPPY and SMALL using DEFINES macro as necessary # # these paths are only valid in subdirectories of this directory @@ -15,13 +14,11 @@ include ${SRCROOT}/Make.rules - -VPATH = $(OBJROOT):$(SYMROOT) - # The order of building is important. SUBDIRS = util libsa libsaio boot0 boot1 boot2 cdboot modules all: + @cd modules; ${MAKE} BUILT_IN=yes all @for i in ${SUBDIRS}; \ do \ echo ================= make $@ for $$i =================; \ Index: branches/iFabio/Chameleon/package/slimpkg =================================================================== --- branches/iFabio/Chameleon/package/slimpkg (revision 0) +++ branches/iFabio/Chameleon/package/slimpkg (revision 298) @@ -0,0 +1,280 @@ +#!/bin/bash + +# $1 Path to store built package + +packagesidentity="org.chameleon" + +packagename="C2RC5" + +pkgroot="${0%/*}" + +COL_BLACK="\x1b[30;01m" +COL_RED="\x1b[31;01m" +COL_GREEN="\x1b[32;01m" #COL_GREEN="\x1b[32;01m" +COL_YELLOW="\x1b[33;01m" +COL_MAGENTA="\x1b[35;01m" +COL_CYAN="\x1b[36;01m" +COL_WHITE="\x1b[37;01m" +COL_BLUE="\x1b[34;01m" +COL_RESET="\x1b[39;49;00m" + +#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' ) +version=$( cat version ) +stage=${version##*-} +revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' ) +builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' ) +timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" ) + +distributioncount=0 +xmlindent=0 + +indent[0]="\t" +indent[1]="\t\t" +indent[2]="\t\t\t" +indent[3]="\t\t\t\t" + +main () +{ + +# clean up the destination path + +rm -R -f "${1}" +echo "" +echo -e $COL_BLACK" ---------------------------"$COL_RESET +echo -e $COL_BLACK" Building $packagename Slim Package"$COL_RESET +echo -e $COL_BLACK" ---------------------------"$COL_RESET +echo "" + +outline[$((outlinecount++))]="${indent[$xmlindent]}" + +# build core package + echo "================= Core =================" + ((xmlindent++)) + packagesidentity="org.chameleon" + mkdir -p ${1}/Core/Root/usr/sbin + mkdir -p ${1}/Core/Root/usr/local/bin + mkdir -p ${1}/Core/Root/usr/standalone/i386 + mkdir -p ${1}/Core/Root/usr/standalone/i386/modules + cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386 + cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386 + cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386 + # cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386 + cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386 + cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386 + cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386 + cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386 + fixperms "${1}/Core/Root/" + cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin +# cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin + local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} ) + echo " [BUILD] i386 " + buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 + +# build Chameleon package + echo "================= Chameleon =================" + outline[$((outlinecount++))]="${indent[$xmlindent]}\t" + choices[$((choicescount++))]="\n\n" + + # build standard package + mkdir -p ${1}/Standard/Root + mkdir -p ${1}/Standard/Scripts/Tools + cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts + # ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile + echo " [BUILD] Standard " + buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 + # End build standard package + + # build efi package + mkdir -p ${1}/EFI/Root + mkdir -p ${1}/EFI/Scripts/Tools + cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts + # ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile + echo " [BUILD] EFI " + buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 + # End build efi package + + # build reset choice package + mkdir -p ${1}/noboot/Root + echo " [BUILD] Reset choice " + buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['EFI'])\"" >/dev/null 2>&1 + # End build reset choice package + + # build Modules package + echo "================= Modules =================" + outline[$((outlinecount++))]="${indent[$xmlindent]}\t" + choices[$((choicescount++))]="\n\n" + ((xmlindent++)) + packagesidentity="org.chameleon.module" + modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' )) + for (( i = 0 ; i < ${#modules[@]} ; i++ )) + do + mkdir -p "${1}/${modules[$i]##*/}/Root" + mkdir -p "${1}/${modules[$i]##*/}/Scripts" + ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall" + echo " [BUILD] ${modules[$i]##*/} " + buildpackage "${1}/${modules[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1 + rm -R -f "${1}/${i##*/}" + done + ((xmlindent--)) + outline[$((outlinecount++))]="${indent[$xmlindent]}\t" + # End build Modules packages + + ((xmlindent--)) + outline[$((outlinecount++))]="${indent[$xmlindent]}\t" +# End build Chameleon package + +# build post install package + echo "================= Post =================" + mkdir -p ${1}/Post/Root + mkdir -p ${1}/Post/Scripts + cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts + echo " [BUILD] Post " + buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 + outline[$((outlinecount++))]="${indent[$xmlindent]}" + +# build meta package + makedistribution "${1}" "${2}" "${3}" "${4}" "${5}" + +# clean up + rm -R -f "${1}" + +} + +fixperms () +{ + # $1 path + find "${1}" -type f -exec chmod 644 {} \; + find "${1}" -type d -exec chmod 755 {} \; + chown -R 0:0 "${1}" +} + +buildpackage () +{ +# $1 Path to package to build containing Root and or Scripts +# $2 Install Location +# $3 Size +# $4 Options + +if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then + + local packagename="${1##*/}" + local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] ) + find "${1}" -name '.DS_Store' -delete + local filecount=$( find "${1}/Root" | wc -l ) + if [ "${3}" ]; then + local installedsize="${3}" + else + local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} ) + fi + local header="\n\n" + header+="\t\n" + rm -R -f "${1}/Temp" + + [ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp" + [ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom" + + if [ -d "${1}/Scripts" ]; then + header+="\t\n" + for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) ) + do + header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n" + done + header+="\t\n" + chown -R 0:0 "${1}/Scripts" + pushd "${1}/Scripts" >/dev/null + find . -print | cpio -o -z -H cpio > "../Temp/Scripts" + popd >/dev/null + fi + + header+="" + echo -e "${header}" > "${1}/Temp/PackageInfo" + pushd "${1}/Root" >/dev/null + find . -print | cpio -o -z -H cpio > "../Temp/Payload" + popd >/dev/null + pushd "${1}/Temp" >/dev/null + + xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none . + + popd >/dev/null + + outline[$((outlinecount++))]="${indent[$xmlindent]}\t" + + if [ "${4}" ]; then + local choiceoptions="${indent[$xmlindent]}${4}\n" + fi + choices[$((choicescount++))]="\n\t#${packagename// /}.pkg\n\n" + + rm -R -f "${1}" +fi +} + +makedistribution () +{ + rm -f "${1%/*}/${packagename// /}"*.pkg + + find "${1}" -type f -name '*.pkg' -depth 1 | while read component + do + mkdir -p "${1}/${packagename}/${component##*/}" + pushd "${1}/${packagename}/${component##*/}" >/dev/null + xar -x -f "${1%}/${component##*/}" + popd >/dev/null + done + + ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution" + ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources" + + find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null + + for (( i=0; i < ${#outline[*]} ; i++)); + do + echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution" + done + + for (( i=0; i < ${#choices[*]} ; i++)); + do + echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution" + done + + echo "" >> "${1}/${packagename}/Distribution" + + perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f` + perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f` + + stage=${stage/RC/Release Candidate } + stage=${stage/FINAL/2.0 Final} + perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f` + + find "${1}/${packagename}" -name '.DS_Store' -delete + pushd "${1}/${packagename}" >/dev/null + xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none . + popd >/dev/null + +# Here is the place for assign a Icon to the pkg +ditto -xk "${pkgroot}/Icon.zip" "${pkgroot}/" +DeRez -only icns "${pkgroot}/Icon/Icon.icns" > tempicns.rsrc +Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" +SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" +rm -f tempicns.rsrc +rm -rf "${pkgroot}/Icon" +# End + echo "" + + echo -e $COL_BLACK" --------------------------------"$COL_RESET + echo -e $COL_BLACK" Building $packagename process complete!"$COL_RESET + echo -e $COL_BLACK" --------------------------------"$COL_RESET + echo "" + + +} + +main "${1}" "${2}" "${3}" "${4}" "${5}" + Property changes on: branches/iFabio/Chameleon/package/slimpkg ___________________________________________________________________ Added: svn:executable + * Index: branches/iFabio/Chameleon/package/builddmg =================================================================== --- branches/iFabio/Chameleon/package/builddmg (revision 297) +++ branches/iFabio/Chameleon/package/builddmg (revision 298) @@ -1,470 +1 @@ #!/bin/bash - -# $1 Path to store built package - -packagesidentity="org.chameleon" - -packagename="Chameleon" - -pkgroot="${0%/*}" - -COL_BLACK="\x1b[30;01m" -COL_RED="\x1b[31;01m" -COL_GREEN="\x1b[32;01m" #COL_GREEN="\x1b[32;01m" -COL_YELLOW="\x1b[33;01m" -COL_MAGENTA="\x1b[35;01m" -COL_CYAN="\x1b[36;01m" -COL_WHITE="\x1b[37;01m" -COL_BLUE="\x1b[34;01m" -COL_RESET="\x1b[39;49;00m" - -#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' ) -version=$( cat version ) -stage=${version##*-} -revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' ) -builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' ) -timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" ) - -distributioncount=0 -xmlindent=0 - -indent[0]="\t" -indent[1]="\t\t" -indent[2]="\t\t\t" -indent[3]="\t\t\t\t" - -main () -{ - -# clean up the destination path - -rm -R -f "${1}" -echo "" -echo -e $COL_BLACK" ----------------------------------"$COL_RESET -echo -e $COL_BLACK" Building $packagename Install Package"$COL_RESET -echo -e $COL_BLACK" ----------------------------------"$COL_RESET -echo "" - -outline[$((outlinecount++))]="${indent[$xmlindent]}" - -# build core package - echo "================= Core =================" - ((xmlindent++)) - packagesidentity="org.chameleon" - mkdir -p ${1}/Core/Root/usr/sbin - mkdir -p ${1}/Core/Root/usr/local/bin - mkdir -p ${1}/Core/Root/usr/standalone/i386 - mkdir -p ${1}/Core/Root/usr/standalone/i386/modules - cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386 - # cp -f ${1%/*}/i386/boot0hfs ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386 - cp -f ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386 - fixperms "${1}/Core/Root/" - cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin -# cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin - local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} ) - echo " [BUILD] i386 " - buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 - -# build Chameleon package - echo "================= Chameleon =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - - # build standard package - mkdir -p ${1}/Standard/Root - mkdir -p ${1}/Standard/Scripts/Tools - cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts - # ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile - echo " [BUILD] Standard " - buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 - # End build standard package - - # build efi package - mkdir -p ${1}/EFI/Root - mkdir -p ${1}/EFI/Scripts/Tools - cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts - # ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile - echo " [BUILD] EFI " - buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 - # End build efi package - - # build reset choice package - mkdir -p ${1}/noboot/Root - echo " [BUILD] Reset choice " - buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['EFI'])\"" >/dev/null 2>&1 - # End build reset choice package - - # build Modules package - echo "================= Modules =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - packagesidentity="org.chameleon.module" - modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' )) - for (( i = 0 ; i < ${#modules[@]} ; i++ )) - do - mkdir -p "${1}/${modules[$i]##*/}/Root" - mkdir -p "${1}/${modules[$i]##*/}/Scripts" - ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall" - echo " [BUILD] ${modules[$i]##*/} " - buildpackage "${1}/${modules[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1 - rm -R -f "${1}/${i##*/}" - done - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - # End build Modules packages - - # build bdmesg package -# mkdir -p ${1}/Bdmesg/Root -# cp -f ${1%/*}/i386/bdmesg ${1}/Bdmesg/Root -# fixperms "${1}/Bdmesg/Root/" - # echo " [BUILD] bdmesg " -# buildpackage "${1}/Bdmesg" "/usr/sbin/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 - # End build bdmesg package - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" -# End build Chameleon package - -# build Extras package - echo "================= Extras =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - packagesidentity="org.chameleon.extras.com" - - # build utility package - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - packagesidentity="org.chameleon.utility.com" - - # build package for Chameleon PrefPanel - mkdir -p "${1}/PrefPanel/Root" - ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root" - echo " [BUILD] Chameleon Preference Panel " - buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\"" >/dev/null 2>&1 - # End build package for Chameleon PrefPanel - - # build package for SMBIOSDefault - mkdir -p "${1}/SMBIOSDefault/Root" - ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root" - echo " [BUILD] SMBIOSDefault " - buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\"" >/dev/null 2>&1 - # End build package for SMBIOSDefault - - # build package for EFIMounter - mkdir -p "${1}/EFIMounter/Root" - ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root" - echo " [BUILD] EFIMounter " - buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\"" >/dev/null 2>&1 - # End build package for EFIMounter - - # build package for Documentation - mkdir -p "${1}/Documentation/Root" - cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root - cp -f ${pkgroot}/doc/README ${1}/Documentation/Root - cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root - echo " [BUILD] Documentation " - buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\"" >/dev/null 2>&1 - # End build package for Documentation - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - # End utility package - - # build options packages - echo "================= Options =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - - # build base options packages - packagesidentity="org.chameleon.options.com" - - options=($( find "${pkgroot}/Scripts/BaseOptions" -type d -depth 1 -not -name '.svn' )) - for (( i = 0 ; i < ${#options[@]} ; i++ )) - do - mkdir -p "${1}/${options[$i]##*/}/Root" - mkdir -p "${1}/${options[$i]##*/}/Scripts" - ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall" - echo " [BUILD] ${options[$i]##*/} " - buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1 - done - # End build base options packages - - # build resolution packages - echo "================= Res. Options =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - packagesidentity="org.chameleon.resolution" - resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' )) - for (( i = 0 ; i < ${#resolutions[@]} ; i++ )) - do - mkdir -p "${1}/${resolutions[$i]##*/}/Root/" - mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/" - ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall" - echo " [BUILD] ${resolutions[$i]##*/} " - buildpackage "${1}/${resolutions[$i]##*/}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1 - done - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - # End build resolution packages - - # build Advanced packages - echo "================= Adv. Options =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - - packagesidentity="org.chameleon.advanced.options.pkg" - optionsadv=($( find "${pkgroot}/Scripts/Advanced" -type d -depth 1 -not -name '.svn' )) - for (( i = 0 ; i < ${#optionsadv[@]} ; i++ )) - do - mkdir -p "${1}/${optionsadv[$i]##*/}/Root" - mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts" - ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall" - echo " [BUILD] ${optionsadv[$i]##*/} " - buildpackage "${1}/${optionsadv[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1 - done - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - # End build Advanced packages - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - - # End build options packages - - # build theme packages - echo "================= Themes =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - packagesidentity="org.chameleon.theme.pkg" - artwork="${1%/*}" - themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' )) - for (( i = 0 ; i < ${#themes[@]} ; i++ )) - do - theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' ) - mkdir -p "${1}/${theme}/Root/" - ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}" - find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+ - find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+ - echo " [BUILD] ${themes[$i]##*/} " - buildpackage "${1}/${theme}" "/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1 - rm -R -f "${1}/${i##*/}" - done - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - # End build theme packages - - # build kext packages - echo "================= Kexts =================" - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - choices[$((choicescount++))]="\n\n" - ((xmlindent++)) - packagesidentity="org.chameleon.kext.pkg" - kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 )) - for (( i = 0 ; i < ${#kexts[@]} ; i++ )) - do - filename="${kexts[$i]##*/}" - mkdir -p "${1}/${filename%.kext}/Root" - ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}" - find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null - fixperms "${1}/${filename%.kext}/Root" - chown 501:20 "${1}/${filename%.kext}/Root" - echo " [BUILD] ${filename%.kext} " - buildpackage "${1}/${filename%.kext}" "/Extra/Extensions" "" "start_selected=\"false\"" >/dev/null 2>&1 - rm -R -f "${1}/${filename%.kext}" - done - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - # End build kext packages - - ((xmlindent--)) - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" -# End build Extras package - -# build post install package - echo "================= Post =================" - mkdir -p ${1}/Post/Root - mkdir -p ${1}/Post/Scripts - cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts - echo " [BUILD] Post " - buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 - outline[$((outlinecount++))]="${indent[$xmlindent]}" - -# build meta package - makedistribution "${1}" "${2}" "${3}" "${4}" "${5}" - -# clean up - rm -R -f "${1}" - -} - -fixperms () -{ - # $1 path - find "${1}" -type f -exec chmod 644 {} \; - find "${1}" -type d -exec chmod 755 {} \; - chown -R 0:0 "${1}" -} - -buildpackage () -{ -# $1 Path to package to build containing Root and or Scripts -# $2 Install Location -# $3 Size -# $4 Options - -if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then - - local packagename="${1##*/}" - local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] ) - find "${1}" -name '.DS_Store' -delete - local filecount=$( find "${1}/Root" | wc -l ) - if [ "${3}" ]; then - local installedsize="${3}" - else - local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} ) - fi - local header="\n\n" - header+="\t\n" - rm -R -f "${1}/Temp" - - [ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp" - [ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom" - - if [ -d "${1}/Scripts" ]; then - header+="\t\n" - for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) ) - do - header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n" - done - header+="\t\n" - chown -R 0:0 "${1}/Scripts" - pushd "${1}/Scripts" >/dev/null - find . -print | cpio -o -z -H cpio > "../Temp/Scripts" - popd >/dev/null - fi - - header+="" - echo -e "${header}" > "${1}/Temp/PackageInfo" - pushd "${1}/Root" >/dev/null - find . -print | cpio -o -z -H cpio > "../Temp/Payload" - popd >/dev/null - pushd "${1}/Temp" >/dev/null - - xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none . - - popd >/dev/null - - outline[$((outlinecount++))]="${indent[$xmlindent]}\t" - - if [ "${4}" ]; then - local choiceoptions="${indent[$xmlindent]}${4}\n" - fi - choices[$((choicescount++))]="\n\t#${packagename// /}.pkg\n\n" - - rm -R -f "${1}" -fi -} - -makedistribution () -{ - rm -f "${1%/*}/${packagename// /}"*.pkg - - find "${1}" -type f -name '*.pkg' -depth 1 | while read component - do - mkdir -p "${1}/${packagename}/${component##*/}" - pushd "${1}/${packagename}/${component##*/}" >/dev/null - xar -x -f "${1%}/${component##*/}" - popd >/dev/null - done - - ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution" - ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources" - - find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null - - for (( i=0; i < ${#outline[*]} ; i++)); - do - echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution" - done - - for (( i=0; i < ${#choices[*]} ; i++)); - do - echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution" - done - - echo "" >> "${1}/${packagename}/Distribution" - - perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f` - perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f` - -# Adding Package type test (not translated) -# perl -i -p -e "s/%PKGTYPE%/TEST/g" `find "${1}/${packagename}/Resources" -type f` -# - - stage=${stage/RC/Release Candidate } - stage=${stage/FINAL/2.0 Final} - perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f` - - find "${1}/${packagename}" -name '.DS_Store' -delete - pushd "${1}/${packagename}" >/dev/null - xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none . - popd >/dev/null - -# Here is the place for assign a Icon to the pkg -# command use to generate the file: -# ditto -c -k --sequesterRsrc --keepParent Icon.icns Icon.zip -ditto -xk "${pkgroot}/Icon.zip" "${pkgroot}/" -DeRez -only icns "${pkgroot}/Icon/Icon.icns" > tempicns.rsrc -Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" -SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" -rm -f tempicns.rsrc -rm -rf "${pkgroot}/Icon" -# End - - md5=$( md5 "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" | awk {'print $4'} ) - echo "MD5 (${packagename// /}-${version}-r${revision}.pkg) = ${md5}" > "${1%/*}/${packagename// /}-${version}-r${revision}.pkg.md5" - echo "" - - echo -e $COL_BLACK" --------------------------"$COL_RESET - echo -e $COL_BLACK" Building process complete!"$COL_RESET - echo -e $COL_BLACK" --------------------------"$COL_RESET - echo "" - echo -e $COL_BLACK" Build info." - echo -e $COL_BLACK" ===========" - echo -e $COL_BLUE" Package name: "$COL_BLACK"$packagename-${version}-r$revision.pkg"$COL_RESET - echo -e $COL_BLUE" MD5: "$COL_BLACK"$md5"$COL_RESET - echo -e $COL_BLUE" Version: "$COL_BLACK"$version"$COL_RESET - echo -e $COL_BLUE" Stage: "$COL_BLACK"$stage"$COL_RESET - echo -e $COL_BLUE" Date/Time: "$COL_BLACK"$builddate"$COL_RESET - echo "" - -} - -main "${1}" "${2}" "${3}" "${4}" "${5}" - Index: branches/iFabio/Chameleon/package/Resources/English.lproj/Localizable.strings =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/iFabio/Chameleon/TODO =================================================================== --- branches/iFabio/Chameleon/TODO (revision 297) +++ branches/iFabio/Chameleon/TODO (revision 298) @@ -1,31 +1,41 @@ TODO List for Chameleon Boot Loader ==================================== -- Setup makefile to use module config for determining which modules to compile in and which to compile as modules +- Bring code closer to coding_standards.txt: + - will change spaces to tabs! If someone opposes to this, please come forward :) + +- Create a dummy module for any modules that are compiled in. This is needed for linking modules with + dependencies that are not compiled in. + - Fix the module system when booting chameleon with multiboot. Cleanup the xcode 4 fix. - Integrate Prasys current work on options and quick shortcut modified version of 18seven -- Add auto detection of efistring algorithm to enable graphics enabler to be enabled by default while not - conflicting with other efi string overriden content +- Add auto detection of efi string algorithm, so graphics enabler can be enabled by default while not + conflicting with other efi string overridden content (original idea of Galaxy) +Azi: done? - Add a more sophisticated acpi loading mechanism to enable loading custom acpi tables when dsdtdrop=y Here's a specification to think about: - First we must care about if a forced DSDT full path has been specified (was the pb smith had in - his first tries) and take it for the DSDT path as is. - Then we have the case where no DSDT path was set where we run our usual DSDT search algorithm to find this file. - In the latter case, the file has to be named DSDT.aml and be in one of the / /Extra or bt(0,0)/Extra directory. + First we must care about if a forced DSDT full path has been specified + (was what pb smith had in his first tries) and take it for the DSDT path as is. + Then we have the case where no DSDT path was set where we run our usual DSDT search algorithm to + find this file. + In the latter case, the file has to be named DSDT.aml and be in one of the / /Extra or bt(0,0)/Extra + directory. Now a first idea to implement correctly the acpi tables loading would be: - Whatever the path was hardcoded in the DSDT option or was automatically found, we extract the path part of - the DSDT file that has been successfully found and we run a loop to enumerate all other acpi files in the same directory. - Now for each acpi file found, we should compare the name with an existing acpi table found in the system that - we would normally load and replace this usual injection by the content of the file. + Whether the path was hardcoded in the DSDT option or was automatically found, we extract the path part + of the DSDT file that has been successfully found and we run a loop to enumerate all other acpi + files in the same directory. + Now for each acpi file found, we should compare the name with an existing acpi table found in + the system that we would normally load and replace this usual injection by the content of the file. - Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsibility of user - to provide any other acpi table. + Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsibility of the + user to provide any other acpi table. +Azi: done? - Add a new module capable of writing proprietary Chameleon data to ioreg: Using the DT__xxx() API, we will create a set of functions to write to log info, chameleon boot info to be retrieved by helper applications... @@ -69,5 +79,5 @@ getc(); } - - Case unsensitive parsing for the bootConfig options: + - Case insensitive parsing for the bootConfig options: should help the common/novice user to setup more easily. Index: branches/iFabio/Chameleon/Make.rules =================================================================== --- branches/iFabio/Chameleon/Make.rules (revision 297) +++ branches/iFabio/Chameleon/Make.rules (revision 298) @@ -88,6 +88,12 @@ -MD -dependency-file $*.d @md -u $(OBJROOT)/Makedep -f -d $*.d +#$(OBJROOT)/boot_modules.o: +# @echo "\t[AS] boot_modules.s" +# @cc $(CPPFLAGS) -Wa,-n -c $(INC) -arch i386 -o $(OBJROOT)/$(@F) $(SYMROOT)/boot_modules.s \ +# -MD -dependency-file $*.d +# @md -u $(OBJROOT)/Makedep -f -d $*.d + $(OBJROOT)/%.o: %.s @echo "\t[AS] $<" Index: branches/iFabio/Chameleon/CHANGES =================================================================== --- branches/iFabio/Chameleon/CHANGES (revision 297) +++ branches/iFabio/Chameleon/CHANGES (revision 298) @@ -1,5 +1,7 @@ +- Modules can now be selected between not compiled, compiled into chameleon, or compiled as modules. - New makefile + configuration system. -- Added the BOOT2_MAX_LENGTH constant in memory.h. This is now used in mboot.c to relocate the correct number of bytes for boot2. +- Added the BOOT2_MAX_LENGTH constant in memory.h. This is now used in mboot.c to relocate the correct + number of bytes for boot2. - Added new ATi/AMD Graphics Card Enabler. - Added new SMBIOS patcher. - Added module system. @@ -31,7 +33,7 @@ - Added ATI new framebuffers support and new cards from PCEFI10.6 - improved ACPI file search algo by implementing a cache. - Nvidia injection fix -- pciroot would not always return correct uuid in autodection mode +- pciroot would not always return correct UID in autodection mode - Fixed the hibernation problem in boot2/resume.c - Fixed all new booter versions with SystemType would override the facp value even if correct, now keeps the facp value if correct and no override has been done, implemented a best effort algo. @@ -40,18 +42,19 @@ conversions api, to be completed by function that we should reuse. - Fixed SystemType would be always forced to a value, now optionally changed - only if overidden + only if overridden - Kept SystemID as the only option to change manually the system-id For theses reasons, SystemId from bootConfig and SMUUID from smbiosConfig are now DEPRECATED. -- Integrated JrCs fadt patch (kept for RC5 the existing DSDT.aml retry algo that disappeared in his patch, should be more discussed for RC6) +- Integrated JrCs fadt patch (kept for RC5 the existing DSDT.aml retry algo that disappeared in his patch, + should be more discussed for RC6) - Added JrCs modified convention name change to coding_standards - Now malloc (ex. MALLOC in Asere patch) is renamed malloc(size) and is an alias to safe_malloc(size, file, line) with _FILE_ and _LINE_ preprocessor definitions - Added a new 'Rename Partition Feature', now permitting to rename partition like 'System reserved' to a more meaningful name - Added SystemID option permitting to change the System UUID to a fixed value. -- Added the PciRoot autodetection feature imported from pcefi10.5 +- Added the PciRoot auto detection feature imported from pcefi10.5 - Added automatic "system-id" injection from dmi bios, also compatible with SystemID boot option and former SMUUID from smbios,plist - Added "system-type' automatic injection (1=Desktop) plus override possibility Index: branches/iFabio/Chameleon/Makefile =================================================================== --- branches/iFabio/Chameleon/Makefile (revision 297) +++ branches/iFabio/Chameleon/Makefile (revision 298) @@ -48,8 +48,8 @@ "JAPANESE=$(JAPANESE)" \ "RC_CFLAGS=$$XCFLAGS" $@ \ ) || exit $$?; \ - + all: $(SYMROOT) $(OBJROOT) $(SRCROOT)/auto.conf $(SRCROOT)/autoconf.h $(SRCROOT)/autoconf.inc $(SRCROOT)/.config @if [ -e ".svn" ]; then svnversion -n | tr -d [:alpha:] > revision; fi @if [ -z "$(RC_ARCHS)" ]; then \ @@ -97,7 +97,7 @@ dmg: all @if [ -e "$(SYMROOT)" ]; then \ - sudo `pwd`/package/builddmg `pwd`/sym/package; \ + sudo `pwd`/package/slimpkg `pwd`/sym/package; \ fi; .PHONY: config