git: 9d18bf1daff5 - stable/12 - x86: add a comment providing source for numbers in legacy XSAVE area layout
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Dec 2021 01:56:56 UTC
The branch stable/12 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=9d18bf1daff5b0feb64411494ce5ceadf3d70b1b
commit 9d18bf1daff5b0feb64411494ce5ceadf3d70b1b
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-12-13 23:25:36 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-12-15 01:56:32 +0000
x86: add a comment providing source for numbers in legacy XSAVE area layout
(cherry picked from commit 0e6b06d5c8719597b2ec59e6856b5decbd9e65f6)
---
sys/amd64/amd64/fpu.c | 3 ++-
sys/i386/i386/npx.c | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index d17241bf2523..91df1259be46 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -465,7 +465,8 @@ fpuinitstate(void *arg __unused)
/*
* Create a table describing the layout of the CPU Extended
- * Save Area.
+ * Save Area. See Intel SDM rev. 075 Vol. 1 13.4.1 "Legacy
+ * Region of an XSAVE Area" for the source of offsets/sizes.
*/
if (use_xsave) {
xstate_bv = (uint64_t *)((char *)(fpu_initialstate + 1) +
diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c
index c64ef4ca895f..abf3ab5bd6df 100644
--- a/sys/i386/i386/npx.c
+++ b/sys/i386/i386/npx.c
@@ -515,7 +515,10 @@ npxinitstate(void *arg __unused)
/*
* Create a table describing the layout of the CPU Extended
- * Save Area.
+ * Save Area. See Intel SDM rev. 075 Vol. 1 13.4.1 "Legacy
+ * Region of an XSAVE Area" for the source of offsets/sizes.
+ * Note that 32bit XSAVE does not use %xmm8-%xmm15, see
+ * 10.5.1.2 and 13.5.2 "SSE State".
*/
if (use_xsave) {
xstate_bv = (uint64_t *)((char *)(npx_initialstate + 1) +