Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 22:29:01 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 219360 for review
Message-ID:  <201210302229.q9UMT1QN014646@skunkworks.freebsd.org>

index | next in thread | raw e-mail

http://p4web.freebsd.org/@@219360?ac=10

Change 219360 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/10/30 22:28:41

	Teach CheriBSD's DDB "show cheri" command to print out capability
	coprocessor exception cause information, which arrived in CHERI
	ISAv2.

Affected files ...

.. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cheri.c#3 edit

Differences ...

==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cheri.c#3 (text+ko) ====

@@ -259,6 +259,7 @@
  */
 DB_SHOW_COMMAND(cheri, ddb_dump_cheri)
 {
+	register_t cause;
 
 	db_printf("CHERI registers\n");
 	DB_CHERI_REG_PRINT(0);
@@ -293,6 +294,9 @@
 	DB_CHERI_REG_PRINT(29);
 	DB_CHERI_REG_PRINT(30);
 	DB_CHERI_REG_PRINT(31);
+	CHERI_CGETCAUSE(cause);
+	db_printf("CHERI cause: ExcCode: %02x RegNum: %02x\n",
+	    (uint8_t)((cause >> 8) & 0xff), (uint8_t)(cause & 0x1f));
 }
 
 /*


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210302229.q9UMT1QN014646>