Skip to contentSkip to conversation

ACPI-20030228 and custom dsdt

DISCUSSION Greg Oliver 4 participants 4 messages Mar 4, 2003 2 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

What is the secret for incorporating this into the 2.4.21-pre4 kernel sources? All patches apply cleanly, but all available methods to use my own DSDT fail compilation.

I have tried the diff for osl.c from the wikiwiki site as well as 2 or 3 other recommendations, to no avail. Is there somewhere simple I can just put the .hex file?

Thanks,

Greg Oliver

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com

#2 lore raw
In reply to a message not in the archive

No... You apply the diff to osl.c that expects an external variable called AmlCode.
You then have to rename the dsdt.hex into something that will compile. I think 2.4 make will pick up the file but with 2.5 you have to modify the make file.
Alternatively, you can add #include "dsdt.hex" to the osl.c file...

Quoted 23 lines · Greg Oliver

What is the secret for incorporating this into the 2.4.21-pre4 kernel sources? All patches apply cleanly, but all available methods to use my own DSDT fail compilation.

I have tried the diff for osl.c from the wikiwiki site as well as 2 or 3 other recommendations, to no avail. Is there somewhere simple I can just put the .hex file?

Thanks,

Greg Oliver

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Acpi-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel

Signature · 10 lines
Darren




-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
#5 lore raw
In reply to a message not in the archive
Quoted 3 lines · Greg Oliver

What is the secret for incorporating this into the 2.4.21-pre4 kernel sources? All patches apply cleanly, but all available methods to use my own DSDT fail compilation.

This still works for me.

Regards,

Nigel

drivers/acpi/dsdt_table.h +15 -0
diff -ruN linux-2.4.18/drivers/acpi/dsdt_table.h linux-2.4.18-use-my-dsdt/drivers/acpi/dsdt_table.h
@@ -0,0 +1,2526 @@
+/*
+ * 
+ * Intel ACPI Component Architecture ASL Compiler X2046 [Jun 11 2002]
+ * Includes ACPI CA Subsystem version 20020611
+ * Copyright (C) 2000 - 2002 Intel Corporation
+ * Supports ACPI Specification Revision 2.0a
+ * 
+ * Compilation of "nigel.v3.asl" - Thu Jun 27 07:37:12 2002
+ * 
+ * C source code output
+ *
+ */
+unsigned char AmlCode[] = 
+{
+    0x44,0x53,0x44,0x54,0x73,0x4E,0x00,0x00,  /* 00000000 "DSDTsN.."  */

[deletia]

+ 0x53,0x08,0x5F,0x41,0x44,0x52,0x0C,0x03, /* 00004E68 "S._ADR.." */
+ 0x00,0x1F,0x00,
+};

drivers/acpi/osl.c renamed from drivers/acpi/osl.c-dist +3 -1
diff -ruN linux-2.4.18/drivers/acpi/dsdt.h linux-2.4.18-use-my-dsdt/drivers/acpi/dsdt.h
@@ -25,6 +25,7 @@
  *
  */
 
+#include "dsdt_table.h"
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
@@ -208,7 +209,8 @@
 	if (!existing_table || !new_table)
 		return AE_BAD_PARAMETER;
 
-	*new_table = NULL;
+	*new_table = (strncmp(existing_table->signature, DSDT_SIG, 4)) ? NULL \
+			: (struct acpi_table_header *) AmlCode;
 	return AE_OK;
 }
 

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com

#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · Darren Benham

No... You apply the diff to osl.c that expects an external variable called AmlCode.
You then have to rename the dsdt.hex into something that will compile. I think 2.4 make will pick up the file but with 2.5 you have to modify the make file.
Alternatively, you can add #include "dsdt.hex" to the osl.c file...

http://www.poupinou.org/apci/over.html

Signature · 11 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com