Commit 89a6bd4b authored by Michael Büsch's avatar Michael Büsch

b43-fwdump: Allow a binary SHM dump to stdout.

The output can be piped to other tools or files.
Signed-off-by: Michael Büsch's avatarMichael Buesch <>
parent 2636a4a6
......@@ -37,6 +37,7 @@ def usage():
print " an instruction dump."
print "-d|--dasmopt OPT Additional options to the disassembler."
print "-s|--shm Also dump SHM."
print "-S|--shmbin Do a binary SHM dump, only."
def parseArgs():
......@@ -44,16 +45,18 @@ def parseArgs():
global binary
global dasmopt
global dumpShm
global dumpShmBin
phy = None # Autodetect
binary = None # No instruction dump
dasmopt = ""
dumpShm = False
dumpShmBin = False
(opts, args) = getopt.getopt(sys.argv[1:],
[ "help", "phy=", "binary=", "dasmopt=", "shm" ])
[ "help", "phy=", "binary=", "dasmopt=", "shm", "shmbin" ])
except getopt.GetoptError:
......@@ -70,6 +73,8 @@ def parseArgs():
dasmopt = v
if o in ("-s", "--shm"):
dumpShm = True
if o in ("-S", "--shmbin"):
dumpShmBin = True
......@@ -130,12 +135,17 @@ def main():
gpr = b43.getGprs()
lr = b43.getLinkRegs()
off = b43.getOffsetRegs()
if dumpShm:
if dumpShm or dumpShmBin:
shm = b43.shmSharedRead()
dbg = b43.getPsmDebug()
psmcond = b43.getPsmConditions()
if dumpShmBin:
# Only do a binary SHM dump
print "--- B43 microcode state dump ---"
print "PC: %03X PSM-COND: %04X" % (dbg.getPc(), psmcond)
print "Link registers:"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment