From: =?ISO-8859-1?Q?S=E9rgio?= Monteiro Basto Subject: Re: Overriding DSDT Tables with external files - 2 Methods Date: 06 Sep 2002 01:46:20 -0400 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <1031291181.3918.12.camel@darkstar.portugal> References: <1031252226.3011.76.camel@jtsdell> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1031252226.3011.76.camel-gH4hS+xkl8U@public.gmane.org> Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: John M Trostel Cc: ACPI-list List-Id: linux-acpi@vger.kernel.org I prefer the method 1 because with gcc of RedHat doesn't include .hex files On Thu, 2002-09-05 at 14:57, John M Trostel wrote: > There seem to be 2 closely related methods of overriding the DSDT in a > BIOS with your own files. > > My question is... Do they both work? If they do both work, is one > prefered over the other? > > *********************************** > Method 1 (from http://www.cpqlinux.com/acpi-howto.html and others) > > 1. get the dsdt.hex file > > 2. cp -a dsdt.hex to drivers/acpi/tables/acpi_dsdt.c > > 3. apply the following patch > > --- linux/drivers/acpi/osl.c Sat Jul 13 16:16:25 2002 > +++ linux-2.4.18-xfs-acpi/drivers/acpi/osl.c Sat Jul 13 14:33:09 2002 > @@ -70,6 +70,7 @@ > static OSD_HANDLER acpi_irq_handler = NULL; > static void *acpi_irq_context = NULL; > > +extern unsigned char AmlCode[]; > > acpi_status > acpi_os_initialize(void) > @@ -221,7 +222,10 @@ > if (!existing_table || !new_table) > return AE_BAD_PARAMETER; > > - *new_table = NULL; > + if (strncmp(existing_table->signature, "DSDT", 4) == 0) > + *new_table = (acpi_table_header*)AmlCode; > + else > + *new_table = NULL; > return AE_OK; > } > > > *********************************** > Method 2 (from Christophe Boyanique) : > > 1. get the dsdt.hex file > > 2. copy that file into drivers/acpi > > 3. patch drivers/acpi/osl.c as follows: > > diff -urP drivers/acpi/osl.c /usr/src/linux/drivers/acpi/osl.c > --- drivers/acpi/osl.c Mon Jul 29 23:30:42 2002 > +++ /usr/src/linux/drivers/acpi/osl.c Sat Jul 27 18:32:34 2002 > @@ -71,6 +71,9 @@ > static void *acpi_irq_context = NULL; > > > +#include "dsdt.hex" > +acpi_table_header *myDST = (acpi_table_header *) AmlCode; > + > acpi_status > acpi_os_initialize(void) > { > @@ -221,7 +224,10 @@ > if (!existing_table || !new_table) > return AE_BAD_PARAMETER; > > - *new_table = NULL; > + if (!strncmp(existing_table->signature, DSDT_SIG, 4)) > + *new_table = myDST; > + else > + *new_table = NULL; > return AE_OK; > } > > > -- > John M. Trostel > Senior Software Engineer > Quantum Corp. > john.trostel-+vhbC7un7QRBDgjK7y7TUQ@public.gmane.org > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390