Jump to content
17 posts in this topic

Recommended Posts

Hey guys I am trying to compile a DSDT for dual graphics. I try compile but i am getting two of them exact errors on two different lines this is what the errors says.

 

 

Error 4047 - Initializer list longer than declared package length

 

Does anyone know how to fix this or can point me in the right direction? Any help is much appreciated

Link to comment
https://www.insanelymac.com/forum/topic/273209-dual-gpu-problem-with-dsdt/
Share on other sites

Ok here is the part with the error

Device (PCI0)
	{
		Name (_HID, EisaId ("PNP0A03"))
		Name (_UID, 0x04)
		Name (_BBN, Zero)
		Name (_ADR, Zero)
		Name (_PRW, Package (0x02)
		{
			0x0D,
			0x05
		})
		Method (_S1D, 0, NotSerialized)
		{
			Return (One)
		}

		Method (_S3D, 0, NotSerialized)
		{
			If (HACK ())
			{
				Return (0x03)
			}
			Else
			{
				Return (0x02)
			}
		}

		Device (PEG1)
		{
			Name (_ADR, 0x00030000)
			Name (PPS1, Package (0x02)
			{
				0x0B,
				0x04
			})
			Method (_PRW, 0, NotSerialized)
			{
				Return (PPS1)
			}

			Device (GFX1)
			{
				Name (_ADR, Zero)
				Name (_SUN, One)
				Name (_PRW, Package (0x02)
				{
					0x0B,
					0x04
				})
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x26)
						{
							"@0,compatible",
							Buffer (0x0B)
							{
								"NVDA,NVMac"
							},

							"@0,device_type",
							Buffer (0x08)
							{
								"display"
							},

							"@0,display_cfg",
							Buffer (0x08)
							{
								0x03, 0x01, 0x00, 0x00
							},

							"@0,name",
							Buffer (0x0F)
							{
								"NVDA,Display-A"
							},

							"@1,compatible",
							Buffer (0x0B)
							{
								"NVDA,NVMac"
							},

							"@1,device_type",
							Buffer (0x08)
							{
								"display"
							},

							"@1,display_cfg",
							Buffer (0x08)
							{
								0xFF, 0xFF, 0x00, 0x01
							},

							"@1,name",
							Buffer (0x0F)
							{
								"NVDA,Display-B"
							},

							"@2,#adress-cells",
							Buffer (0x0B)
							{
								"0x01000000"
							},

							"@2,#size-cells",
							Buffer (0x0B)
							{
								"0x00000000"
							},

							"@2,compatible",
							Buffer (0x13)
							{
								"NVDA,sensor-parent"
							},

							"@2,device_type",
							Buffer (0x0F)
							{
								"NVDA,gpu-diode"
							},

							"@2,hwctrl-params-version",
							Buffer (0x0B)
							{
								"0x02000000"
							},

							"@2,hwsensor-params-version",
							Buffer (0x0B)
							{
								"0x02000000"
							},

							"@2,name",
							Buffer (0x0E)
							{
								"sensor-parent"
							},

							"@2,reg",
							Buffer (0x0B)
							{
								"0x02000000"
							},

							"NVCAP",
							Buffer (0x14)
							{
								/* 0000 */	0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
								/* 0008 */	0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
								/* 0010 */	0x00, 0x00, 0x00, 0x00
							},

							"NVPM",
							Buffer (0x1C)
							{
								/* 0000 */	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								/* 0008 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								/* 0010 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								/* 0018 */	0x00, 0x00, 0x00, 0x00
							},

							"VRAM,totalsize",
							Buffer (0x06)
							{
								0x00, 0x00, 0x00, 0x60
							},

							"device_type",
							Buffer (0x0C)
							{
								"NVDA,Parent"
							},

							"model",
							Buffer (0x17)
							{
								"NVidia Quadro FX 4800 (Primary)"
							},

							"rom-revision",
							Buffer (0x25)
							{
								"NVidia Quadro FX 4800 OpenGL Engine"
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}
			}
		}

		Device (PEG3)
		{
			Name (_ADR, 0x00030000)
			Name (PPS1, Package (0x02)
			{
				0x0B,
				0x04
			})
			Method (_PRW, 0, NotSerialized)
			{
				Return (PPS1)
			}

			Device (GFX3)
			{
				Name (_ADR, Zero)
				Name (_SUN, One)
				Name (_PRW, Package (0x02)
				{
					0x0B,
					0x04
				})
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x26)
						{
							"@0,compatible",
							Buffer (0x0B)
							{
								"NVDA,NVMac"
							},

							"@0,device_type",
							Buffer (0x08)
							{
								"display"
							},

							"@0,display_cfg",
							Buffer (0x08)
							{
								0x03, 0x01, 0x00, 0x00
							},

							"@0,name",
							Buffer (0x0F)
							{
								"NVDA,Display-A"
							},

							"@1,compatible",
							Buffer (0x0B)
							{
								"NVDA,NVMac"
							},

							"@1,device_type",
							Buffer (0x08)
							{
								"display"
							},

							"@1,display_cfg",
							Buffer (0x08)
							{
								0xFF, 0xFF, 0x00, 0x01
							},

							"@1,name",
							Buffer (0x0F)
							{
								"NVDA,Display-B"
							},

							"@2,#adress-cells",
							Buffer (0x0B)
							{
								"0x01000000"
							},

							"@2,#size-cells",
							Buffer (0x0B)
							{
								"0x00000000"
							},

							"@2,compatible",
							Buffer (0x13)
							{
								"NVDA,sensor-parent"
							},

							"@2,device_type",
							Buffer (0x0F)
							{
								"NVDA,gpu-diode"
							},

							"@2,hwctrl-params-version",
							Buffer (0x0B)
							{
								"0x02000000"
							},

							"@2,hwsensor-params-version",
							Buffer (0x0B)
							{
								"0x02000000"
							},

							"@2,name",
							Buffer (0x0E)
							{
								"sensor-parent"
							},

							"@2,reg",
							Buffer (0x0B)
							{
								"0x02000000"
							},

							"NVCAP",
							Buffer (0x14)
							{
								/* 0000 */	0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
								/* 0008 */	0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
								/* 0010 */	0x00, 0x00, 0x00, 0x00
							},

							"NVPM",
							Buffer (0x1C)
							{
								/* 0000 */	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								/* 0008 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								/* 0010 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
								/* 0018 */	0x00, 0x00, 0x00, 0x00
							},

							"VRAM,totalsize",
							Buffer (0x06)
							{
								0x00, 0x00, 0x00, 0x60
							},

							"device_type",
							Buffer (0x0C)
							{
								"NVDA,Parent"
							},

							"model",
							Buffer (0x17)
							{
								"NVidia Quadro FX 4800 (Secondary)"
							},

							"rom-revision",
							Buffer (0x25)
							{
								"NVidia Quadro FX 4800 OpenGL Engine"
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}
			}
		}

The thing is I don't really remember what it is you're supposed to count anymore..or if it's in hex or alpha.

In the off chance that I remember correctly, the package length for both should be 0x16. If that doesn't work try 0x22 (22 is 16 in hex).

 

I'm sure someone will step in and correct me if I'm wrong.

 

Is there are reason why you didn't name them gfx0 and gfx1?

Just being curious, I've never tried injecting two video cards.

 "@0,display_cfg",
							Buffer (0x04)
							{
								0x03, 0x01, 0x00, 0x00
							},
"@1,display_cfg",
							Buffer (0x04)
							{
								0xFF, 0xFF, 0x00, 0x01
							},
"NVCAP",
							Buffer (0x18)
							{
								/* 0000 */	0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
								/* 0008 */	0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
								/* 0010 */	0x00, 0x00, 0x00, 0x00
							},
"VRAM,totalsize",
							Buffer (0x04)
							{
								0x00, 0x00, 0x00, 0x60
							},
"@0,display_cfg",
							Buffer (0x04)
							{
								0x03, 0x01, 0x00, 0x00
							},
"@1,display_cfg",
							Buffer (0x04)
							{
								0xFF, 0xFF, 0x00, 0x01
							},
"NVCAP",
							Buffer (0x18)
							{
								/* 0000 */	0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
								/* 0008 */	0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
								/* 0010 */	0x00, 0x00, 0x00, 0x00
							},
"VRAM,totalsize",
							Buffer (0x04)
							{
								0x00, 0x00, 0x00, 0x60
							},

Ahhhh..of course!

 

I didn't look any further than this (there is one for each gfx card):

 


				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x26)
						{

 

Still not sure if that should be 0x22...or if I don't know what I'm talking about. :worried_anim:

Thanks guys I really appreciate the help. I would 0x02C did work and the DSDT compiled but i am not getting both GPUs to work one works but non of the display ports work. The working card is listed properly and I get Graphics acceleration. However the other one just says Display. What am I doing wrong?

 

The thing is I don't really remember what it is you're supposed to count anymore..or if it's in hex or alpha.

In the off chance that I remember correctly, the package length for both should be 0x16. If that doesn't work try 0x22 (22 is 16 in hex).

 

I'm sure someone will step in and correct me if I'm wrong.

 

Is there are reason why you didn't name them gfx0 and gfx1?

Just being curious, I've never tried injecting two video cards.

 

I didn't name them gfx0 and gfx1 because I was following the template from DSDTSE. Should I have place it that way?

No idea, I was just wondering if there was any particular reason for naming them like that.

Don't follow my advice, as you can see from this thread I clearly have no idea what I'm talking about. :D

 

Thanks for the help buoo!!

I don't know how to get 2 graphics card working, I just reported the lengths as I know and just because I read Gringo was not so sure.

Gringo knows for sure more things than me, he teached me a lot of my knowledges.

Follow his advice.

 

My apologies

Don't take it like that :-)

 

Really, thanks for helping, as I said from the beginning I'm not sure about how the lengths should be counted, everything I said when trying to help was wrong! I'm glad you came by to set things straight. And If I put you on the path to know more than I do about these things then I'm proud.

×
×
  • Create New...