scripts: update qemu boot check

Enable checks to all supported platforms of QEMU now.
Check both IPC header regs and memory window IPC message header.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2019-01-17 18:56:40 +08:00 committed by Liam Girdwood
parent 51cab44e2a
commit cb0786cf42
1 changed files with 56 additions and 16 deletions

View File

@ -1,8 +1,7 @@
#!/bin/bash
#SUPPORTED_PLATFORMS=(byt cht bdw hsw apl icl skl kbl cnl)
# TODO: skl, kbl, cnl is unstable need to check
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl icl)
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl icl skl kbl cnl)
READY_MSG="6c 00 00 00 00 00 00 70"
rm -f dump-*.txt
@ -30,52 +29,93 @@ do
PLATFORM=$j
if [ $j == "byt" ]
then
READY_IPC="0x70028800"
READY_IPC="00 88 02 70 00 00 00 80"
SHM_IPC_REG=qemu-bridge-shim-io
SHM_MBOX=qemu-bridge-mbox-io
fi
if [ $j == "cht" ]
then
READY_IPC="0x70028800"
READY_IPC="00 88 02 70 00 00 00 80"
SHM_IPC_REG=qemu-bridge-shim-io
SHM_MBOX=qemu-bridge-mbox-io
fi
if [ $j == "bdw" ]
then
READY_IPC="0x70000000"
fi
READY_IPC="00 3c 01 80"
SHM_IPC_REG=qemu-bridge-shim-io
SHM_MBOX=qemu-bridge-mbox-io
fi
if [ $j == "hsw" ]
then
READY_IPC="0x70000000"
READY_IPC="00 fc 00 80"
SHM_IPC_REG=qemu-bridge-shim-io
SHM_MBOX=qemu-bridge-mbox-io
fi
if [ $j == "apl" ]
then
PLATFORM="bxt"
READY_IPC="0xf0000000"
READY_IPC="00 00 00 f0"
SHM_IPC_REG=qemu-bridge-ipc-io
OUTBOX_OFFSET="f000"
SHM_MBOX=qemu-bridge-hp-sram-mem
ROM="-r ../sof.git/src/arch/xtensa/rom-$j.bin"
fi
if [ $j == "skl" ]
then
READY_IPC="0xf0000000"
READY_IPC="00 00 00 f0"
SHM_IPC_REG=qemu-bridge-ipc-io
OUTBOX_OFFSET="f000"
SHM_MBOX=qemu-bridge-hp-sram-mem
ROM="-r ../sof.git/src/arch/xtensa/rom-$j.bin"
fi
if [ $j == "kbl" ]
then
READY_IPC="0xf0000000"
READY_IPC="00 00 00 f0"
SHM_IPC_REG=qemu-bridge-ipc-io
OUTBOX_OFFSET="f000"
SHM_MBOX=qemu-bridge-hp-sram-mem
ROM="-r ../sof.git/src/arch/xtensa/rom-$j.bin"
fi
if [ $j == "cnl" ]
then
READY_IPC="0xf0000000"
READY_IPC="00 00 00 f0"
SHM_IPC_REG=qemu-bridge-ipc-io
OUTBOX_OFFSET="5000"
SHM_MBOX=qemu-bridge-hp-sram-mem
ROM="-r ../sof.git/src/arch/xtensa/rom-$j.bin"
fi
if [ $j == "icl" ]
then
READY_IPC="0xf0000000"
READY_IPC="00 00 00 f0"
SHM_IPC_REG=qemu-bridge-ipc-io
OUTBOX_OFFSET="5000"
SHM_MBOX=qemu-bridge-hp-sram-mem
ROM="-r ../sof.git/src/arch/xtensa/rom-$j.bin"
fi
./xtensa-host.sh $PLATFORM -k ../sof.git/src/arch/xtensa/sof-$j.ri $ROM -o 2.0 ../sof.git/dump-$j.txt
# dump log into sof.git incase running in docker
# now check log for boot message
if grep $READY_IPC ../sof.git/dump-$j.txt; then
# check if ready ipc header is in the ipc regs
IPC_REG=$(hexdump -C /dev/shm/$SHM_IPC_REG | grep "$READY_IPC")
# check if ready ipc message is in the mbox
IPC_MSG=$(hexdump -C /dev/shm/$SHM_MBOX | grep -A 4 "$READY_MSG" | grep -A 4 "$OUTBOX_OFFSET")
if [ "$IPC_REG" ]; then
echo "ipc reg dump:"
# directly output the log to be nice to look
hexdump -C /dev/shm/$SHM_IPC_REG | grep "$READY_IPC"
if [ "$IPC_MSG" ]; then
echo "ipc message dump:"
# directly output the log to be nice to look
hexdump -C /dev/shm/$SHM_MBOX | grep -A 4 "$READY_MSG" | grep -A 4 "$OUTBOX_OFFSET"
else
echo "Error mailbox failed"
fi
else
echo "Error ipc reg failed"
fi
if [[ "$IPC_REG" && "$IPC_MSG" ]]; then
echo "Boot success";
else
echo "Error boot failed"