DSDT API PATCH FSC

ToDo

INFO

\dmesg  |  grep DSDT
[    0.000000] ACPI: Override [DSDT-CB-01   ], this is unsafe: tainting kernel
[    0.000000] ACPI: DSDT @ 0x00000000bcfee000 Table override, replaced with:
[    0.000000] ACPI: DSDT ffffffff81643ce0 09384 (v01 LENOVO CB-01    00000001 INTL 20100528)
[    0.005222] ACPI: Forced DSDT copy: length 0x09384 copied locally, original unmapped
[    0.524245] ACPI: EC: Look up EC in DSDT
add=0x00000000bcfee000
sudo dd if=/dev/mem bs=1 skip=$(printf "%d" $add) | xxd > orig.hex
add=0xffffffff81643ce0
sudo dd if=/dev/mem bs=1 skip=$(printf "%d" $add) | xxd > mine.hex

deb

Place the DSDT.aml into /etc/initramfs-tools Don't forget to update the Initramfs:

file /etc/initramfs-tools/DSDT.aml
ls /lib/modules/
KVER=$(uname -r)
sudo update-initramfs -v -u -k $KVER

Patch

sudo apt-get install initramfs-tools
ln -fs  /etc/DSDT.aml /etc/mkinitrd/DSDT
ln -fs  /etc/DSDT.aml /etc/mkinitrd/DSDT.aml

initramfs

dmesg | grep -i dsdt
# ACPI: DSDT (v001 COMPAL CY26____ 0x06040000 MSFT 0x0100000e) @ 0x00000000
# ACPI: Looking for DSDT in initramfs... error, file /DSDT.aml not found.
sudo apt-get install initramfs-tools

# ACPI: Looking for DSDT in initramfs… successfully read 11567 bytes from /DSDT.aml.

# ACPI (tbget-0297): Table [DSDT] replaced by host OS [20060707]

HOWTO / [[ACPI]] : Differentiated System Description Table (DSDT)

# ACPI Machine Language (AML)
\su
cat /proc/acpi/dsdt > dsdt-$HOSTNAME.aml # as root
iasl -d dsdt-$HOSTNAME.aml # Disassamble and create  dsdt.dsl
# Intel ACPI Component Architecture
# ASL Optimizing Compiler / AML Disassembler version 20041203 [[Dec 27 2004]]
# Copyright (C) 2000 - 2004 Intel Corporation
# Supports ACPI Specification Revision 2.0c
# Loading Acpi table from file dsdt-nrv.aml
# Acpi table [[DSDT]] successfully installed and loaded
# Pass 1 parse of [[DSDT]]
# Pass 2 parse of [[DSDT]]
# Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)
# .............................................................................................................................................................................................................
# Parsing completed
# Disassembly completed, written to "dsdt-nrv.dsl"
iasl -tc dsdt-$HOSTNAME.dsl # will create two files, dsdt.hex and DSDT.aml.
# Intel ACPI Component Architecture
# ASL Optimizing Compiler / AML Disassembler version 20041203 [[Dec 27 2004]]
# Copyright (C) 2000 - 2004 Intel Corporation
# Supports ACPI Specification Revision 2.0c
# ASL Input:  dsdt-nrv.dsl - 2813 lines, 98011 bytes, 1330 keywords
# AML Output: DSDT.aml - 11567 bytes 444 named objects 886 executable opcodes
# Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 395 Optimizations
# [[ "$?" ]] || exit

Kernel must be recompiled with this patch :

http://gaugusch.at/acpi-dsdt-initrd-patches/acpi-dsdt-initrd-patch-v0.7d-2.6.9.patch

cd /usr/src/linux-2.6.10
patch -b -p1 < ../acpi-dsdt-initrd-patch-v0.7d-2.6.9.patch
grep DSDT .config
# CONFIG_ACPI_CUSTOM_DSDT=y # need to be uncommented and set to yes
INITRD_ORIG=/boot/initrd.img-`uname -r`
INITRD=${INITRD_ORIG}-${HOSTNAME}
mv $INITRD $INITRD-bak-$(date +%s).bak
cp -f $INITRD_ORIG $INITRD # custom version that include dsdt
echo -n "INITRDDSDT123DSDT123" >> $INITRD # start block mark ( dsdt block)
cat /etc/dsdt-${HOSTNAME}.aml >> $INITRD # custom fixed table
echo -n "INITRDDSDT321DSDT321" >> $INITRD # end block mark
# strings $INITRD | grep DSDT
# INITRDDSDT123DSDT123DSDT/-
# INITRDDSDT321DSDT321
# grep "initrd.*$HOSTNAME" /etc/lilo.conf
#       initrd=/boot/initrd.img-2.6.9-1-k7-nrv
# lilo -v #
# or Edit /boot/grub/menu.lst in order to add an entry which use the custom initrd
# reboot
dmesg | grep  "DSDT"
# ACPI: Looking for DSDT in initrd... found (at offset 0x219014).
#   ACPI-0294: *** Info: Table [[DSDT]] replaced by host OS
# ACPI: setting ELCR to 0200 (from 0c20)
# ...

ACPI Compiler

ed2k://|file|acpica-unix-20041203.tar.gz|670416|c4c742897d0c268d7cefefc5612043bd|

Else build it yourself :

cd acpica-unix-20041203
cd compiler && make
# aslcompiler.l:846: error: `yytext_ptr' undeclared (first use in this function)
  • – acpica-0.0.20041203_www_rzr_online_fr/compiler/aslcompilerlex.c.orig 2004-12-27 20:15:59.000000000 +0100

+++ acpica-0.0.20041203_www_rzr_online_fr/compiler/aslcompilerlex.c 2004-12-27 20:15:59.000000000 +0100

@@ -4021,7 +4021,7 @@
#undef yy_set_bol
#undef yy_new_buffer
#undef yy_set_interactive
*#undef yytext_ptr
+// rzr // #undef yytext_ptr // HERE FIXED
#undef YY_DO_BEFORE_ACTION
make -C ./compiler/
make -C ./tools/acpisrc/
install -d ${DESTDIR}/usr/bin/
install -s compiler/iasl ${DESTDIR}/usr/bin/
install -s tools/acpisrc/acpisrc ${DESTDIR}/usr/bin/

[[InitRD]] : replace [[BIOS]] DSDT by a custom one

Normally you can skip this chapter.

Using a custom DSDT on kernel 2.6.8.1mdk (InitRD method)

Mandrake Kernel was already compiled for use of custom dsdt in initrd

I added the “magic signature” and the DSDT to my InitRD (I use mandrake, and there is an initrd by default) : it was found at boot, but then I had an error :

What I did :

cp -f /boot/initrd-2.6.8.1-12mdk.img /boot/initrd-2.6.8.1-12mdk.img-DSDT
echo -n "INITRDDSDT123DSDT123" >> /boot/initrd-2.6.8.1-12mdk.img-DSDT
cat dsdt.aml >> /boot/initrd-2.6.8.1-12mdk.img-DSDT

What I got (kernel messages) :

ACPI: Using customized DSDT
ACPI-0196: *** Warning: Invalid checksum in table [[DSDT]] (C1, sum 58 is not zero)
ACPI-0299: *** Info: Table [[DSDT]] replaced by host OS
ACPI-0307: *** Error: ns_search_and_enter: Bad character in ACPI Name: CACACACA
ACPI-0279: *** Error: Looking up [[0xCACACACA]] (NON-ASCII)
ACPI-1133: *** Error: [[NULL NAME]], AE_BAD_CHARACTER
ACPI-0125: *** Error: acpi_load_tables: Could not load namespace: AE_BAD_CHARACTER
ACPI-0134: *** Error: acpi_load_tables: Could not load tables: AE_BAD_CHARACTER
ACPI: Unable to load the System Description Tables

What I did to solve it… after hours of tries :

cp -f /boot/initrd-2.6.8.1-12mdk.img /boot/initrd-2.6.8.1-12mdk.img-DSDT
echo -n "INITRDDSDT123DSDT123" >> /boot/initrd-2.6.8.1-12mdk.img-DSDT
cat dsdt.aml >> /boot/initrd-2.6.8.1-12mdk.img-DSDT
echo -n "INITRDDSDT321DSDT321" >> /boot/initrd-2.6.8.1-12mdk.img-DSDT

Edit /boot/grub/menu.lst in order to add an entry which uses my custom initrd

Without that last line, the kernel couldn't find the end of the DSDT table (that's strange, because it was at the end of the initrd).

What I get now :

ACPI: Using customized DSDT
ACPI-0299: *** Info: Table [[DSDT]] replaced by host OS

OK, the BIOS DSDT was replaced by mine. Testing can start.

Now the kernel knows when to stop and the custom dsdt is used. Weird it wasn't in the howtos.

MORE

@TaG: AcpI DsdT FujitsU AmiloA cy26 GruB LinuX ObsoletE

<iframe width="420" height="315" src="//www.youtube.com/embed/iAMy7Qqffko" frameborder="0" allowfullscreen></iframe>

compal.txt · Last modified: 2022/04/16 12:22 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki