Module Name: src Committed By: christos Date: Fri Apr 30 01:09:29 UTC 2021
Modified Files: src/sys/arch/amd64/include: gdt.h src/sys/arch/i386/include: gdt.h src/sys/arch/x86/include: pmap.h Log Message: Bump MAX_USERLDT_SIZE to the max size (wastes some memory). wine needs more than PAGE_SIZE and fails spuriously. XXX: Note the duplicate definition hacks. Should really create <x86/gdt.h>, put the just the constants there and unify them. This would also avoid the hack in: src/tests/lib/libi386/t_user_ldt.c#46 To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/include/gdt.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/i386/include/gdt.h cvs rdiff -u -r1.125 -r1.126 src/sys/arch/x86/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/amd64/include/gdt.h diff -u src/sys/arch/amd64/include/gdt.h:1.12 src/sys/arch/amd64/include/gdt.h:1.13 --- src/sys/arch/amd64/include/gdt.h:1.12 Sat Apr 25 11:26:16 2020 +++ src/sys/arch/amd64/include/gdt.h Thu Apr 29 21:09:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gdt.h,v 1.12 2020/04/25 15:26:16 bouyer Exp $ */ +/* $NetBSD: gdt.h,v 1.13 2021/04/30 01:09:29 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -45,6 +45,6 @@ int ldt_alloc(void *, size_t); void ldt_free(int); #endif -#define MAXGDTSIZ 65536 -#define MAX_USERLDT_SIZE PAGE_SIZE +#define MAXGDTSIZ 65536 /* XXX: see <x86/pmap.h> */ +#define MAX_USERLDT_SIZE 65536 /* XXX: see <x86/pmap.h> */ #define MAX_USERLDT_SLOTS (int)(MAX_USERLDT_SIZE / sizeof(union descriptor)) Index: src/sys/arch/i386/include/gdt.h diff -u src/sys/arch/i386/include/gdt.h:1.18 src/sys/arch/i386/include/gdt.h:1.19 --- src/sys/arch/i386/include/gdt.h:1.18 Sat Apr 25 11:26:17 2020 +++ src/sys/arch/i386/include/gdt.h Thu Apr 29 21:09:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gdt.h,v 1.18 2020/04/25 15:26:17 bouyer Exp $ */ +/* $NetBSD: gdt.h,v 1.19 2021/04/30 01:09:29 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -44,6 +44,6 @@ void ldt_free(int); #endif /* LOCORE */ -#define MAXGDTSIZ 65536 -#define MAX_USERLDT_SIZE PAGE_SIZE +#define MAXGDTSIZ 65536 /* XXX: see <x86/pmap.h> */ +#define MAX_USERLDT_SIZE 65536 /* XXX: see <x86/pmap.h> */ #define MAX_USERLDT_SLOTS (int)(MAX_USERLDT_SIZE / sizeof(union descriptor)) Index: src/sys/arch/x86/include/pmap.h diff -u src/sys/arch/x86/include/pmap.h:1.125 src/sys/arch/x86/include/pmap.h:1.126 --- src/sys/arch/x86/include/pmap.h:1.125 Sun Jul 19 03:35:08 2020 +++ src/sys/arch/x86/include/pmap.h Thu Apr 29 21:09:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.125 2020/07/19 07:35:08 maxv Exp $ */ +/* $NetBSD: pmap.h,v 1.126 2021/04/30 01:09:29 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -188,11 +188,11 @@ struct slotspace { extern struct slotspace slotspace; #ifndef MAXGDTSIZ -#define MAXGDTSIZ 65536 /* XXX */ +#define MAXGDTSIZ 65536 /* XXX: dup in <machine/gdt.h> */ #endif #ifndef MAX_USERLDT_SIZE -#define MAX_USERLDT_SIZE PAGE_SIZE /* XXX */ +#define MAX_USERLDT_SIZE 65536 /* XXX: dup in <machine/gdt.h> */ #endif struct pcpu_entry {