CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: skrll Date: Thu Jul 23 19:21:23 UTC 2020 Modified Files: src/sys/arch/i386/include: byte_swap.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/include/byte_swap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/byte_swap.h diff -u src/sys/arch/i386/include/byte_swap.h:1.15 src/sys/arch/i386/include/byte_swap.h:1.16 --- src/sys/arch/i386/include/byte_swap.h:1.15 Mon Apr 28 20:23:24 2008 +++ src/sys/arch/i386/include/byte_swap.h Thu Jul 23 19:21:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: byte_swap.h,v 1.15 2008/04/28 20:23:24 martin Exp $ */ +/* $NetBSD: byte_swap.h,v 1.16 2020/07/23 19:21:23 skrll Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ static __inline uint16_t __byte_swap_u16 static __inline uint16_t __byte_swap_u16_variable(uint16_t x) { - __asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); + __asm volatile ("rorw $8, %w1" : "=r" (x) : "0" (x)); return (x); }
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: kamil Date: Thu Jan 9 10:46:31 UTC 2020 Modified Files: src/sys/arch/i386/include: ptrace.h Log Message: Add missing compat define of PT32_GETXSTATE Fixes i386 build. Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/include/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/ptrace.h diff -u src/sys/arch/i386/include/ptrace.h:1.24 src/sys/arch/i386/include/ptrace.h:1.25 --- src/sys/arch/i386/include/ptrace.h:1.24 Wed Jan 8 17:21:38 2020 +++ src/sys/arch/i386/include/ptrace.h Thu Jan 9 10:46:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.24 2020/01/08 17:21:38 mgorny Exp $ */ +/* $NetBSD: ptrace.h,v 1.25 2020/01/09 10:46:31 kamil Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -159,6 +159,7 @@ { DT_REG, N("xmmregs"), Pmachdep_xmmregs, \ procfs_machdep_validxmmregs }, +#define PT32_GETXSTATE PT_GETXSTATE #define COREDUMP_MACHDEP_LWP_NOTES(l, ns, name)\ { \ struct xstate xstate; \
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: mgorny Date: Fri May 10 16:27:03 UTC 2019 Modified Files: src/sys/arch/i386/include: reg.h Log Message: Fill 'struct fpreg' & 'struct xmmregs' in The 'struct fpreg' data type used by PT_GETFPREGS, and 'struct xmmregs' used by PT_GETXMMREGS are currently opaque. Define them to contain correct data structs instead, the same way they are defined for amd64. For 'struct fpreg' this means 'struct save87', and for 'struct xmmregs' this means 'struct fxsave'. This makes it more transparent for consumers how the data is formatted, and allows using it without need for explicit casts. Reviewed by . To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/i386/include/reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/reg.h diff -u src/sys/arch/i386/include/reg.h:1.20 src/sys/arch/i386/include/reg.h:1.21 --- src/sys/arch/i386/include/reg.h:1.20 Thu Feb 23 03:34:22 2017 +++ src/sys/arch/i386/include/reg.h Fri May 10 16:27:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: reg.h,v 1.20 2017/02/23 03:34:22 kamil Exp $ */ +/* $NetBSD: reg.h,v 1.21 2019/05/10 16:27:03 mgorny Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -37,6 +37,7 @@ #ifndef _I386_REG_H_ #define _I386_REG_H_ +#include #include /* @@ -92,20 +93,14 @@ struct reg { }; struct fpreg { - /* - * XXX - * Fill this in with real info. - */ - char __data[108]; + struct save87 fstate; }; +__CTASSERT(sizeof(struct fpreg) == 108); struct xmmregs { - /* - * XXX - * Fill this in with real info. - */ - char __data[512]; + struct fxsave fxstate; }; +__CTASSERT(sizeof(struct xmmregs) == 512); /* * Debug Registers
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Thu Mar 7 13:02:13 UTC 2019 Modified Files: src/sys/arch/i386/include: pte.h Log Message: Style, and remove useless comments. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/i386/include/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pte.h diff -u src/sys/arch/i386/include/pte.h:1.27 src/sys/arch/i386/include/pte.h:1.28 --- src/sys/arch/i386/include/pte.h:1.27 Tue Feb 1 20:09:08 2011 +++ src/sys/arch/i386/include/pte.h Thu Mar 7 13:02:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.27 2011/02/01 20:09:08 chuck Exp $ */ +/* $NetBSD: pte.h,v 1.28 2019/03/07 13:02:13 maxv Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -60,14 +60,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - * pte.h rewritten by chuck based on the jolitz version, plus random - * info on the pentium and other processors found on the net. the - * goal of this rewrite is to provide enough documentation on the MMU - * hardware that the reader will be able to understand it without having - * to refer to a hardware manual. - */ - #ifndef _I386_PTE_H_ #define _I386_PTE_H_ #ifdef _KERNEL_OPT @@ -75,86 +67,6 @@ #endif /* - * i386 MMU hardware structure (without PAE extension): - * - * the i386 MMU is a two-level MMU which maps 4GB of virtual memory. - * the pagesize is 4K (4096 [0x1000] bytes), although newer pentium - * processors can support a 4MB pagesize as well. - * - * the first level table (segment table?) is called a "page directory" - * and it contains 1024 page directory entries (PDEs). each PDE is - * 4 bytes (an int), so a PD fits in a single 4K page. this page is - * the page directory page (PDP). each PDE in a PDP maps 4MB of space - * (1024 * 4MB = 4GB). a PDE contains the physical address of the - * second level table: the page table. or, if 4MB pages are being used, - * then the PDE contains the PA of the 4MB page being mapped. - * - * a page table consists of 1024 page table entries (PTEs). each PTE is - * 4 bytes (an int), so a page table also fits in a single 4K page. a - * 4K page being used as a page table is called a page table page (PTP). - * each PTE in a PTP maps one 4K page (1024 * 4K = 4MB). a PTE contains - * the physical address of the page it maps and some flag bits (described - * below). - * - * the processor has a special register, "cr3", which points to the - * the PDP which is currently controlling the mappings of the virtual - * address space. - * - * the following picture shows the translation process for a 4K page: - * - * %cr3 register [PA of PDP] - * | - * | - * | bits <31-22> of VA bits <21-12> of VA bits <11-0> - * | index the PDP (0 - 1023) index the PTPare the page offset - * | | | | - * | v | | - * +--->+--+ | | - * | PD Page | PA of v | - * | |---PTP>++ | - * | 1024 PDE | | page table |--PTE--+ | - * | entries | | (aka PTP) | | | - * +--+ | 1024 PTE | | | - * | entries| | | - * ++ | | - * | | - *bits <31-12> bits <11-0> - *p h y s i c a l a d d r - * - * the i386 caches PTEs in a TLB. it is important to flush out old - * TLB mappings when making a change to a mappings. writing to the - * %cr3 will flush the entire TLB.newer processors also have an - * instruction that will invalidate the mapping of a single page (which - * is useful if you are changing a single mappings because it preserves - * all the cached TLB entries). - * - * as shows, bits 31-12 of the PTE contain PA of the page being mapped. - * the rest of the PTE is defined as follows: - * bit# name use - * 11 n/a available for OS use, hardware ignores it - * 10 n/a available for OS use, hardware ignores it - * 9 n/a available for OS use, hardware ignores it - * 8 G global bit (see discussion below) - * 7 PS page size [for PDEs] (0=4k, 1=4M ) - * 6 D dirty (modified) page - * 5 A accessed (referenced) page - * 4 PCD cache disable - * 3 PWT prevent write through (cache) - * 2 U/S user/supervisor bit (0=supervisor only, 1=both u) - * 1 R/W read/write bit (0=read only, 1=read-write) - * 0 P present (valid) - * - * notes: - * - PS is only supported on
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: mlelstv Date: Tue Nov 13 11:01:54 UTC 2018 Modified Files: src/sys/arch/i386/include: multiboot.h Log Message: Framebuffer definitions for multiboot protocol. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/include/multiboot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/multiboot.h diff -u src/sys/arch/i386/include/multiboot.h:1.9 src/sys/arch/i386/include/multiboot.h:1.10 --- src/sys/arch/i386/include/multiboot.h:1.9 Fri Apr 13 01:49:47 2018 +++ src/sys/arch/i386/include/multiboot.h Tue Nov 13 11:01:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: multiboot.h,v 1.9 2018/04/13 01:49:47 khorben Exp $ */ +/* $NetBSD: multiboot.h,v 1.10 2018/11/13 11:01:54 mlelstv Exp $ */ /*- * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. @@ -86,6 +86,7 @@ extern struct multiboot_header *Multiboo #define MULTIBOOT_INFO_HAS_LOADER_NAME 0x0200 #define MULTIBOOT_INFO_HAS_APM_TABLE 0x0400 #define MULTIBOOT_INFO_HAS_VBE 0x0800 +#define MULTIBOOT_INFO_HAS_FRAMEBUFFER 0x1000 #if !defined(_LOCORE) struct multiboot_info { @@ -138,6 +139,32 @@ struct multiboot_info { uint16_t unused_mi_vbe_interface_seg; uint16_t unused_mi_vbe_interface_off; uint16_t unused_mi_vbe_interface_len; + + /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_FRAMEBUFFER. */ + uint64_t framebuffer_addr; + uint32_t framebuffer_pitch; + uint32_t framebuffer_width; + uint32_t framebuffer_height; + uint8_t framebuffer_bpp; +#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 0 +#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB 1 +#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2 + uint8_t framebuffer_type; + union { + struct { + uint32_t framebuffer_palette_addr; + uint16_t framebuffer_palette_num_colors; + }; + struct { + uint8_t framebuffer_red_field_position; + uint8_t framebuffer_red_mask_size; + uint8_t framebuffer_green_field_position; + uint8_t framebuffer_green_mask_size; + uint8_t framebuffer_blue_field_position; + uint8_t framebuffer_blue_mask_size; + }; + }; + }; /* - */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: cherry Date: Sun Sep 23 07:54:42 UTC 2018 Modified Files: src/sys/arch/i386/include: segments.h Log Message: Summary: Remove older and now conflicting type declaration for global variable 'idt'. This should fix the i386 build failure now. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/i386/include/segments.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/segments.h diff -u src/sys/arch/i386/include/segments.h:1.65 src/sys/arch/i386/include/segments.h:1.66 --- src/sys/arch/i386/include/segments.h:1.65 Sun Sep 23 00:59:59 2018 +++ src/sys/arch/i386/include/segments.h Sun Sep 23 07:54:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.65 2018/09/23 00:59:59 cherry Exp $ */ +/* $NetBSD: segments.h,v 1.66 2018/09/23 07:54:42 cherry Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -198,7 +198,6 @@ typedef struct gate_descriptor idt_descr #endif /* XEN */ extern idt_descriptor_t *idt; extern union descriptor *gdtstore, *ldtstore; -extern struct gate_descriptor *idt; void setgate(struct gate_descriptor *, void *, int, int, int, int); void set_idtgate(idt_descriptor_t *, void *, int, int, int);
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sun Jun 17 15:46:39 UTC 2018 Modified Files: src/sys/arch/i386/include: frameasm.h Log Message: i586 and below don't have this 3-byte nop, so use three 1-byte nops, reported by Nathanial Sloss To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/include/frameasm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.25 src/sys/arch/i386/include/frameasm.h:1.26 --- src/sys/arch/i386/include/frameasm.h:1.25 Sat Jan 27 18:48:59 2018 +++ src/sys/arch/i386/include/frameasm.h Sun Jun 17 15:46:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.25 2018/01/27 18:48:59 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.26 2018/06/17 15:46:39 maxv Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -42,11 +42,11 @@ #define SMAP_ENABLE \ HOTPATCH(HP_NAME_CLAC, 3) ; \ - .byte 0x0F, 0x1F, 0x00 + .byte 0x90, 0x90, 0x90 #define SMAP_DISABLE \ HOTPATCH(HP_NAME_STAC, 3) ; \ - .byte 0x0F, 0x1F, 0x00 + .byte 0x90, 0x90, 0x90 /* * These are used on interrupt or trap entry or exit.
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: kamil Date: Tue May 22 21:03:09 UTC 2018 Modified Files: src/sys/arch/i386/include: ptrace.h Log Message: Define PTRACE_BREAKPOINT_ASM for i386 in the MD part of x86 uses int3 for software breakpoint on i386 and amd64. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/include/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/ptrace.h diff -u src/sys/arch/i386/include/ptrace.h:1.19 src/sys/arch/i386/include/ptrace.h:1.20 --- src/sys/arch/i386/include/ptrace.h:1.19 Sat Apr 8 02:02:30 2017 +++ src/sys/arch/i386/include/ptrace.h Tue May 22 21:03:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.19 2017/04/08 02:02:30 kamil Exp $ */ +/* $NetBSD: ptrace.h,v 1.20 2018/05/22 21:03:09 kamil Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -112,6 +112,7 @@ #define PTRACE_REG_INTRV(r) (r)->r_eax #define PTRACE_BREAKPOINT ((const uint8_t[]) { 0xcc }) +#define PTRACE_BREAKPOINT_ASM __asm __volatile ("int3" : : : "memory") #define PTRACE_BREAKPOINT_SIZE 1 #define PTRACE_BREAKPOINT_ADJ sizeof(PTRACE_BREAKPOINT)
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: khorben Date: Fri Apr 13 01:49:47 UTC 2018 Modified Files: src/sys/arch/i386/include: multiboot.h Log Message: Correct discrepancy with the Multiboot specification The VBE mode was missing, and the types of the subsequent VBE members were also wrong. Nothing in NetBSD's base seems to be using this, and therefore nothing is expected to break as a result of this fix, or any binary to change for that matter. The latest specification (as of today) can be found at: https://www.gnu.org/software/grub/manual/multiboot/multiboot.html This was already reported in misc/52366, and addresses part of it. Patch sent to port-i386@. Build-tested on NetBSD/amd64. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/include/multiboot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/multiboot.h diff -u src/sys/arch/i386/include/multiboot.h:1.8 src/sys/arch/i386/include/multiboot.h:1.9 --- src/sys/arch/i386/include/multiboot.h:1.8 Sun Feb 22 18:05:42 2009 +++ src/sys/arch/i386/include/multiboot.h Fri Apr 13 01:49:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: multiboot.h,v 1.8 2009/02/22 18:05:42 ahoka Exp $ */ +/* $NetBSD: multiboot.h,v 1.9 2018/04/13 01:49:47 khorben Exp $ */ /*- * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. @@ -134,9 +134,10 @@ struct multiboot_info { /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_VBE. */ void * unused_mi_vbe_control_info; void * unused_mi_vbe_mode_info; - paddr_t unused_mi_vbe_interface_seg; - paddr_t unused_mi_vbe_interface_off; - uint32_t unused_mi_vbe_interface_len; + uint16_t unused_mi_vbe_mode; + uint16_t unused_mi_vbe_interface_seg; + uint16_t unused_mi_vbe_interface_off; + uint16_t unused_mi_vbe_interface_len; }; /* - */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sat Jan 27 08:05:14 UTC 2018 Modified Files: src/sys/arch/i386/include: frameasm.h Log Message: Use .pushsection (like amd64), and align INTRENTRY. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/include/frameasm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.21 src/sys/arch/i386/include/frameasm.h:1.22 --- src/sys/arch/i386/include/frameasm.h:1.21 Sun Jan 7 13:43:24 2018 +++ src/sys/arch/i386/include/frameasm.h Sat Jan 27 08:05:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.21 2018/01/07 13:43:24 maxv Exp $ */ +/* $NetBSD: frameasm.h,v 1.22 2018/01/27 08:05:14 maxv Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -34,34 +34,34 @@ #define HOTPATCH(name, size) \ 123: ; \ - .section .rodata.hotpatch, "a" ; \ + .pushsection .rodata.hotpatch, "a" ; \ .byte name ; \ .byte size ; \ .long 123b ; \ - .previous + .popsection /* * These are used on interrupt or trap entry or exit. */ #define INTRENTRY \ subl $TF_PUSHSIZE,%esp ; \ - movw %gs,TF_GS(%esp) ; \ - movw %fs,TF_FS(%esp) ; \ + movw %gs,TF_GS(%esp) ; \ + movw %fs,TF_FS(%esp) ; \ movl %eax,TF_EAX(%esp) ; \ - movw %es,TF_ES(%esp) ; \ - movw %ds,TF_DS(%esp) ; \ + movw %es,TF_ES(%esp) ; \ + movw %ds,TF_DS(%esp) ; \ movl $GSEL(GDATA_SEL, SEL_KPL),%eax ; \ movl %edi,TF_EDI(%esp) ; \ movl %esi,TF_ESI(%esp) ; \ - movw %ax,%ds ; \ + movw %ax,%ds ; \ movl %ebp,TF_EBP(%esp) ; \ - movw %ax,%es ; \ + movw %ax,%es ; \ movl %ebx,TF_EBX(%esp) ; \ - movw %ax,%gs ; \ + movw %ax,%gs ; \ movl %edx,TF_EDX(%esp) ; \ movl $GSEL(GCPU_SEL, SEL_KPL),%eax ; \ movl %ecx,TF_ECX(%esp) ; \ - movl %eax,%fs ; \ + movl %eax,%fs ; \ cld #define INTRFASTEXIT \
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sun Sep 17 09:11:19 UTC 2017 Removed Files: src/sys/arch/i386/include: tlog.h Log Message: Remove tlog.h - unused now. Note that it is not installed. To generate a diff of this commit: cvs rdiff -u -r1.4 -r0 src/sys/arch/i386/include/tlog.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sat Aug 12 13:11:23 UTC 2017 Modified Files: src/sys/arch/i386/include: frame.h Log Message: Remove the vm86 fields from the trap frame. It seems to me that we could now remove the '-16' when initializing pcb_esp0. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/i386/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/frame.h diff -u src/sys/arch/i386/include/frame.h:1.36 src/sys/arch/i386/include/frame.h:1.37 --- src/sys/arch/i386/include/frame.h:1.36 Wed Jun 14 00:40:05 2017 +++ src/sys/arch/i386/include/frame.h Sat Aug 12 13:11:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.36 2017/06/14 00:40:05 chs Exp $ */ +/* $NetBSD: frame.h,v 1.37 2017/08/12 13:11:23 maxv Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -100,11 +100,6 @@ struct trapframe { /* below used when transitting rings (e.g. user to kernel) */ int tf_esp; int tf_ss; - /* below used when switching out of VM86 mode */ - int tf_vm86_es; - int tf_vm86_ds; - int tf_vm86_fs; - int tf_vm86_gs; }; /*
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sat Aug 12 12:48:47 UTC 2017 Modified Files: src/sys/arch/i386/include: pcb.h Log Message: Remove the vm86 fields from the pcb. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/i386/include/pcb.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pcb.h diff -u src/sys/arch/i386/include/pcb.h:1.55 src/sys/arch/i386/include/pcb.h:1.56 --- src/sys/arch/i386/include/pcb.h:1.55 Thu Feb 23 03:34:22 2017 +++ src/sys/arch/i386/include/pcb.h Sat Aug 12 12:48:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.55 2017/02/23 03:34:22 kamil Exp $ */ +/* $NetBSD: pcb.h,v 1.56 2017/08/12 12:48:47 maxv Exp $ */ /*- * Copyright (c) 1998, 2009 The NetBSD Foundation, Inc. @@ -89,13 +89,10 @@ struct pcb { struct segment_descriptor pcb_fsd; /* %fs descriptor */ struct segment_descriptor pcb_gsd; /* %gs descriptor */ void *pcb_onfault; /* copyin/out fault recovery */ - int vm86_eflags; /* virtual eflags for vm86 mode */ - int vm86_flagmask; /* flag mask for vm86 mode */ - void *vm86_userp; /* XXX performance hack */ char *pcb_iomap; /* I/O permission bitmap */ struct dbreg *pcb_dbregs; /* CPU Debug Registers */ - int not_used[14]; + int not_used[17]; /* floating point state */ struct cpu_info *pcb_fpcpu; /* cpu holding our fp state. */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Sat Jul 29 13:05:16 UTC 2017 Modified Files: src/sys/arch/i386/include: freebsd_machdep.h param.h Log Message: Remove unused. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/include/freebsd_machdep.h cvs rdiff -u -r1.81 -r1.82 src/sys/arch/i386/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/freebsd_machdep.h diff -u src/sys/arch/i386/include/freebsd_machdep.h:1.13 src/sys/arch/i386/include/freebsd_machdep.h:1.14 --- src/sys/arch/i386/include/freebsd_machdep.h:1.13 Wed Feb 12 23:24:09 2014 +++ src/sys/arch/i386/include/freebsd_machdep.h Sat Jul 29 13:05:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_machdep.h,v 1.13 2014/02/12 23:24:09 dsl Exp $ */ +/* $NetBSD: freebsd_machdep.h,v 1.14 2017/07/29 13:05:15 maxv Exp $ */ /* * Copyright (c) 1986, 1989, 1991, 1993 @@ -110,9 +110,6 @@ struct freebsd_sigframe { struct freebsd_sigcontext sf_sc; }; -/* sys/i386/include/exec.h */ -#define FREEBSD___LDPGSZ 4096 - void freebsd_syscall_intern(struct proc *); #endif /* _FREEBSD_MACHDEP_H */ Index: src/sys/arch/i386/include/param.h diff -u src/sys/arch/i386/include/param.h:1.81 src/sys/arch/i386/include/param.h:1.82 --- src/sys/arch/i386/include/param.h:1.81 Wed Jun 14 12:27:24 2017 +++ src/sys/arch/i386/include/param.h Sat Jul 29 13:05:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.81 2017/06/14 12:27:24 maxv Exp $ */ +/* $NetBSD: param.h,v 1.82 2017/07/29 13:05:15 maxv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -80,10 +80,6 @@ #include "opt_kernbase.h" #endif /* defined(_KERNEL_OPT) */ -#ifdef KERNBASE_LOCORE -#error "You should only re-define KERNBASE" -#endif - #ifndef KERNBASE #define KERNBASE 0xc000UL /* start of kernel virtual space */ #endif
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Wed Jun 14 17:09:00 UTC 2017 Modified Files: src/sys/arch/i386/include: frameasm.h Log Message: style To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/include/frameasm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.15 src/sys/arch/i386/include/frameasm.h:1.16 --- src/sys/arch/i386/include/frameasm.h:1.15 Tue Jul 26 12:57:35 2011 +++ src/sys/arch/i386/include/frameasm.h Wed Jun 14 17:09:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.15 2011/07/26 12:57:35 yamt Exp $ */ +/* $NetBSD: frameasm.h,v 1.16 2017/06/14 17:09:00 maxv Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -9,22 +9,22 @@ #endif #if !defined(XEN) -#define CLI(reg)cli -#define STI(reg)sti +#define CLI(reg) cli +#define STI(reg) sti #else /* XXX assym.h */ -#define TRAP_INSTR int $0x82 -#define XEN_BLOCK_EVENTS(reg) movb $1,EVTCHN_UPCALL_MASK(reg) -#define XEN_UNBLOCK_EVENTS(reg) movb $0,EVTCHN_UPCALL_MASK(reg) -#define XEN_TEST_PENDING(reg) testb $0xFF,EVTCHN_UPCALL_PENDING(reg) - -#define CLI(reg)movlCPUVAR(VCPU),reg ; \ -XEN_BLOCK_EVENTS(reg) -#define STI(reg)movlCPUVAR(VCPU),reg ; \ +#define TRAP_INSTR int $0x82 +#define XEN_BLOCK_EVENTS(reg) movb $1,EVTCHN_UPCALL_MASK(reg) +#define XEN_UNBLOCK_EVENTS(reg) movb $0,EVTCHN_UPCALL_MASK(reg) +#define XEN_TEST_PENDING(reg) testb $0xFF,EVTCHN_UPCALL_PENDING(reg) + +#define CLI(reg) movl CPUVAR(VCPU),reg ; \ + XEN_BLOCK_EVENTS(reg) +#define STI(reg) movl CPUVAR(VCPU),reg ; \ XEN_UNBLOCK_EVENTS(reg) -#define STIC(reg) movlCPUVAR(VCPU),reg ; \ +#define STIC(reg) movl CPUVAR(VCPU),reg ; \ XEN_UNBLOCK_EVENTS(reg) ; \ - testb $0xff,EVTCHN_UPCALL_PENDING(reg) + testb $0xff,EVTCHN_UPCALL_PENDING(reg) #endif #ifndef TRAPLOG @@ -60,7 +60,7 @@ rdmsr ; \ movl %eax,TREC_IBT(%ebx) #endif - + /* * These are used on interrupt or trap entry or exit. */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Thu Jun 8 18:25:14 UTC 2017 Modified Files: src/sys/arch/i386/include: profile.h Log Message: use compiler builtins to compute addresses instead %ebp assembly arithmetic. (from joerg) To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/i386/include/profile.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/profile.h diff -u src/sys/arch/i386/include/profile.h:1.36 src/sys/arch/i386/include/profile.h:1.37 --- src/sys/arch/i386/include/profile.h:1.36 Sun Jun 4 12:35:59 2017 +++ src/sys/arch/i386/include/profile.h Thu Jun 8 14:25:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.36 2017/06/04 16:35:59 christos Exp $ */ +/* $NetBSD: profile.h,v 1.37 2017/06/08 18:25:14 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -54,8 +54,7 @@ #define MCOUNT \ MCOUNT_COMPAT\ extern void mcount(void) __asm(MCOUNT_ENTRY)\ - __attribute__((__no_instrument_function__)) \ - __attribute__((__optimize__("-fno-omit-frame-pointer"))); \ + __attribute__((__no_instrument_function__)); \ void \ mcount(void)\ { \ @@ -72,12 +71,11 @@ mcount(void)\ *\ * selfpc = pc pushed by mcount call\ */\ - __asm volatile("movl 4(%%ebp),%0" : "=r" (selfpc)); \ + selfpc = (int)__builtin_return_address(0); \ /*\ - * frompcindex = pc pushed by call into self. \ + * frompcindex = stack frame of caller, assuming frame pointer \ */\ - __asm volatile("movl (%%ebp),%0" : "=r" (frompcindex)); \ - frompcindex = ((int *)frompcindex)[1];\ + frompcindex = ((int *)__builtin_frame_address(1))[1]; \ _mcount((u_long)frompcindex, (u_long)selfpc); \ \ __asm volatile("movl %0,%%edx" : : "g" (edx)); \
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Sun Jun 4 16:35:59 UTC 2017 Modified Files: src/sys/arch/i386/include: profile.h Log Message: - prevent optimization from omitting the frame pointer (and re-using it); we use it in our inline assembly. - convert to c a little assembly to make the code more understandable. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/i386/include/profile.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/profile.h diff -u src/sys/arch/i386/include/profile.h:1.35 src/sys/arch/i386/include/profile.h:1.36 --- src/sys/arch/i386/include/profile.h:1.35 Tue May 30 21:50:19 2017 +++ src/sys/arch/i386/include/profile.h Sun Jun 4 12:35:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.35 2017/05/31 01:50:19 christos Exp $ */ +/* $NetBSD: profile.h,v 1.36 2017/06/04 16:35:59 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -54,7 +54,8 @@ #define MCOUNT \ MCOUNT_COMPAT\ extern void mcount(void) __asm(MCOUNT_ENTRY)\ - __attribute__((__no_instrument_function__)); \ + __attribute__((__no_instrument_function__)) \ + __attribute__((__optimize__("-fno-omit-frame-pointer"))); \ void \ mcount(void)\ { \ @@ -75,8 +76,8 @@ mcount(void)\ /*\ * frompcindex = pc pushed by call into self. \ */\ - __asm volatile("movl (%%ebp),%0;movl 4(%0),%0" \ - : "=r" (frompcindex)); \ + __asm volatile("movl (%%ebp),%0" : "=r" (frompcindex)); \ + frompcindex = ((int *)frompcindex)[1];\ _mcount((u_long)frompcindex, (u_long)selfpc); \ \ __asm volatile("movl %0,%%edx" : : "g" (edx)); \
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Wed May 31 01:50:19 UTC 2017 Modified Files: src/sys/arch/i386/include: profile.h Log Message: prevent coredumps by skipping everything early if we are not counting. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/i386/include/profile.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/profile.h diff -u src/sys/arch/i386/include/profile.h:1.34 src/sys/arch/i386/include/profile.h:1.35 --- src/sys/arch/i386/include/profile.h:1.34 Sun Jan 10 04:04:32 2016 +++ src/sys/arch/i386/include/profile.h Tue May 30 21:50:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.34 2016/01/10 09:04:32 ryo Exp $ */ +/* $NetBSD: profile.h,v 1.35 2017/05/31 01:50:19 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,6 +45,12 @@ #define MCOUNT_COMPAT /* nothing */ #endif +#if defined(_REENTRANT) && !defined(_KERNEL) +#define MCOUNT_ACTIVE if (_gmonparam.state != GMON_PROF_ON) return +#else +#define MCOUNT_ACTIVE +#endif + #define MCOUNT \ MCOUNT_COMPAT\ extern void mcount(void) __asm(MCOUNT_ENTRY)\ @@ -55,6 +61,7 @@ mcount(void)\ int selfpc, frompcindex; \ int eax, ecx, edx; \ \ + MCOUNT_ACTIVE; \ __asm volatile("movl %%eax,%0" : "=g" (eax)); \ __asm volatile("movl %%ecx,%0" : "=g" (ecx)); \ __asm volatile("movl %%edx,%0" : "=g" (edx)); \
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: kamil Date: Sat Apr 8 02:02:30 UTC 2017 Modified Files: src/sys/arch/i386/include: ptrace.h Log Message: Define PT_SETSTEP and PT_CLEARSTEP for i386 (ptrace(2)) Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/include/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/ptrace.h diff -u src/sys/arch/i386/include/ptrace.h:1.18 src/sys/arch/i386/include/ptrace.h:1.19 --- src/sys/arch/i386/include/ptrace.h:1.18 Thu Feb 23 03:34:22 2017 +++ src/sys/arch/i386/include/ptrace.h Sat Apr 8 02:02:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.18 2017/02/23 03:34:22 kamil Exp $ */ +/* $NetBSD: ptrace.h,v 1.19 2017/04/08 02:02:30 kamil Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -88,6 +88,8 @@ #define PT_SETXMMREGS (PT_FIRSTMACH + 6) #define PT_GETDBREGS (PT_FIRSTMACH + 7) #define PT_SETDBREGS (PT_FIRSTMACH + 8) +#define PT_SETSTEP (PT_FIRSTMACH + 9) +#define PT_CLEARSTEP (PT_FIRSTMACH + 10) #define PT_MACHDEP_STRINGS \ "PT_STEP", \ @@ -98,7 +100,9 @@ "PT_GETXMMREGS", \ "PT_SETXMMREGS", \ "PT_GETDBREGS", \ - "PT_SETDBREGS", + "PT_SETDBREGS", \ + "PT_SETSTEP", \ + "PT_CLEARSTEP", #include
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Fri Mar 10 13:42:47 UTC 2017 Modified Files: src/sys/arch/i386/include: pmc.h Log Message: unused To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/include/pmc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pmc.h diff -u src/sys/arch/i386/include/pmc.h:1.10 src/sys/arch/i386/include/pmc.h:1.11 --- src/sys/arch/i386/include/pmc.h:1.10 Sat Feb 18 14:36:32 2017 +++ src/sys/arch/i386/include/pmc.h Fri Mar 10 13:42:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmc.h,v 1.10 2017/02/18 14:36:32 maxv Exp $ */ +/* $NetBSD: pmc.h,v 1.11 2017/03/10 13:42:47 maxv Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -36,24 +36,6 @@ #ifndef _I386_PMC_H_ #define _I386_PMC_H_ -#define PMC_CLASS_I586 0x1 /* i586-compatible */ -#define PMC_TYPE_I586_TSC 0x10001 /* cycle counter */ -#define PMC_TYPE_I586_PMCx 0x10002 /* performance counter */ - -#define PMC_CLASS_I686 0x2 /* i686-compatible */ -#define PMC_TYPE_I686_TSC 0x20001 /* cycle counter */ -#define PMC_TYPE_I686_PMCx 0x20002 /* performance counter */ - -#define PMC_CLASS_K7 0x3 /* K7-compatible */ -#define PMC_TYPE_K7_TSC 0x30001 /* cycle counter */ -#define PMC_TYPE_K7_PMCx 0x30002 /* performance counter */ - -/* - * Each PMC event on the x86 is associated with a processor unit. We - * encode the unit in the upper 16 bits of the event ID. - */ -#define __PMC_UNIT(x) ((x) << 16) - #if defined(_KERNEL) struct x86_pmc_info_args; struct x86_pmc_startstop_args;
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: kamil Date: Mon Jan 16 21:19:14 UTC 2017 Modified Files: src/sys/arch/i386/include: userret.h Log Message: Allow to mix single-step with hardware assisted watchpoints on i386 This case needs new handling in trap recognition. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/include/userret.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/userret.h diff -u src/sys/arch/i386/include/userret.h:1.12 src/sys/arch/i386/include/userret.h:1.13 --- src/sys/arch/i386/include/userret.h:1.12 Thu Dec 15 12:04:18 2016 +++ src/sys/arch/i386/include/userret.h Mon Jan 16 21:19:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.12 2016/12/15 12:04:18 kamil Exp $ */ +/* $NetBSD: userret.h,v 1.13 2017/01/16 21:19:14 kamil Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -79,12 +79,9 @@ userret(struct lwp *l) mi_userret(l); /* - * Never mix debug registers with single step, while technically - * possible on x86 CPUs, it adds unnecessary complications we do - * not want to handle it. + * Allow to mix debug registers with single step. */ - if ((l->l_md.md_regs->tf_eflags & PSL_T) == 0 && - l->l_md.md_flags & MDL_X86_HW_WATCHPOINTS) + if (l->l_md.md_flags & MDL_X86_HW_WATCHPOINTS) set_x86_hw_watchpoints(l); else clear_x86_hw_watchpoints();
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: maxv Date: Fri Sep 2 08:28:06 UTC 2016 Modified Files: src/sys/arch/i386/include: segments.h Log Message: KNF, and give the structure sizes. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/include/segments.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/segments.h diff -u src/sys/arch/i386/include/segments.h:1.56 src/sys/arch/i386/include/segments.h:1.57 --- src/sys/arch/i386/include/segments.h:1.56 Sat Aug 27 14:19:47 2016 +++ src/sys/arch/i386/include/segments.h Fri Sep 2 08:28:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.56 2016/08/27 14:19:47 maxv Exp $ */ +/* $NetBSD: segments.h,v 1.57 2016/09/02 08:28:06 maxv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -88,38 +88,38 @@ * Selectors */ -#define ISPL(s) ((s) & SEL_RPL) /* what is the priority level of a selector */ +#define ISPL(s) ((s) & SEL_RPL) /* what is the priority level of a selector */ #ifndef XEN -#define SEL_KPL 0 /* kernel privilege level */ +#define SEL_KPL 0 /* kernel privilege level */ #else -#define SEL_XEN 0 /* Xen privilege level */ -#define SEL_KPL 1 /* kernel privilege level */ +#define SEL_XEN 0 /* Xen privilege level */ +#define SEL_KPL 1 /* kernel privilege level */ #endif /* XEN */ -#define SEL_UPL 3 /* user privilege level */ -#define SEL_RPL 3 /* requester's privilege level mask */ +#define SEL_UPL 3 /* user privilege level */ +#define SEL_RPL 3 /* requester's privilege level mask */ #ifdef XEN -#define CHK_UPL 2 /* user privilege level mask */ +#define CHK_UPL 2 /* user privilege level mask */ #else #define CHK_UPL SEL_RPL #endif /* XEN */ -#define ISLDT(s) ((s) & SEL_LDT) /* is it local or global */ -#define SEL_LDT 4 /* local descriptor table */ -#define IDXSEL(s) (((s) >> 3) & 0x1fff) /* index of selector */ -#define IDXSELN(s) (((s) >> 3)) /* index of selector */ -#define GSEL(s,r) (((s) << 3) | r) /* a global selector */ -#define LSEL(s,r) (((s) << 3) | r | SEL_LDT) /* a local selector */ -#define GSYSSEL(s,r) GSEL(s,r) /* compat with amd64 */ +#define ISLDT(s) ((s) & SEL_LDT) /* is it local or global */ +#define SEL_LDT 4 /* local descriptor table */ +#define IDXSEL(s) (((s) >> 3) & 0x1fff) /* index of selector */ +#define IDXSELN(s) (((s) >> 3)) /* index of selector */ +#define GSEL(s,r) (((s) << 3) | r) /* a global selector */ +#define LSEL(s,r) (((s) << 3) | r | SEL_LDT) /* a local selector */ +#define GSYSSEL(s,r) GSEL(s,r) /* compat with amd64 */ #if defined(_KERNEL_OPT) #include "opt_vm86.h" #endif #ifdef VM86 -#define USERMODE(c, f) (ISPL(c) == SEL_UPL || ((f) & PSL_VM) != 0) -#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL && ((f) & PSL_VM) == 0) +#define USERMODE(c, f) (ISPL(c) == SEL_UPL || ((f) & PSL_VM) != 0) +#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL && ((f) & PSL_VM) == 0) #else -#define USERMODE(c, f) (ISPL(c) == SEL_UPL) -#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL) +#define USERMODE(c, f) (ISPL(c) == SEL_UPL) +#define KERNELMODE(c, f) (ISPL(c) == SEL_KPL) #endif #ifndef _LOCORE @@ -129,7 +129,7 @@ #endif /* - * Memory and System segment descriptors + * Memory and System segment descriptors (both 8 bytes). */ struct segment_descriptor { unsigned sd_lolimit:16; /* segment extent (lsb) */ @@ -145,7 +145,7 @@ struct segment_descriptor { } __packed; /* - * Gate descriptors (e.g. indirect descriptors) + * Gate descriptors (8 bytes). */ struct gate_descriptor { unsigned gd_looffset:16; /* gate offset (lsb) */ @@ -158,13 +158,16 @@ struct gate_descriptor { unsigned gd_hioffset:16; /* gate offset (msb) */ } __packed; +/* + * Xen-specific? + */ struct ldt_descriptor { __vaddr_t ld_base; uint32_t ld_entries; } __packed; /* - * Generic descriptor + * Generic descriptor (8 bytes). */ union descriptor { struct segment_descriptor sd; @@ -175,7 +178,7 @@ union descriptor { } __packed; /* - * region descriptors, used to load gdt/idt tables before segments yet exist. + * Region descriptors, used to load gdt/idt tables before segments yet exist. */ struct region_descriptor { unsigned rd_limit:16; /* segment extent */ @@ -211,40 +214,40 @@ void idt_vec_free(int); #endif /* !_LOCORE */ /* system segments and gate types */ -#define SDT_SYSNULL 0 /* system null */ -#define SDT_SYS286TSS 1 /* system 286 TSS available */ -#define SDT_SYSLDT 2 /* system local descriptor table */ -#define SDT_SYS286BSY 3 /* system 286 TSS busy */ -#define SDT_SYS286CGT 4 /* system 286 call gate */ -#define SDT_SYSTASKGT 5 /* system task gate */ -#define SDT_SYS286IGT 6 /* system 286 interrupt gate */ -#define SDT_SYS286TGT 7 /* system 286 trap gate */ -#define SDT_SYSNULL2 8 /* system null again */ -#define SDT_SYS386TSS 9 /* system 386 TSS available */ -#define
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: chs Date: Sun May 15 15:26:04 UTC 2016 Modified Files: src/sys/arch/i386/include: asm.h Log Message: define ALTENTRY(), needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/i386/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/asm.h diff -u src/sys/arch/i386/include/asm.h:1.41 src/sys/arch/i386/include/asm.h:1.42 --- src/sys/arch/i386/include/asm.h:1.41 Thu Sep 12 15:36:17 2013 +++ src/sys/arch/i386/include/asm.h Sun May 15 15:26:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.41 2013/09/12 15:36:17 joerg Exp $ */ +/* $NetBSD: asm.h,v 1.42 2016/05/15 15:26:04 chs Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -173,6 +173,7 @@ #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE #define NENTRY(y) _ENTRY(_C_LABEL(y)) +#define ALTENTRY(x) NENTRY(x) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE #define LABEL(y) _LABEL(_C_LABEL(y)) #define END(y) .size y, . - y
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Tue Feb 2 20:16:59 UTC 2016 Modified Files: src/sys/arch/i386/include: elf_machdep.h Log Message: one more. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/i386/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/elf_machdep.h diff -u src/sys/arch/i386/include/elf_machdep.h:1.11 src/sys/arch/i386/include/elf_machdep.h:1.12 --- src/sys/arch/i386/include/elf_machdep.h:1.11 Tue Feb 2 15:16:08 2016 +++ src/sys/arch/i386/include/elf_machdep.h Tue Feb 2 15:16:59 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.11 2016/02/02 20:16:08 christos Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.12 2016/02/02 20:16:59 christos Exp $ */ #define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB #define ELF32_MACHDEP_ID_CASES \ @@ -26,6 +26,7 @@ #define R_386_RELATIVE 8 #define R_386_GOTOFF 9 #define R_386_GOTPC 10 +#define R_386_32PLT 11 /* TLS relocations */ #define R_386_TLS_TPOFF 14
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Tue Feb 2 20:16:08 UTC 2016 Modified Files: src/sys/arch/i386/include: elf_machdep.h Log Message: more relocations. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/elf_machdep.h diff -u src/sys/arch/i386/include/elf_machdep.h:1.10 src/sys/arch/i386/include/elf_machdep.h:1.11 --- src/sys/arch/i386/include/elf_machdep.h:1.10 Sat May 30 01:56:52 2009 +++ src/sys/arch/i386/include/elf_machdep.h Tue Feb 2 15:16:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.10 2009/05/30 05:56:52 skrll Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.11 2016/02/02 20:16:08 christos Exp $ */ #define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB #define ELF32_MACHDEP_ID_CASES \ @@ -56,8 +56,15 @@ #define R_386_TLS_DTPMOD32 35 #define R_386_TLS_DTPOFF32 36 #define R_386_TLS_TPOFF32 37 + +#define R_386_SIZE32 38 + +/* More TLS relocations */ #define R_386_TLS_GOTDESC 39 #define R_386_TLS_DESC_CALL 40 #define R_386_TLS_DESC 41 +#define R_386_IRELATIVE 42 +#define R_386_GOT32X 43 + #define R_TYPE(name) __CONCAT(R_386_,name)
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Sun Jan 24 18:21:50 UTC 2016 Modified Files: src/sys/arch/i386/include: segments.h types.h Log Message: expose __vaddr_t for segments.h since it is a userland api. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/include/segments.h cvs rdiff -u -r1.85 -r1.86 src/sys/arch/i386/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/segments.h diff -u src/sys/arch/i386/include/segments.h:1.54 src/sys/arch/i386/include/segments.h:1.55 --- src/sys/arch/i386/include/segments.h:1.54 Tue Apr 26 11:51:23 2011 +++ src/sys/arch/i386/include/segments.h Sun Jan 24 13:21:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.54 2011/04/26 15:51:23 joerg Exp $ */ +/* $NetBSD: segments.h,v 1.55 2016/01/24 18:21:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -159,7 +159,7 @@ struct gate_descriptor { } __packed; struct ldt_descriptor { - vaddr_t ld_base; + __vaddr_t ld_base; uint32_t ld_entries; } __packed; Index: src/sys/arch/i386/include/types.h diff -u src/sys/arch/i386/include/types.h:1.85 src/sys/arch/i386/include/types.h:1.86 --- src/sys/arch/i386/include/types.h:1.85 Sat Jan 23 17:31:19 2016 +++ src/sys/arch/i386/include/types.h Sun Jan 24 13:21:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.85 2016/01/23 22:31:19 christos Exp $ */ +/* $NetBSD: types.h,v 1.86 2016/01/24 18:21:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -41,6 +41,10 @@ #include #include +typedef int __register_t; +typedef unsigned long __vaddr_t; /* segments.h */ +typedef unsigned char __cpu_simple_lock_nv_t; + #if defined(_KERNEL) typedef struct label_t { int val[6]; @@ -78,7 +82,7 @@ typedef __uint64_t psize_t; #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) -typedef unsigned long vaddr_t; +typedef __vaddr_t vaddr_t; typedef unsigned long vsize_t; #define PRIxVADDR "lx" #define PRIxVSIZE "lx" @@ -86,14 +90,11 @@ typedef unsigned long vsize_t; typedef int pmc_evid_t; typedef __uint64_t pmc_ctr_t; -typedef int register_t; +typedef __register_t register_t; #define PRIxREGISTER "x" #endif /* _KERNEL || _KMEMUSER */ -typedef int __register_t; -typedef unsigned char __cpu_simple_lock_nv_t; - /* __cpu_simple_lock_t used to be a full word. */ #define __CPU_SIMPLE_LOCK_PAD
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: pooka Date: Wed Apr 22 19:48:01 UTC 2015 Modified Files: src/sys/arch/i386/include: types.h Log Message: Revise rhetoric for why __HAVE_ATOMIC64_OPS is defined with _KERNEL even though we don't know for sure that the target i386 CPU will support them. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/i386/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/types.h diff -u src/sys/arch/i386/include/types.h:1.79 src/sys/arch/i386/include/types.h:1.80 --- src/sys/arch/i386/include/types.h:1.79 Thu Apr 24 19:23:00 2014 +++ src/sys/arch/i386/include/types.h Wed Apr 22 19:48:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.79 2014/04/24 19:23:00 christos Exp $ */ +/* $NetBSD: types.h,v 1.80 2015/04/22 19:48:01 pooka Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -109,12 +109,13 @@ typedef volatile unsigned char __cpu_si #define __HAVE_SYSCALL_INTERN #define __HAVE_MINIMAL_EMUL #define __HAVE_OLD_DISKLABEL -#if defined(_KERNEL) !defined(_RUMPKERNEL) !defined(_RUMP_NATIVE_ABI) +#if defined(_KERNEL) /* * Processors i586 do not have cmpxchg8b, and we compile for i486 - * by default in userland. The kernel tsc driver uses them though, - * and handles i586 * by patching. We don't want to expose them in - * userland, that is why we exclude rump. + * by default. The kernel tsc driver uses them though, and handles i586 + * by patching. E.g. rump kernels and crash(8) and a selection of + * other run-in-userspace code defines _KERNEL, but is careful not to + * build anything using 64bit atomic ops by default. */ #define __HAVE_ATOMIC64_OPS #endif
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: pooka Date: Tue Dec 9 14:39:49 UTC 2014 Modified Files: src/sys/arch/i386/include: ansi.h Log Message: On i386, prefer __WCHAR/WINT_TYPE__ where available instead of hardcoded _BSD_WCHAR_T_ value. This mimics some other ports, and more importantly fixes compilation with i386 compilers which define __WCHAR_TYPE__ as long int instead of the int we had in there. That superficial mismatch resulted in errors such as: lib/libc/gen/vis.c:109:1: error: array of inappropriate type initialized from string constant static const wchar_t char_shell[] = L'`\;()|{}]\\$!^~; No change to NetBSD (our gcc does define __WCHAR_TYPE__, but it is int ... as expected ... since the NetBSD build worked ;) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/include/ansi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/ansi.h diff -u src/sys/arch/i386/include/ansi.h:1.25 src/sys/arch/i386/include/ansi.h:1.26 --- src/sys/arch/i386/include/ansi.h:1.25 Sun Jul 17 20:54:41 2011 +++ src/sys/arch/i386/include/ansi.h Tue Dec 9 14:39:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.25 2011/07/17 20:54:41 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.26 2014/12/09 14:39:49 pooka Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -56,7 +56,16 @@ #define _BSD_TIMER_T_ int /* timer_t */ #define _BSD_SUSECONDS_T_ int /* suseconds_t */ #define _BSD_USECONDS_T_ unsigned int /* useconds_t */ + +#if defined(__WCHAR_TYPE__) +#define _BSD_WCHAR_T_ __WCHAR_TYPE__ /* wchar_t */ +#else #define _BSD_WCHAR_T_ int /* wchar_t */ +#endif +#if defined(__WINT_TYPE__) +#define _BSD_WINT_T_ __WINT_TYPE__ /* wint_t */ +#else #define _BSD_WINT_T_ int /* wint_t */ +#endif #endif /* _I386_ANSI_H_ */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: joerg Date: Mon Jul 28 11:22:46 UTC 2014 Modified Files: src/sys/arch/i386/include: int_fmtio.h int_mwgwtypes.h Log Message: GCC sets up u?int_fast8_t to be int, so be consistent with it. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/include/int_fmtio.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/include/int_mwgwtypes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/int_fmtio.h diff -u src/sys/arch/i386/include/int_fmtio.h:1.8 src/sys/arch/i386/include/int_fmtio.h:1.9 --- src/sys/arch/i386/include/int_fmtio.h:1.8 Fri Jul 25 21:43:13 2014 +++ src/sys/arch/i386/include/int_fmtio.h Mon Jul 28 11:22:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: int_fmtio.h,v 1.8 2014/07/25 21:43:13 joerg Exp $ */ +/* $NetBSD: int_fmtio.h,v 1.9 2014/07/28 11:22:46 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -144,7 +144,7 @@ #define SCNdLEAST16 hd /* int_least16_t */ #define SCNdLEAST32 d /* int_least32_t */ #define SCNdLEAST64 lld /* int_least64_t */ -#define SCNdFAST8 hhd /* int_fast8_t */ +#define SCNdFAST8 d /* int_fast8_t */ #define SCNdFAST16 d /* int_fast16_t */ #define SCNdFAST32 d /* int_fast32_t */ #define SCNdFAST64 lld /* int_fast64_t */ @@ -159,7 +159,7 @@ #define SCNiLEAST16 hi /* int_least16_t */ #define SCNiLEAST32 i /* int_least32_t */ #define SCNiLEAST64 lli /* int_least64_t */ -#define SCNiFAST8 hhi /* int_fast8_t */ +#define SCNiFAST8 i /* int_fast8_t */ #define SCNiFAST16 i /* int_fast16_t */ #define SCNiFAST32 i /* int_fast32_t */ #define SCNiFAST64 lli /* int_fast64_t */ @@ -176,7 +176,7 @@ #define SCNoLEAST16 ho /* uint_least16_t */ #define SCNoLEAST32 o /* uint_least32_t */ #define SCNoLEAST64 llo /* uint_least64_t */ -#define SCNoFAST8 hho /* uint_fast8_t */ +#define SCNoFAST8 o /* uint_fast8_t */ #define SCNoFAST16 o /* uint_fast16_t */ #define SCNoFAST32 o /* uint_fast32_t */ #define SCNoFAST64 llo /* uint_fast64_t */ @@ -191,7 +191,7 @@ #define SCNuLEAST16 hu /* uint_least16_t */ #define SCNuLEAST32 u /* uint_least32_t */ #define SCNuLEAST64 llu /* uint_least64_t */ -#define SCNuFAST8 hhu /* uint_fast8_t */ +#define SCNuFAST8 u /* uint_fast8_t */ #define SCNuFAST16 u /* uint_fast16_t */ #define SCNuFAST32 u /* uint_fast32_t */ #define SCNuFAST64 llu /* uint_fast64_t */ @@ -206,7 +206,7 @@ #define SCNxLEAST16 hx /* uint_least16_t */ #define SCNxLEAST32 x /* uint_least32_t */ #define SCNxLEAST64 llx /* uint_least64_t */ -#define SCNxFAST8 hhx /* uint_fast8_t */ +#define SCNxFAST8 x /* uint_fast8_t */ #define SCNxFAST16 x /* uint_fast16_t */ #define SCNxFAST32 x /* uint_fast32_t */ #define SCNxFAST64 llx /* uint_fast64_t */ Index: src/sys/arch/i386/include/int_mwgwtypes.h diff -u src/sys/arch/i386/include/int_mwgwtypes.h:1.7 src/sys/arch/i386/include/int_mwgwtypes.h:1.8 --- src/sys/arch/i386/include/int_mwgwtypes.h:1.7 Fri Jul 25 21:43:13 2014 +++ src/sys/arch/i386/include/int_mwgwtypes.h Mon Jul 28 11:22:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ */ +/* $NetBSD: int_mwgwtypes.h,v 1.8 2014/07/28 11:22:46 joerg Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -60,8 +60,8 @@ typedef unsigned long long int uint_leas /* 7.18.1.3 Fastest minimum-width integer types */ -typedef signed char int_fast8_t; -typedef unsigned char uint_fast8_t; +typedef int int_fast8_t; +typedef unsigned int uint_fast8_t; typedef int int_fast16_t; typedef unsigned int uint_fast16_t; typedef int int_fast32_t;
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Thu Apr 3 15:22:19 UTC 2014 Modified Files: src/sys/arch/i386/include: types.h Log Message: we have cpu_bootconf() To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/i386/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/types.h diff -u src/sys/arch/i386/include/types.h:1.76 src/sys/arch/i386/include/types.h:1.77 --- src/sys/arch/i386/include/types.h:1.76 Sat Nov 30 20:05:16 2013 +++ src/sys/arch/i386/include/types.h Thu Apr 3 11:22:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.76 2013/12/01 01:05:16 christos Exp $ */ +/* $NetBSD: types.h,v 1.77 2014/04/03 15:22:19 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -104,6 +104,7 @@ typedef volatile unsigned char __cpu_si #define __HAVE_NEW_STYLE_BUS_H #define __HAVE_CPU_DATA_FIRST #define __HAVE_CPU_COUNTER +#define __HAVE_CPU_BOOTCONF #define __HAVE_MD_CPU_OFFLINE #define __HAVE_SYSCALL_INTERN #define __HAVE_MINIMAL_EMUL
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Tue Jan 28 17:46:01 UTC 2014 Modified Files: src/sys/arch/i386/include: vmparam.h Log Message: only limit bottom-up allocations, put back 3G limit on datasize. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/i386/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/vmparam.h diff -u src/sys/arch/i386/include/vmparam.h:1.78 src/sys/arch/i386/include/vmparam.h:1.79 --- src/sys/arch/i386/include/vmparam.h:1.78 Mon Jan 27 21:51:34 2014 +++ src/sys/arch/i386/include/vmparam.h Tue Jan 28 12:46:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.78 2014/01/28 02:51:34 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.79 2014/01/28 17:46:01 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -68,8 +68,12 @@ #define DFLDSIZ (256*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (2U*1024*1024*1024 + \ - 1U* 512*1024*1024) /* 2.5G max data size */ +#define MAXDSIZ (3U*1024*1024*1024) /* 3G max data size */ +#endif +#ifndef MAXDSIZ_BU +#define MAXDSIZ_BU (2U*1024*1024*1024 + /* 2.5G max data size for */ \ + 1U* 512*1024*1024) /* bottom-up allocation */ \ + /* could be a bit more */ #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ @@ -114,7 +118,7 @@ #define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \ trunc_page(USRSTACK - MAXSSIZ - (sz)) #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \ -round_page((vaddr_t)(da) + (vsize_t)maxdmap) +round_page((vaddr_t)(da) + (vsize_t)MIN(maxdmap, MAXDSIZ_BU)) /* XXX max. amount of KVM to be used by buffers. */ #ifndef VM_MAX_KERNEL_BUF
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Tue Jan 28 02:51:34 UTC 2014 Modified Files: src/sys/arch/i386/include: vmparam.h Log Message: Cut down MAXDSIZE from 3G to 2.5G otherwise bottomup allocation ends up supplying an out of bounds hint for sigcode (c001e000 bf00). Makes a.out binaries work again. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/i386/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/vmparam.h diff -u src/sys/arch/i386/include/vmparam.h:1.77 src/sys/arch/i386/include/vmparam.h:1.78 --- src/sys/arch/i386/include/vmparam.h:1.77 Sat Jan 25 10:16:50 2014 +++ src/sys/arch/i386/include/vmparam.h Mon Jan 27 21:51:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.77 2014/01/25 15:16:50 christos Exp $ */ +/* $NetBSD: vmparam.h,v 1.78 2014/01/28 02:51:34 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -68,7 +68,8 @@ #define DFLDSIZ (256*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (3U*1024*1024*1024) /* max data size */ +#define MAXDSIZ (2U*1024*1024*1024 + \ + 1U* 512*1024*1024) /* 2.5G max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Sat Jan 25 19:10:56 UTC 2014 Modified Files: src/sys/arch/i386/include: npx.h Log Message: help lint. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/i386/include/npx.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/npx.h diff -u src/sys/arch/i386/include/npx.h:1.29 src/sys/arch/i386/include/npx.h:1.30 --- src/sys/arch/i386/include/npx.h:1.29 Sun Jan 19 18:27:30 2014 +++ src/sys/arch/i386/include/npx.h Sat Jan 25 14:10:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: npx.h,v 1.29 2014/01/19 23:27:30 dsl Exp $ */ +/* $NetBSD: npx.h,v 1.30 2014/01/25 19:10:56 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -91,7 +91,10 @@ struct save87 { uint8_t s87_pad[8 * 2 - 2 * 4]; /* bogus historical padding */ #endif }; +#ifndef __lint__ +// Has different packing semantics, adding packed to save87 works __CTASSERT(sizeof (struct save87) == 108 + 16); +#endif /* FPU regsters in the extended save format. */ struct fpaccxmm { @@ -122,7 +125,10 @@ struct fxsave { uint32_t sv_ex_sw; /* saved SW from last exception */ uint32_t sv_ex_tw; /* saved TW from last exception */ } __aligned(16); +#ifndef __lint__ +// lint does not know aligned __CTASSERT(sizeof (struct fxsave) == 512 + 16); +#endif union savefpu {
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: dsl Date: Sun Jan 19 23:27:30 UTC 2014 Modified Files: src/sys/arch/i386/include: npx.h Log Message: Add a couple of __CTASSERT() for the sizes of the fp save structures. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/i386/include/npx.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/npx.h diff -u src/sys/arch/i386/include/npx.h:1.28 src/sys/arch/i386/include/npx.h:1.29 --- src/sys/arch/i386/include/npx.h:1.28 Sun Jan 19 14:30:37 2014 +++ src/sys/arch/i386/include/npx.h Sun Jan 19 23:27:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: npx.h,v 1.28 2014/01/19 14:30:37 dsl Exp $ */ +/* $NetBSD: npx.h,v 1.29 2014/01/19 23:27:30 dsl Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -91,6 +91,7 @@ struct save87 { uint8_t s87_pad[8 * 2 - 2 * 4]; /* bogus historical padding */ #endif }; +__CTASSERT(sizeof (struct save87) == 108 + 16); /* FPU regsters in the extended save format. */ struct fpaccxmm { @@ -121,6 +122,8 @@ struct fxsave { uint32_t sv_ex_sw; /* saved SW from last exception */ uint32_t sv_ex_tw; /* saved TW from last exception */ } __aligned(16); +__CTASSERT(sizeof (struct fxsave) == 512 + 16); + union savefpu { struct save87 sv_87;
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: dsl Date: Mon Dec 9 17:39:53 UTC 2013 Modified Files: src/sys/arch/i386/include: freebsd_machdep.h Log Message: Include machine/npx.h here. The only file that needs 'struct freebsd_save87' includes it already. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/include/freebsd_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/freebsd_machdep.h diff -u src/sys/arch/i386/include/freebsd_machdep.h:1.10 src/sys/arch/i386/include/freebsd_machdep.h:1.11 --- src/sys/arch/i386/include/freebsd_machdep.h:1.10 Sun Dec 8 20:45:30 2013 +++ src/sys/arch/i386/include/freebsd_machdep.h Mon Dec 9 17:39:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_machdep.h,v 1.10 2013/12/08 20:45:30 dsl Exp $ */ +/* $NetBSD: freebsd_machdep.h,v 1.11 2013/12/09 17:39:53 dsl Exp $ */ /* * Copyright (c) 1986, 1989, 1991, 1993 @@ -41,6 +41,7 @@ #define _FREEBSD_MACHDEP_H #include compat/sys/sigtypes.h +#include machine/npx.h /* * signal support
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: para Date: Mon Mar 18 16:32:32 UTC 2013 Modified Files: src/sys/arch/i386/include: pmap.h Log Message: i386 pmap.h got a forward declarition for vm_map from systm.h insert a forward declaration To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/i386/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pmap.h diff -u src/sys/arch/i386/include/pmap.h:1.115 src/sys/arch/i386/include/pmap.h:1.116 --- src/sys/arch/i386/include/pmap.h:1.115 Sun Feb 19 10:39:06 2012 +++ src/sys/arch/i386/include/pmap.h Mon Mar 18 16:32:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.115 2012/02/19 10:39:06 cherry Exp $ */ +/* $NetBSD: pmap.h,v 1.116 2013/03/18 16:32:32 para Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -400,6 +400,7 @@ pmap_pte_flush(void) #endif +struct vm_map; struct trapframe; int pmap_exec_fixup(struct vm_map *, struct trapframe *, struct pcb *);
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: alnsn Date: Sun Nov 18 14:39:43 UTC 2012 Modified Files: src/sys/arch/i386/include: sljitarch.h Log Message: Disable generation of fastcall functions on i386. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/include/sljitarch.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/sljitarch.h diff -u src/sys/arch/i386/include/sljitarch.h:1.1 src/sys/arch/i386/include/sljitarch.h:1.2 --- src/sys/arch/i386/include/sljitarch.h:1.1 Sun Oct 28 16:25:03 2012 +++ src/sys/arch/i386/include/sljitarch.h Sun Nov 18 14:39:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sljitarch.h,v 1.1 2012/10/28 16:25:03 alnsn Exp $ */ +/* $NetBSD: sljitarch.h,v 1.2 2012/11/18 14:39:42 alnsn Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,4 +31,7 @@ #define SLJIT_CONFIG_X86_32 1 +#define SLJIT_CALL +#define SLJIT_X86_32_FASTCALL 0 + #endif
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: dsl Date: Mon Oct 1 17:30:39 UTC 2012 Modified Files: src/sys/arch/i386/include: apmvar.h Log Message: Remove some definitions that were part of the APM bos interface. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/include/apmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/apmvar.h diff -u src/sys/arch/i386/include/apmvar.h:1.25 src/sys/arch/i386/include/apmvar.h:1.26 --- src/sys/arch/i386/include/apmvar.h:1.25 Mon Apr 28 20:23:24 2008 +++ src/sys/arch/i386/include/apmvar.h Mon Oct 1 17:30:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: apmvar.h,v 1.25 2008/04/28 20:23:24 martin Exp $ */ +/* $NetBSD: apmvar.h,v 1.26 2012/10/01 17:30:39 dsl Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,36 +36,4 @@ #include dev/apm/apmio.h #endif /* _LCORE */ -/* - * virtual physical address of the trampoline - * that we use: page 1. - */ -#define APM_BIOSTRAMP PAGE_SIZE - -#ifndef _LOCORE -/* filled in by apmcall */ - -struct apm_connect_info { - u_int apm_code32_seg_base; /* real-mode style segment selector */ - u_int apm_code16_seg_base; - u_int apm_data_seg_base; - u_int apm_entrypt; - u_short apm_segsel; /* segment selector for APM */ - u_short _pad1; - u_int apm_code32_seg_len; - u_int apm_code16_seg_len; - u_int apm_data_seg_len; - u_int apm_detail; -}; - -#ifdef _KERNEL -extern struct apm_connect_info apminfo; /* in locore */ -extern int apmpresent; -int apmcall(int function, struct bioscallregs *regs); -void bioscall(int function, struct bioscallregs *regs); -int apm_set_powstate(void *, u_int, u_int); -void apminit(void); -int apm_busprobe(void); -#endif /* _KERNEL */ -#endif /* _LOCORE */ #endif /* __i386_apm_h__ */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: yamt Date: Tue Jul 26 12:56:39 UTC 2011 Modified Files: src/sys/arch/i386/include: cpu.h Log Message: whitespace To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/sys/arch/i386/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/cpu.h diff -u src/sys/arch/i386/include/cpu.h:1.176 src/sys/arch/i386/include/cpu.h:1.177 --- src/sys/arch/i386/include/cpu.h:1.176 Mon Dec 29 19:59:09 2008 +++ src/sys/arch/i386/include/cpu.h Tue Jul 26 12:56:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.176 2008/12/29 19:59:09 pooka Exp $ */ +/* $NetBSD: cpu.h,v 1.177 2011/07/26 12:56:39 yamt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -68,6 +68,7 @@ (*(struct cpu_info * const *)offsetof(struct cpu_info, ci_curlwp))); return l; } + __inline static void __unused cpu_set_curpri(int pri) {
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: yamt Date: Tue Jul 26 12:57:35 UTC 2011 Modified Files: src/sys/arch/i386/include: frameasm.h Log Message: comment To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/include/frameasm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/frameasm.h diff -u src/sys/arch/i386/include/frameasm.h:1.14 src/sys/arch/i386/include/frameasm.h:1.15 --- src/sys/arch/i386/include/frameasm.h:1.14 Mon Jul 7 13:01:16 2008 +++ src/sys/arch/i386/include/frameasm.h Tue Jul 26 12:57:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: frameasm.h,v 1.14 2008/07/07 13:01:16 gmcgarry Exp $ */ +/* $NetBSD: frameasm.h,v 1.15 2011/07/26 12:57:35 yamt Exp $ */ #ifndef _I386_FRAMEASM_H_ #define _I386_FRAMEASM_H_ @@ -139,7 +139,7 @@ movl %esp, %eax; \ jne 999f; \ movl CPUVAR(INTRSTACK), %esp; \ -999: pushl %eax; \ +999: pushl %eax; /* eax == pointer to intrframe */ \ /* * IDEPTH_DECR:
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: dyoung Date: Sun Jul 17 01:18:42 UTC 2011 Modified Files: src/sys/arch/i386/include: Makefile Removed Files: src/sys/arch/i386/include: bus.h Log Message: On i386, good-bye machine/bus.h. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/i386/include/Makefile cvs rdiff -u -r1.41 -r0 src/sys/arch/i386/include/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/Makefile diff -u src/sys/arch/i386/include/Makefile:1.37 src/sys/arch/i386/include/Makefile:1.38 --- src/sys/arch/i386/include/Makefile:1.37 Sat Jul 31 21:47:54 2010 +++ src/sys/arch/i386/include/Makefile Sun Jul 17 01:18:42 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.37 2010/07/31 21:47:54 joerg Exp $ +# $NetBSD: Makefile,v 1.38 2011/07/17 01:18:42 dyoung Exp $ INCSDIR= /usr/include/i386 INCS= ansi.h aout_machdep.h apmvar.h asm.h \ - bioscall.h bootinfo.h bswap.h byte_swap.h bus.h \ + bioscall.h bootinfo.h bswap.h byte_swap.h \ cdefs.h cpu.h cpufunc.h cputypes.h \ disklabel.h \ elf_machdep.h endian.h endian_machdep.h \
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: dyoung Date: Fri Jul 1 18:15:11 UTC 2011 Modified Files: src/sys/arch/i386/include: mca_machdep.h Log Message: #include sys/bus.h instead of machine/bus.h. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/include/mca_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/mca_machdep.h diff -u src/sys/arch/i386/include/mca_machdep.h:1.14 src/sys/arch/i386/include/mca_machdep.h:1.15 --- src/sys/arch/i386/include/mca_machdep.h:1.14 Sun Apr 3 22:29:26 2011 +++ src/sys/arch/i386/include/mca_machdep.h Fri Jul 1 18:15:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mca_machdep.h,v 1.14 2011/04/03 22:29:26 dyoung Exp $ */ +/* $NetBSD: mca_machdep.h,v 1.15 2011/07/01 18:15:11 dyoung Exp $ */ /* * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #define _I386_MCA_MACHDEP_H_ #include sys/device.h /* for device_t */ -#include machine/bus.h +#include sys/bus.h /* * i386-specific definitions for MCA autoconfiguration.
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: joerg Date: Thu Jun 16 13:16:20 UTC 2011 Modified Files: src/sys/arch/i386/include: asm.h Log Message: Use minimal alignment for functions in standalone code. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/asm.h diff -u src/sys/arch/i386/include/asm.h:1.39 src/sys/arch/i386/include/asm.h:1.40 --- src/sys/arch/i386/include/asm.h:1.39 Mon Dec 20 21:11:24 2010 +++ src/sys/arch/i386/include/asm.h Thu Jun 16 13:16:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.39 2010/12/20 21:11:24 joerg Exp $ */ +/* $NetBSD: asm.h,v 1.40 2011/06/16 13:16:20 joerg Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -85,7 +85,7 @@ /* let kernels and others override entrypoint alignment */ #if !defined(_ALIGN_TEXT) !defined(_KERNEL) # ifdef _STANDALONE -# define _ALIGN_TEXT .align 4 +# define _ALIGN_TEXT .align 1 # elif defined __ELF__ # define _ALIGN_TEXT .align 16 # else
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: dsl Date: Thu Jun 2 18:46:51 UTC 2011 Modified Files: src/sys/arch/i386/include: frame.h Log Message: Replace the trapframe fields for segment registers with two uint16_t fields - one of which is an explicit pad. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/frame.h diff -u src/sys/arch/i386/include/frame.h:1.33 src/sys/arch/i386/include/frame.h:1.34 --- src/sys/arch/i386/include/frame.h:1.33 Fri Nov 14 13:05:34 2008 +++ src/sys/arch/i386/include/frame.h Thu Jun 2 18:46:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.33 2008/11/14 13:05:34 ad Exp $ */ +/* $NetBSD: frame.h,v 1.34 2011/06/02 18:46:51 dsl Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -77,10 +77,14 @@ * Exception/Trap Stack Frame */ struct trapframe { - int tf_gs; - int tf_fs; - int tf_es; - int tf_ds; + uint16_t tf_gs; + uint16_t tf_gs_pad; + uint16_t tf_fs; + uint16_t tf_fs_pad; + uint16_t tf_es; + uint16_t tf_es_pad; + uint16_t tf_ds; + uint16_t tf_ds_pad; int tf_edi; int tf_esi; int tf_ebp;
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: haad Date: Tue Dec 14 15:50:07 UTC 2010 Modified Files: src/sys/arch/i386/include: types.h Log Message: Revert change made in revision 1.66 by ad@ this is not true and 64bit atomic ops should be enabled in libc by default. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/i386/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/types.h diff -u src/sys/arch/i386/include/types.h:1.68 src/sys/arch/i386/include/types.h:1.69 --- src/sys/arch/i386/include/types.h:1.68 Tue Sep 21 00:18:05 2010 +++ src/sys/arch/i386/include/types.h Tue Dec 14 15:50:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.68 2010/09/21 00:18:05 jym Exp $ */ +/* $NetBSD: types.h,v 1.69 2010/12/14 15:50:07 haad Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -107,12 +107,12 @@ #define __HAVE_SYSCALL_INTERN #define __HAVE_MINIMAL_EMUL #define __HAVE_OLD_DISKLABEL +#define __HAVE_ATOMIC64_OPS #define __HAVE_ATOMIC_AS_MEMBAR #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE_INTR_CONTROL #if defined(_KERNEL) -#define __HAVE_ATOMIC64_OPS /* not true for i486 in userspace */ #define __HAVE_RAS #endif
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: jym Date: Sat Oct 2 22:53:50 UTC 2010 Modified Files: src/sys/arch/i386/include: pte.h Log Message: Update the comment for PG_PS when used with PAE. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/include/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pte.h diff -u src/sys/arch/i386/include/pte.h:1.25 src/sys/arch/i386/include/pte.h:1.26 --- src/sys/arch/i386/include/pte.h:1.25 Tue Sep 14 21:34:02 2010 +++ src/sys/arch/i386/include/pte.h Sat Oct 2 22:53:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.25 2010/09/14 21:34:02 jym Exp $ */ +/* $NetBSD: pte.h,v 1.26 2010/10/02 22:53:49 jym Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -252,7 +252,7 @@ #define PG_U 0x0020 /* has been used */ #define PG_M 0x0040 /* has been modified */ #define PG_PAT 0x0080 /* PAT (on pte) */ -#define PG_PS 0x0080 /* 4MB page size */ +#define PG_PS 0x0080 /* 4MB page size (2MB for PAE) */ #define PG_G 0x0100 /* global, don't TLB flush */ #define PG_AVAIL1 0x0200 /* ignored by hardware */ #define PG_AVAIL2 0x0400 /* ignored by hardware */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: jym Date: Tue Sep 14 21:34:03 UTC 2010 Modified Files: src/sys/arch/i386/include: pte.h Log Message: Add ULL suffix to PG_NX when it is defined. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/include/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pte.h diff -u src/sys/arch/i386/include/pte.h:1.24 src/sys/arch/i386/include/pte.h:1.25 --- src/sys/arch/i386/include/pte.h:1.24 Tue Jul 6 20:50:34 2010 +++ src/sys/arch/i386/include/pte.h Tue Sep 14 21:34:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.24 2010/07/06 20:50:34 cegger Exp $ */ +/* $NetBSD: pte.h,v 1.25 2010/09/14 21:34:02 jym Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -267,7 +267,7 @@ #define PG_KW 0x0002 /* kernel read-write */ #ifdef PAE -#define PG_NX 0x8000 /* No-execute */ +#define PG_NX 0x8000ULL /* No-execute */ #else #define PG_NX 0 /* dummy */ #endif
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: jym Date: Thu Jul 15 18:58:41 UTC 2010 Modified Files: src/sys/arch/i386/include: pmap.h Log Message: Purely cosmetic: move L2_SLOT_KERNBASE out of the PAE #ifdef/#endif block. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/i386/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pmap.h diff -u src/sys/arch/i386/include/pmap.h:1.105 src/sys/arch/i386/include/pmap.h:1.106 --- src/sys/arch/i386/include/pmap.h:1.105 Mon Mar 1 00:55:33 2010 +++ src/sys/arch/i386/include/pmap.h Thu Jul 15 18:58:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.105 2010/03/01 00:55:33 jym Exp $ */ +/* $NetBSD: pmap.h,v 1.106 2010/07/15 18:58:40 jym Exp $ */ /* * @@ -219,12 +219,10 @@ #ifdef PAE #define L2_SLOT_PTE (KERNBASE/NBPD_L2-4) /* 1532: for recursive PDP map */ #define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 1536: start of kernel space */ -#define L2_SLOT_KERNBASE L2_SLOT_KERN #define L2_SLOT_APTE 1960 /* 1964-2047 reserved by Xen */ #else /* PAE */ #define L2_SLOT_PTE (KERNBASE/NBPD_L2-1) /* 767: for recursive PDP map */ #define L2_SLOT_KERN (KERNBASE/NBPD_L2) /* 768: start of kernel space */ -#define L2_SLOT_KERNBASE L2_SLOT_KERN #ifndef XEN #define L2_SLOT_APTE 1023 /* 1023: alternative recursive slot */ #else @@ -232,6 +230,7 @@ #endif #endif /* PAE */ +#define L2_SLOT_KERNBASE L2_SLOT_KERN #define PDIR_SLOT_KERN L2_SLOT_KERN #define PDIR_SLOT_PTE L2_SLOT_PTE
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: jld Date: Tue Apr 6 20:43:57 UTC 2010 Modified Files: src/sys/arch/i386/include: pte.h Log Message: Fix typos in PAE comment. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/include/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/pte.h diff -u src/sys/arch/i386/include/pte.h:1.21 src/sys/arch/i386/include/pte.h:1.22 --- src/sys/arch/i386/include/pte.h:1.21 Fri Feb 26 19:25:07 2010 +++ src/sys/arch/i386/include/pte.h Tue Apr 6 20:43:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.21 2010/02/26 19:25:07 jym Exp $ */ +/* $NetBSD: pte.h,v 1.22 2010/04/06 20:43:57 jld Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -164,10 +164,10 @@ * * The PAE extension extends the size of the PTE to 64 bits (52bits physical * address) and is compatible with the amd64 PTE format. The first level - * maps 2M, the second 1G, so a third level page table is intruduced to + * maps 2M, the second 1G, so a third level page table is introduced to * map the 4GB virtual address space. This PD has only 4 entries. - * We can't use recursive mapping at level 3 to map the PD pages, as - * this would eat one GB of address space. In addition, Xen impose restrictions + * We can't use recursive mapping at level 3 to map the PD pages, as this + * would eat one GB of address space. In addition, Xen imposes restrictions * on the entries we put in the L3 page (for example, the page pointed to by * the last slot can't be shared among different L3 pages), which makes * handling this L3 page in the same way we do for L2 on i386 (or L4 on amd64)
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: mlelstv Date: Fri Sep 25 13:51:27 UTC 2009 Modified Files: src/sys/arch/i386/include: npx.h Log Message: The FPU Tag word is a 16bit register, in FPU (387) mode it defines 2-bit tags for each FPU data register, in MMX mode it defines 1-bit tags for each data register. The single bit tags are stored in the lower 8 bits and thus in the first byte of the save frame. See amd64/include/fpu.h and the IA-32 Software Developer's manual Vol 2A. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/include/npx.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/npx.h diff -u src/sys/arch/i386/include/npx.h:1.22 src/sys/arch/i386/include/npx.h:1.23 --- src/sys/arch/i386/include/npx.h:1.22 Tue May 2 19:03:24 2006 +++ src/sys/arch/i386/include/npx.h Fri Sep 25 13:51:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: npx.h,v 1.22 2006/05/02 19:03:24 drochner Exp $ */ +/* $NetBSD: npx.h,v 1.23 2009/09/25 13:51:27 mlelstv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -81,8 +81,8 @@ struct envxmm { /*0*/ uint16_t en_cw; /* FPU Control Word */ uint16_t en_sw; /* FPU Status Word */ - uint8_t en_rsvd0; uint8_t en_tw; /* FPU Tag Word (abridged) */ + uint8_t en_rsvd0; uint16_t en_opcode; /* FPU Opcode */ uint32_t en_fip; /* FPU Instruction Pointer */ uint16_t en_fcs; /* FPU IP selector */
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: drochner Date: Tue Aug 18 17:40:39 UTC 2009 Modified Files: src/sys/arch/i386/include: stdarg.h Log Message: use __builtin_va_start rather than __builtin_stdarg_start for gcc=4.1, I don't know why it was made that inconsistent at that time, but the in-tree gcc-4.1 works with that, and gcc-4.4.1 removes builtin support for old style varargs. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/include/stdarg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/stdarg.h diff -u src/sys/arch/i386/include/stdarg.h:1.22 src/sys/arch/i386/include/stdarg.h:1.23 --- src/sys/arch/i386/include/stdarg.h:1.22 Sat Jun 21 00:56:39 2008 +++ src/sys/arch/i386/include/stdarg.h Tue Aug 18 17:40:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: stdarg.h,v 1.22 2008/06/21 00:56:39 gmcgarry Exp $ */ +/* $NetBSD: stdarg.h,v 1.23 2009/08/18 17:40:39 drochner Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -47,7 +47,12 @@ #define __builtin_va_copy(d, s) ((d) = (s)) #endif -#if __GNUC_PREREQ__(2, 96) +#if __GNUC_PREREQ__(4, 1) +#define va_start(ap, last) __builtin_va_start((ap), (last)) +#define va_arg __builtin_va_arg +#define va_end __builtin_va_end +#define __va_copy(dest, src) __builtin_va_copy((dest), (src)) +#elif __GNUC_PREREQ__(2, 96) #define va_start(ap, last) __builtin_stdarg_start((ap), (last)) #define va_arg __builtin_va_arg #define va_end __builtin_va_end
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: ad Date: Sun Jun 28 09:24:09 UTC 2009 Modified Files: src/sys/arch/i386/include: types.h Log Message: Define __HAVE_ATOMIC64_OPS only in kernel, since it doesn't work in userspace on the i486. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/i386/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/types.h diff -u src/sys/arch/i386/include/types.h:1.65 src/sys/arch/i386/include/types.h:1.66 --- src/sys/arch/i386/include/types.h:1.65 Sun Apr 19 14:11:37 2009 +++ src/sys/arch/i386/include/types.h Sun Jun 28 09:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.65 2009/04/19 14:11:37 ad Exp $ */ +/* $NetBSD: types.h,v 1.66 2009/06/28 09:24:09 ad Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -81,12 +81,12 @@ #define __HAVE_SYSCALL_INTERN #define __HAVE_MINIMAL_EMUL #define __HAVE_OLD_DISKLABEL -#define __HAVE_ATOMIC64_OPS #define __HAVE_ATOMIC_AS_MEMBAR #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE_INTR_CONTROL #if defined(_KERNEL) +#define __HAVE_ATOMIC64_OPS /* not true for i486 in userspace */ #define __HAVE_RAS #endif