# HG changeset patch # User nkeynes # Date 1219150846 0 # Node ID 2e08d8237d3387cdde0239d132a23c1c7417367e # Parent e9d2d9be7cb6025dc5af65ade50d7490cec65d5e Add semi-documented PVR register at 0xFF000030 (SH4 version identification) --- a/src/sh4/mmu.c Tue Aug 19 08:38:10 2008 +0000 +++ b/src/sh4/mmu.c Tue Aug 19 13:00:46 2008 +0000 @@ -138,6 +138,8 @@ { uint32_t tmp; switch(reg) { + case SH4VER: + return; case PTEH: val &= 0xFFFFFCFF; if( (val & 0xFF) != mmu_asid ) { --- a/src/sh4/sh4mmio.h Tue Aug 19 08:38:10 2008 +0000 +++ b/src/sh4/sh4mmio.h Tue Aug 19 13:00:46 2008 +0000 @@ -46,6 +46,7 @@ LONG_PORT( 0x020, TRA, PORT_MRW, UNDEFINED, "TRAPA exception register" ) LONG_PORT( 0x024, EXPEVT,PORT_MRW, 0, "Exception event register" ) LONG_PORT( 0x028, INTEVT,PORT_MRW, UNDEFINED, "Interrupt event register" ) + LONG_PORT( 0x030, SH4VER, PORT_MRW, 0x040205C1, "SH4 version register (PVR)" ) /* Renamed to avoid naming conflict */ LONG_PORT( 0x034, PTEA, PORT_MRW, UNDEFINED, "Page table entry assistance" ) LONG_PORT( 0x038, QACR0,PORT_MRW, UNDEFINED, "Queue address control 0" ) LONG_PORT( 0x03C, QACR1,PORT_MRW, UNDEFINED, "Queue address control 1" ) --- a/test/testregs.c Tue Aug 19 08:38:10 2008 +0000 +++ b/test/testregs.c Tue Aug 19 13:00:46 2008 +0000 @@ -193,6 +193,8 @@ { 0xA05F81F8, 0xFFFFFFFF, 0 }, { 0xA05F81FC, 0xFFFFFFFF, 0 }, { 0xFF00001C, 0xFFFFFFFF, 0x000081A7 }, + { 0xFF000030, 0xFFFFFFFF, 0x040205C1 }, + { 0xFF000030, 0, 0x040205C1 }, { 0, 0, 0 } }; int main( int argc, char *argv[] )