3 # SPDX-License-Identifier: GPL-2.0-only
8 # walk through all ACPI tables with their addresses
11 # we can not just dump the tables by their names because some
12 # machines have double ACPI tables
14 acpidump |
grep "@ 0x" |
while read line
16 NAME
=$
( echo `echo $line|cut -f1 -d@` )
17 FNAME
=$
( echo $NAME |
sed s
/\
/_
/g |
sed s
/\
!/b
/g
)
18 ADDR
=$
( echo `echo $line|cut -f2 -d@` )
19 if [ "${!FNAME}" == "" ]; then
22 eval $FNAME=$
(( ${!FNAME} + 1 ))
24 printf "Processing table \"$NAME\" at $ADDR ... "
25 printf "${!FNAME} tables of that kind found before.\n"
27 # acpidump -s ${!FNAME} --table "$NAME" > out/$FNAME-$ADDR-${!FNAME}.txt
28 acpidump
-b -s ${!FNAME} --table "$NAME" > out
/$FNAME-$ADDR-${!FNAME}.bin
29 if [ "`file -b out/$FNAME-$ADDR-${!FNAME}.bin`" != "ASCII text" ]; then
30 iasl
-d out
/$FNAME-$ADDR-${!FNAME}.bin
&>/dev
/null
32 printf "Skipping $NAME because it was not dumped correctly.\n\n"