Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177618033
D59173.1794849443.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
6 KB
Referenced Files
None
Subscribers
None
D59173.1794849443.diff
View Options
diff --git a/stand/arm64/libarm64/cache.c b/stand/arm64/libarm64/cache.c
--- a/stand/arm64/libarm64/cache.c
+++ b/stand/arm64/libarm64/cache.c
@@ -68,7 +68,7 @@
* Relevant field [19:16] is LOG2
* of the number of words in DCache line
*/
- dcl_size = CTR_DLINE_SIZE(ctr);
+ dcl_size = CTR_DminLine_SIZE(ctr);
/* Size of word shifted by cache line size */
return (sizeof(int) << dcl_size);
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -475,19 +475,19 @@
};
static const struct mrs_field_value ctr_dline[] = {
- MRS_FIELD_VALUE_CACHE(CTR, DLINE, "4 byte D-cacheline",
+ MRS_FIELD_VALUE_CACHE(CTR, DminLine, "4 byte D-cacheline",
"byte D-cacheline"),
MRS_FIELD_VALUE_END,
};
static const struct mrs_field_value ctr_l1ip[] = {
- MRS_FIELD_VALUE(CTR_L1IP_VIPT, "VIPT I-cache"),
- MRS_FIELD_VALUE(CTR_L1IP_PIPT, "PIPT I-cache"),
+ MRS_FIELD_VALUE(CTR_L1Ip_VIPT, "VIPT I-cache"),
+ MRS_FIELD_VALUE(CTR_L1Ip_PIPT, "PIPT I-cache"),
MRS_FIELD_VALUE_END,
};
static const struct mrs_field_value ctr_iline[] = {
- MRS_FIELD_VALUE_CACHE(CTR, ILINE, "4 byte I-cacheline",
+ MRS_FIELD_VALUE_CACHE(CTR, IminLine, "4 byte I-cacheline",
"byte I-cacheline"),
MRS_FIELD_VALUE_END,
};
@@ -499,12 +499,12 @@
MRS_FIELD(CTR, IDC, false, MRS_LOWER, MRS_USERSPACE, ctr_idc),
MRS_FIELD(CTR, CWG, false, MRS_HIGHER_OR_ZERO, MRS_USERSPACE, ctr_cwg),
MRS_FIELD(CTR, ERG, false, MRS_HIGHER_OR_ZERO, MRS_USERSPACE, ctr_erg),
- MRS_FIELD(CTR, DLINE, false, MRS_LOWER, MRS_USERSPACE, ctr_dline),
+ MRS_FIELD(CTR, DminLine, false, MRS_LOWER, MRS_USERSPACE, ctr_dline),
/* If the ICache types are different report the safe option */
- MRS_FIELD(CTR, L1IP, false, MRS_EXACT_IF_DIFFERENT |
- MRS_SAFE(CTR_L1IP_VIPT >> CTR_L1IP_SHIFT), MRS_USERSPACE,
+ MRS_FIELD(CTR, L1Ip, false, MRS_EXACT_IF_DIFFERENT |
+ MRS_SAFE(CTR_L1Ip_VIPT >> CTR_L1Ip_SHIFT), MRS_USERSPACE,
ctr_l1ip),
- MRS_FIELD(CTR, ILINE, false, MRS_LOWER, MRS_USERSPACE, ctr_iline),
+ MRS_FIELD(CTR, IminLine, false, MRS_LOWER, MRS_USERSPACE, ctr_iline),
MRS_FIELD_END,
};
@@ -2332,7 +2332,7 @@
if (errata_status != ERRATA_NONE && PCPU_GET(cpuid) == 0 &&
cpu_feat_has_erratum(errata_list, errata_count, 1542419)) {
/* Clear fields we will change */
- user_cpu_desc.ctr &= ~(CTR_DIC_MASK | CTR_ILINE_WIDTH);
+ user_cpu_desc.ctr &= ~(CTR_DIC_MASK | CTR_IminLine_WIDTH);
/*
* Set DIC to none so userspace will execute an 'ic ivau'
@@ -2346,7 +2346,7 @@
* 4-byte words the instruction covers. As PAGE_SHIFT is log2
* of the number of bytes in a page we need to subtract 2.
*/
- user_cpu_desc.ctr |= (PAGE_SHIFT - 2) << CTR_ILINE_SHIFT;
+ user_cpu_desc.ctr |= (PAGE_SHIFT - 2) << CTR_IminLine_SHIFT;
l_user_cpu_desc.ctr = user_cpu_desc.ctr;
}
@@ -3301,11 +3301,11 @@
{
/* Identify the L1 cache type */
- switch (CTR_L1IP_VAL(ctr)) {
- case CTR_L1IP_PIPT:
+ switch (CTR_L1Ip_VAL(ctr)) {
+ case CTR_L1Ip_PIPT:
break;
default:
- case CTR_L1IP_VIPT:
+ case CTR_L1Ip_VIPT:
icache_aliasing = true;
break;
}
@@ -3315,21 +3315,21 @@
__func__, icache_line_size));
/* Get the D cache line size */
- dcache_line_size = CTR_DLINE_SIZE(ctr);
+ dcache_line_size = CTR_DminLine_SIZE(ctr);
/* And the same for the I cache */
- icache_line_size = CTR_ILINE_SIZE(ctr);
+ icache_line_size = CTR_IminLine_SIZE(ctr);
idcache_line_size = MIN(dcache_line_size, icache_line_size);
}
- if (dcache_line_size != CTR_DLINE_SIZE(ctr)) {
+ if (dcache_line_size != CTR_DminLine_SIZE(ctr)) {
printf("WARNING: D-cacheline size mismatch %ld != %d\n",
- dcache_line_size, CTR_DLINE_SIZE(ctr));
+ dcache_line_size, CTR_DminLine_SIZE(ctr));
}
- if (icache_line_size != CTR_ILINE_SIZE(ctr)) {
+ if (icache_line_size != CTR_IminLine_SIZE(ctr)) {
printf("WARNING: I-cacheline size mismatch %ld != %d\n",
- icache_line_size, CTR_ILINE_SIZE(ctr));
+ icache_line_size, CTR_IminLine_SIZE(ctr));
}
}
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -445,22 +445,22 @@
#define CTR_ERG_MASK (0xf << CTR_ERG_SHIFT)
#define CTR_ERG_VAL(reg) ((reg) & CTR_ERG_MASK)
#define CTR_ERG_SIZE(reg) (4 << (CTR_ERG_VAL(reg) >> CTR_ERG_SHIFT))
-#define CTR_DLINE_SHIFT 16
-#define CTR_DLINE_WIDTH 4
-#define CTR_DLINE_MASK (0xf << CTR_DLINE_SHIFT)
-#define CTR_DLINE_VAL(reg) ((reg) & CTR_DLINE_MASK)
-#define CTR_DLINE_SIZE(reg) (4 << (CTR_DLINE_VAL(reg) >> CTR_DLINE_SHIFT))
-#define CTR_L1IP_SHIFT 14
-#define CTR_L1IP_WIDTH 2
-#define CTR_L1IP_MASK (0x3 << CTR_L1IP_SHIFT)
-#define CTR_L1IP_VAL(reg) ((reg) & CTR_L1IP_MASK)
-#define CTR_L1IP_VIPT (2 << CTR_L1IP_SHIFT)
-#define CTR_L1IP_PIPT (3 << CTR_L1IP_SHIFT)
-#define CTR_ILINE_SHIFT 0
-#define CTR_ILINE_WIDTH 4
-#define CTR_ILINE_MASK (0xf << CTR_ILINE_SHIFT)
-#define CTR_ILINE_VAL(reg) ((reg) & CTR_ILINE_MASK)
-#define CTR_ILINE_SIZE(reg) (4 << (CTR_ILINE_VAL(reg) >> CTR_ILINE_SHIFT))
+#define CTR_DminLine_SHIFT 16
+#define CTR_DminLine_WIDTH 4
+#define CTR_DminLine_MASK (0xf << CTR_DminLine_SHIFT)
+#define CTR_DminLine_VAL(reg) ((reg) & CTR_DminLine_MASK)
+#define CTR_DminLine_SIZE(reg) (4 << (CTR_DminLine_VAL(reg) >> CTR_DminLine_SHIFT))
+#define CTR_L1Ip_SHIFT 14
+#define CTR_L1Ip_WIDTH 2
+#define CTR_L1Ip_MASK (0x3 << CTR_L1Ip_SHIFT)
+#define CTR_L1Ip_VAL(reg) ((reg) & CTR_L1Ip_MASK)
+#define CTR_L1Ip_VIPT (2 << CTR_L1Ip_SHIFT)
+#define CTR_L1Ip_PIPT (3 << CTR_L1Ip_SHIFT)
+#define CTR_IminLine_SHIFT 0
+#define CTR_IminLine_WIDTH 4
+#define CTR_IminLine_MASK (0xf << CTR_IminLine_SHIFT)
+#define CTR_IminLine_VAL(reg) ((reg) & CTR_IminLine_MASK)
+#define CTR_IminLine_SIZE(reg) (4 << (CTR_IminLine_VAL(reg) >> CTR_IminLine_SHIFT))
/* CurrentEL - Current Exception Level */
#define CURRENTEL_EL_SHIFT 2
diff --git a/sys/arm64/vmm/vmm_nvhe.c b/sys/arm64/vmm/vmm_nvhe.c
--- a/sys/arm64/vmm/vmm_nvhe.c
+++ b/sys/arm64/vmm/vmm_nvhe.c
@@ -55,7 +55,7 @@
uint64_t ctr;
ctr = READ_SPECIALREG(ctr_el0);
- line_size = sizeof(int) << CTR_DLINE_SIZE(ctr);
+ line_size = sizeof(int) << CTR_DminLine_SIZE(ctr);
end = start + len;
dsb(ishst);
/* Clean and Invalidate the D-cache */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 5:17 PM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41784961
Default Alt Text
D59173.1794849443.diff (6 KB)
Attached To
Mode
D59173: arm64: Fix the CTR_EL0 field names
Attached
Detach File
Event Timeline