blob: ccbb349c1a194f362db71d232f8e96370c94032c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "nvlib.h"
int main(int argc, char** argv)
{
std::auto_ptr<nv_device> dev;
dev.reset(nv_device::open_default());
unsigned base = strtoul(argv[1], 0, 0);
unsigned size = strtoul(argv[2], 0, 0);
for(unsigned i = 0; i < size; i += 4) {
if(!(i & 15)) {
if(i)
printf("\n");
printf("%08x:", base + i);
}
printf(" %08x", dev->rd32(base + i));
}
if(size)
printf("\n");
return 0;
}
|