diff options
| author | dsl <dsl@NetBSD.org> | 2014-02-20 18:19:09 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2014-02-20 18:19:09 +0000 |
| commit | bdd255cdbe6e9afa6e27885e8415ae04bd7eb0c6 (patch) | |
| tree | c3021a1e207737d77c953ab9f56e8cd56e0b35d1 /sys/arch/amd64/include | |
| parent | 9be9f1480832c584e7d63b4a9c315cef10641f55 (diff) | |
Move the amd64 and i386 pcb to the bottom of the uarea, and move the
kernel stack to the top.
Change the pcb layouts so that fpu save area is at the end and is
64byte aligned ready for xsave (saving the ymm registers).
Welcome to 6.99.32
Diffstat (limited to 'sys/arch/amd64/include')
| -rw-r--r-- | sys/arch/amd64/include/pcb.h | 21 | ||||
| -rw-r--r-- | sys/arch/amd64/include/proc.h | 7 |
2 files changed, 10 insertions, 18 deletions
diff --git a/sys/arch/amd64/include/pcb.h b/sys/arch/amd64/include/pcb.h index 4c49975d918..f4da2a2d357 100644 --- a/sys/arch/amd64/include/pcb.h +++ b/sys/arch/amd64/include/pcb.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.24 2014/02/11 20:17:16 dsl Exp $ */ +/* $NetBSD: pcb.h,v 1.25 2014/02/20 18:19:10 dsl Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -72,12 +72,7 @@ #ifdef __x86_64__ -#include <sys/signal.h> - -#include <machine/segments.h> -#include <machine/tss.h> -#include <x86/fpu.h> -#include <machine/sysarch.h> +#include <x86/cpu_extended_state.h> #define NIOPORTS 1024 /* # of ports we allow to be mapped */ @@ -91,16 +86,18 @@ struct pcb { uint64_t pcb_cr3; uint64_t pcb_rsp; uint64_t pcb_rbp; - uint64_t pcb_usersp; - uint32_t pcb_unused[2]; /* unused */ - union savefpu pcb_savefpu __aligned(16); /* floating point state */ - uint32_t pcb_unused_1[4]; /* unused */ void *pcb_onfault; /* copyin/out fault recovery */ - struct cpu_info *pcb_fpcpu; /* cpu holding our fp state. */ uint64_t pcb_fs; uint64_t pcb_gs; int pcb_iopl; + + uint32_t pcb_unused[11]; /* unused */ + + struct cpu_info *pcb_fpcpu; /* cpu holding our fp state. */ + union savefpu pcb_savefpu __aligned(64); /* floating point state */ + /* **** DO NOT ADD ANYTHING HERE **** */ }; +__CTASSERT(sizeof(struct pcb) - sizeof (union savefpu) == 128); #else /* __x86_64__ */ diff --git a/sys/arch/amd64/include/proc.h b/sys/arch/amd64/include/proc.h index 928a2f6f411..b69cc416a09 100644 --- a/sys/arch/amd64/include/proc.h +++ b/sys/arch/amd64/include/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.18 2014/02/15 10:11:15 dsl Exp $ */ +/* $NetBSD: proc.h,v 1.19 2014/02/20 18:19:10 dsl Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -65,11 +65,6 @@ struct mdproc { /* md_flags */ #define MDP_USEDMTRR 0x0008 /* has set volatile MTRRs */ -#define UAREA_PCB_OFFSET (USPACE - ALIGN(sizeof(struct pcb))) -#define KSTACK_LOWEST_ADDR(l) \ - ((void *)((vaddr_t)(l)->l_addr - UAREA_PCB_OFFSET)) -#define KSTACK_SIZE UAREA_PCB_OFFSET - #else /* __x86_64__ */ #include <i386/proc.h> |
