diff options
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/elf_machdep.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 9 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_sysvec.c | 1 | ||||
-rw-r--r-- | sys/i386/include/metadata.h | 36 | ||||
-rw-r--r-- | sys/i386/include/pcb.h | 16 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 2 |
6 files changed, 22 insertions, 43 deletions
diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index 81d6e35..29a8885 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -89,6 +89,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = NULL, .sv_thread_detach = NULL, + .sv_trap = NULL, }; INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 36aeca5..f55900c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -3190,10 +3190,11 @@ init386(first) } else { metadata_missing = 1; } - if (envmode == 1) - kern_envp = static_env; - else if (bootinfo.bi_envp) - kern_envp = (caddr_t)bootinfo.bi_envp + KERNBASE; + + if (bootinfo.bi_envp) + init_static_kenv((caddr_t)bootinfo.bi_envp + KERNBASE, 0); + else + init_static_kenv(NULL, 0); /* Init basic tunables, hz etc */ init_param1(); diff --git a/sys/i386/ibcs2/ibcs2_sysvec.c b/sys/i386/ibcs2/ibcs2_sysvec.c index 16507ee..372e5ea 100644 --- a/sys/i386/ibcs2/ibcs2_sysvec.c +++ b/sys/i386/ibcs2/ibcs2_sysvec.c @@ -90,6 +90,7 @@ struct sysentvec ibcs2_svr3_sysvec = { .sv_syscallnames = NULL, .sv_schedtail = NULL, .sv_thread_detach = NULL, + .sv_trap = NULL, }; static int diff --git a/sys/i386/include/metadata.h b/sys/i386/include/metadata.h index 73c9207..98d0272 100644 --- a/sys/i386/include/metadata.h +++ b/sys/i386/include/metadata.h @@ -1,36 +1,6 @@ /*- - * Copyright (c) 2003 Peter Wemm <peter@FreeBSD.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_METADATA_H_ -#define _MACHINE_METADATA_H_ - -#define MODINFOMD_SMAP 0x1001 -#define MODINFOMD_SMAP_XATTR 0x1002 -#define MODINFOMD_DTBP 0x1003 - -#endif /* !_MACHINE_METADATA_H_ */ +#include <x86/metadata.h> diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 4bfd603..558565b 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -44,13 +44,17 @@ #endif #include <machine/npx.h> +/* + * NB: The fields marked with (*) are used by kernel debuggers. Their + * ABI should be preserved. + */ struct pcb { - int pcb_edi; - int pcb_esi; - int pcb_ebp; - int pcb_esp; - int pcb_ebx; - int pcb_eip; + int pcb_edi; /* (*) */ + int pcb_esi; /* (*) */ + int pcb_ebp; /* (*) */ + int pcb_esp; /* (*) */ + int pcb_ebx; /* (*) */ + int pcb_eip; /* (*) */ struct segment_descriptor pcb_fsd; struct segment_descriptor pcb_gsd; int pcb_ds; diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 7c980ce..df5441b 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -988,6 +988,7 @@ struct sysentvec linux_sysvec = { .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, + .sv_trap = NULL, }; INIT_SYSENTVEC(aout_sysvec, &linux_sysvec); @@ -1027,6 +1028,7 @@ struct sysentvec elf_linux_sysvec = { .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, + .sv_trap = NULL, }; static void |