Jump to content

ACPI (DSDT) Patcher for BIOS and AML


koalala
 Share

845 posts in this topic

Recommended Posts

kizwan,

 

Thanks - somehow I was messing up my hex conversions....

 

I'm poking at it again with 10.5.7 and I noticed that the value for layout id is not being reported with the same value I set it in DSDT. The pinconfigs and config data are though. Anyone else notice this?

 

Here's my dsdt data -

 

			Device (HDEF)
            {
                Name (_ADR, 0x001B0000)
                Method (_PRW, 0, NotSerialized)
                {
                    Return (Package (0x02)
                    {
                        0x0D,
                        0x05
                    })
                }

                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x0C)
                        {
                            "built-in",
                            Buffer (One)
                            {
                                0x00
                            },

                            "codec-id",
                            Buffer (0x04)
                            {
                                0x85, 0x08, 0xEC, 0x10
                            },

                            "ConfigData",
                            Buffer (0xC0)
                            {
                                /* 0000 */    0x21, 0x87, 0x1c, 0x40, 0x21, 0x87, 0x1d, 0x9c,
                                /* 0008 */    0x21, 0x87, 0x1e, 0xa1, 0x21, 0x87, 0x1f, 0x01,
                                /* 0010 */    0x21, 0x97, 0x1c, 0x50, 0x21, 0x97, 0x1d, 0x9c,
                                /* 0018 */    0x21, 0x97, 0x1e, 0xa1, 0x21, 0x97, 0x1f, 0x02,
                                /* 0020 */    0x21, 0xa7, 0x1c, 0x4f, 0x21, 0xa7, 0x1d, 0x34,
                                /* 0028 */    0x21, 0xa7, 0x1e, 0x81, 0x21, 0xa7, 0x1f, 0x01,
                                /* 0030 */    0x21, 0xb7, 0x1c, 0x20, 0x21, 0xb7, 0x1d, 0x4c,
                                /* 0038 */    0x21, 0xb7, 0x1e, 0x21, 0x21, 0xb7, 0x1f, 0x02,
                                /* 0040 */    0x21, 0xc7, 0x1c, 0xf0, 0x21, 0xc7, 0x1d, 0x01,
                                /* 0048 */    0x21, 0xc7, 0x1e, 0x33, 0x21, 0xc7, 0x1f, 0x59,
                                /* 0050 */    0x21, 0xd7, 0x1c, 0x01, 0x21, 0xd7, 0x1d, 0xe6,
                                /* 0058 */    0x21, 0xd7, 0x1e, 0x05, 0x21, 0xd7, 0x1f, 0x40,
                                /* 0060 */    0x21, 0x47, 0x1c, 0x10, 0x21, 0x47, 0x1d, 0x44,
                                /* 0068 */    0x21, 0x47, 0x1e, 0x01, 0x21, 0x47, 0x1f, 0x01,
                                /* 0070 */    0x21, 0x57, 0x1c, 0x12, 0x21, 0x57, 0x1d, 0x14,
                                /* 0078 */    0x21, 0x57, 0x1e, 0x01, 0x21, 0x57, 0x1f, 0x01,
                                /* 0080 */    0x21, 0x67, 0x1c, 0x11, 0x21, 0x67, 0x1d, 0x64,
                                /* 0088 */    0x21, 0x67, 0x1e, 0x01, 0x21, 0x67, 0x1f, 0x01,
                                /* 0090 */    0x21, 0x77, 0x1c, 0x14, 0x21, 0x77, 0x1d, 0x24,
                                /* 0098 */    0x21, 0x77, 0x1e, 0x01, 0x21, 0x77, 0x1f, 0x01,
                                /* 0100 */    0x21, 0xe7, 0x1c, 0x30, 0x21, 0xe7, 0x1d, 0x61,
                                /* 0108 */    0x21, 0xe7, 0x1e, 0x4b, 0x21, 0xe7, 0x1f, 0x01,
                                /* 0110 */    0x21, 0xf7, 0x1c, 0x60, 0x21, 0xf7, 0x1d, 0x71,
                                /* 0118 */    0x21, 0xf7, 0x1e, 0xcb, 0x21, 0xf7, 0x1f, 0x01
                            },

                            "layout-id",
                            Buffer (0x04)
                            {
                                0x49, 0x00, 0x00, 0x00
                            },

                            "device-type",
                            Buffer (0x10)
                            {
                                "Realtek ALC889a"
                            },

                            "PinConfigurations",
                            Buffer (0x30)
                            {
                             /* 0000 */    0x10, 0x44, 0x01, 0x01, 0x12, 0x14, 0x01, 0x01,
                             /* 0008 */    0x11, 0x64, 0x01, 0x01, 0x14, 0x24, 0x01, 0x01,
                             /* 0010 */    0x40, 0x9c, 0xa1, 0x01, 0x50, 0x9c, 0xa1, 0x02,
                             /* 0018 */    0x4f, 0x34, 0x81, 0x01, 0x20, 0x4c, 0x21, 0x02,
                             /* 0020 */    0xf0, 0x01, 0x33, 0x59, 0x01, 0xe6, 0x05, 0x40,
                             /* 0028 */    0x30, 0x61, 0x4b, 0x01, 0x60, 0x71, 0xcb, 0x01                                          
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
            }

 

and here's a snap of my ioregistryexplorer where layout id seems to be showing lower case L not 73 (decimal) or x49 (hex)

post-106904-1242729701_thumb.jpg

Link to comment
Share on other sites

kizwan,

 

Thanks - somehow I was messing up my hex conversions....

 

I'm poking at it again with 10.5.7 and I noticed that the value for layout id is not being reported with the same value I set it in DSDT. The pinconfigs and config data are though. Anyone else notice this?

 

 

 

and here's a snap of my ioregistryexplorer where layout id seems to be showing lower case L not 73 (decimal) or x49 (hex)

 

 

I can see perhaps some little mistake:

"device-type",

Buffer (0x10)

{

"Realtek ALC889a"

},

Buffer length = 10hex Bytes = 16 dez

Realtek ALC889a itself is only 15 Bytes (dez) = 0Fhex

Perhaps thats the problem ?

Link to comment
Share on other sites

I can see perhaps some little mistake:

"device-type",

Buffer (0x10)

{

"Realtek ALC889a"

},

Buffer length = 10hex Bytes = 16 dez

Realtek ALC889a itself is only 15 Bytes (dez) = 0Fhex

Perhaps thats the problem ?

 

kizwan,

 

Well - I fixed the hex value to x0F but have the same lower case L listed as layout id. It would appear something about DSDT injection isn't working correctly.

 

Thanks,

SMF

Link to comment
Share on other sites

kizwan,

 

Well - I fixed the hex value to x0F but have the same lower case L listed as layout id. It would appear something about DSDT injection isn't working correctly.

 

Thanks,

SMF

SMF, the suggestion was came from mitch_de not me. :D I don't know why layout id appeared like that. It not happen to me. I don't think miscalculation of "device-type" was the cause of your problem because it don't cause me any problem. This is my dsdt:-

                Method (_DSM, 4, NotSerialized)
               {
                   Store (Package (0x0C)
                   {
                       "built-in",
                       Buffer (One)
                       {
                           0x00
                       },

                       "codec-id",
                       Buffer (0x04)
                       {
                           0x83, 0x08, 0xEC, 0x10
                       },

                       "ConfigData",
                       Buffer (0x40)
                       {
                           /* 0000 */    0x01, 0x47, 0x1C, 0x30, 0x01, 0x47, 0x1D, 0x11,
                           /* 0008 */    0x01, 0x47, 0x1E, 0x0B, 0x01, 0x47, 0x1F, 0x01,
                           /* 0010 */    0x01, 0x87, 0x1C, 0x10, 0x01, 0x87, 0x1D, 0x91,
                           /* 0018 */    0x01, 0x87, 0x1E, 0xAB, 0x01, 0x87, 0x1F, 0x01,
                           /* 0020 */    0x01, 0xA7, 0x1C, 0x20, 0x01, 0xA7, 0x1D, 0x31,
                           /* 0028 */    0x01, 0xA7, 0x1E, 0x81, 0x01, 0xA7, 0x1F, 0x01,
                           /* 0030 */    0x01, 0xE7, 0x1C, 0x40, 0x01, 0xE7, 0x1D, 0xE1,
                           /* 0038 */    0x01, 0xE7, 0x1E, 0x45, 0x01, 0xE7, 0x1F, 0x01
                       },

                       "layout-id",
                       Buffer (0x04)
                       {
                           0x0C, 0x00, 0x00, 0x00
                       },

                       "device-type",
                       Buffer (0x11)
                       {
                           "Mobile ALC883 S/T"
                       },

                       "PinConfigurations",
                       Buffer (0x10)
                       {
                           /* 0000 */    0x30, 0x11, 0x0B, 0x01, 0x10, 0x91, 0xAB, 0x01,
                           /* 0008 */    0x20, 0x31, 0x81, 0x01, 0x40, 0xE1, 0x45, 0x01
                       }
                   }, Local0)
                   DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                   Return (Local0)
               }

 

kizwan

Link to comment
Share on other sites

kizwan,

 

Well - I fixed the hex value to x0F but have the same lower case L listed as layout id. It would appear something about DSDT injection isn't working correctly.

 

Thanks,

SMF

 

As an update I changed the layout id to 63 (decimal) - x3F and it worked. Not sure why but ioregistryexplorer now reports 3F as the layout id. Unfortunately, as others have commented, I get sound out of the line out port but there is only on output and two inputs reported in system preferences.

 

SMF

Link to comment
Share on other sites

  • 2 weeks later...
Guys, probably I'm dumb, but I can't see link to download ACPI Patcher for Mac. Did I miss something? Can you help me with it?

 

They are at the end of post 1.

 

They are for Mac - you only must run it in VMWARE Fusion or Parallels Windows environment :hysterical:

Link to comment
Share on other sites

They are at the end of post 1.

 

They are for Mac - you only must run it in VMWARE Fusion or Parallels Windows environment :thumbsup_anim:

 

I have seen that versions for Windows (they won't run on my VMware btw). I'm asking about that one, which koalala describes here.

Link to comment
Share on other sites

I have seen that versions for Windows (they won't run on my VMware btw). I'm asking about that one, which koalala describes here.

 

The native (= Porting to Cocoa) patcher from him is simple not ready.

 

What excact is the problem (error...) when you run the patcher (posting #1) in VMWARE ?

For me it works (XP, Fusion, orig. BIOS File as Inputfile).

Link to comment
Share on other sites

The native (= Porting to Cocoa) patcher from him is simple not ready.

 

What excact is the problem (error...) when you run the patcher (posting #1) in VMWARE ?

For me it works (XP, Fusion, orig. BIOS File as Inputfile).

 

When I'm running "ACPI Patcher.exe" it show me dialog with text — "The application failed to initialize properly (0xc0000135). Click on OK to terminate the application." and that is all.

Link to comment
Share on other sites

When I'm running "ACPI Patcher.exe" it show me dialog with text — "The application failed to initialize properly (0xc0000135). Click on OK to terminate the application." and that is all.

"You need Windows and .NET Framework but you can run the program from any PC, not necessarily the one you want to patch."

 

Perhaps the .net framework is not installed ?

Link to comment
Share on other sites

"You need Windows and .NET Framework but you can run the program from any PC, not necessarily the one you want to patch."

 

Perhaps the .net framework is not installed ?

 

Yes, you was right, I installed .net framework and patcher works! Thank you man!

Link to comment
Share on other sites

I really want to patch my dsdt.aml file, but i dont know where to find the dsdt file, or the bios file. i understand that im supposed to browse for it, but where is it?

 

Your BIOS file is at the website of your motherboard manufacturer.

Link to comment
Share on other sites

Your BIOS file is at the website of your motherboard manufacturer.

 

Or a lot of BIOS's allow you to save the old before flashing to new so you can always save your own already in use if this feature is supported in it.

Link to comment
Share on other sites

Hi Koalala,

 

Great job !

 

Would there be any luck to see support for insyde bios in the patcher utility ?

 

I have a nasty piece of work called Toshiba Satellite m40-331 which has an ugly bios

and i would like to patch it.

 

I managed to extract to bios using insydeco but i'm fairly new to this and it might take me ages

before i get anywhere.

 

All the best.

 

Rafik

Link to comment
Share on other sites

Compile problem here.

Try change this entry:-

	External (PDC1)
External (PDC0)
External (CFGD)
External (^CPU0._PPC)
External (\_PR_.CPU0._PPC)

to:-

	External (PDC1)
External (PDC0)
External (CFGD)
// External (^CPU0._PPC)
External (\_PR_.CPU0._PPC)

Link to comment
Share on other sites

Try change this entry:-

	External (PDC1)
External (PDC0)
External (CFGD)
External (^CPU0._PPC)
External (\_PR_.CPU0._PPC)

to:-

	External (PDC1)
External (PDC0)
External (CFGD)
// External (^CPU0._PPC)
External (\_PR_.CPU0._PPC)

Still cannot compile it into DSDT.aml. Can you tell which iasl tool to use? :(

Link to comment
Share on other sites

Still cannot compile it into DSDT.aml. Can you tell which iasl tool to use? :)

You need to correct your dsdt.dsl first. There is nothing wrong with iasl tool.

 

I found almost the same error that I'm able to fix:-

/*
* Intel ACPI Component Architecture
* AML Disassembler version 20080926
*
* Disassembly of ./DSDT.dat, Sat Jun 13 14:47:53 2009
*
*
* Original Table Header:
*     Signature        "DSDT"
*     Length           0x00006490 (25744)
*     Revision         0x02
*     Checksum         0xEE
*     OEM ID           "INTEL "
*     OEM Table ID     "CRESTLNE"
*     OEM Revision     0x06040000 (100925440)
*     Compiler ID      "INTL"
*     Compiler Version 0x20050624 (537200164)
*/
DefinitionBlock ("./DSDT.aml", "DSDT", 2, "INTEL ", "CRESTLNE", 0x06040000)
{
   External (PDC1)
   External (PDC0)
   External (CFGD)
   External ([b]^[/b]CPU0._PPC)

   OperationRegion (NV1, SystemIO, 0x72, 0x02)

What I do is that I just change "External (^CPU0._PPC)" to "External (\_PR_.CPU0._PPC)". But this is not the case with your dsdt.dsl where you have "two" entry:-

	External (^CPU0._PPC)
External (\_PR_.CPU0._PPC)

That mean if I do the same correction, it will have duplicate entry & it still not correct.

 

Perhaps somebody else can help you.

 

kizwan

Link to comment
Share on other sites

hi

 

I have got working LEO with DSDT.AML (eth + TM + 7600gs gfx)....

 

I have got one problem... in system profiler I see VRAM -2048..... I always set 128 in patcher but it doesn't work...

 

do i have to manually change dsdt.dsl??? or there something with my card...with natit it worked ....

 

thx for help

 

OK SOLVED:

 

decompiled DSDT.aml, changed 80 with 08 at vram, compiled and i see 128MB....

Link to comment
Share on other sites

Hey.

 

I've used the DSDT Patcher from fassl. It was able to make some optimizations and compile successfully. I loaded it up using the PC_EFI v9 bootloader from Netkas. I can load the AppleIntelCPUPowerManagement.kext successfully. The problem is that I still need to use cpus=1 or I experience crashes.

 

Is there a difference between this patcher and fassl's that would help to identify or fix the problem? Or would you be able to tell me what the problem is?

 

I've attached the debug file from when I used fassl's patcher.

 

I'm running a P6N diamond mobo. The rest of my specs are in my signature.

 

Thanks in advance.

dsdt_fixed.txt

Link to comment
Share on other sites

 Share

×
×
  • Create New...