Jump to content
InsanelyMac Forum
Sign in to follow this  
yehia Amer

HP insyde bios CPUS=1 fix

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

Hello.. recently I installed MAC OS SL (x86) AMD Universal CD, on my HP laptop Intel... for my surprise it worked. But when I restarted my laptop didn´t work anymore.

 

I don´t know in fact, if the problem was due to AMD instalation or if my HD crashed.

 

Now, my HP doesn´t boot with a Boot CD.. it doesn´t recognize the BIOS, just stay on the initial screen with the F1/F2/F9/F10 and F11 options.

 

 

P.S: When I installed, I made 1 partion with a MRB mode.

 

Does anyone here know how to fix it or help me?

 

Thank.

Share this post


Link to post
Share on other sites
Hello.. recently I installed MAC OS SL (x86) AMD Universal CD, on my HP laptop Intel... for my surprise it worked. But when I restarted my laptop didn´t work anymore.

 

I don´t know in fact, if the problem was due to AMD instalation or if my HD crashed.

 

Now, my HP doesn´t boot with a Boot CD.. it doesn´t recognize the BIOS, just stay on the initial screen with the F1/F2/F9/F10 and F11 options.

 

 

P.S: When I installed, I made 1 partion with a MRB mode.

 

Does anyone here know how to fix it or help me?

 

Thank.

if you have HP i7 laptop so this topic can help you Hp Pavilion dvx Quad

 

if it is not insyde bios HP, sorry i can't help you

Share this post


Link to post
Share on other sites

At first I though that it was caused by the weird order in APIC.aml but that's (obviously) not the case. I also injected a real MacBookPro6,1 table, but that didn't help either. Can it be caused by a faulty SMBIOS table?

 

BTW: I don't even see a HPET table anymore in IORegistryExplorer, and yet I am working with a single core active here. There's also a real MacBookPro6,1 ioreg floating around, with two identical APIC tables. Just a slightly different name and a different revision.

 

Well. Not much, but it's a start for this newby. Let's see what tomorrow brings.

 

Edit: I did some reading and learned something new again. Now I know that CPU cores have Local APIC's inside, and that it has two interrupt lines being:

 

LINT0 which is used as the “Interrupt Input Line” (INTR), which is connected to the INT pin on the primary 8259.

LINT1 which is wired to the “Non-Maskable Interrupt” (NMI) in a 8259 configuration.

 

interrupts2b.gif

 

So why do we get this lapic.c error on our HP notebook's? Is this due to a missing BIOS (chipset) initialization procedure? Is that the crux of the problem, or is it a hardware related issue?

 

I wonder why Chameleon can't do it already, because there has to be people out there that know more than I do. Call me stubborn, but I don't want a patched kernel. I just want the vanilla kernel to work.. and without it being patched on the fly.

 

Can we please get some hints, clues or evidence of what is missing?

 

Edit 2: A search for 'local APIC' in the "Intel® 5 Series Chipset and Intel® 3400 Series Chipset" (322169.pdf) returned two items. One on page 502 and the other on page 503. Is this 'REDIR_TBL—Redirection Table' related?

Share this post


Link to post
Share on other sites

Update:

 

I can now boot without the cpus=1 boot option, but I have yet to figure out what change made it work. What I can tell right now is that I used Revolution 6.16 (from an USB stick) with a hard coded cpu_type 0x501 and Model Identifier set to "MacPro3,1". It also injects a stripped down version of my desktop hack DSDT and SMBIOS table (completely different hardware) ... and thus it has to be in there somewhere. My bet is on the SMBIOS table. Let's find out shall we :gun:

 

Edit: I gave it a few shots and so far I know that injecting a patched, or even a real MacBookPro6,1 APIC table, makes it stop in CPU3 instead of CPU0. And during every boot. Injected a second APIC table, which can be found on real Mac's, didn't help either. I think that this one was added to support up to 16 cores (think MacPro5,1)

 

CPU3 is the second tread on core 2 (on my Intel i3). And I think to know this after getting panics starting with CPU0 and CPU1 and thus so we should have: CPU0, CPU1, CPU2 and CPU3. The big question now is why it stops in lapic_configuration() in lapic.c on the last core. And if this happens for everyone on the last core.

 

The next thing I will do is to set/use the same cpu_type (0x501) and model identifier (MacPro3,1) because this is what Revolution 6.1 on my USB stick does. Just to see if that helps, but I don't think so. Right. And it didn't.

 

The last two things I can do now is to inject my desktop hack's DSDT and SMBIOS. I'll start by injecting the DSDT and see if it even boots... without the SMBIOS from my desktop hack.

 

OOPS booting with a modified kernel. Thank you big brother (he copied the file without telling me anything) :gathering:

Rather stupid I didn't check for it, but then again I was so trilled that my cores finally worked. What a shame.

Forget this. It can't be fixed in the DSDT... says my brother with five years of hacking under the belt. Still. This was a fun thing to do. becaue I learned so many new things.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.



×