Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[1d97c1]: nouveau-pm / tools / strip-all.sh Maximize Restore History

Download this file

strip-all.sh    51 lines (43 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# During the downclocking a number of read/writes occur
# here seems to be only the relevant one
# Tested on a trial and error basis, using mmio-replay and
# playing Nexiuz for about 10 min
#
# Some information about the ranges
# 0x1000 PBUS
# 0x4000 PLLs
# 0xa000 Performance Monitor ??
# 0xe000 PCONNECTOR -- Display and fan
# 0xc000 unknown -- setup coonected with the PLL read/writes
# 0x80000 - unknown, there seems to be a block write to it on nv9x cards
# 0x100000 - PFB - some read/writes may come from the vbios init scripts
# and/or other scripts within the vbios
#
# Seen a number of 0x1100 and 0x88000 - 0x8802080
# reads on nv8x cards
offset=0xf5000000
error() {
echo "ERROR - $1"
exit 1
}
if test "x$offset" == x0; then
error "Add the base offset/PBAR"
fi
for file in transition-[123456789]
do
echo Processing $file
cat $file | gawk '{ adr=strtonum($5); read_mode=($1);ofs=strtonum('$offset'); if ( \
(adr >= (ofs + 0x1000) && adr <= (ofs + 0x1fff)) || (adr==(ofs + 0x1100) && (read_mode != "R")) ||\
(adr >= (ofs + 0xa000) && adr < (ofs + 0xafff)) ||\
(adr >= (ofs + 0xe000) && adr < (ofs + 0xefff)) ||\
(adr >= (ofs + 0x80000) && adr < (ofs + 0x800ff)) ||\
((adr >= (ofs + 0x88000) && adr <= (ofs + 0x88020)) && (read_mode != "R")) ||\
(adr > (ofs + 0x88020) && adr < (ofs + 0x88fff)) ||\
(adr >= (ofs + 0x100000) && adr < (ofs + 0x100fff)) ||\
(adr >= (ofs + 0x4000) && adr <= (ofs + 0x4fff)) || (adr >= (ofs + 0xc000) && adr <= (ofs + 0xcfff)) ) print;}' > $file-strip-all
echo Stripping time/map
./timestrip $file-strip-all > $file-clear
rm $file-strip-all
done
exit 0