git: ac7f6d240079 - stable/13 - 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:55:13 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ac7f6d24007949fb8ac951a7ff86d9da388004bb commit ac7f6d24007949fb8ac951a7ff86d9da388004bb 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:41:29 +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 daf079b7d2cc..9b23cc5773a3 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -472,7 +472,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 4767d8896de9..dc04d84b0eb5 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -527,7 +527,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) +