Help - Search - Members - Calendar
Full Version: Hp Insyde Bios Cpus=1 Fix
Project OS X Forums > OS X 10.6 (Snow Leopard) > Development
yehia2amer
is there anyway to make this fix in the boot-loader, not editing the vanillia kernel
this will solve CPUS=1 in all i7,i5 insyde bios hp users
so please share your knowledge, and any help will be appreciated

that's the kernel fix

download the xnu source for 10.6.3 form opensource apple and unpack it
find the problematic file lapic.c in the path xnu-1504.3.12/osmfk/i386/lapic.c
use search to find : /* ExtINT */ and after the third instance [inside the lapic_configure() ] you add 2 lines of code :

/* NMI: ummasked, off course */
LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);

soo the code will look like this:
----------------------------------------------------------
/* ExtINT */
if (get_cpu_number() == master_cpu) {
value = LAPIC_READ(LVT_LINT0);
value &= ~LAPIC_LVT_MASKED;
value |= LAPIC_LVT_DM_EXTINT;
LAPIC_WRITE(LVT_LINT0, value);
}

/* NMI: ummasked, off course */
LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);

/* Timer: unmasked, one-shot */
LAPIC_WRITE(LVT_TIMER, LAPIC_VECTOR(TIMER));
-----------------------------------------------------------------
save the file and compile the kernel.
you should have xcode installed

N.B:

i have already tried a modded apic.aml file with Anv bootloader, as the original one from Pavilion was missing some parts at the end compared to the MacBook Pro apic.aml (related to NMI too !!!)

[0CCh 0204 1] Subtable Type : 04 <Local APIC NMI>
[0CDh 0205 1] Length : 06
[0CEh 0206 1] Processor ID : 00
[0CFh 0207 2] Flags (decoded below) : 0005
Polarity : 1
Trigger Mode : 1
[0D1h 0209 1] Interrupt Input LINT : 01

the modded file is loading fine but i still have the Panic with the vanilla kernel
gsly
QUOTE (yehia2amer @ May 25 2010, 09:18 AM) *
is there anyway to make this fix in the boot-loader, not editing the vanillia kernel
this will solve CPUS=1 in all i7,i5 insyde bios hp users
so please share your knowledge, and any help will be appreciated
...

i have already tried a modded apic.aml file with Anv bootloader, as the original one from Pavilion was missing some parts at the end compared to the MacBook Pro apic.aml (related to NMI too !!!)

the modded file is loading fine but i still have the Panic with the vanilla kernel


Thanks for confirming that lapic.c patch with fix this issue. I had found references to that fix previously on the 'net and squirreled it away for future use, but I'm still working on my DSDT.aml to get my SL 10.6.3 stable on my HP DV8 (i7 720QM, 8GB, 2x500GB, Insyde BIOS F.21) and nothing else I tried would get more than one core working. (BTW, this site is the *best* for DSDT information, etc. You guys rock!)

I'll grab the source (hopefully it's 10.3.1?) and patch/compile to confirm on my system, but I agree that we should find a more Vanilla solution.
yehia2amer
QUOTE (gsly @ May 26 2010, 02:08 AM) *
Thanks for confirming that lapic.c patch with fix this issue. I had found references to that fix previously on the 'net and squirreled it away for future use, but I'm still working on my DSDT.aml to get my SL 10.6.3 stable on my HP DV8 (i7 720QM, 8GB, 2x500GB, Insyde BIOS F.21) and nothing else I tried would get more than one core working. (BTW, this site is the *best* for DSDT information, etc. You guys rock!)

I'll grab the source (hopefully it's 10.3.1?) and patch/compile to confirm on my system, but I agree that we should find a more Vanilla solution.


1) do you get your dsdt.aml working ,please see my guide, i write the most problematic fixes but the dsdt still give me a KP
[GUIDE] Snow Leopard on HP dvx Quad Core i7 QM, Installing Method, Kexts, and DSDT fixes
2) no sources to 10.3.1 , i think we have to wait till the 10.4
3) what is your wifi and do you get it working

don't forget, always post feedback
gsly
QUOTE (yehia2amer @ May 26 2010, 10:27 AM) *
1) do you get your dsdt.aml working ,please see my guide, i write the most problematic fixes but the dsdt still give me a KP
[GUIDE] Snow Leopard on HP dvx Quad Core i7 QM, Installing Method, Kexts, and DSDT fixes
2) no sources to 10.3.1 , i think we have to wait till the 10.4
3) what is your wifi and do you get it working


1) Thanks, I did use some of the information from your guide but the DV8 has been harder to get SL going on. I'm doing device injection testing now smile.gif
2) Hopefully 10.6.4 will also fix the kernel so we don't have to, but I doubt it sad.gif
3) DV8 standard Wifi is Intel 5100. No hope of getting that working unless I port the Linux driver and build a mach kernel driver... I thought about it and decided it will be easier to order a Dell Broadcom based card and hack the BIOS white-list to accept it instead. (decoded the BIOS white-list... Waiting on the card...)
yehia2amer
SO WE NEED ANYONE TO HELP dry.gif
any help will be appreciated
gsly
yehia2amer,

I found this thread over at voodooprojects.org about using the Chameleon boot loader to patch a vanilla kernel at boot time:

http://forum.voodooprojects.org/index.php/topic,1153.0.html

I haven't had time to look at the code yet, but I plan to work on getting all 8 cores running next now that I've made some progress in other areas.. I replaced Intel 5100 with Dell 1510, hacked F.24 BIOS white-list and got WiFi working in Windows 7, Ubuntu 10.04 and Snow Leopard 10.6.3; also discovered my stability issues were related to the Apple's nVidia drivers in 10.6.3 v1.1 MBP update as even MBP users are having the same lock-ups (see http://discussions.apple.com/thread.jspa?t...2&tstart=0), however in my Hackintosh I can disable the injection and get stability biggrin.gif
Dastan
you guys are great ,
All cores under vanilla would be awesome,
and I'm ready for any beta testing what so ever


Specs :
HP dv6 core i5 430m
intel P55M chipset
nvidia G 105M
10.6.3 with 10.3.1 Vanilla ,Multibeast -ed
X64 with Cpus=1
3GB RAM
320GB GUID
Dastan
I have two questions if you don't mind :

1- is the fix above works ?
2- how can I recompile a kernel ?

thanks
yehia2amer
QUOTE (Dastan @ Jun 13 2010, 08:42 AM) *
I have two questions if you don't mind :

1- is the fix above works ?
2- how can I recompile a kernel ?

thanks


1) yes
2) use this guide Build XNU Kernel on SL
18seven
That guide is missing the last step (if you would like a universal binary kernel).

CODE
lipo -create BUILD/obj/RELEASE_I386/mach_kernel BUILD/obj/RELEASE_X86_64/mach_kernel -output BUILD/obj/mach_kernel

Dastan
QUOTE (18seven @ Jun 13 2010, 09:50 PM) *
That guide is missing the last step (if you would like a universal binary kernel).

CODE
lipo -create BUILD/obj/RELEASE_I386/mach_kernel BUILD/obj/RELEASE_X86_64/mach_kernel -output BUILD/obj/mach_kernel


thanks for the help , Ill try it later and post my results , thanks tongue.gif
btw it looks very complicated and im just a n00b ,could some body post the fixed mach_kernel .that would be great rolleyes.gif rolleyes.gif
Dastan
10.6.4 is out , does it fix the cpus=1 ?
mac8
Hi gsly or anyone,

I have a dv8t and struggling to boot with a boot CD (I tried Legacy Empire EFI v108, v1085, regular) and also with iBoot Supported 2.0.
With Empire EFI, it wrote some garbage on the white background and rebooted. With iBoot Supported 2.0, I have to give these boot flags: cpus=1 busratio=12 fsb=133 and I get a blank rectangle (Select a Language) with a pink background in the SL installer. I have 8GB RAM installed.

Can somebody provide with a dsdt.aml for dv8t to get the boot CD working and eventually get all 4 cores working with 8 threads?
If dv8t is tough to get vanilla SL working, how about getting dv7t-1180us? Does it work 100% minus the wireless card?

Please help.
gsly
QUOTE (mac8 @ Jun 17 2010, 01:17 PM) *
Hi gsly or anyone,

I have a dv8t and struggling to boot with a boot CD (I tried Legacy Empire EFI v108, v1085, regular) and also with iBoot Supported 2.0.
With Empire EFI, it wrote some garbage on the white background and rebooted. With iBoot Supported 2.0, I have to give these boot flags: cpus=1 busratio=12 fsb=133 and I get a blank rectangle (Select a Language) with a pink background in the SL installer. I have 8GB RAM installed.

Can somebody provide with a dsdt.aml for dv8t to get the boot CD working and eventually get all 4 cores working with 8 threads?
If dv8t is tough to get vanilla SL working, how about getting dv7t-1180us? Does it work 100% minus the wireless card?

Please help.


Please start a new topic in the Installation sub-forum and I'll reply there as we don't want to hijack yehia2amer's original thread... Thanks.
Dastan
I tried the above method and i get an error that says "make command not found " although I installed the Xcode ?

again may i ask , could anyone post the fixed kernel and release me from my misery biggrin.gif biggrin.gif pleeeeeeeez .
mac8
QUOTE (gsly @ Jun 18 2010, 04:35 AM) *
Please start a new topic in the Installation sub-forum and I'll reply there as we don't want to hijack yehia2amer's original thread... Thanks.


Point taken.
gsly
The 10.4.0 kernel source (10.6.4) is now available at http://www.opensource.apple.com/release/mac-os-x-1064/ and you should be able to apply the same patch (haven't tried it yet as I need to get 10.6.4 installed first smile.gif

However, yehia2amer started this thread looking for a way to fix this through DSDT patching so...

yehia2amer, what version/model MacBook did you compare tables to? I've been looking for a full dump/extraction of a MacBookPro6,2 as I think that is the closest to my Pavilion DV8.


mammoth
QUOTE (gsly @ Jun 18 2010, 08:29 AM) *
The 10.4.0 kernel source (10.6.4) is now available at http://www.opensource.apple.com/release/mac-os-x-1064/ and you should be able to apply the same patch (haven't tried it yet as I need to get 10.6.4 installed first smile.gif

However, yehia2amer started this thread looking for a way to fix this through DSDT patching so...

yehia2amer, what version/model MacBook did you compare tables to? I've been looking for a full dump/extraction of a MacBookPro6,2 as I think that is the closest to my Pavilion DV8.


Hello gsly!

Hey we have the HP DV8 1100 (VF836AV) and would LOVE to get a copy of your DSDT and moded BIOS (I've already ordered the same Dell Wi-Fi card)! If you could either post it or PM me for a way to get it, I would be eternally grateful.

If it will help you (or anyone else) I have uploaded an IOReg dump and System Profiler dump of an actual MacBook Pro 6,2 here:
Click to view attachment

Thanks for your great work and help gsly!

Mammoth
gsly
QUOTE (yehia2amer @ May 25 2010, 09:18 AM) *
i have already tried a modded apic.aml file with Anv bootloader, as the original one from Pavilion was missing some parts at the end compared to the MacBook Pro apic.aml (related to NMI too !!!)

[0CCh 0204 1] Subtable Type : 04 <Local APIC NMI>
[0CDh 0205 1] Length : 06
[0CEh 0206 1] Processor ID : 00
[0CFh 0207 2] Flags (decoded below) : 0005
Polarity : 1
Trigger Mode : 1
[0D1h 0209 1] Interrupt Input LINT : 01

the modded file is loading fine but i still have the Panic with the vanilla kernel


yehia2amer, I just dumped all of the ACPI tables from my DV8 F.24 BIOS and compared to a McBookPro6,1 table and I see what you mean now about the missing NMI in HP's APIC table.

Questions:

1) Is the "Anv" bootloader you used Andyvand's Chameleon branch? (http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/andyvand)
2) Can I see a copy of your APIC.dsl file you modified?
3) Any idea how to calculate the Checksum field in APIC.dsl if I add stuff?

I've grabbed a local copy of the SVN repo for Chameleon and I'm going to compile Andyvand's branch and get my DV8 booting from that then I'll see if I can build a modified APIC.dsl
gsly
QUOTE (gsly @ Jun 18 2010, 11:46 AM) *
3) Any idea how to calculate the Checksum field in APIC.dsl if I add stuff?

To answer my own question, the checksum is a value that causes the entire table to sum to "00". FWIW, WinHex can perform the checksum (8-bit) and you just adjust the checksum value until it sums to 0.
Dastan
could someone post a patched 10.6.4 kernel ? or give me an easier guide to build one .

I'm stuck at " make command not found " although i installed Xcode in the above guide .

thaaaaanks biggrin.gif biggrin.gif smile.gif smile.gif smile.gif
Slice
QUOTE (yehia2amer @ Jun 13 2010, 11:40 PM) *
1) yes
2) use this guide Build XNU Kernel on SL

QUOTE (18seven @ Jun 14 2010, 12:50 AM) *
That guide is missing the last step (if you would like a universal binary kernel).

CODE
lipo -create BUILD/obj/RELEASE_I386/mach_kernel BUILD/obj/RELEASE_X86_64/mach_kernel -output BUILD/obj/mach_kernel

Very thanks for this guide. Now I can compile Snow kernel! ohmy.gif
The only problem, it doesn't work sad.gif It is loaded and go to blue screen. No idea what is wrong.
New kernel is 13Mb while vanilla is 18Mb because I have no PPC codes, only i386+x86_64.
gsly
yehia2amer, On the weekend I updated to 10.6.4, compiled the Andyvand bootloader and created an APIC.aml file with similar results to you (KP with ESR 64). I also did a bunch of reading of the ACPI spec, the Intel processor programming spec, etc. looking for something else to try. There is another APIC sub-table type I see in the ACPI spec related to NMI that either HP or Mac uses, but I think the real issue is getting the Delivery Mode for LVT_INT1 initialized to NMI in the DSDT *before* the kernel starts.

I was looking at a bunch of different DSDT examples (from different boards etc) but I didn't find anything useful about defining the APIC interrupt defaults, however I'm thinking it might be as simple as wedging a new Method into some initialization method to write the correct value into the register (hopefully before the kernel is called). Thoughts?
gsly
QUOTE (Dastan @ Jun 21 2010, 06:21 AM) *
could someone post a patched 10.6.4 kernel ? or give me an easier guide to build one .

I'm stuck at " make command not found " although i installed Xcode in the above guide .

thaaaaanks biggrin.gif biggrin.gif smile.gif smile.gif smile.gif


Looks like a version of the kernel with the fix (and lots of other changes) is now available at:

http://osx86.net/f36/10-4-0-xnu-kernel-for-intel-amd-t6268/

I haven't tried it myself as I'm working on the vanilla solution.

gsly
QUOTE (gsly @ Jun 21 2010, 06:18 PM) *
Looks like a version of the kernel with the fix (and lots of other changes) is now available at:

http://osx86.net/f36/10-4-0-xnu-kernel-for-intel-amd-t6268/

I haven't tried it myself as I'm working on the vanilla solution.


Ah!

yehia2amer, I was reading the page in the link above and found out that meklort plans to include the kernel patch in Chameleon which is a thought I had at work today as well, so I checked his branch and sure enough, there is code in there to patch the kernel.

However, I don't like the way it is patched in that he is just NOPping the panic stuff rather that initializing the Delivery mode to NMI for LVT_INT1 (for each CPU that is...)

I'll compile and test to see it it works over the next few days...
Slice
I am trying to build the kernel with the patch from topic.
I got two errors
CODE
ERROR: OSBoolean.cpp: failed to get mapping for tid 10706
ERROR: IOMemoryDescriptor.cpp: failed to get mapping for tid 65129

Is there anybody knows what is mean?
18seven
QUOTE (Slice @ Jun 21 2010, 10:03 AM) *
Very thanks for this guide. Now I can compile Snow kernel! ohmy.gif
The only problem, it doesn't work sad.gif It is loaded and go to blue screen. No idea what is wrong.
New kernel is 13Mb while vanilla is 18Mb because I have no PPC codes, only i386+x86_64.


Yeah thats annoying, it would load eventually. To work around this you need to disable com.apple.driver.AppleIntel*Profile kext. Use kaitek's blacklist patch.

CODE
diff -uNr xnu-1504.3.12/iokit/IOKit/IOCatalogue.h xnu-1504.3.12-atom/iokit/IOKit/IOCatalogue.h
--- xnu-1504.3.12/iokit/IOKit/IOCatalogue.h 2010-03-29 15:14:21.000000000 -0400
+++ xnu-1504.3.12-atom/iokit/IOKit/IOCatalogue.h 2010-04-03 12:39:29.000000000 -0400
@@ -269,4 +269,14 @@
extern const OSSymbol * gIOProbeScoreKey;
extern IOCatalogue * gIOCatalogue;

+extern "C" {
+ /* kaitek: see ::addDrivers() and StartIOKit() for more information about the built-in kernel
+ * kext blacklist. */
+ typedef struct {
+ const char *name;
+ uint32_t hits;
+ } blacklist_mod_t;
+ extern boolean_t blacklistEnabled;
+ extern blacklist_mod_t blacklistMods[];
+};
#endif /* ! _IOKIT_IOCATALOGUE_H */
diff -uNr xnu-1504.3.12/iokit/Kernel/IOCatalogue.cpp xnu-1504.3.12-atom/iokit/Kernel/IOCatalogue.cpp
--- xnu-1504.3.12/iokit/Kernel/IOCatalogue.cpp 2010-03-29 15:14:22.000000000 -0400
+++ xnu-1504.3.12-atom/iokit/Kernel/IOCatalogue.cpp 2010-04-03 12:39:29.000000000 -0400
@@ -347,6 +347,8 @@
OSOrderedSet * set = NULL; // must release
OSDictionary * dict = NULL; // do not release
OSArray * persons = NULL; // do not release
+ OSString * moduleName;
+ bool ret;

persons = OSDynamicCast(OSArray, drivers);
if (!persons) {
@@ -368,9 +370,38 @@

IOLockLock(lock);
while ( (dict = (OSDictionary *) iter->getNextObject()) ) {
-
- // xxx Deleted OSBundleModuleDemand check; will handle in other ways for SL
+ /* kaitek / qoopz: if the kext blacklist is enabled (which it is by default), then check
+ * if any of the personalities we are preparing for matching should be skipped. */
+ if (blacklistEnabled) {
+ OSString *modName = OSDynamicCast(OSString, dict->getObject(gIOModuleIdentifierKey));
+ const char *modNameStr = NULL;
+ if (modName)
+ modNameStr = modName->getCStringNoCopy();
+ if (modNameStr) {
+ boolean_t shouldMatch = TRUE;
+ for (uint32_t n = 0; blacklistMods[n].name; n++) {
+ if (strcmp(blacklistMods[n].name, modNameStr))
+ continue;
+ if (!blacklistMods[n].hits++)
+ printf("warning: skipping personalities in blacklisted kext %s\n",
+ modNameStr);
+ shouldMatch = FALSE;
+ }
+ if (!shouldMatch)
+ continue;
+ }
+ }
+
+ if ((moduleName = OSDynamicCast(OSString, dict->getObject("OSBundleModuleDemand"))))
+ {
+ IOLockUnlock( lock );
+ ret = OSKext::loadKextWithIdentifier(moduleName->getCStringNoCopy(), false);
+ IOLockLock( lock );
+ ret = true;
+ }

+else
+{
SInt count;

UniqueProperties(dict);
@@ -404,6 +435,7 @@
}

AddNewImports(set, dict);
+}
}
// Start device matching.
if (doNubMatching && (set->getCount() > 0)) {
diff -uNr xnu-1504.3.12/iokit/Kernel/IOPlatformExpert.cpp xnu-1504.3.12-atom/iokit/Kernel/IOPlatformExpert.cpp
--- xnu-1504.3.12/iokit/Kernel/IOPlatformExpert.cpp 2010-03-29 15:14:22.000000000 -0400
+++ xnu-1504.3.12-atom/iokit/Kernel/IOPlatformExpert.cpp 2010-04-03 12:39:29.000000000 -0400
@@ -765,10 +765,16 @@

boolean_t PEGetModelName( char * name, int maxLength )
{
- if( gIOPlatform)
- return( gIOPlatform->getModelName( name, maxLength ));
- else
- return( false );
+ OSData *prop;
+
+ /* Eureka: Get the model name directly from property instead of calling getModelName(). */
+ prop = (OSData *) IOService::getPlatform()->getProvider()->getProperty(gIODTModelKey);
+ if (prop) {
+ strlcpy(name, (const char *) prop->getBytesNoCopy(), maxLength - 1);
+ return true;
+ }
+
+ return false;
}

int PEGetPlatformEpoch(void)
diff -uNr xnu-1504.3.12/iokit/Kernel/IOStartIOKit.cpp xnu-1504.3.12-atom/iokit/Kernel/IOStartIOKit.cpp
--- xnu-1504.3.12/iokit/Kernel/IOStartIOKit.cpp 2010-03-29 15:14:22.000000000 -0400
+++ xnu-1504.3.12-atom/iokit/Kernel/IOStartIOKit.cpp 2010-04-03 12:44:13.000000000 -0400
@@ -91,7 +91,16 @@
{
IORegistryEntry * root;
OSObject * obj;
+ uint32_t bootArg;

+ /* kaitek: todo: implement some kind of mechanism whereby the user can specify a
+ * custom list of kexts to be blacklisted. perhaps categories with the current
+ * list designated "default" and additional categories like "gfx", etc. */
+
+if (PE_parse_boot_argn("blacklist", &bootArg, sizeof(&bootArg)) && !bootArg) {
+ blacklistEnabled = FALSE;
+ printf("warning: disabling kext blacklist\n");
+ }
root = IORegistryEntry::initialize();
assert( root );
IOService::initialize();
@@ -118,6 +127,17 @@

// From <osfmk/kern/debug.c>
extern int debug_mode;
+/* kaitek / qoopz: blacklist of common kexts that are known to be problematic or undesirable
+ * for virtually all non-apple hardware. see notes in StartIOKit(). */
+
+boolean_t blacklistEnabled = TRUE;
+blacklist_mod_t blacklistMods[] = {
+ { "com.apple.driver.AppleIntelMeromProfile", 0 },
+ { "com.apple.driver.AppleIntelNehalemProfile", 0 },
+ { "com.apple.driver.AppleIntelPenrynProfile", 0 },
+ { "com.apple.driver.AppleIntelYonahProfile", 0 },
+ { NULL, 0 }
+};

/*****
* Pointer into bootstrap KLD segment for functions never used past startup.



QUOTE
I am trying to build the kernel with the patch from topic.
I got two errors
CODE
ERROR: OSBoolean.cpp: failed to get mapping for tid 10706
ERROR: IOMemoryDescriptor.cpp: failed to get mapping for tid 65129
Is there anybody knows what is mean?


I just ordered an i7 build and plan to dig into this over the weekend.

gsly
QUOTE (Slice @ Jun 21 2010, 07:03 AM) *
Very thanks for this guide. Now I can compile Snow kernel! ohmy.gif
The only problem, it doesn't work sad.gif It is loaded and go to blue screen. No idea what is wrong.
New kernel is 13Mb while vanilla is 18Mb because I have no PPC codes, only i386+x86_64.


Slice, I compiled the 10.4.0 kernel last night following the quoted guide but when I booted it, it eventually got to the log-on screen (it was slow), my laptops keyboard was non-functional. Even plugging in a USB keyboard didn't work (as laptop's internal is PS/2). Strangely, the USB mouse moved the pointer as well as the PS/2 touch pad, but I couldn't click on anything sad.gif

I think that guide is missing a step on how to build a combined 32/64 kernel image because if you do a "file" on the stock kernel, you'll see it has all three architectures (i368/x64/PPC) and I have a feeling that some of the kexts need the 64bit even when booting in 32-bit mode.
Slice
QUOTE (18seven @ Jun 22 2010, 05:10 PM) *
Yeah thats annoying, it would load eventually. To work around this you need to disable com.apple.driver.AppleIntel*Profile kext. Use kaitek's blacklist patch.

I just ordered an i7 build and plan to dig into this over the weekend.

Thank you for this diif. Will try it as soon as possible.
But Penryn profile loaded with vanilla kernel and all is work. huh.gif Some private codes?

QUOTE (gsly @ Jun 22 2010, 07:10 PM) *
Slice, I compiled the 10.4.0 kernel last night following the quoted guide but when I booted it, it eventually got to the log-on screen (it was slow), my laptops keyboard was non-functional. Even plugging in a USB keyboard didn't work (as laptop's internal is PS/2). Strangely, the USB mouse moved the pointer as well as the PS/2 touch pad, but I couldn't click on anything sad.gif

Very similar to me.
QUOTE
I think that guide is missing a step on how to build a combined 32/64 kernel image because if you do a "file" on the stock kernel, you'll see it has all three architectures (i368/x64/PPC) and I have a feeling that some of the kexts need the 64bit even when booting in 32-bit mode.

The step is done by 18seven. I create a kernel i386+x64.

Another thought.
I google about my error during kernel compilation and found the same problem in OpenSolaris. "failed to get mapping for tid" is a problem of previous step - creating CTFCONVERT. The bad dwarf libraries and may be something else.
18seven
QUOTE (gsly @ Jun 22 2010, 11:10 AM) *
Slice, I compiled the 10.4.0 kernel last night following the quoted guide but when I booted it, it eventually got to the log-on screen (it was slow), my laptops keyboard was non-functional. Even plugging in a USB keyboard didn't work (as laptop's internal is PS/2). Strangely, the USB mouse moved the pointer as well as the PS/2 touch pad, but I couldn't click on anything sad.gif


see my previous post


QUOTE (gsly @ Jun 22 2010, 11:10 AM) *
I think that guide is missing a step on how to build a combined 32/64 kernel image because if you do a "file" on the stock kernel, you'll see it has all three architectures (i368/x64/PPC) and I have a feeling that some of the kexts need the 64bit even when booting in 32-bit mode.


QUOTE (slice)
The step is done by 18seven. I create a kernel i386+x64.


^

Do you not understand or need more information gsly? Also, I did flatten ppc into a build, no go.

imo a patch is a patch regardless of being compiled into the kernel or injected into memory, the use of the word "vanilla" is incorrect and possibly misleading for n00bs. I like to do all of my own patching and my practice is to not muck with the os but rather point to whatever_kernel in boot.plist to avoid possible update overwrite. Thus, I would:

CODE
lipo -create BUILD/obj/RELEASE_I386/mach_kernel BUILD/obj/RELEASE_X86_64/mach_kernel -output BUILD/obj/i7_kernel
gsly
QUOTE (18seven @ Jun 23 2010, 05:41 AM) *
Do you not understand or need more information gsly? Also, I did flatten ppc into a build, no go.

imo a patch is a patch regardless of being compiled into the kernel or injected into memory, the use of the word "vanilla" is incorrect and possibly misleading for n00bs. I like to do all of my own patching and my practice is to not muck with the os but rather point to whatever_kernel in boot.plist to avoid possible update overwrite. Thus, I would:

CODE
lipo -create BUILD/obj/RELEASE_I386/mach_kernel BUILD/obj/RELEASE_X86_64/mach_kernel -output BUILD/obj/i7_kernel


Sorry, I missed your information on creating a fat/universal binary before I replied to Slice. I built the fat binary last night with the same results although I noticed that the stock 10.6.4 kernel header is xnu-1504.7.4-1 whereas the source available is only xnu-1504.7.4

We shouldn't have to patch anything if the source compiles to the same thing as Apple provides (and boots fine without patches), but obviously that isn't true.

I agree that its ok to build/patch a new kernel and just point to that (leaving the vanilla kernel in place) but I think the original goal of this thread was to find a solution where we don't have to compile a kernel with every OS update, (specifically to fix this HP only issue)
18seven
QUOTE (gsly @ Jun 23 2010, 10:30 AM) *
the original goal of this thread was to find a solution where we don't have to compile a kernel with every OS update, (specifically to fix this HP only issue)


Right, sorry we got a little ot but its all good, and not widely published, info so wtf. I do wonder if the memory patch will/can be forward compatible.
Slice
I also think that new kernel is only possible way. And more, I hope my kernel will be a little bit better then vanilla.
10 minutes is not a problem to generate new kernel with every update.
yehia2amer
this is a conversation between me and meklort which indicates that we can use a vanilla kernel using a kernel patch that chameleon applies biggrin.gif
so thnx so much to meklort , and hope to see this as soon as possible

QUOTE (meklort)
mucha's lapic fix (common issues with new HP laptops, meklort plans on including a fix for this in Chameleon)


QUOTE (yehia2amer)
i want to know if you really working on this!!!
also i am very interested to know if it works
so please let me know your latest
thanks in advance


QUOTE (meklort)
Yes, I have a patch written (in asm), I just haven't written the support code for the bootloader (that or tested it).


QUOTE (yehia2amer)
great, can you send me the asm please
you added it to the dsdt right ?!!!
is there any topic about that

thanks


QUOTE (meklort)
It's a kernel patch that chameleon applies, it has nothing to do with the DSDT. The support code that I need to write is to locate the correct patch location. Once it's located you need to replace
002af296 movl _lapic_start,%edx
002af29c addl $0x00000320,%edx
002af2a2 movl _lapic_interrupt_base,%eax
002af2a7 addl $0x0e,%eax
002af2aa movl %eax,(%edx)
002af2ac movl _lapic_start,%edx
002af2b2 addl $0x00000340,%edx
002af2b8 movl _lapic_interrupt_base,%eax
002af2bd addl $0x0f,%eax
002af2c0 movl %eax,(%edx)
002af2c2 movl _lapic_start,%edx
002af2c8 addl $0x00000330,%edx
002af2ce movl _lapic_interrupt_base,%eax

with this:

movl _lapic_start,%edx
addl $0x00000360,%edx
movl $0x00000400,(%eax)
subl $0x00000040,%edx
movl _lapic_interrupt_base,%eax
addl $0x0e,%eax
movl %eax,(%edx)
addl $0x00000020,%edx
addl $0x0f,%eax
movl %eax,(%edx)
subl $0x00000330,%edx
addl $0x0c,%eax
movl %eax,(%edx)

You also need to ensure that the extra space saved (about 10 bytes) is filled in with nops.


gsly
QUOTE (yehia2amer @ Jun 28 2010, 07:13 AM) *
this is a conversation between me and meklort which indicates that we can use a vanilla kernel using a kernel patch that chameleon applies biggrin.gif
so thnx so much to meklort , and hope to see this as soon as possible


Thanks yehia2amer, I think I follow the patch (just rewriting and including the "fix") and that should work well if he can reliably locate the correct code to patch.

In the meantime, I've found a solution to building the kernel (with only the one patch line to lapic.c) that involves removing one kext (and updating kextcache!)

I found the solution here: http://lists.apple.com/archives/darwin-ker...c/msg00000.html

Once I removed the AppleProfileFamily.kext cache, my compiled kernel booted fine and I get all 8 processors on my DV8 now wink.gif

I can live with patching one file and recompiling the kernel... its nothing I didn't do 20 years ago! laugh.gif
18seven
QUOTE (gsly @ Jun 28 2010, 09:04 PM) *
I found the solution here: http://lists.apple.com/archives/darwin-ker...c/msg00000.html

Once I removed the AppleProfileFamily.kext cache, my compiled kernel booted fine and I get all 8 processors on my DV8 now wink.gif


This is a known issue already addressed in this thread. Simply use the blacklist patch, I posted for you on 22 June, to the kernel you are already patching. It disables those kext.
gsly
QUOTE (18seven @ Jun 29 2010, 05:01 AM) *
This is a known issue already addressed in this thread. Simply use the blacklist patch, I posted for you on 22 June, to the kernel you are already patching. It disables those kext.


Why do more work? Its going to be a lot easier to add one line of code to one file when 10.6.5 comes out than to patch a bunch of files...
18seven
QUOTE (gsly @ Jun 29 2010, 10:14 AM) *
Why do more work? Its going to be a lot easier to add one line of code to one file when 10.6.5 comes out than to patch a bunch of files...


gsly, you are incorrect. You will need to maintain the cache anytime its updated, with or without your intention. It is a hell of a lot easier to apply the patch while you already patching the kernel, its one additional line, i.e patch -p1 < blacklist.patch. I can promise you, the method you propose is less efficient and destined for failure.
mammoth
QUOTE (gsly @ Jun 28 2010, 05:04 PM) *
In the meantime, I've found a solution to building the kernel (with only the one patch line to lapic.c) that involves removing one kext (and updating kextcache!)

... my compiled kernel booted fine and I get all 8 processors on my DV8 now wink.gif


Wow this is GREAT news! Awesome work and thanks to everyone in this thread! rolleyes.gif

Could someone post a step-by-step "how-to" on this? Also, if the patched kernel could be made available, it would be greatly appreciated by so many.

Thanks,

Mammoth
Dastan
QUOTE (mammoth @ Jul 1 2010, 12:59 AM) *
Wow this is GREAT news! Awesome work and thanks to everyone in this thread! rolleyes.gif

Could someone post a step-by-step "how-to" on this? Also, if the patched kernel could be made available, it would be greatly appreciated by so many.

Thanks,

Mammoth


yea , a step by step guide would be nice !
Slice
Now I created a working kernel 10.4.0 without any modifications.
CODE
HacBook:~ slice$ uname -a
Darwin HacBook.local 10.4.0 Darwin Kernel Version 10.4.0: среда,  8 сентября 2010 г. 15:28:23 (UTC); slice:xnu-1504.7.4/BUILD/obj//RELEASE_I386 i386
HacBook:~ slice$

But with this
CODE
/* NMI: ummasked, off course */
LAPIC_WRITE(LVT_LINT1, LAPIC_LVT_DM_NMI);

I got KP at start.
yehia2amer
this is a chameleon boot-loader by Meklort which apply a kernel fix to fix the lapic problem with hp laptops
it works for me at 32bit only and Meklort is working at a 64bit version

if you want to tested it , please share your results here

Chameleon lapic fix by meklort
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.