|
@@ -213,3 +213,100 @@ typedef struct pal_cache_config_info_s {
|
|
#define PAL_CACHE_ATTR_WT_OR_WB 2 /* Either write thru or write
|
|
#define PAL_CACHE_ATTR_WT_OR_WB 2 /* Either write thru or write
|
|
* back depending on TLB
|
|
* back depending on TLB
|
|
* memory attributes
|
|
* memory attributes
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/* Possible values for cache hints */
|
|
|
|
+
|
|
|
|
+#define PAL_CACHE_HINT_TEMP_1 0 /* Temporal level 1 */
|
|
|
|
+#define PAL_CACHE_HINT_NTEMP_1 1 /* Non-temporal level 1 */
|
|
|
|
+#define PAL_CACHE_HINT_NTEMP_ALL 3 /* Non-temporal all levels */
|
|
|
|
+
|
|
|
|
+/* Processor cache protection information */
|
|
|
|
+typedef union pal_cache_protection_element_u {
|
|
|
|
+ u32 pcpi_data;
|
|
|
|
+ struct {
|
|
|
|
+ u32 data_bits : 8, /* # data bits covered by
|
|
|
|
+ * each unit of protection
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ tagprot_lsb : 6, /* Least -do- */
|
|
|
|
+ tagprot_msb : 6, /* Most Sig. tag address
|
|
|
|
+ * bit that this
|
|
|
|
+ * protection covers.
|
|
|
|
+ */
|
|
|
|
+ prot_bits : 6, /* # of protection bits */
|
|
|
|
+ method : 4, /* Protection method */
|
|
|
|
+ t_d : 2; /* Indicates which part
|
|
|
|
+ * of the cache this
|
|
|
|
+ * protection encoding
|
|
|
|
+ * applies.
|
|
|
|
+ */
|
|
|
|
+ } pcp_info;
|
|
|
|
+} pal_cache_protection_element_t;
|
|
|
|
+
|
|
|
|
+#define pcpi_cache_prot_part pcp_info.t_d
|
|
|
|
+#define pcpi_prot_method pcp_info.method
|
|
|
|
+#define pcpi_prot_bits pcp_info.prot_bits
|
|
|
|
+#define pcpi_tagprot_msb pcp_info.tagprot_msb
|
|
|
|
+#define pcpi_tagprot_lsb pcp_info.tagprot_lsb
|
|
|
|
+#define pcpi_data_bits pcp_info.data_bits
|
|
|
|
+
|
|
|
|
+/* Processor cache part encodings */
|
|
|
|
+#define PAL_CACHE_PROT_PART_DATA 0 /* Data protection */
|
|
|
|
+#define PAL_CACHE_PROT_PART_TAG 1 /* Tag protection */
|
|
|
|
+#define PAL_CACHE_PROT_PART_TAG_DATA 2 /* Tag+data protection (tag is
|
|
|
|
+ * more significant )
|
|
|
|
+ */
|
|
|
|
+#define PAL_CACHE_PROT_PART_DATA_TAG 3 /* Data+tag protection (data is
|
|
|
|
+ * more significant )
|
|
|
|
+ */
|
|
|
|
+#define PAL_CACHE_PROT_PART_MAX 6
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+typedef struct pal_cache_protection_info_s {
|
|
|
|
+ pal_status_t pcpi_status;
|
|
|
|
+ pal_cache_protection_element_t pcp_info[PAL_CACHE_PROT_PART_MAX];
|
|
|
|
+} pal_cache_protection_info_t;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/* Processor cache protection method encodings */
|
|
|
|
+#define PAL_CACHE_PROT_METHOD_NONE 0 /* No protection */
|
|
|
|
+#define PAL_CACHE_PROT_METHOD_ODD_PARITY 1 /* Odd parity */
|
|
|
|
+#define PAL_CACHE_PROT_METHOD_EVEN_PARITY 2 /* Even parity */
|
|
|
|
+#define PAL_CACHE_PROT_METHOD_ECC 3 /* ECC protection */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/* Processor cache line identification in the hierarchy */
|
|
|
|
+typedef union pal_cache_line_id_u {
|
|
|
|
+ u64 pclid_data;
|
|
|
|
+ struct {
|
|
|
|
+ u64 cache_type : 8, /* 7-0 cache type */
|
|
|
|
+ level : 8, /* 15-8 level of the
|
|
|
|
+ * cache in the
|
|
|
|
+ * hierarchy.
|
|
|
|
+ */
|
|
|
|
+ way : 8, /* 23-16 way in the set
|
|
|
|
+ */
|
|
|
|
+ part : 8, /* 31-24 part of the
|
|
|
|
+ * cache
|
|
|
|
+ */
|
|
|
|
+ reserved : 32; /* 63-32 is reserved*/
|
|
|
|
+ } pclid_info_read;
|
|
|
|
+ struct {
|
|
|
|
+ u64 cache_type : 8, /* 7-0 cache type */
|
|
|
|
+ level : 8, /* 15-8 level of the
|
|
|
|
+ * cache in the
|
|
|
|
+ * hierarchy.
|
|
|
|
+ */
|
|
|
|
+ way : 8, /* 23-16 way in the set
|
|
|
|
+ */
|
|
|
|
+ part : 8, /* 31-24 part of the
|
|
|
|
+ * cache
|
|
|
|
+ */
|
|
|
|
+ mesi : 8, /* 39-32 cache line
|
|
|
|
+ * state
|
|
|
|
+ */
|
|
|
|
+ start : 8, /* 47-40 lsb of data to
|
|
|
|
+ * invert
|
|
|
|
+ */
|