Index: branches/slice/trunkM/Chameleon.xcodeproj/slice.pbxuser =================================================================== --- branches/slice/trunkM/Chameleon.xcodeproj/slice.pbxuser (revision 1198) +++ branches/slice/trunkM/Chameleon.xcodeproj/slice.pbxuser (revision 1199) @@ -2,30 +2,30 @@ { 012E60F8137AC68F00E35218 /* smbios_decode.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {887, 3120}}"; - sepNavSelRange = "{9653, 17}"; - sepNavVisRange = "{4743, 2018}"; + sepNavIntBoundsRect = "{{0, 0}, {887, 3029}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 810}"; }; }; 012E60F9137AC68F00E35218 /* smbios_getters.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1454, 7046}}"; - sepNavSelRange = "{13718, 7}"; - sepNavVisRange = "{13285, 923}"; + sepNavIntBoundsRect = "{{0, 0}, {1454, 6851}}"; + sepNavSelRange = "{13684, 0}"; + sepNavVisRange = "{6233, 612}"; }; }; 012E60FA137AC68F00E35218 /* smbios_getters.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {782, 650}}"; - sepNavSelRange = "{1045, 0}"; - sepNavVisRange = "{522, 899}"; + sepNavIntBoundsRect = "{{0, 0}, {877, 663}}"; + sepNavSelRange = "{1357, 0}"; + sepNavVisRange = "{362, 1171}"; }; }; 012E60FB137AC68F00E35218 /* smbios.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1076, 10712}}"; - sepNavSelRange = "{27109, 14}"; - sepNavVisRange = "{27026, 1014}"; + sepNavIntBoundsRect = "{{0, 0}, {877, 12376}}"; + sepNavSelRange = "{27806, 9}"; + sepNavVisRange = "{27294, 696}"; sepNavWindowFrame = "{{15, 60}, {889, 813}}"; }; }; @@ -63,30 +63,39 @@ PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 332860018; - PBXWorkspaceStateSaveDate = 332860018; + PBXPerProjectTemplateStateSaveDate = 332935263; + PBXWorkspaceStateSaveDate = 332935263; }; perUserProjectItems = { 1208BED013D70B8900694228 /* PBXTextBookmark */ = 1208BED013D70B8900694228 /* PBXTextBookmark */; 1208BED513D710A600694228 /* PBXTextBookmark */ = 1208BED513D710A600694228 /* PBXTextBookmark */; - 1208BED613D710A600694228 /* PBXTextBookmark */ = 1208BED613D710A600694228 /* PBXTextBookmark */; - 1208BED813D710A600694228 /* PBXTextBookmark */ = 1208BED813D710A600694228 /* PBXTextBookmark */; 122A5BCA1375C49300795FF0 /* PBXTextBookmark */ = 122A5BCA1375C49300795FF0 /* PBXTextBookmark */; 122A5BCB1375C49300795FF0 /* PBXTextBookmark */ = 122A5BCB1375C49300795FF0 /* PBXTextBookmark */; + 1237521013D814370027F8A5 /* PBXTextBookmark */ = 1237521013D814370027F8A5 /* PBXTextBookmark */; + 1237560213D81EE60027F8A5 /* PBXTextBookmark */ = 1237560213D81EE60027F8A5 /* PBXTextBookmark */; + 1237560313D81EE60027F8A5 /* PBXTextBookmark */ = 1237560313D81EE60027F8A5 /* PBXTextBookmark */; + 1237560613D81EE60027F8A5 /* PBXTextBookmark */ = 1237560613D81EE60027F8A5 /* PBXTextBookmark */; + 1237560713D81EE60027F8A5 /* PBXTextBookmark */ = 1237560713D81EE60027F8A5 /* PBXTextBookmark */; + 1237560813D81EE60027F8A5 /* PBXTextBookmark */ = 1237560813D81EE60027F8A5 /* PBXTextBookmark */; + 1237560913D81EE60027F8A5 /* PBXTextBookmark */ = 1237560913D81EE60027F8A5 /* PBXTextBookmark */; + 1237560A13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560A13D81EE60027F8A5 /* PBXTextBookmark */; + 1237560B13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560B13D81EE60027F8A5 /* PBXTextBookmark */; + 1237560C13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560C13D81EE60027F8A5 /* PBXTextBookmark */; + 1237560D13D81EE60027F8A5 /* PBXTextBookmark */ = 1237560D13D81EE60027F8A5 /* PBXTextBookmark */; + 1237561D13D823130027F8A5 /* PBXTextBookmark */ = 1237561D13D823130027F8A5 /* PBXTextBookmark */; + 12375A1613D82F2C0027F8A5 /* PBXTextBookmark */ = 12375A1613D82F2C0027F8A5 /* PBXTextBookmark */; + 12375A2913D82FD80027F8A5 /* PBXTextBookmark */ = 12375A2913D82FD80027F8A5 /* PBXTextBookmark */; + 12375A3C13D831AB0027F8A5 /* PBXTextBookmark */ = 12375A3C13D831AB0027F8A5 /* PBXTextBookmark */; + 12375A3D13D831AB0027F8A5 /* PBXTextBookmark */ = 12375A3D13D831AB0027F8A5 /* PBXTextBookmark */; + 12375A3E13D831AB0027F8A5 /* PBXTextBookmark */ = 12375A3E13D831AB0027F8A5 /* PBXTextBookmark */; 1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */ = 1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */; - 1284EEE913D6F35E00A6BE87 /* PBXTextBookmark */ = 1284EEE913D6F35E00A6BE87 /* PBXTextBookmark */; - 1284EEF713D6F95000A6BE87 /* PBXTextBookmark */ = 1284EEF713D6F95000A6BE87 /* PBXTextBookmark */; 1284EEF913D6F95000A6BE87 /* PBXTextBookmark */ = 1284EEF913D6F95000A6BE87 /* PBXTextBookmark */; - 1284EF1113D6FD4500A6BE87 /* PBXTextBookmark */ = 1284EF1113D6FD4500A6BE87 /* PBXTextBookmark */; 128EB70A13D31D3900E0DA4B /* PBXTextBookmark */ = 128EB70A13D31D3900E0DA4B /* PBXTextBookmark */; 128EB70B13D31D3900E0DA4B /* PBXTextBookmark */ = 128EB70B13D31D3900E0DA4B /* PBXTextBookmark */; 128EC26913D3427400E0DA4B /* PBXTextBookmark */ = 128EC26913D3427400E0DA4B /* PBXTextBookmark */; 128EC27313D3442900E0DA4B /* PBXTextBookmark */ = 128EC27313D3442900E0DA4B /* PBXTextBookmark */; - 128EC27413D3442900E0DA4B /* PBXTextBookmark */ = 128EC27413D3442900E0DA4B /* PBXTextBookmark */; 12BFD73713D6E2DD00065808 /* PBXTextBookmark */ = 12BFD73713D6E2DD00065808 /* PBXTextBookmark */; - 12BFD73813D6E2DD00065808 /* PBXTextBookmark */ = 12BFD73813D6E2DD00065808 /* PBXTextBookmark */; 12D15FC013D35DFB00ABAAF4 /* PBXTextBookmark */ = 12D15FC013D35DFB00ABAAF4 /* PBXTextBookmark */; - 12D15FC213D35DFB00ABAAF4 /* PBXTextBookmark */ = 12D15FC213D35DFB00ABAAF4 /* PBXTextBookmark */; 12D15FE813D3634F00ABAAF4 /* PBXTextBookmark */ = 12D15FE813D3634F00ABAAF4 /* PBXTextBookmark */; 12EDC2D91376FCB300937D70 /* PBXTextBookmark */ = 12EDC2D91376FCB300937D70 /* PBXTextBookmark */; }; @@ -114,41 +123,13 @@ vrLen = 799; vrLoc = 2489; }; - 1208BED613D710A600694228 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1208BED713D710A600694228 /* AppleSMBIOS.cpp */; - rLen = 0; - rLoc = 9223372036854775807; - rType = 0; - }; - 1208BED713D710A600694228 /* AppleSMBIOS.cpp */ = { + 1208BED913D710A600694228 /* AppleSMBIOS.cpp */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AppleSMBIOS.cpp; path = "/Users/slice/Projects/Apple/AppleSMBIOS-41/AppleSMBIOS.cpp"; sourceTree = ""; }; - 1208BED813D710A600694228 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1208BED913D710A600694228 /* AppleSMBIOS.cpp */; - name = "AppleSMBIOS.cpp: 333"; - rLen = 36; - rLoc = 8807; - rType = 0; - vrLen = 1074; - vrLoc = 5057; - }; - 1208BED913D710A600694228 /* AppleSMBIOS.cpp */ = { - isa = PBXFileReference; - name = AppleSMBIOS.cpp; - path = "/Users/slice/Projects/Apple/AppleSMBIOS-41/AppleSMBIOS.cpp"; - sourceTree = ""; - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {877, 16107}}"; - sepNavSelRange = "{8807, 36}"; - sepNavVisRange = "{5057, 1074}"; - }; - }; 122A5BB51375B61C00795FF0 /* Source Control */ = { isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; @@ -183,36 +164,183 @@ vrLen = 604; vrLoc = 1448; }; - 1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */ = { + 1237521013D814370027F8A5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = B0056D6111F3868000754B65 /* platform.h */; - name = "platform.h: 139"; - rLen = 12; - rLoc = 4643; + fRef = 1208BED913D710A600694228 /* AppleSMBIOS.cpp */; + name = "AppleSMBIOS.cpp: 333"; + rLen = 36; + rLoc = 8807; rType = 0; - vrLen = 1184; - vrLoc = 3805; + vrLen = 1052; + vrLoc = 5057; }; - 1284EEE913D6F35E00A6BE87 /* PBXTextBookmark */ = { + 1237560213D81EE60027F8A5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 012E60FA137AC68F00E35218 /* smbios_getters.h */; - name = "smbios_getters.h: 44"; + fRef = B0056D2711F3868000754B65 /* acpi_patcher.h */; + name = "acpi_patcher.h: 12"; + rLen = 8; + rLoc = 238; + rType = 0; + vrLen = 570; + vrLoc = 0; + }; + 1237560313D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 012E60F8137AC68F00E35218 /* smbios_decode.c */; + name = "smbios_decode.c: 1"; rLen = 0; - rLoc = 1290; + rLoc = 0; rType = 0; - vrLen = 1154; - vrLoc = 310; + vrLen = 810; + vrLoc = 0; }; - 1284EEF713D6F95000A6BE87 /* PBXTextBookmark */ = { + 1237560613D81EE60027F8A5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; + fRef = B0056D5B11F3868000754B65 /* pci.c */; + name = "pci.c: 132"; + rLen = 0; + rLoc = 2891; + rType = 0; + vrLen = 482; + vrLoc = 0; + }; + 1237560713D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D5D11F3868000754B65 /* pci_root.c */; + name = "pci_root.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 667; + vrLoc = 1620; + }; + 1237560813D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D5E11F3868000754B65 /* pci_root.h */; + name = "pci_root.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 192; + vrLoc = 0; + }; + 1237560913D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D5C11F3868000754B65 /* pci.h */; + name = "pci.h: 28"; + rLen = 8; + rLoc = 388; + rType = 0; + vrLen = 575; + vrLoc = 276; + }; + 1237560A13D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056CF611F3868000754B65 /* boot.c */; + name = "boot.c: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 1039; + vrLoc = 3039; + }; + 1237560B13D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 012E60F9137AC68F00E35218 /* smbios_getters.c */; + name = "smbios_getters.c: 497"; + rLen = 0; + rLoc = 13684; + rType = 0; + vrLen = 612; + vrLoc = 6233; + }; + 1237560C13D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D5F11F3868000754B65 /* pci_setup.c */; + name = "pci_setup.c: 24"; + rLen = 19; + rLoc = 470; + rType = 0; + vrLen = 829; + vrLoc = 160; + }; + 1237560D13D81EE60027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056CF711F3868000754B65 /* boot.h */; + name = "boot.h: 167"; + rLen = 0; + rLoc = 5686; + rType = 0; + vrLen = 637; + vrLoc = 5182; + }; + 1237561D13D823130027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D2511F3868000754B65 /* acpi.h */; + name = "acpi.h: 36"; + rLen = 11; + rLoc = 880; + rType = 0; + vrLen = 774; + vrLoc = 477; + }; + 12375A1613D82F2C0027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; fRef = B0056D2611F3868000754B65 /* acpi_patcher.c */; - name = "acpi_patcher.c: 736"; + name = "acpi_patcher.c: 823"; + rLen = 19; + rLoc = 28073; + rType = 0; + vrLen = 987; + vrLoc = 27547; + }; + 12375A2913D82FD80027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 012E60FA137AC68F00E35218 /* smbios_getters.h */; + name = "smbios_getters.h: 45"; rLen = 0; - rLoc = 24837; + rLoc = 1357; rType = 0; - vrLen = 1102; - vrLoc = 24291; + vrLen = 1171; + vrLoc = 362; }; + 12375A3C13D831AB0027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D3F11F3868000754B65 /* fake_efi.c */; + name = "fake_efi.c: 502"; + rLen = 9; + rLoc = 21173; + rType = 0; + vrLen = 1037; + vrLoc = 20605; + }; + 12375A3D13D831AB0027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 012E60FB137AC68F00E35218 /* smbios.c */; + rLen = 9; + rLoc = 27806; + rType = 0; + }; + 12375A3E13D831AB0027F8A5 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 012E60FB137AC68F00E35218 /* smbios.c */; + name = "smbios.c: 836"; + rLen = 9; + rLoc = 27806; + rType = 0; + vrLen = 696; + vrLoc = 27294; + }; + 1284EEE713D6F35E00A6BE87 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = B0056D6111F3868000754B65 /* platform.h */; + name = "platform.h: 139"; + rLen = 12; + rLoc = 4643; + rType = 0; + vrLen = 1184; + vrLoc = 3805; + }; 1284EEF913D6F95000A6BE87 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B0056D6011F3868000754B65 /* platform.c */; @@ -223,16 +351,6 @@ vrLen = 1026; vrLoc = 786; }; - 1284EF1113D6FD4500A6BE87 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = B0056D3F11F3868000754B65 /* fake_efi.c */; - name = "fake_efi.c: 740"; - rLen = 0; - rLoc = 28686; - rType = 0; - vrLen = 645; - vrLoc = 28553; - }; 128EB70A13D31D3900E0DA4B /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B0056D6A11F3868000754B65 /* stringTable.c */; @@ -273,16 +391,6 @@ vrLen = 1382; vrLoc = 997; }; - 128EC27413D3442900E0DA4B /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 012E60F8137AC68F00E35218 /* smbios_decode.c */; - name = "smbios_decode.c: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1349; - vrLoc = 7003; - }; 12BFD73713D6E2DD00065808 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B0056D6811F3868000754B65 /* spd.c */; @@ -293,16 +401,6 @@ vrLen = 496; vrLoc = 8297; }; - 12BFD73813D6E2DD00065808 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 012E60FB137AC68F00E35218 /* smbios.c */; - name = "smbios.c: 26"; - rLen = 1; - rLoc = 487; - rType = 0; - vrLen = 1356; - vrLoc = 347; - }; 12D15FC013D35DFB00ABAAF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B0056D4011F3868000754B65 /* fake_efi.h */; @@ -313,16 +411,6 @@ vrLen = 571; vrLoc = 66; }; - 12D15FC213D35DFB00ABAAF4 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 012E60F9137AC68F00E35218 /* smbios_getters.c */; - name = "smbios_getters.c: 493"; - rLen = 7; - rLoc = 13692; - rType = 0; - vrLen = 587; - vrLoc = 13520; - }; 12D15FE813D3634F00ABAAF4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = B0056D6511F3868000754B65 /* SMBIOS.h */; @@ -352,16 +440,16 @@ }; B0056CF611F3868000754B65 /* boot.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1160, 9841}}"; - sepNavSelRange = "{13406, 0}"; - sepNavVisRange = "{22628, 768}"; + sepNavIntBoundsRect = "{{0, 0}, {880, 10192}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{3039, 1039}"; }; }; B0056CF711F3868000754B65 /* boot.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {877, 3653}}"; - sepNavSelRange = "{5659, 0}"; - sepNavVisRange = "{5084, 630}"; + sepNavIntBoundsRect = "{{0, 0}, {877, 3692}}"; + sepNavSelRange = "{5686, 0}"; + sepNavVisRange = "{5182, 637}"; }; }; B0056D0611F3868000754B65 /* options.c */ = { @@ -378,14 +466,28 @@ sepNavVisRange = "{0, 1312}"; }; }; + B0056D2511F3868000754B65 /* acpi.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {782, 2067}}"; + sepNavSelRange = "{1851, 18}"; + sepNavVisRange = "{1683, 831}"; + }; + }; B0056D2611F3868000754B65 /* acpi_patcher.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {922, 17745}}"; - sepNavSelRange = "{24837, 0}"; - sepNavVisRange = "{24291, 1102}"; + sepNavIntBoundsRect = "{{0, 0}, {877, 17485}}"; + sepNavSelRange = "{28073, 19}"; + sepNavVisRange = "{27547, 987}"; sepNavWindowFrame = "{{15, 60}, {889, 813}}"; }; }; + B0056D2711F3868000754B65 /* acpi_patcher.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 520}}"; + sepNavSelRange = "{238, 8}"; + sepNavVisRange = "{0, 570}"; + }; + }; B0056D2A11F3868000754B65 /* ati.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {877, 17433}}"; @@ -437,9 +539,9 @@ }; B0056D3F11F3868000754B65 /* fake_efi.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {877, 10972}}"; - sepNavSelRange = "{28686, 0}"; - sepNavVisRange = "{28553, 645}"; + sepNavIntBoundsRect = "{{0, 0}, {873, 11167}}"; + sepNavSelRange = "{28916, 0}"; + sepNavVisRange = "{30020, 333}"; }; }; B0056D4011F3868000754B65 /* fake_efi.h */ = { @@ -458,18 +560,39 @@ }; B0056D5B11F3868000754B65 /* pci.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {782, 2574}}"; + sepNavIntBoundsRect = "{{0, 0}, {877, 2626}}"; sepNavSelRange = "{2891, 0}"; - sepNavVisRange = "{2501, 585}"; + sepNavVisRange = "{0, 482}"; }; }; B0056D5C11F3868000754B65 /* pci.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {782, 12519}}"; - sepNavSelRange = "{2084, 4}"; - sepNavVisRange = "{1847, 805}"; + sepNavIntBoundsRect = "{{0, 0}, {877, 12545}}"; + sepNavSelRange = "{388, 8}"; + sepNavVisRange = "{276, 575}"; }; }; + B0056D5D11F3868000754B65 /* pci_root.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 1508}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{1620, 667}"; + }; + }; + B0056D5E11F3868000754B65 /* pci_root.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 394}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 192}"; + }; + }; + B0056D5F11F3868000754B65 /* pci_setup.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {877, 1300}}"; + sepNavSelRange = "{470, 19}"; + sepNavVisRange = "{160, 829}"; + }; + }; B0056D6011F3868000754B65 /* platform.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {873, 975}}"; @@ -493,9 +616,9 @@ }; B0056D6511F3868000754B65 /* SMBIOS.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {782, 6292}}"; - sepNavSelRange = "{14307, 17}"; - sepNavVisRange = "{13924, 957}"; + sepNavIntBoundsRect = "{{0, 0}, {782, 6318}}"; + sepNavSelRange = "{14808, 14}"; + sepNavVisRange = "{14080, 936}"; }; }; B0056D6811F3868000754B65 /* spd.c */ = { Index: branches/slice/trunkM/Chameleon.xcodeproj/slice.mode1v3 =================================================================== --- branches/slice/trunkM/Chameleon.xcodeproj/slice.mode1v3 (revision 1198) +++ branches/slice/trunkM/Chameleon.xcodeproj/slice.mode1v3 (revision 1199) @@ -272,14 +272,14 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 46 + 85 11 3 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 334}, {186, 600}} + {{0, 1021}, {186, 600}} PBXTopSmartGroupGIDs @@ -316,7 +316,7 @@ PBXProjectModuleGUID 1CE0B20306471E060097A5F4 PBXProjectModuleLabel - AppleSMBIOS.cpp + smbios.c PBXSplitModuleInNavigatorKey Split0 @@ -324,11 +324,11 @@ PBXProjectModuleGUID 1CE0B20406471E060097A5F4 PBXProjectModuleLabel - AppleSMBIOS.cpp + smbios.c _historyCapacity 0 bookmark - 1208BED813D710A600694228 + 12375A3E13D831AB0027F8A5 history 122A5BCA1375C49300795FF0 @@ -338,20 +338,29 @@ 128EB70B13D31D3900E0DA4B 128EC26913D3427400E0DA4B 128EC27313D3442900E0DA4B - 128EC27413D3442900E0DA4B 12D15FC013D35DFB00ABAAF4 - 12D15FC213D35DFB00ABAAF4 12D15FE813D3634F00ABAAF4 12BFD73713D6E2DD00065808 - 12BFD73813D6E2DD00065808 1284EEE713D6F35E00A6BE87 - 1284EEE913D6F35E00A6BE87 - 1284EEF713D6F95000A6BE87 1284EEF913D6F95000A6BE87 - 1284EF1113D6FD4500A6BE87 1208BED013D70B8900694228 1208BED513D710A600694228 - 1208BED613D710A600694228 + 1237521013D814370027F8A5 + 1237560213D81EE60027F8A5 + 1237560313D81EE60027F8A5 + 1237560613D81EE60027F8A5 + 1237560713D81EE60027F8A5 + 1237560813D81EE60027F8A5 + 1237560913D81EE60027F8A5 + 1237560A13D81EE60027F8A5 + 1237560B13D81EE60027F8A5 + 1237560C13D81EE60027F8A5 + 1237560D13D81EE60027F8A5 + 1237561D13D823130027F8A5 + 12375A1613D82F2C0027F8A5 + 12375A2913D82FD80027F8A5 + 12375A3C13D831AB0027F8A5 + 12375A3D13D831AB0027F8A5 SplitCount @@ -363,14 +372,14 @@ GeometryConfiguration Frame - {{0, 0}, {938, 432}} + {{0, 0}, {938, 399}} RubberWindowFrame 294 219 1146 659 0 0 1440 878 Module PBXNavigatorGroup Proportion - 432pt + 399pt ContentConfiguration @@ -383,14 +392,14 @@ GeometryConfiguration Frame - {{0, 437}, {938, 181}} + {{0, 404}, {938, 214}} RubberWindowFrame 294 219 1146 659 0 0 1440 878 Module XCDetailModule Proportion - 181pt + 214pt Proportion @@ -409,9 +418,9 @@ TableOfContents - 1208BED313D70B8900694228 + 12375A3F13D831AB0027F8A5 1CE0B1FE06471DED0097A5F4 - 1208BED413D70B8900694228 + 12375A4013D831AB0027F8A5 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 @@ -631,7 +640,7 @@ TableOfContents 122A5BB81375BA4700795FF0 - 1208BEC713D70B8600694228 + 12375A3513D831A70027F8A5 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID @@ -764,12 +773,14 @@ Dock + BecomeActive + ContentConfiguration PBXProjectModuleGUID 1CDD528C0622207200134675 PBXProjectModuleLabel - bootstruct.c + fake_efi.c StatusBarVisibility @@ -778,7 +789,7 @@ Frame {{0, 0}, {843, 431}} RubberWindowFrame - 526 109 843 689 0 0 1440 878 + 574 74 843 689 0 0 1440 878 Module PBXNavigatorGroup @@ -790,8 +801,6 @@ 431pt - BecomeActive - ContentConfiguration PBXProjectModuleGUID @@ -804,7 +813,7 @@ Frame {{0, 436}, {843, 212}} RubberWindowFrame - 526 109 843 689 0 0 1440 878 + 574 74 843 689 0 0 1440 878 Module PBXProjectFindModule @@ -827,13 +836,13 @@ TableOfContents 1C530D57069F1CE1000CFCEE - 1208BECE13D70B8600694228 - 1208BECF13D70B8600694228 + 12375A3A13D831A70027F8A5 + 12375A3B13D831A70027F8A5 1CDD528C0622207200134675 1CD0528E0623707200166675 WindowString - 526 109 843 689 0 0 1440 878 + 574 74 843 689 0 0 1440 878 WindowToolGUID 1C530D57069F1CE1000CFCEE WindowToolIsVisible Index: branches/slice/trunkM/i386/libsaio/smbios_getters.h =================================================================== --- branches/slice/trunkM/i386/libsaio/smbios_getters.h (revision 1198) +++ branches/slice/trunkM/i386/libsaio/smbios_getters.h (revision 1199) @@ -42,6 +42,7 @@ extern SMBStructHeader* FindNextDmiTableOfType(int type, int minlength); extern void getSmbiosProductName(); extern void getSmbiosMacModel(void); +extern void getSmbiosTableStructure(struct SMBEntryPoint *smbios); SMBEntryPoint *getAddressOfSmbiosTable(void); const char * smbiosStringAtIndex(SMBStructHeader* smHeader, int index, int* length); Index: branches/slice/trunkM/i386/libsaio/acpi_patcher.c =================================================================== --- branches/slice/trunkM/i386/libsaio/acpi_patcher.c (revision 1198) +++ branches/slice/trunkM/i386/libsaio/acpi_patcher.c (revision 1199) @@ -926,6 +926,16 @@ // Load replacement DSDT new_dsdt = loadACPITable(dirSpec); + struct acpi_2_dsdt* dsdt = (struct acpi_2_dsdt*)new_dsdt; + if (new_dsdt) { + msglog("DSDT.aml loaded from %s\n", dirSpec); + strncpy(dsdt->OEMID, "Apple ", 6); + strncpy(dsdt->OEMTableId, MacModel, 8); + dsdt->OEMRevision = ModelRev; + dsdt->Checksum=0; + dsdt->Checksum=256-checksum8(new_dsdt,dsdt->Length); + + } // Mozodojo: going to patch FACP and load SSDT's even if DSDT.aml is not present /*if (!new_dsdt) { @@ -1074,6 +1084,13 @@ //Now I want to replace DSDT in place // it is only way to patch DSDT on some platform old_dsdt = (char *)fadt->DSDT; + //it's impossible because the memory of old_dsdt is read_only? +/* strncpy((struct acpi_2_dsdt*)old_dsdt->OEMID, "Apple ", 6); + strncpy((struct acpi_2_dsdt*)old_dsdt->OEMTableId, MacModel, 8); + (struct acpi_2_dsdt*)old_dsdt->OEMRevision = ModelRev; + (struct acpi_2_dsdt*)old_dsdt->Checksum=0; + (struct acpi_2_dsdt*)old_dsdt->Checksum = 256-checksum8(old_dsdt,(struct acpi_2_dsdt*)old_dsdt->Length); +*/ if(!old_dsdt || !tableSign(old_dsdt, "DSDT")){ if(fadt_mod->Length > 140) old_dsdt = (char *)(uint32_t)fadt_mod->X_DSDT; if(!old_dsdt || !tableSign(old_dsdt, "DSDT")) old_dsdt = (char *)new_dsdt; Index: branches/slice/trunkM/i386/libsaio/cpu.c =================================================================== --- branches/slice/trunkM/i386/libsaio/cpu.c (revision 1198) +++ branches/slice/trunkM/i386/libsaio/cpu.c (revision 1199) @@ -85,7 +85,115 @@ return retval; } +#if 0 /* + * DFE: Measures the Max Performance Frequency in Hz (64-bit) + */ +static uint64_t measure_mperf_frequency(void) +{ + uint64_t mperfStart; + uint64_t mperfEnd; + uint64_t mperfDelta = 0xffffffffffffffffULL; + unsigned long pollCount; + uint64_t retval = 0; + int i; + + /* Time how many MPERF ticks elapse in 30 msec using the 8254 PIT + * counter 2. We run this loop 3 times to make sure the cache + * is hot and we take the minimum delta from all of the runs. + * That is to say that we're biased towards measuring the minimum + * number of MPERF ticks that occur while waiting for the timer to + * expire. + */ + for(i = 0; i < 10; ++i) + { + enable_PIT2(); + set_PIT2_mode0(CALIBRATE_LATCH); + mperfStart = rdmsr64(MSR_AMD_MPERF); + pollCount = poll_PIT2_gate(); + mperfEnd = rdmsr64(MSR_AMD_MPERF); + /* The poll loop must have run at least a few times for accuracy */ + if(pollCount <= 1) + continue; + /* The MPERF must increment at LEAST once every millisecond. We + * should have waited exactly 30 msec so the MPERF delta should + * be >= 30. Anything less and the processor is way too slow. + */ + if((mperfEnd - mperfStart) <= CALIBRATE_TIME_MSEC) + continue; + // tscDelta = MIN(tscDelta, (tscEnd - tscStart)) + if( (mperfEnd - mperfStart) < mperfDelta ) + mperfDelta = mperfEnd - mperfStart; + } + /* mperfDelta is now the least number of MPERF ticks the processor made in + * a timespan of 0.03 s (e.g. 30 milliseconds) + */ + + if(mperfDelta > (1ULL<<32)) + retval = 0; + else + { + retval = mperfDelta * 1000 / 30; + } + disable_PIT2(); + return retval; +} +#endif +/* + * Measures the Actual Performance Frequency in Hz (64-bit) + */ +static uint64_t measure_aperf_frequency(void) +{ + uint64_t aperfStart; + uint64_t aperfEnd; + uint64_t aperfDelta = 0xffffffffffffffffULL; + unsigned long pollCount; + uint64_t retval = 0; + int i; + + /* Time how many APERF ticks elapse in 30 msec using the 8254 PIT + * counter 2. We run this loop 3 times to make sure the cache + * is hot and we take the minimum delta from all of the runs. + * That is to say that we're biased towards measuring the minimum + * number of APERF ticks that occur while waiting for the timer to + * expire. + */ + for(i = 0; i < 10; ++i) + { + enable_PIT2(); + set_PIT2_mode0(CALIBRATE_LATCH); + aperfStart = rdmsr64(MSR_AMD_APERF); + pollCount = poll_PIT2_gate(); + aperfEnd = rdmsr64(MSR_AMD_APERF); + /* The poll loop must have run at least a few times for accuracy */ + if(pollCount <= 1) + continue; + /* The TSC must increment at LEAST once every millisecond. We + * should have waited exactly 30 msec so the APERF delta should + * be >= 30. Anything less and the processor is way too slow. + */ + if((aperfEnd - aperfStart) <= CALIBRATE_TIME_MSEC) + continue; + // tscDelta = MIN(tscDelta, (tscEnd - tscStart)) + if( (aperfEnd - aperfStart) < aperfDelta ) + aperfDelta = aperfEnd - aperfStart; + } + /* mperfDelta is now the least number of MPERF ticks the processor made in + * a timespan of 0.03 s (e.g. 30 milliseconds) + */ + + if(aperfDelta > (1ULL<<32)) + retval = 0; + else + { + retval = aperfDelta * 1000 / 30; + } + disable_PIT2(); + return retval; +} + + +/* * Calculates the FSB and CPU frequencies using specific MSRs for each CPU * - multi. is read from a specific MSR. In the case of Intel, there is: * a max multi. (used to calculate the FSB freq.), @@ -114,9 +222,15 @@ do_cpuid(0x00000003, p->CPU.CPUID[CPUID_3]); do_cpuid2(0x00000004, 0, p->CPU.CPUID[CPUID_4]); do_cpuid(0x80000000, p->CPU.CPUID[CPUID_80]); - if ((p->CPU.CPUID[CPUID_80][0] & 0x0000000f) >= 1) { + if ((p->CPU.CPUID[CPUID_80][0] & 0x0000000f) >= 8) { + do_cpuid(0x80000008, p->CPU.CPUID[CPUID_88]); + do_cpuid(0x80000001, p->CPU.CPUID[CPUID_81]); + } + else if ((p->CPU.CPUID[CPUID_80][0] & 0x0000000f) >= 1) { do_cpuid(0x80000001, p->CPU.CPUID[CPUID_81]); } + + #if DEBUG_CPU { int i; @@ -138,15 +252,23 @@ p->CPU.Model += (p->CPU.ExtModel << 4); - if (p->CPU.Vendor == 0x756E6547 /* Intel */ && + if (p->CPU.Vendor == CPUID_VENDOR_INTEL && p->CPU.Family == 0x06 && p->CPU.Model >= CPUID_MODEL_NEHALEM && p->CPU.Model != CPUID_MODEL_ATOM // MSR is *NOT* available on the Intel Atom CPU - ){ + ) + { msr = rdmsr64(MSR_CORE_THREAD_COUNT); // Undocumented MSR in Nehalem and newer CPUs p->CPU.NoCores = bitfield((uint32_t)msr, 31, 16); // Using undocumented MSR to get actual values p->CPU.NoThreads = bitfield((uint32_t)msr, 15, 0); // Using undocumented MSR to get actual values - } else { + } + else if (p->CPU.Vendor == CPUID_VENDOR_AMD) + { + p->CPU.NoThreads = bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16); + p->CPU.NoCores = bitfield(p->CPU.CPUID[CPUID_88][2], 7, 0) + 1; + } + else + { p->CPU.NoThreads = bitfield(p->CPU.CPUID[CPUID_1][1], 23, 16); // Use previous method for Cores and Threads p->CPU.NoCores = bitfield(p->CPU.CPUID[CPUID_4][0], 31, 26) + 1; } @@ -215,7 +337,7 @@ fsbFrequency = 0; cpuFrequency = 0; - if ((p->CPU.Vendor == 0x756E6547 /* Intel */) && ((p->CPU.Family == 0x06) || (p->CPU.Family == 0x0f))) { + if ((p->CPU.Vendor == CPUID_VENDOR_INTEL) && ((p->CPU.Family == 0x06) || (p->CPU.Family == 0x0f))) { int intelCPU = p->CPU.Model; if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0c) || (p->CPU.Family == 0x0f && p->CPU.Model >= 0x03)) { /* Nehalem CPU model */ @@ -231,12 +353,12 @@ msr = rdmsr64(MSR_PLATFORM_INFO); DBG("msr(0x%04x): platform_info %08x-%08x\n", MSR_PLATFORM_INFO, (msr >> 32) & 0xffffffff, msr & 0xffffffff); - bus_ratio_max = (msr >> 8) & 0xff; - bus_ratio_min = (msr >> 40) & 0xff; //valv: not sure about this one (Remarq.1) + bus_ratio_max = bitfield(msr, 14, 8); + bus_ratio_min = bitfield(msr, 46, 40); //valv: not sure about this one (Remarq.1) msr = rdmsr64(MSR_FLEX_RATIO); DBG("msr(0x%04x): flex_ratio %08x\n", MSR_FLEX_RATIO, msr & 0xffffffff); if ((msr >> 16) & 0x01) { - flex_ratio = (msr >> 8) & 0xff; + flex_ratio = bitfield(msr, 14, 8); /* bcc9: at least on the gigabyte h67ma-ud2h, where the cpu multipler can't be changed to allow overclocking, the flex_ratio msr has unexpected (to OSX) @@ -250,7 +372,7 @@ presence bit) */ wrmsr64(MSR_FLEX_RATIO, (msr & 0xFFFFFFFFFFFEFFFFULL)); msr = rdmsr64(MSR_FLEX_RATIO); - verbose("Unusable flex ratio detected. Patched MSR now %08x\n", msr & 0xffffffff); + verbose("Unusable flex ratio detected. Patched MSR now %08x\n", bitfield(msr, 31, 0)); } else { if (bus_ratio_max > flex_ratio) { bus_ratio_max = flex_ratio; @@ -295,17 +417,17 @@ currcoef = bus_ratio_max; } else { msr = rdmsr64(MSR_IA32_PERF_STATUS); - DBG("msr(0x%x): ia32_perf_stat 0x%08x\n", __LINE__, msr & 0xffffffff); - currcoef = (msr >> 8) & 0x1f; + DBG("msr(0x%x): ia32_perf_stat 0x%08x\n", __LINE__, bitfield(msr, 31, 0)); + currcoef = bitfield(msr, 12, 8); /* Non-integer bus ratio for the max-multi*/ - maxdiv = (msr >> 46) & 0x01; + maxdiv = bitfield(msr, 46, 46); /* Non-integer bus ratio for the current-multi (undocumented)*/ - currdiv = (msr >> 14) & 0x01; + currdiv = bitfield(msr, 14, 14); if ((p->CPU.Family == 0x06 && p->CPU.Model >= 0x0e) || (p->CPU.Family == 0x0f)) // This will always be model >= 3 { /* On these models, maxcoef defines TSC freq */ - maxcoef = (msr >> 40) & 0x1f; + maxcoef = bitfield(msr, 44, 40); } else { /* On lower models, currcoef defines TSC freq */ /* XXX */ @@ -357,41 +479,78 @@ DBG("CPU is %s\n", p->CPU.Mobile?"Mobile":"Desktop"); } -#if 0 - else if((p->CPU.Vendor == 0x68747541 /* AMD */) && (p->CPU.Family == 0x0f)) { - if(p->CPU.ExtFamily == 0x00 /* K8 */) { - msr = rdmsr64(K8_FIDVID_STATUS); - currcoef = (msr & 0x3f) / 2 + 4; - currdiv = (msr & 0x01) * 2; - } else if(p->CPU.ExtFamily >= 0x01 /* K10+ */) { - msr = rdmsr64(K10_COFVID_STATUS); - if(p->CPU.ExtFamily == 0x01 /* K10 */) - currcoef = (msr & 0x3f) + 0x10; - else /* K11+ */ - currcoef = (msr & 0x3f) + 0x08; - currdiv = (2 << ((msr >> 6) & 0x07)); - } + else if((p->CPU.Vendor == CPUID_VENDOR_AMD) && (p->CPU.Family == 0x0f)) + { + switch(p->CPU.ExtFamily) + { + case 0x00: /* K8 */ + msr = rdmsr64(K8_FIDVID_STATUS); + maxcoef = bitfield(msr, 21, 16) / 2 + 4; + currcoef = bitfield(msr, 5, 0) / 2 + 4; + break; + + case 0x01: /* K10 */ + msr = rdmsr64(K10_COFVID_STATUS); + do_cpuid2(0x00000006, 0, p->CPU.CPUID[CPUID_6]); + if(bitfield(p->CPU.CPUID[CPUID_6][2], 0, 0) == 1) // EffFreq: effective frequency interface + { + //uint64_t mperf = measure_mperf_frequency(); + uint64_t aperf = measure_aperf_frequency(); + cpuFrequency = aperf; + } + // NOTE: tsc runs at the maccoeff (non turbo) + // *not* at the turbo frequency. + maxcoef = bitfield(msr, 54, 49) / 2 + 4; + currcoef = bitfield(msr, 5, 0) + 0x10; + currdiv = 2 << bitfield(msr, 8, 6); + + break; + + case 0x05: /* K14 */ + msr = rdmsr64(K10_COFVID_STATUS); + currcoef = (bitfield(msr, 54, 49) + 0x10) << 2; + currdiv = (bitfield(msr, 8, 4) + 1) << 2; + currdiv += bitfield(msr, 3, 0); - if (currcoef) { - if (currdiv) { - fsbFrequency = ((tscFrequency * currdiv) / currcoef); - DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv); - } else { - fsbFrequency = (tscFrequency / currcoef); - DBG("%d\n", currcoef); - } - fsbFrequency = (tscFrequency / currcoef); - cpuFrequency = tscFrequency; - } - } + break; + + case 0x02: /* K11 */ + // not implimented + break; + } + + if (maxcoef) + { + if (currdiv) + { + if(!currcoef) currcoef = maxcoef; + if(!cpuFrequency) + fsbFrequency = ((tscFrequency * currdiv) / currcoef); + else + fsbFrequency = ((cpuFrequency * currdiv) / currcoef); - if (!fsbFrequency) { - fsbFrequency = (DEFAULT_FSB * 1000); - cpuFrequency = tscFrequency; - DBG("0 ! using the default value for FSB !\n"); - } -#endif - + DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv); + } else { + if(!cpuFrequency) + fsbFrequency = (tscFrequency / maxcoef); + else + fsbFrequency = (cpuFrequency / maxcoef); + DBG("%d\n", currcoef); + } + } + else if (currcoef) + { + if (currdiv) + { + fsbFrequency = ((tscFrequency * currdiv) / currcoef); + DBG("%d.%d\n", currcoef / currdiv, ((currcoef % currdiv) * 100) / currdiv); + } else { + fsbFrequency = (tscFrequency / currcoef); + DBG("%d\n", currcoef); + } + } + if(!cpuFrequency) cpuFrequency = tscFrequency; + } p->CPU.MaxCoef = maxcoef; p->CPU.MaxDiv = maxdiv; p->CPU.CurrCoef = currcoef; Index: branches/slice/trunkM/i386/libsaio/platform.h =================================================================== --- branches/slice/trunkM/i386/libsaio/platform.h (revision 1198) +++ branches/slice/trunkM/i386/libsaio/platform.h (revision 1199) @@ -14,10 +14,13 @@ extern void dumpPhysAddr(const char * title, void * a, int len); extern void scan_cpu(); -#define bit(n) (1UL << (n)) +#define bit(n) (1ULL << (n)) #define bitmask(h,l) ((bit(h)|(bit(h)-1)) & ~(bit(l)-1)) #define bitfield(x,h,l) (((x) & bitmask(h,l)) >> l) +/* CPUID Vendor */ +#define CPUID_VENDOR_INTEL 0x756E6547 +#define CPUID_VENDOR_AMD 0x68747541 /* CPUID index into cpuid_raw */ #define CPUID_0 0 @@ -25,9 +28,11 @@ #define CPUID_2 2 #define CPUID_3 3 #define CPUID_4 4 -#define CPUID_80 5 -#define CPUID_81 6 -#define CPUID_MAX 7 +#define CPUID_6 5 +#define CPUID_80 6 +#define CPUID_81 7 +#define CPUID_88 8 +#define CPUID_MAX 9 #define CPU_MODEL_PENTIUM_M 0x0D #define CPU_MODEL_YONAH 0x0E // Sossaman, Yonah Index: branches/slice/trunkM/i386/libsaio/pci_setup.c =================================================================== --- branches/slice/trunkM/i386/libsaio/pci_setup.c (revision 1198) +++ branches/slice/trunkM/i386/libsaio/pci_setup.c (revision 1199) @@ -21,6 +21,8 @@ extern pci_dt_t *dram_controller_dev; +uint16_t vgaVendor; + void setup_pci_devs(pci_dt_t *pci_dt) { char *devicepath; @@ -54,7 +56,9 @@ case PCI_CLASS_DISPLAY_VGA: DBG("GraphicsEnabler %s enabled\n", do_gfx_devprop?"":"no"); if (do_gfx_devprop) - switch (current->vendor_id) + { + vgaVendor = current->vendor_id; + switch (vgaVendor) { case PCI_VENDOR_ID_ATI: setup_ati_devprop(current); @@ -68,6 +72,7 @@ setup_nvidia_devprop(current); break; } + } break; case PCI_CLASS_SERIAL_USB: Index: branches/slice/trunkM/i386/libsaio/cpu.h =================================================================== --- branches/slice/trunkM/i386/libsaio/cpu.h (revision 1198) +++ branches/slice/trunkM/i386/libsaio/cpu.h (revision 1199) @@ -33,6 +33,10 @@ #define K8_FIDVID_STATUS 0xC0010042 #define K10_COFVID_STATUS 0xC0010071 +#define MSR_AMD_MPERF 0x000000E7 +#define MSR_AMD_APERF 0x000000E8 + + #define DEFAULT_FSB 100000 /* for now, hardcoding 100MHz for old CPUs */ // DFE: This constant comes from older xnu: Index: branches/slice/trunkM/i386/libsaio/smbios.c =================================================================== --- branches/slice/trunkM/i386/libsaio/smbios.c (revision 1198) +++ branches/slice/trunkM/i386/libsaio/smbios.c (revision 1199) @@ -11,13 +11,13 @@ #include "smbios_getters.h" #ifndef DEBUG_SMBIOS -#define DEBUG_SMBIOS 0 +#define DEBUG_SMBIOS 1 #endif #if DEBUG_SMBIOS -#define DBG(x...) printf(x) +#define DBG(x...) verbose(x) #else -#define DBG(x...) msglog(x) +#define DBG(x...) #endif #define SMBPlist &bootInfo->smbiosConfig @@ -110,7 +110,7 @@ #define kDefaultMacProWestmereBIOSVersion " MP51.88Z.007F.B00.1008031144" #define kDefaulMacProWestmereBIOSReleaseDate "08/03/10" //------------------------------------------------------------------------------------------------------------------------- -#define MAX_DMI_TABLES 96 +#define MAX_DMI_TABLES 255 typedef struct DmiNumAssocTag { SMBStructHeader* dmi; uint8_t type; @@ -123,6 +123,55 @@ #define getFieldOffset(struct, field) ((uint8_t)(uint32_t)&(((struct *)0)->field)) +/** + * Get a table structure entry from a type specification and a smbios address + * return NULL if table is not found + */ +void getSmbiosTableStructure(struct SMBEntryPoint *smbios) +{ + SMBStructHeader* dmihdr=NULL; + SMBByte* p; + int i; + + if (ftTablePairInit && smbios!=NULL) { + ftTablePairInit = false; +#if DEBUG_SMBIOS + verbose(">>> SMBIOSAddr=0x%08x\n", smbios); + verbose(">>> DMI: addr=0x%08x, len=%d, count=%d\n", smbios->dmi.tableAddress, + smbios->dmi.tableLength, smbios->dmi.structureCount); +#endif + p = (SMBByte *) smbios->dmi.tableAddress; + for (i=0; + i < smbios->dmi.structureCount && + p + 4 <= (SMBByte *)smbios->dmi.tableAddress + smbios->dmi.tableLength; + i++) { + dmihdr = (SMBStructHeader *) p; + +#if DEBUG_SMBIOS + // verbose(">>>>>> DMI(%d): type=0x%02x, len=0x%d\n",i,dmihdr->type,dmihdr->length); +#endif + if (dmihdr->length < 4 || dmihdr->type == 127 /* EOT */) break; + if (DmiTablePairCount < MAX_DMI_TABLES) { + DmiTablePair[DmiTablePairCount].dmi = dmihdr; + DmiTablePair[DmiTablePairCount].type = dmihdr->type; + DmiTablePairCount++; + } + else { + verbose("DMI table entries list is full! Next entries won't be stored.\n"); + } +#if DEBUG_SMBIOS + verbose("DMI header found for table type %d, length = %d\n", dmihdr->type, dmihdr->length); +#endif + p = p + dmihdr->length; + while ((p - (SMBByte *)smbios->dmi.tableAddress + 1 < smbios->dmi.tableLength) && (p[0] != 0x00 || p[1] != 0x00)) { + p++; + } + p += 2; + } + + } +} + typedef struct { SMBStructHeader *orig; SMBStructHeader *new; @@ -298,7 +347,7 @@ if (Platform->Type == 2) //platformCPUFeature(CPU_FEATURE_MOBILE)) { - if (Platform->CPU.NoCores > 1) //Slice - it is wrong but we have no criteria to choose from + if (vgaVendor != PCI_VENDOR_ID_INTEL) //Slice { defaultBIOSInfo.version = kDefaultMacBookProBIOSVersion; defaultSystemInfo.productName = kDefaultMacBookPro; @@ -812,7 +861,7 @@ { int i; - if (ftTablePairInit) getSmbios(SMBIOS_ORIGINAL); +// if (ftTablePairInit) getSmbios(SMBIOS_ORIGINAL); for (i=current_pos; i < DmiTablePairCount; i++) { if (type == DmiTablePair[i].type && @@ -822,6 +871,7 @@ return DmiTablePair[i].dmi; } } + DBG("SMBIOS table type %d not found\n", type); return NULL; // not found }; @@ -854,7 +904,7 @@ // do not need in complex MSR calculation case kSMBTypeProcessorInformation: tmp = ((SMBProcessorInformation *)structHeader)->externalClock; - Platform->CPU.FSBFrequency = tmp * MEGA + (tmp & 7) * 110000; //According to Intel + Platform->CPU.FSBFrequency = tmp * MEGA + (tmp & 7) * 110000; //According to Intel 133->133.33MHz tmp = ((SMBProcessorInformation *)structHeader)->currentClock; Platform->CPU.CPUFrequency = tmp * MEGA + (tmp & 7) * 110000; break; Index: branches/slice/trunkM/i386/libsaio/fake_efi.c =================================================================== --- branches/slice/trunkM/i386/libsaio/fake_efi.c (revision 1198) +++ branches/slice/trunkM/i386/libsaio/fake_efi.c (revision 1199) @@ -740,8 +740,9 @@ verbose("2:Platform=%x root_pci=%x\n", Platform, root_pci_dev); #endif setup_pci_devs(root_pci_dev); - - readSMBIOSInfo(getSmbios(SMBIOS_ORIGINAL)); + smbios_p = (EFI_PTR32)getSmbios(SMBIOS_ORIGINAL); + getSmbiosTableStructure((void*)(EFI_PTR32)smbios_p); + readSMBIOSInfo((void*)(EFI_PTR32)smbios_p); // load smbios.plist file if any setupSmbiosConfigFile("smbios.plist"); Index: branches/slice/trunkM/i386/libsaio/smbios_getters.c =================================================================== --- branches/slice/trunkM/i386/libsaio/smbios_getters.c (revision 1198) +++ branches/slice/trunkM/i386/libsaio/smbios_getters.c (revision 1199) @@ -442,7 +442,7 @@ } //Slice -//#define MEGA 1000000LL - now in mem.h +//#define MEGA 1000000LL - now in platform.h void scan_cpu_DMI(void) //PlatformInfo_t *p) { // int i=0; @@ -494,40 +494,3 @@ return; } -/* -//Slice - check other DMI info -bool scanDMI(void) -{ - SMBStructHeader * dmihdr = NULL; - SMBSystemEnclosure* encInfo; // Type 3 - - for (dmihdr = FindFirstDmiTableOfType(3, 13); dmihdr; dmihdr = FindNextDmiTableOfType(3, 13)) - { - encInfo = (SMBSystemEnclosure*)dmihdr; - msglog("DMI Chassis Info:\n Type=%x\n Boot-up State=%x\n Power Supply=%x Thermal State=%x\n", encInfo->type, encInfo->bootupState, encInfo->powerSupplyState, encInfo->thermalState); - switch (encInfo->type) { - case 1: - case 2: - return FALSE; - case 3: - case 4: - case 6: - case 7: - Platform->CPU.Mobile = FALSE; - break; - case 8: - case 9: - case 0x0A: - case 0x0B: - case 0x0E: - Platform->CPU.Mobile = TRUE; - break; - - default: - break; - } - return TRUE; - } - return FALSE; -} -*/ \ No newline at end of file Index: branches/slice/trunkM/i386/boot2/boot.c =================================================================== --- branches/slice/trunkM/i386/boot2/boot.c (revision 1198) +++ branches/slice/trunkM/i386/boot2/boot.c (revision 1199) @@ -585,7 +585,7 @@ if (ret == 0 && kerneltime > exttime) { exttime = kerneltime; } - if (ret == 0 && cachetime != (exttime + 1)) { + if (ret == 0 && cachetime < exttime) { trycache = 0; break; } Index: branches/slice/trunkM/i386/boot2/boot.h =================================================================== --- branches/slice/trunkM/i386/boot2/boot.h (revision 1198) +++ branches/slice/trunkM/i386/boot2/boot.h (revision 1199) @@ -164,6 +164,7 @@ extern void *gRootPCIDev; extern void* gPlatform; extern void* gBootOrder; +extern uint16_t vgaVendor;; /* * Boot Modes Index: branches/slice/trunkM/revision =================================================================== --- branches/slice/trunkM/revision (revision 1198) +++ branches/slice/trunkM/revision (revision 1199) @@ -1 +1 @@ -1191 \ No newline at end of file +1198 \ No newline at end of file Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/decls.pbxbtree =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/cdecls.pbxbtree =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/imports.pbxbtree =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/pbxindex.header =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/refs.pbxbtree =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/symbols0.pbxsymbols =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/strings.pbxstrings/control =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/strings.pbxstrings/strings =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/build/Chameleon.build/Chameleon.pbxindex/files.pbxbtree =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: branches/slice/trunkM/Makefile =================================================================== --- branches/slice/trunkM/Makefile (revision 1198) +++ branches/slice/trunkM/Makefile (revision 1199) @@ -93,7 +93,7 @@ fi; \ done -dist image: all +dist image: @echo "================= Distrib =================" @echo "\t[RM] ${IMGROOT}" @rm -rf ${IMGROOT} @@ -114,7 +114,7 @@ @cp -f ${SRCROOT}/artwork/themes/default/* ${IMGROOT}/Extra/Themes/Default @cp -f ${SYMROOT}/i386/boot ${IMGROOT}/usr/standalone/i386 @cp -f ${SYMROOT}/i386/boot0 ${IMGROOT}/usr/standalone/i386 - @cp -f ${SYMROOT}/i386/boot0hfs ${IMGROOT}/usr/standalone/i386 +# @cp -f ${SYMROOT}/i386/boot0hfs ${IMGROOT}/usr/standalone/i386 @cp -f ${SYMROOT}/i386/boot0md ${IMGROOT}/usr/standalone/i386 @cp -f ${SYMROOT}/i386/boot1h ${IMGROOT}/usr/standalone/i386 @cp -f ${SYMROOT}/i386/boot1f32 ${IMGROOT}/usr/standalone/i386