summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-03-04 21:56:04 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-03-04 21:56:35 +0000
commitbfc2b5306fac21bda5fc09dbf031716fd53a0f78 (patch)
tree664dbef2069565ca891322624c9a68b0597b5339 /tools
parentf93dae8176d83791521eae23ab3c028cc7c93eee (diff)
intel_error_decode: Pretty print i830 PGTBL_ER
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_error_decode.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
index 4dc3d43c..d4bf8bcf 100644
--- a/tools/intel_error_decode.c
+++ b/tools/intel_error_decode.c
@@ -76,6 +76,53 @@ print_instdone (unsigned int instdone, unsigned int instdone1)
}
static void
+print_i830_pgtbl_err(unsigned int reg)
+{
+ const char *str;
+
+ switch((reg >> 3) & 0xf) {
+ case 0x1: str = "Overlay TLB"; break;
+ case 0x2: str = "Display A TLB"; break;
+ case 0x3: str = "Host TLB"; break;
+ case 0x4: str = "Render TLB"; break;
+ case 0x5: str = "Display C TLB"; break;
+ case 0x6: str = "Mapping TLB"; break;
+ case 0x7: str = "Command Stream TLB"; break;
+ case 0x8: str = "Vertex Buffer TLB"; break;
+ case 0x9: str = "Display B TLB"; break;
+ case 0xa: str = "Reserved System Memory"; break;
+ case 0xb: str = "Compressor TLB"; break;
+ case 0xc: str = "Binner TLB"; break;
+ default: str = "unknown"; break;
+ }
+
+ if (str)
+ printf (" source = %s\n", str);
+
+ switch(reg & 0x7) {
+ case 0x0: str = "Invalid GTT"; break;
+ case 0x1: str = "Invalid GTT PTE"; break;
+ case 0x2: str = "Invalid Memory"; break;
+ case 0x3: str = "Invalid TLB miss"; break;
+ case 0x4: str = "Invalid PTE data"; break;
+ case 0x5: str = "Invalid LocalMemory not present"; break;
+ case 0x6: str = "Invalid Tiling"; break;
+ case 0x7: str = "Host to CAM"; break;
+ }
+ printf (" error = %s\n", str);
+}
+
+static void
+print_pgtbl_err(unsigned int reg, unsigned int devid)
+{
+ if (IS_965(devid)) {
+ } else if (IS_9XX(devid)) {
+ } else {
+ return print_i830_pgtbl_err(reg);
+ }
+}
+
+static void
read_data_file (const char * filename)
{
FILE *file;
@@ -137,6 +184,10 @@ read_data_file (const char * filename)
if (matched)
intel_decode_context_set_head_tail(reg, 0xffffffff);
+ matched = sscanf (line, " PGTBL_ER: 0x%08x\n", &reg);
+ if (matched && reg)
+ print_pgtbl_err(reg, devid);
+
matched = sscanf (line, " INSTDONE: 0x%08x\n", &reg);
if (matched)
print_instdone (reg, -1);