git: 6a9c2e63be23 - main - Add padding for future use on arm64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Apr 2023 09:23:31 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=6a9c2e63be235c046b86804166449ebecc27f429
commit 6a9c2e63be235c046b86804166449ebecc27f429
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-04-24 16:18:47 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-04-25 09:23:15 +0000
Add padding for future use on arm64
Allow new features to be supported without changing the size of
existing structures.
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D39777
---
sys/arm64/arm64/machdep.c | 4 ++--
sys/arm64/include/pcb.h | 2 +-
sys/arm64/include/pmap.h | 1 +
sys/arm64/include/proc.h | 2 ++
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 8d2e2f81d1d8..c390269f419a 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -104,10 +104,10 @@ __FBSDID("$FreeBSD$");
#include <dev/smbios/smbios.h>
-_Static_assert(sizeof(struct pcb) == 1216, "struct pcb is incorrect size");
+_Static_assert(sizeof(struct pcb) == 1248, "struct pcb is incorrect size");
_Static_assert(offsetof(struct pcb, pcb_fpusaved) == 136,
"pcb_fpusaved changed offset");
-_Static_assert(offsetof(struct pcb, pcb_fpustate) == 160,
+_Static_assert(offsetof(struct pcb, pcb_fpustate) == 192,
"pcb_fpustate changed offset");
enum arm64_bus arm64_bus_method = ARM64_BUS_NONE;
diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h
index 35f04787c781..85c92727ca43 100644
--- a/sys/arm64/include/pcb.h
+++ b/sys/arm64/include/pcb.h
@@ -67,7 +67,7 @@ struct pcb {
/* The bits passed to userspace in get_fpcontext */
#define PCB_FP_USERMASK (PCB_FP_STARTED)
u_int pcb_vfpcpu; /* Last cpu this thread ran VFP code */
- uint64_t pcb_pad2;
+ uint64_t pcb_reserved[5];
/*
* The userspace VFP state. The pcb_fpusaved pointer will point to
diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h
index 8e3e81f2a5d3..bf387c9cf25b 100644
--- a/sys/arm64/include/pmap.h
+++ b/sys/arm64/include/pmap.h
@@ -95,6 +95,7 @@ struct pmap {
struct asid_set *pm_asid_set; /* The ASID/VMID set to use */
enum pmap_stage pm_stage;
int pm_levels;
+ uint64_t pm_reserved[4];
};
typedef struct pmap *pmap_t;
diff --git a/sys/arm64/include/proc.h b/sys/arm64/include/proc.h
index 9a22fe43833a..eb5fe806088a 100644
--- a/sys/arm64/include/proc.h
+++ b/sys/arm64/include/proc.h
@@ -63,6 +63,8 @@ struct mdthread {
struct {
struct ptrauth_key apia;
} md_ptrauth_kern;
+
+ uint64_t md_reserved[4];
};
struct mdproc {