soc/mediatek/mt8196: Reserve DRAM buffers for HW TX TRACKING
[coreboot.git] / util / acpi / acpidump-all
blobc42ee4a616df67d6ee8edf104529e8722e6378d0
1 #!/usr/bin/env bash
3 # SPDX-License-Identifier: GPL-2.0-only
5 rm -rf out
6 mkdir out
8 # walk through all ACPI tables with their addresses
9 # example:
10 # RSDT @ 0xcf6794ba
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
20 eval $FNAME=0
21 else
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
31 else
32 printf "Skipping $NAME because it was not dumped correctly.\n\n"
35 done