/* Bit Field macros * v = bit field variable; m = mask, m##_SHIFT = shift, x = value to load
*/ #define set_bf(v, m, x) (v = ((v) & ~(m)) | (((x) << m##_SHIFT) & (m))) #define get_bf(v, m) (((v) & (m)) >> m##_SHIFT)
#define PAACE_TCEF_FORMAT0_8B 0x00 #define PAACE_TCEF_FORMAT1_RSVD 0x01 /* * Hard coded value for the PAACT size to accommodate * maximum LIODN value generated by u-boot.
*/ #define PAACE_NUMBER_ENTRIES 0x500 /* Hard coded value for the SPAACT size */ #define SPAACE_NUMBER_ENTRIES 0x800
/* PAACE Offsets 0x20-0x38 */
u32 reserved[8]; /* not currently implemented */
};
/* OME : Operation mapping entry * MOE : Mapped Operation Encodings * The operation mapping table is table containing operation mapping entries (OME). * The index of a particular OME is programmed in the PAACE entry for translation * in bound I/O operations corresponding to an LIODN. The OMT is used for translation * specifically in case of the indexed translation mode. Each OME contains a 128 * byte mapped operation encoding (MOE), where each byte represents an MOE.
*/ #define NUM_MOE 128 struct ome {
u8 moe[NUM_MOE];
} __packed;
#define IOE_READ 0x00 #define IOE_READ_IDX 0x00 #define IOE_WRITE 0x81 #define IOE_WRITE_IDX 0x01 #define IOE_EREAD0 0x82 /* Enhanced read type 0 */ #define IOE_EREAD0_IDX 0x02 /* Enhanced read type 0 */ #define IOE_EWRITE0 0x83 /* Enhanced write type 0 */ #define IOE_EWRITE0_IDX 0x03 /* Enhanced write type 0 */ #define IOE_DIRECT0 0x84 /* Directive type 0 */ #define IOE_DIRECT0_IDX 0x04 /* Directive type 0 */ #define IOE_EREAD1 0x85 /* Enhanced read type 1 */ #define IOE_EREAD1_IDX 0x05 /* Enhanced read type 1 */ #define IOE_EWRITE1 0x86 /* Enhanced write type 1 */ #define IOE_EWRITE1_IDX 0x06 /* Enhanced write type 1 */ #define IOE_DIRECT1 0x87 /* Directive type 1 */ #define IOE_DIRECT1_IDX 0x07 /* Directive type 1 */ #define IOE_RAC 0x8c /* Read with Atomic clear */ #define IOE_RAC_IDX 0x0c /* Read with Atomic clear */ #define IOE_RAS 0x8d /* Read with Atomic set */ #define IOE_RAS_IDX 0x0d /* Read with Atomic set */ #define IOE_RAD 0x8e /* Read with Atomic decrement */ #define IOE_RAD_IDX 0x0e /* Read with Atomic decrement */ #define IOE_RAI 0x8f /* Read with Atomic increment */ #define IOE_RAI_IDX 0x0f /* Read with Atomic increment */
#define EOE_READ 0x00 #define EOE_WRITE 0x01 #define EOE_RAC 0x0c /* Read with Atomic clear */ #define EOE_RAS 0x0d /* Read with Atomic set */ #define EOE_RAD 0x0e /* Read with Atomic decrement */ #define EOE_RAI 0x0f /* Read with Atomic increment */ #define EOE_LDEC 0x10 /* Load external cache */ #define EOE_LDECL 0x11 /* Load external cache with stash lock */ #define EOE_LDECPE 0x12 /* Load external cache with preferred exclusive */ #define EOE_LDECPEL 0x13 /* Load external cache with preferred exclusive and lock */ #define EOE_LDECFE 0x14 /* Load external cache with forced exclusive */ #define EOE_LDECFEL 0x15 /* Load external cache with forced exclusive and lock */ #define EOE_RSA 0x16 /* Read with stash allocate */ #define EOE_RSAU 0x17 /* Read with stash allocate and unlock */ #define EOE_READI 0x18 /* Read with invalidate */ #define EOE_RWNITC 0x19 /* Read with no intention to cache */ #define EOE_WCI 0x1a /* Write cache inhibited */ #define EOE_WWSA 0x1b /* Write with stash allocate */ #define EOE_WWSAL 0x1c /* Write with stash allocate and lock */ #define EOE_WWSAO 0x1d /* Write with stash allocate only */ #define EOE_WWSAOL 0x1e /* Write with stash allocate only and lock */ #define EOE_VALID 0x80
/* Function prototypes */ int pamu_domain_init(void); int pamu_enable_liodn(int liodn); int pamu_disable_liodn(int liodn); int pamu_config_ppaace(int liodn, u32 omi, uint32_t stashid, int prot);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.