projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b43-fwdump: Allow a binary SHM dump to stdout.
[b43-tools.git]
/
debug
/
b43-fwdump
diff --git
a/debug/b43-fwdump
b/debug/b43-fwdump
index 4308d60704fb0828c02ba28d6628e6df4601db7c..0e94a3026ee383965bae73190f7a5d9e47195232 100755
(executable)
--- a/
debug/b43-fwdump
+++ b/
debug/b43-fwdump
@@
-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 " 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."
return
def parseArgs():
return
def parseArgs():
@@
-44,16
+45,18
@@
def parseArgs():
global binary
global dasmopt
global dumpShm
global binary
global dasmopt
global dumpShm
+ global dumpShmBin
phy = None # Autodetect
binary = None # No instruction dump
dasmopt = ""
dumpShm = False
phy = None # Autodetect
binary = None # No instruction dump
dasmopt = ""
dumpShm = False
+ dumpShmBin = False
try:
(opts, args) = getopt.getopt(sys.argv[1:],
try:
(opts, args) = getopt.getopt(sys.argv[1:],
- "hp:b:d:s",
- [ "help", "phy=", "binary=", "dasmopt=", "shm" ])
+ "hp:b:d:s
S
",
+ [ "help", "phy=", "binary=", "dasmopt=", "shm"
, "shmbin"
])
except getopt.GetoptError:
usage()
sys.exit(1)
except getopt.GetoptError:
usage()
sys.exit(1)
@@
-70,6
+73,8
@@
def parseArgs():
dasmopt = v
if o in ("-s", "--shm"):
dumpShm = True
dasmopt = v
if o in ("-s", "--shm"):
dumpShm = True
+ if o in ("-S", "--shmbin"):
+ dumpShmBin = True
return
return
@@
-130,12
+135,17
@@
def main():
gpr = b43.getGprs()
lr = b43.getLinkRegs()
off = b43.getOffsetRegs()
gpr = b43.getGprs()
lr = b43.getLinkRegs()
off = b43.getOffsetRegs()
- if dumpShm:
+ if dumpShm
or dumpShmBin
:
shm = b43.shmSharedRead()
dbg = b43.getPsmDebug()
psmcond = b43.getPsmConditions()
b43.ucodeStart()
shm = b43.shmSharedRead()
dbg = b43.getPsmDebug()
psmcond = b43.getPsmConditions()
b43.ucodeStart()
+ if dumpShmBin:
+ # Only do a binary SHM dump
+ stdout.write(shm)
+ sys.exit(0)
+
print "--- B43 microcode state dump ---"
print "PC: %03X PSM-COND: %04X" % (dbg.getPc(), psmcond)
print "Link registers:"
print "--- B43 microcode state dump ---"
print "PC: %03X PSM-COND: %04X" % (dbg.getPc(), psmcond)
print "Link registers:"