filename | src/mmio.h |
changeset | 156:3b93648a3b07 |
prev | 136:f07efd59604f |
next | 172:59cf18b4cfb2 |
author | nkeynes |
date | Thu Jun 15 10:25:45 2006 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Add P4 I/O tracing Add ability to set I/O trace by region address |
file | annotate | diff | log | raw |
1.1 --- a/src/mmio.h Sun Apr 30 01:49:45 2006 +00001.2 +++ b/src/mmio.h Thu Jun 15 10:25:45 2006 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: mmio.h,v 1.4 2006-04-30 01:49:45 nkeynes Exp $1.6 + * $Id: mmio.h,v 1.5 2006-06-15 10:25:42 nkeynes Exp $1.7 *1.8 * mmio.h defines a complicated batch of macros used to build up the1.9 * memory-mapped I/O regions in a reasonably readable fashion.1.10 @@ -83,6 +83,11 @@1.11 io_rgn[mid]->index[(r)>>2]->desc : "Undefined register" )1.12 #define MMIO_NAME_BYNUM( mid ) (io_rgn[mid]->id)1.14 +#define MMIO_REGID_IOBYNUM( io, r ) (io->index[(r)>>2] != NULL ? \1.15 + io->index[(r)>>2]->id : "<UNDEF>" )1.16 +#define MMIO_REGDESC_IOBYNUM( io, r ) (io->index[(r)>>2] != NULL ? \1.17 + io->index[(r)>>2]->desc : "Undefined register" )1.18 +1.19 #ifdef __cplusplus1.20 }1.21 #endif
.