Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sync with head.

  • Loading branch information...
commit c09bc1fd81c87dcf70626cb378b0d18a98833659 1 parent c05b43f
yamt authored
Showing with 1,848 additions and 648 deletions.
  1. +3 −2 sys/arch/algor/conf/P5064
  2. +3 −2 sys/arch/algor/conf/P6032
  3. +3 −2 sys/arch/alpha/conf/ALPHA
  4. +3 −2 sys/arch/alpha/conf/BASIL
  5. +3 −2 sys/arch/alpha/conf/FRAU-FARBISSINA
  6. +2 −1  sys/arch/alpha/conf/GENERIC
  7. +10 −2 sys/arch/amd64/amd64/netbsd32_machdep.c
  8. +9 −6 sys/arch/amd64/conf/GENERIC
  9. +3 −2 sys/arch/amd64/conf/INSTALL
  10. +3 −2 sys/arch/amd64/conf/INSTALL_ACPI
  11. +2 −1  sys/arch/amd64/conf/SIMICS
  12. +19 −1 sys/arch/amd64/include/vmparam.h
  13. +3 −2 sys/arch/bebox/conf/GENERIC
  14. +2 −1  sys/arch/cats/conf/GENERIC
  15. +2 −1  sys/arch/cats/conf/INSTALL
  16. +4 −2 sys/arch/cobalt/conf/GENERIC
  17. +4 −2 sys/arch/cobalt/conf/INSTALL
  18. +17 −4 sys/arch/cobalt/dev/gt.c
  19. +8 −1 sys/arch/cobalt/include/pci_machdep.h
  20. +29 −2 sys/arch/cobalt/pci/pci_machdep.c
  21. +3 −2 sys/arch/i386/conf/DELPHI
  22. +2 −1  sys/arch/i386/conf/DISKLESS
  23. +5 −2 sys/arch/i386/conf/GENERIC
  24. +5 −2 sys/arch/i386/conf/GENERIC.MPACPI
  25. +5 −2 sys/arch/i386/conf/GENERIC_LAPTOP
  26. +2 −1  sys/arch/i386/conf/GENERIC_TINY
  27. +2 −1  sys/arch/i386/conf/INSTALL
  28. +2 −1  sys/arch/i386/conf/INSTALL_LAPTOP
  29. +2 −1  sys/arch/i386/conf/INSTALL_SMALL
  30. +2 −1  sys/arch/i386/conf/INSTALL_TINY
  31. +3 −2 sys/arch/i386/conf/IOPENER
  32. +2 −1  sys/arch/i386/conf/LAMB
  33. +3 −2 sys/arch/i386/conf/SWINGER
  34. +3 −2 sys/arch/i386/conf/VIRTUALPC
  35. +2 −1  sys/arch/ibmnws/conf/GENERIC
  36. +3 −3 sys/arch/mips/include/cache.h
  37. +5 −3 sys/arch/mips/include/pmap.h
  38. +24 −4 sys/arch/mips/mips/cache.c
  39. +15 −2 sys/arch/mips/mips/mem.c
  40. +86 −18 sys/arch/mips/mips/pmap.c
  41. +2 −14 sys/arch/mips/mips/vm_machdep.c
  42. +3 −2 sys/arch/prep/conf/GENERIC
  43. +2 −1  sys/arch/prep/conf/INSTALL
  44. +2 −1  sys/arch/prep/conf/NATSUMI
  45. +2 −4 sys/arch/sgimips/sgimips/machdep.c
  46. +21 −1 sys/arch/sparc64/include/vmparam.h
  47. +10 −2 sys/arch/sparc64/sparc64/netbsd32_machdep.c
  48. +10 −2 sys/arch/sparc64/sparc64/svr4_32_machdep.c
  49. +11 −2 sys/arch/xen/i386/gdt.c
  50. +2 −8 sys/arch/xen/i386/npx.c
  51. +5 −2 sys/compat/aoutm68k/aoutm68k_exec.c
  52. +5 −2 sys/compat/darwin/darwin_exec.c
  53. +6 −2 sys/compat/freebsd/freebsd_exec.c
  54. +6 −2 sys/compat/hpux/hpux_exec.c
  55. +6 −2 sys/compat/ibcs2/ibcs2_exec.c
  56. +4 −2 sys/compat/irix/irix_exec.c
  57. +6 −2 sys/compat/linux/common/linux_exec.c
  58. +4 −2 sys/compat/mach/mach_exec.c
  59. +4 −1 sys/compat/netbsd32/netbsd32.h
  60. +41 −2 sys/compat/netbsd32/netbsd32_netbsd.c
  61. +6 −2 sys/compat/osf1/osf1_exec.c
  62. +6 −2 sys/compat/pecoff/pecoff_emul.c
  63. +6 −2 sys/compat/sunos/sunos_exec.c
  64. +5 −2 sys/compat/sunos32/sunos32_exec.c
  65. +6 −2 sys/compat/svr4/svr4_exec.c
  66. +6 −2 sys/compat/svr4_32/svr4_32_exec.c
  67. +2 −1  sys/compat/svr4_32/svr4_32_exec.h
  68. +21 −2 sys/compat/svr4_32/svr4_32_resource.c
  69. +6 −2 sys/compat/ultrix/ultrix_misc.c
  70. +4 −1 sys/conf/files
  71. +2 −1  sys/dev/DEVNAMES
  72. +154 −0 sys/dev/acpi/attimer_acpi.c
  73. +9 −1 sys/dev/acpi/files.acpi
  74. +159 −0 sys/dev/acpi/pcppi_acpi.c
  75. +6 −2 sys/dev/cgd_crypto.c
  76. +107 −0 sys/dev/ic/attimer.c
  77. +50 −0 sys/dev/ic/attimervar.h
  78. +6 −4 sys/dev/ic/esiop.c
  79. +99 −93 sys/dev/ic/rtl8169.c
  80. +3 −4 sys/dev/ic/rtl81x9reg.h
  81. +28 −11 sys/dev/ic/rtl81x9var.h
  82. +3 −3 sys/dev/ic/tulip.c
  83. +3 −4 sys/dev/ieee1394/fwohci.c
  84. +150 −0 sys/dev/isa/attimer_isa.c
  85. +6 −2 sys/dev/isa/files.isa
  86. +4 −2 sys/dev/isa/midi_pcppi.c
  87. +64 −68 sys/dev/isa/pcppi.c
  88. +22 −1 sys/dev/isa/pcppivar.h
  89. +4 −2 sys/dev/isa/spkr.c
  90. +4 −2 sys/dev/mii/rgephy.c
  91. +3 −3 sys/dev/pci/aac_pci.c
  92. +2 −2 sys/dev/pci/esavar.h
  93. +6 −2 sys/dev/pci/if_wm.c
  94. +19 −10 sys/dev/pci/pccbb.c
  95. +15 −10 sys/dev/pci/pciconf.c
  96. +4 −2 sys/dev/pci/pciconf.h
  97. +6 −1 sys/dev/pci/pcidevs
  98. +7 −2 sys/dev/pci/pcidevs.h
  99. +23 −3 sys/dev/pci/pcidevs_data.h
  100. +3 −3 sys/dev/pcmcia/esl.c
  101. +3 −3 sys/dev/pcmcia/esl_pcmcia.c
  102. +2 −2 sys/dev/pcmcia/eslvar.h
  103. +8 −2 sys/dev/pcmcia/if_wi_pcmcia.c
  104. +3 −3 sys/dev/pcmcia/opl_esl.c
  105. +6 −1 sys/dev/pcmcia/pcmciadevs
  106. +9 −2 sys/dev/pcmcia/pcmciadevs.h
  107. +24 −2 sys/dev/pcmcia/pcmciadevs_data.h
  108. +4 −3 sys/kern/exec_elf32.c
  109. +6 −3 sys/kern/kern_exec.c
  110. +32 −56 sys/kern/kern_resource.c
  111. +4 −3 sys/kern/sysv_shm.c
  112. +61 −15 sys/kern/vfs_lockf.c
  113. +11 −2 sys/net/if.h
  114. +3 −3 sys/net/if_tap.c
  115. +2 −1  sys/sys/lockf.h
  116. +2 −2 sys/sys/param.h
  117. +3 −1 sys/sys/proc.h
  118. +3 −1 sys/sys/resourcevar.h
  119. +12 −2 sys/ufs/ext2fs/ext2fs_bmap.c
  120. +5 −30 sys/ufs/lfs/lfs_alloc.c
  121. +124 −93 sys/ufs/lfs/lfs_vnops.c
  122. +6 −6 sys/ufs/ufs/ufs_vnops.c
  123. +2 −1  sys/uvm/uvm_extern.h
  124. +14 −7 sys/uvm/uvm_mmap.c
View
5 sys/arch/algor/conf/P5064
@@ -1,4 +1,4 @@
-# $NetBSD: P5064,v 1.31.6.2 2005/03/19 08:32:44 yamt Exp $
+# $NetBSD: P5064,v 1.31.6.3 2005/03/26 18:19:16 yamt Exp $
#
# Algorithmics P-5064 kernel.
#
@@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "P5064-$Revision: 1.31.6.2 $"
+#ident "P5064-$Revision: 1.31.6.3 $"
maxusers 32
@@ -208,6 +208,7 @@ mcclock* at isa? port 0x70
#pckbc* at isa? # PC keyboard controller
#pckbd* at pckbc? # PC keyboard (kbd port)
#pms* at pckbc? # PS/2-style mouse (aux port)
+#attimer* at isa? # AT Timer
#pcppi* at isa? # PC prog. periph. interface
#spkr0 at pcppi? # IBM BASIC emulation
#isabeep0 at pcppi? # "keyboard" beep
View
5 sys/arch/algor/conf/P6032
@@ -1,4 +1,4 @@
-# $NetBSD: P6032,v 1.25.6.2 2005/03/19 08:32:44 yamt Exp $
+# $NetBSD: P6032,v 1.25.6.3 2005/03/26 18:19:16 yamt Exp $
#
# Algorithmics P-6032 kernel.
#
@@ -7,7 +7,7 @@ include "arch/algor/conf/std.algor"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "P6032-$Revision: 1.25.6.2 $"
+#ident "P6032-$Revision: 1.25.6.3 $"
maxusers 32
@@ -213,6 +213,7 @@ mcclock* at isa? port 0x70
#pckbc* at isa? # PC keyboard controller
#pckbd* at pckbc? # PC keyboard (kbd port)
#pms* at pckbc? # PS/2-style mouse (aux port)
+#attimer* at isa? # AT Timer
#pcppi* at isa? # PC prog. periph. interface
#spkr0 at pcppi? # IBM BASIC emulation
#isabeep0 at pcppi? # "keyboard" beep
View
5 sys/arch/alpha/conf/ALPHA
@@ -1,4 +1,4 @@
-# $NetBSD: ALPHA,v 1.198.2.2 2005/03/19 08:32:44 yamt Exp $
+# $NetBSD: ALPHA,v 1.198.2.3 2005/03/26 18:19:16 yamt Exp $
#
# Alpha kernel with all the options you'd want, and more.
@@ -6,7 +6,7 @@ include "arch/alpha/conf/std.alpha"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "ALPHA-$Revision: 1.198.2.2 $"
+ident "ALPHA-$Revision: 1.198.2.3 $"
maxusers 32
@@ -384,6 +384,7 @@ mcclock* at isa? port 0x70
pckbc* at isa? # PC keyboard controller
pckbd* at pckbc? # PC keyboard (kbd port)
pms* at pckbc? # PS/2-style mouse (aux port)
+attimer* at isa? # AT Timer
pcppi* at isa? # PC prog. periph. interface
spkr0 at pcppi? # IBM BASIC emulation
isabeep0 at pcppi? # "keyboard" beep
View
5 sys/arch/alpha/conf/BASIL
@@ -1,4 +1,4 @@
-# $NetBSD: BASIL,v 1.28.6.2 2005/03/19 08:32:44 yamt Exp $
+# $NetBSD: BASIL,v 1.28.6.3 2005/03/26 18:19:16 yamt Exp $
#
# basil.shagadelic.org -- thorpej's API UP1000
@@ -6,7 +6,7 @@ include "arch/alpha/conf/std.alpha"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "BASIL-$Revision: 1.28.6.2 $"
+#ident "BASIL-$Revision: 1.28.6.3 $"
maxusers 64
@@ -294,6 +294,7 @@ mcclock* at isa? port 0x70
pckbc* at isa? # PC keyboard controller
pckbd* at pckbc? # PC keyboard (kbd port)
pms* at pckbc? # PS/2-style mouse (aux port)
+attimer* at isa? # AT Timer
pcppi* at isa? # PC prog. periph. interface
spkr0 at pcppi? # IBM BASIC emulation
isabeep0 at pcppi? # "keyboard" beep
View
5 sys/arch/alpha/conf/FRAU-FARBISSINA
@@ -1,4 +1,4 @@
-# $NetBSD: FRAU-FARBISSINA,v 1.33.6.2 2005/03/19 08:32:44 yamt Exp $
+# $NetBSD: FRAU-FARBISSINA,v 1.33.6.3 2005/03/26 18:19:16 yamt Exp $
#
# frau-farbissina.shagadelic.org -- thorpej's AlphaServer 1200 MP hacking
# box
@@ -7,7 +7,7 @@ include "arch/alpha/conf/std.alpha"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "FRAU-FARBISSINA-$Revision: 1.33.6.2 $"
+#ident "FRAU-FARBISSINA-$Revision: 1.33.6.3 $"
maxusers 64
@@ -266,6 +266,7 @@ mcclock* at isa? port 0x70
pckbc* at isa? # PC keyboard controller
pckbd* at pckbc? # PC keyboard (kbd port)
pms* at pckbc? # PS/2-style mouse (aux port)
+attimer* at isa? # AT Timer
pcppi* at isa? # PC prog. periph. interface
spkr0 at pcppi? # IBM BASIC emulation
isabeep0 at pcppi? # "keyboard" beep
View
3  sys/arch/alpha/conf/GENERIC
@@ -22,7 +22,7 @@ include "arch/alpha/conf/std.alpha"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.257.6.2 $"
+#ident "GENERIC-$Revision: 1.257.6.3 $"
maxusers 32
@@ -393,6 +393,7 @@ mcclock* at isa? port 0x70
pckbc* at isa? # PC keyboard controller
pckbd* at pckbc? # PC keyboard (kbd port)
pms* at pckbc? # PS/2-style mouse (aux port)
+attimer* at isa? # AT Timer
pcppi* at isa? # PC prog. periph. interface
spkr0 at pcppi? # IBM BASIC emulation
isabeep0 at pcppi? # "keyboard" beep
View
12 sys/arch/amd64/amd64/netbsd32_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_machdep.c,v 1.11 2004/09/17 14:11:21 skrll Exp $ */
+/* $NetBSD: netbsd32_machdep.c,v 1.11.6.1 2005/03/26 18:19:16 yamt Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.11 2004/09/17 14:11:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.11.6.1 2005/03/26 18:19:16 yamt Exp $");
#include "opt_compat_netbsd.h"
#include "opt_execfmt.h"
@@ -124,6 +124,8 @@ netbsd32_setregs(struct lwp *l, struct exec_package *pack, u_long stack)
pmap_ldt_cleanup(p);
#endif
+ netbsd32_adjust_limits(p);
+
l->l_md.md_flags &= ~MDP_USEDFPU;
pcb->pcb_flags = 0;
pcb->pcb_savefpu.fp_fxsave.fx_fcw = __NetBSD_NPXCW__;
@@ -870,3 +872,9 @@ check_mcontext32(const mcontext32_t *mcp, struct trapframe *tf)
return EINVAL;
return 0;
}
+
+vaddr_t
+netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t size)
+{
+ return round_page((vaddr_t)(base) + (vsize_t)MAXDSIZ32);
+}
View
15 sys/arch/amd64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.36.2.2 2005/03/19 08:32:45 yamt Exp $
+# $NetBSD: GENERIC,v 1.36.2.3 2005/03/26 18:19:16 yamt Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.36.2.2 $"
+#ident "GENERIC-$Revision: 1.36.2.3 $"
maxusers 32 # estimated number of users
@@ -246,6 +246,8 @@ mainbus0 at root
#lpt* at acpi? # Parallel port
#mpu* at acpi? # Roland MPU-401 MIDI UART
#pckbc* at acpi? # PC keyboard controller
+#attimer* at acpi? # AT Timer
+#pcppi* at acpi? # AT-style speaker sound
#wss* at acpi? # NeoMagic 256AV in wss mode
options MPBIOS
@@ -310,6 +312,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
@@ -491,8 +494,8 @@ fd* at fdc? drive ? # the drives themselves
# PCI network interfaces
an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11)
+bce* at pci? dev ? function ? # Broadcom 440x 10/100 Ethernet
bge* at pci? dev ? function ? # Broadcom 570x gigabit Ethernet
-bce* at pci? dev ? function ? # Broadcom 440x 10/100 Etherner
en* at pci? dev ? function ? # ENI/Adaptec ATM
ep* at pci? dev ? function ? # 3Com 3c59x
epic* at pci? dev ? function ? # SMC EPIC/100 Ethernet
@@ -510,10 +513,10 @@ ntwoc* at pci? dev ? function ? # Riscom/N2 PCI Sync Serial
pcn* at pci? dev ? function ? # AMD PCnet-PCI Ethernet
re* at pci? dev ? function ? # Realtek 8139C+/8169/8169S/8110S
rtk* at pci? dev ? function ? # Realtek 8129/8139
-skc* at pci? dev ? function ? # SysKonnect SK9821 Gigabit Ethernet
-sk* at skc? # SysKonnect SK9821 Gigabit Ethernet
sf* at pci? dev ? function ? # Adaptec AIC-6915 Ethernet
sip* at pci? dev ? function ? # SiS 900/DP83815 Ethernet
+skc* at pci? dev ? function ? # SysKonnect SK9821 Gigabit Ethernet
+sk* at skc? # SysKonnect SK9821 Gigabit Ethernet
ste* at pci? dev ? function ? # Sundance ST-201 Ethernet
stge* at pci? dev ? function ? # Sundance/Tamarack TC9021 Gigabit
ti* at pci? dev ? function ? # Alteon ACEnic gigabit Ethernet
@@ -559,8 +562,8 @@ exphy* at mii? phy ? # 3Com internal PHYs
glxtphy* at mii? phy ? # Level One LXT-1000 PHYs
gphyter* at mii? phy ? # NS83861 Gig-E PHY
icsphy* at mii? phy ? # Integrated Circuit Systems ICS189x
-inphy* at mii? phy ? # Intel 82555 PHYs
igphy* at mii? phy ? # Intel IGP01E1000
+inphy* at mii? phy ? # Intel 82555 PHYs
iophy* at mii? phy ? # Intel 82553 PHYs
lxtphy* at mii? phy ? # Level One LXT-970 PHYs
makphy* at mii? phy ? # Marvell Semiconductor 88E1000 PHYs
View
5 sys/arch/amd64/conf/INSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.23.2.2 2005/03/19 08:32:45 yamt Exp $
+# $NetBSD: INSTALL,v 1.23.2.3 2005/03/26 18:19:16 yamt Exp $
#
# GENERIC machine description file
#
@@ -20,7 +20,7 @@
include "arch/amd64/conf/std.amd64"
-#ident "INSTALL-$Revision: 1.23.2.2 $"
+#ident "INSTALL-$Revision: 1.23.2.3 $"
maxusers 32 # estimated number of users
@@ -226,6 +226,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
5 sys/arch/amd64/conf/INSTALL_ACPI
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL_ACPI,v 1.15.2.2 2005/03/19 08:32:45 yamt Exp $
+# $NetBSD: INSTALL_ACPI,v 1.15.2.3 2005/03/26 18:19:16 yamt Exp $
#
# GENERIC machine description file
#
@@ -20,7 +20,7 @@
include "arch/amd64/conf/std.amd64"
-#ident "INSTALL-$Revision: 1.15.2.2 $"
+#ident "INSTALL-$Revision: 1.15.2.3 $"
maxusers 32 # estimated number of users
@@ -227,6 +227,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/amd64/conf/SIMICS
@@ -1,4 +1,4 @@
-# $NetBSD: SIMICS,v 1.11.6.2 2005/03/19 08:32:45 yamt Exp $
+# $NetBSD: SIMICS,v 1.11.6.3 2005/03/26 18:19:16 yamt Exp $
#
# INSTALL_TINY - Tiny Installation kernel, suitable for 4M machines.
#
@@ -219,6 +219,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
+#attimer0 at isa?
#pcppi0 at isa?
#sysbeep0 at pcppi?
View
20 sys/arch/amd64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.5.6.1 2005/02/12 18:17:30 yamt Exp $ */
+/* $NetBSD: vmparam.h,v 1.5.6.2 2005/03/26 18:19:16 yamt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -81,6 +81,24 @@
#endif
/*
+ * 32bit memory related constants.
+ */
+
+#define MAXTSIZ32 (64*1024*1024)
+#ifndef DFLDSIZ32
+#define DFLDSIZ32 (256*1024*1024) /* initial data size limit */
+#endif
+#ifndef MAXDSIZ32
+#define MAXDSIZ32 (2L*1024*1024*1024) /* max data size */
+#endif
+#ifndef DFLSSIZ32
+#define DFLSSIZ32 (2*1024*1024) /* initial stack size limit */
+#endif
+#ifndef MAXSSIZ32
+#define MAXSSIZ32 (32*1024*1024) /* max stack size */
+#endif
+
+/*
* Size of shared memory map
*/
#ifndef SHMMAXPGS
View
5 sys/arch/bebox/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.75.6.2 2005/03/19 08:32:52 yamt Exp $
+# $NetBSD: GENERIC,v 1.75.6.3 2005/03/26 18:19:16 yamt Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@ include "arch/bebox/conf/std.bebox"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.75.6.2 $"
+#ident "GENERIC-$Revision: 1.75.6.3 $"
maxusers 32
@@ -221,6 +221,7 @@ ne0 at isa? port 0x300 irq 5 # NE[12]000 ethernet cards
#wss0 at isa? port 0x530 irq 10 drq 0 # Windows Sound System
+#attimer0 at isa?
#pcppi0 at isa?
#spkr0 at pcppi?
View
3  sys/arch/cats/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.72.2.2 2005/03/19 08:32:52 yamt Exp $
+# $NetBSD: GENERIC,v 1.72.2.3 2005/03/26 18:19:16 yamt Exp $
#
# GENERIC machine description file
#
@@ -475,6 +475,7 @@ pms* at pckbc? # PS/2 mouse for wsmouse
wskbd* at pckbd? console ?
wsmouse* at pms?
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/cats/conf/INSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.42.6.2 2005/03/19 08:32:52 yamt Exp $
+# $NetBSD: INSTALL,v 1.42.6.3 2005/03/26 18:19:16 yamt Exp $
#
# CATSINST -- CHALTECH CATS Install kernel
#
@@ -374,6 +374,7 @@ pms* at pckbc? # PS/2 mouse for wsmouse
wskbd* at pckbd? console ?
wsmouse* at pms?
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
6 sys/arch/cobalt/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.65.2.2 2005/03/19 08:32:52 yamt Exp $
+# $NetBSD: GENERIC,v 1.65.2.3 2005/03/26 18:19:16 yamt Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@ include "arch/cobalt/conf/std.cobalt"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.65.2.2 $"
+#ident "GENERIC-$Revision: 1.65.2.3 $"
maxusers 32
@@ -161,6 +161,8 @@ pci* at gt0
pchb* at pci? dev ? function ?
pcib* at pci? dev ? function ?
+options PCI_NETBSD_CONFIGURE
+
# Cryptographic Devices
# PCI cryptographic devices
View
6 sys/arch/cobalt/conf/INSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.1.4.2 2005/03/19 08:32:52 yamt Exp $
+# $NetBSD: INSTALL,v 1.1.4.3 2005/03/26 18:19:16 yamt Exp $
#
# INSTALL -- installation and rescue kernel.
#
@@ -10,7 +10,7 @@ include "arch/cobalt/conf/std.cobalt"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.1.4.2 $"
+#ident "GENERIC-$Revision: 1.1.4.3 $"
makeoptions COPTS="-Os"
@@ -150,6 +150,8 @@ pci* at gt0
pchb* at pci? dev ? function ?
pcib* at pci? dev ? function ?
+options PCI_NETBSD_CONFIGURE
+
# Cryptographic Devices
# PCI cryptographic devices
View
21 sys/arch/cobalt/dev/gt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gt.c,v 1.12 2004/08/30 15:05:16 drochner Exp $ */
+/* $NetBSD: gt.c,v 1.12.6.1 2005/03/26 18:19:16 yamt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@@ -26,7 +26,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.12 2004/08/30 15:05:16 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.12.6.1 2005/03/26 18:19:16 yamt Exp $");
+
+#include "opt_pci.h"
+#include "pci.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -42,18 +45,21 @@ __KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.12 2004/08/30 15:05:16 drochner Exp $");
#include <sys/syslog.h>
#include <sys/types.h>
#include <sys/device.h>
+#include <sys/malloc.h>
+#include <sys/extent.h>
#include <machine/autoconf.h>
#include <machine/bus.h>
#include <machine/intr.h>
#include <dev/pci/pcivar.h>
+#ifdef PCI_NETBSD_CONFIGURE
+#include <dev/pci/pciconf.h>
+#endif
#include <cobalt/cobalt/clockvar.h>
#include <cobalt/dev/gtreg.h>
-#include "pci.h"
-
struct gt_softc {
struct device sc_dev;
@@ -117,6 +123,13 @@ gt_attach(parent, self, aux)
pc->pc_bst = sc->sc_bst;
pc->pc_bsh = sc->sc_bsh;
+#ifdef PCI_NETBSD_CONFIGURE
+ pc->pc_ioext = extent_create("pciio", 0x10100000, 0x11ffffff,
+ M_DEVBUF, NULL, 0, EX_NOWAIT);
+ pc->pc_memext = extent_create("pcimem", 0x12000000, 0x13ffffff,
+ M_DEVBUF, NULL, 0, EX_NOWAIT);
+ pci_configure_bus(pc, pc->pc_ioext, pc->pc_memext, NULL, 0, 0);
+#endif
pba.pba_dmat = &pci_bus_dma_tag;
pba.pba_dmat64 = NULL;
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
View
9 sys/arch/cobalt/include/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.7 2004/08/28 13:33:31 tsutsui Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.7.6.1 2005/03/26 18:19:16 yamt Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -34,6 +34,7 @@
* Machine-specific definitions for PCI autoconfiguration.
*/
#define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
+#define __HAVE_PCI_CONF_HOOK
/*
* Forward declarations.
@@ -57,6 +58,9 @@ typedef int pci_intr_handle_t;
struct cobalt_pci_chipset {
bus_space_tag_t pc_bst; /* bus space tag for PCICFG regs */
bus_space_handle_t pc_bsh; /* bus space handle for PCICFG regs */
+
+ struct extent *pc_memext; /* PCI memory extent */
+ struct extent *pc_ioext; /* PCI I/O extent */
};
/*
@@ -77,3 +81,6 @@ const struct evcnt *pci_intr_evcnt(pci_chipset_tag_t, pci_intr_handle_t);
void *pci_intr_establish(pci_chipset_tag_t, pci_intr_handle_t,
int, int (*)(void *), void *);
void pci_intr_disestablish(pci_chipset_tag_t, void *);
+void pci_conf_interrupt(pci_chipset_tag_t, int, int, int, int,
+ int *);
+int pci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t);
View
31 sys/arch/cobalt/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.16 2004/08/28 13:33:31 tsutsui Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.16.6.1 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.16 2004/08/28 13:33:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.16.6.1 2005/03/26 18:19:17 yamt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -34,6 +34,7 @@ __KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.16 2004/08/28 13:33:31 tsutsui Exp
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/device.h>
+#include <sys/extent.h>
#define _COBALT_BUS_DMA_PRIVATE
#include <machine/bus.h>
@@ -42,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.16 2004/08/28 13:33:31 tsutsui Exp
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
+#include <dev/pci/pciconf.h>
#include <cobalt/dev/gtreg.h>
@@ -224,3 +226,28 @@ pci_intr_disestablish(pc, cookie)
cpu_intr_disestablish(cookie);
icu_intr_disestablish(cookie);
}
+
+void
+pci_conf_interrupt(pci_chipset_tag_t pc, int bus, int dev, int pin, int swiz,
+ int *iline)
+{
+
+ /* not yet... */
+}
+
+int
+pci_conf_hook(pci_chipset_tag_t pc, int bus, int dev, int func, pcireg_t id)
+{
+
+ /* Don't configure the bridge and PCI probe. */
+ if (PCI_VENDOR(id) == PCI_VENDOR_GALILEO &&
+ PCI_PRODUCT(id) == PCI_PRODUCT_GALILEO_GT64011)
+ return 0;
+
+ /* Don't configure device 9 */
+ if (dev == 9)
+ return 0;
+
+ return PCI_CONF_ALL & ~(PCI_CONF_MAP_ROM |
+ PCI_COMMAND_SERR_ENABLE | PCI_COMMAND_PARITY_ENABLE);
+}
View
5 sys/arch/i386/conf/DELPHI
@@ -1,4 +1,4 @@
-# $NetBSD: DELPHI,v 1.46.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: DELPHI,v 1.46.6.3 2005/03/26 18:19:17 yamt Exp $
#
# DELPHI -- one of thorpej@zembu.com's devel machines
#
@@ -7,7 +7,7 @@ include "arch/i386/conf/std.i386"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "DELPHI-$Revision: 1.46.6.2 $"
+ident "DELPHI-$Revision: 1.46.6.3 $"
maxusers 64 # estimated number of users
@@ -295,6 +295,7 @@ wsdisplay* at pcdisplay? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/DISKLESS
@@ -1,4 +1,4 @@
-# $NetBSD: DISKLESS,v 1.100.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: DISKLESS,v 1.100.6.3 2005/03/26 18:19:17 yamt Exp $
#
# DISKLESS -- Generic machine setup for diskless boot.
# This kernel can be loaded from a bootable floppy (i.e. kernel-copy)
@@ -134,6 +134,7 @@ npx0 at isa? port 0xf0 irq 13 # math coprocessor
pc0 at isa? port 0x60 irq 1 # generic PC console device
+#attimer0 at isa?
#pcppi0 at isa?
#sysbeep0 at pcppi?
View
7 sys/arch/i386/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.652.2.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: GENERIC,v 1.652.2.3 2005/03/26 18:19:17 yamt Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.652.2.2 $"
+#ident "GENERIC-$Revision: 1.652.2.3 $"
maxusers 32 # estimated number of users
@@ -329,6 +329,8 @@ cpu* at mainbus?
#mpu* at acpi? # Roland MPU-401 MIDI UART
#npx* at acpi? # Math coprocessor
#pckbc* at acpi? # PC keyboard controller
+#attimer* at acpi? # AT Timer
+#pcppi* at acpi? # AT-style speaker sound
#wss* at acpi? # NeoMagic 256AV in wss mode
# Sony Vaio jog dial
@@ -478,6 +480,7 @@ wsdisplay* at pcdisplay? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
7 sys/arch/i386/conf/GENERIC.MPACPI
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.MPACPI,v 1.17.2.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: GENERIC.MPACPI,v 1.17.2.3 2005/03/26 18:19:17 yamt Exp $
#
# GENERIC.MPACPI -- Generic, plus ACPI Multiprocessor support
#
@@ -8,7 +8,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.17.2.2 $"
+#ident "GENERIC-$Revision: 1.17.2.3 $"
maxusers 32 # estimated number of users
@@ -301,6 +301,7 @@ acpilid* at acpi? # ACPI Lid Switch
acpitz* at acpi? # ACPI Thermal Zone
# Mainboard devices
+attimer* at acpi? # AT Timer
com* at acpi? # Serial communications interface
fdc* at acpi? # Floppy disk controller
joy* at acpi? # Joystick/Game port
@@ -308,6 +309,7 @@ lpt* at acpi? # Parallel port
mpu* at acpi? # Roland MPU-401 MIDI UART
npx* at acpi? # Math coprocessor
pckbc* at acpi? # PC keyboard controller
+pcppi* at acpi? # AT-style speaker sound
wss* at acpi? # NeoMagic 256AV in wss mode
# Sony Vaio jog dial
@@ -454,6 +456,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
7 sys/arch/i386/conf/GENERIC_LAPTOP
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC_LAPTOP,v 1.129.2.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: GENERIC_LAPTOP,v 1.129.2.3 2005/03/26 18:19:17 yamt Exp $
# From: NetBSD: GENERIC,v 1.414 2001/07/30 19:59:05 ad Exp
#
# GENERIC_LAPTOP -- GENERIC with cardbus and some USB devices enabled
@@ -8,7 +8,7 @@ include "arch/i386/conf/std.i386"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.129.2.2 $"
+#ident "GENERIC-$Revision: 1.129.2.3 $"
maxusers 32 # estimated number of users
@@ -264,6 +264,7 @@ apm0 at mainbus0 # Advanced power management
#acpitz* at acpi? # ACPI Thermal Zone
# Mainboard devices
+#attimer* at acpi? # AT Timer
#com* at acpi? # Serial communications interface
#fdc* at acpi? # Floppy disk controller
#joy* at acpi? # Joystick/Game port
@@ -271,6 +272,7 @@ apm0 at mainbus0 # Advanced power management
#mpu* at acpi? # Roland MPU-401 MIDI UART
#npx* at acpi? # Math coprocessor
#pckbc* at acpi? # PC keyboard controller
+#pcppi* at acpi? # AT-style speaker sound
#wss* at acpi? # NeoMagic 256AV in wss mode
# Sony Vaio jog dial
@@ -395,6 +397,7 @@ wsdisplay* at pcdisplay? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/GENERIC_TINY
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC_TINY,v 1.77.2.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: GENERIC_TINY,v 1.77.2.3 2005/03/26 18:19:17 yamt Exp $
#
# GENERIC_TINY -- suitable default for 4M machines
# No EISA, PCI, or SCSI.
@@ -273,6 +273,7 @@ wskbd* at pckbd? console ?
#wsmouse* at pms? mux 0
+#attimer0 at isa?
#pcppi0 at isa?
#sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/INSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.256.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: INSTALL,v 1.256.6.3 2005/03/26 18:19:17 yamt Exp $
#
# INSTALL - Installation kernel.
#
@@ -277,6 +277,7 @@ wsdisplay* at pcdisplay? console ?
wskbd* at pckbd? console ?
#wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/INSTALL_LAPTOP
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL_LAPTOP,v 1.77.4.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: INSTALL_LAPTOP,v 1.77.4.3 2005/03/26 18:19:17 yamt Exp $
#
# INSTALL - Installation kernel.
#
@@ -284,6 +284,7 @@ wsdisplay* at pcdisplay? console ?
wskbd* at pckbd? console ?
#wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/INSTALL_SMALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL_SMALL,v 1.108.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: INSTALL_SMALL,v 1.108.6.3 2005/03/26 18:19:17 yamt Exp $
#
# INSTALL_SMALL - Small Installation kernel.
#
@@ -220,6 +220,7 @@ pc0 at isa? port 0x60 irq 1 # pccons generic PC console driver
#options GERMAN_KBD
#options NORWEGIAN_KBD
+#attimer0 at isa?
#pcppi0 at isa?
#sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/INSTALL_TINY
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL_TINY,v 1.82.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: INSTALL_TINY,v 1.82.6.3 2005/03/26 18:19:17 yamt Exp $
#
# INSTALL_TINY - Tiny Installation kernel, suitable for 4M machines.
#
@@ -222,6 +222,7 @@ npx0 at isa? port 0xf0 irq 13 # x86 math coprocessor
# ISA console
pc0 at isa? port 0x60 irq 1 # pccons generic PC console driver
+#attimer0 at isa?
#pcppi0 at isa?
#sysbeep0 at pcppi?
View
5 sys/arch/i386/conf/IOPENER
@@ -1,4 +1,4 @@
-# $NetBSD: IOPENER,v 1.54.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: IOPENER,v 1.54.6.3 2005/03/26 18:19:17 yamt Exp $
#
# IOPENER -- GENERIC-like kernel for the Netpliance i-opener
# from: GENERIC,v 1.358 2000/07/05 04:07:25 sommerfeld Exp
@@ -8,7 +8,7 @@ include "arch/i386/conf/std.i386"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "IOPENER-$Revision: 1.54.6.2 $"
+#ident "IOPENER-$Revision: 1.54.6.3 $"
maxusers 32 # estimated number of users
@@ -248,6 +248,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/i386/conf/LAMB
@@ -1,4 +1,4 @@
-# $NetBSD: LAMB,v 1.44.2.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: LAMB,v 1.44.2.3 2005/03/26 18:19:17 yamt Exp $
#
# LAMB - a complete kernel for wildlab LAMB, http://www.wildlab.com/
#
@@ -296,6 +296,7 @@ npx0 at isa? port 0xf0 irq 13 # x86 math coprocessor
#wsmouse* at pms? mux 0
# no buzzer installed
+#attimer0 at isa?
#pcppi0 at isa?
#sysbeep0 at pcppi?
View
5 sys/arch/i386/conf/SWINGER
@@ -1,4 +1,4 @@
-# $NetBSD: SWINGER,v 1.58.6.2 2005/03/19 08:33:01 yamt Exp $
+# $NetBSD: SWINGER,v 1.58.6.3 2005/03/26 18:19:17 yamt Exp $
# from NetBSD: GENERIC,v 1.325 2000/04/14 14:53:32 augustss Exp
#
# SWINGER -- thorpej's Abit BP6+dual Celeron
@@ -8,7 +8,7 @@ include "arch/i386/conf/std.i386"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "SWINGER-$Revision: 1.58.6.2 $"
+#ident "SWINGER-$Revision: 1.58.6.3 $"
maxusers 64 # estimated number of users
@@ -292,6 +292,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
5 sys/arch/i386/conf/VIRTUALPC
@@ -1,4 +1,4 @@
-# $NetBSD: VIRTUALPC,v 1.15.2.2 2005/03/19 08:33:02 yamt Exp $
+# $NetBSD: VIRTUALPC,v 1.15.2.3 2005/03/26 18:19:17 yamt Exp $
#
# VIRTUALPC machine description file --
#
@@ -11,7 +11,7 @@ include "arch/i386/conf/std.i386"
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "VIRTUALPC-$Revision: 1.15.2.2 $"
+#ident "VIRTUALPC-$Revision: 1.15.2.3 $"
maxusers 32 # estimated number of users
@@ -361,6 +361,7 @@ wsdisplay* at pcdisplay? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa?
pcppi0 at isa?
sysbeep0 at pcppi?
View
3  sys/arch/ibmnws/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.9.6.2 2005/03/19 08:33:04 yamt Exp $
+# $NetBSD: GENERIC,v 1.9.6.3 2005/03/26 18:19:17 yamt Exp $
#
#
@@ -137,6 +137,7 @@ isa* at pcib? # ISA on PCI-ISA bridge
# wskbd* at pckbd? console ?
# wsmouse* at pms? mux 0
+# attimer0 at isa?
# pcppi0 at isa? # PC prog. periph. interface
# isabeep0 at pcppi? # "keyboard" beep
View
6 sys/arch/mips/include/cache.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cache.h,v 1.6.12.1 2005/03/19 08:33:05 yamt Exp $ */
+/* $NetBSD: cache.h,v 1.6.12.2 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -185,8 +185,6 @@ extern int mips_sdcache_write_through;
extern int mips_scache_unified;
-extern u_int mips_sdcache_forceinv; /* force pmap to invalidate for r5ksc */
-
/* TERTIARY CACHE VARIABLES */
extern u_int mips_tcache_size; /* always unified */
extern u_int mips_tcache_line_size;
@@ -201,6 +199,8 @@ extern u_int mips_dcache_align_mask;
extern u_int mips_cache_alias_mask;
extern u_int mips_cache_prefer_mask;
+extern int mips_cache_virtual_alias;
+
/*
* XXX XXX XXX THIS SHOULD NOT EXIST XXX XXX XXX
*/
View
8 sys/arch/mips/include/pmap.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.46 2005/01/17 04:54:14 atatat Exp $ */
+/* $NetBSD: pmap.h,v 1.46.2.1 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -180,8 +180,10 @@ void pmap_prefer(vaddr_t, vaddr_t *, int);
/*
* Alternate mapping hooks for pool pages. Avoids thrashing the TLB.
*/
-#define PMAP_MAP_POOLPAGE(pa) MIPS_PHYS_TO_KSEG0((pa))
-#define PMAP_UNMAP_POOLPAGE(va) MIPS_KSEG0_TO_PHYS((va))
+vaddr_t mips_pmap_map_poolpage(paddr_t);
+paddr_t mips_pmap_unmap_poolpage(vaddr_t);
+#define PMAP_MAP_POOLPAGE(pa) mips_pmap_map_poolpage(pa)
+#define PMAP_UNMAP_POOLPAGE(va) mips_pmap_unmap_poolpage(va)
/*
* Other hooks for the pool allocator.
View
28 sys/arch/mips/mips/cache.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cache.c,v 1.25.4.1 2005/03/19 08:33:05 yamt Exp $ */
+/* $NetBSD: cache.c,v 1.25.4.2 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.25.4.1 2005/03/19 08:33:05 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.25.4.2 2005/03/26 18:19:17 yamt Exp $");
#include "opt_cputype.h"
#include "opt_mips_cache.h"
@@ -129,8 +129,6 @@ int mips_sdcache_write_through;
int mips_scache_unified;
-u_int mips_sdcache_forceinv = 0;
-
/* TERTIARY CACHE VARIABLES */
u_int mips_tcache_size; /* always unified */
u_int mips_tcache_line_size;
@@ -154,6 +152,8 @@ u_int mips_dcache_align_mask;
u_int mips_cache_alias_mask; /* for virtually-indexed caches */
u_int mips_cache_prefer_mask;
+int mips_cache_virtual_alias;
+
struct mips_cache_ops mips_cache_ops;
#ifdef MIPS1
@@ -421,6 +421,11 @@ mips_config_cache_prehistoric(void)
mips3_get_cache_config(csizebase);
+ if (mips_picache_size > PAGE_SIZE ||
+ mips_pdcache_size > PAGE_SIZE)
+ /* no VCE support if there is no L2 cache */
+ mips_cache_virtual_alias = 1;
+
switch (mips_picache_line_size) {
case 16:
mips_cache_ops.mco_icache_sync_all =
@@ -494,6 +499,10 @@ mips_config_cache_prehistoric(void)
mips3_get_cache_config(csizebase);
+ if (mips_picache_size > PAGE_SIZE ||
+ mips_pdcache_size > PAGE_SIZE)
+ mips_cache_virtual_alias = 1;
+
switch (mips_picache_line_size) {
case 32:
mips_cache_ops.mco_icache_sync_all =
@@ -590,6 +599,7 @@ mips_config_cache_prehistoric(void)
~(PAGE_SIZE - 1);
mips_cache_prefer_mask =
max(mips_pdcache_size, mips_picache_size) - 1;
+ mips_cache_virtual_alias = 1;
/* cache ops */
mips_cache_ops.mco_icache_sync_all =
r5900_icache_sync_all_64;
@@ -619,6 +629,8 @@ mips_config_cache_prehistoric(void)
mips4_get_cache_config(csizebase);
+ /* VCE is handled by hardware */
+
mips_cache_ops.mco_icache_sync_all =
r10k_icache_sync_all;
mips_cache_ops.mco_icache_sync_range =
@@ -669,14 +681,22 @@ mips_config_cache_prehistoric(void)
switch (MIPS_PRID_IMPL(cpu_id)) {
#if defined(MIPS3) || defined(MIPS4)
case MIPS_R4000:
+#if 0
/*
* R4000/R4400 always detects virtual alias as if
* primary cache size is 32KB. Actual primary cache size
* is ignored wrt VCED/VCEI.
*/
+ /*
+ * XXX
+ * It's still better to avoid virtual alias even with VCE,
+ * isn't it?
+ */
mips_cache_alias_mask =
(MIPS3_MAX_PCACHE_SIZE - 1) & ~(PAGE_SIZE - 1);
mips_cache_prefer_mask = MIPS3_MAX_PCACHE_SIZE - 1;
+#endif
+ mips_cache_virtual_alias = 0;
/* FALLTHROUGH */
case MIPS_R4600:
#ifdef ENABLE_MIPS_R4700
View
17 sys/arch/mips/mips/mem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mem.c,v 1.29 2003/08/07 16:28:33 agc Exp $ */
+/* $NetBSD: mem.c,v 1.29.10.1 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -76,8 +76,11 @@
* Memory special file
*/
+#include "opt_cputype.h"
+#include "opt_mips_cache.h"
+
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29 2003/08/07 16:28:33 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29.10.1 2005/03/26 18:19:17 yamt Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -89,6 +92,8 @@ __KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29 2003/08/07 16:28:33 agc Exp $");
#include <machine/cpu.h>
+#include <mips/cache.h>
+
#include <uvm/uvm_extern.h>
extern paddr_t avail_end;
@@ -142,6 +147,10 @@ mmrw(dev, uio, flags)
return (EFAULT);
v += MIPS_KSEG0_START;
error = uiomove((void *)v, c, uio);
+#if defined(MIPS3_PLUS)
+ if (mips_cache_virtual_alias)
+ mips_dcache_wbinv_range(v, c);
+#endif
continue;
case DEV_KMEM:
@@ -156,6 +165,10 @@ mmrw(dev, uio, flags)
uio->uio_rw == UIO_READ ? B_READ : B_WRITE)))
return (EFAULT);
error = uiomove((void *)v, c, uio);
+#if defined(MIPS3_PLUS)
+ if (mips_cache_virtual_alias)
+ mips_dcache_wbinv_range(v, c);
+#endif
continue;
case DEV_NULL:
View
104 sys/arch/mips/mips/pmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.156.2.1 2005/03/19 08:33:05 yamt Exp $ */
+/* $NetBSD: pmap.c,v 1.156.2.2 2005/03/26 18:19:17 yamt Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.156.2.1 2005/03/19 08:33:05 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.156.2.2 2005/03/26 18:19:17 yamt Exp $");
/*
* Manages physical address maps.
@@ -641,10 +641,10 @@ pmap_destroy(pmap)
* were being accessed by KSEG0 (cached) addresses and
* may cause cache coherency problems when the page
* is reused with KSEG2 (mapped) addresses. This may
- * cause problems on machines without secondary caches.
+ * cause problems on machines without VCED/VCEI.
*/
- if (MIPS_HAS_R4K_MMU)
- mips_dcache_wbinv_range((vaddr_t) pte,
+ if (mips_cache_virtual_alias)
+ mips_dcache_inv_range((vaddr_t)pte,
PAGE_SIZE);
#endif /* MIPS3_PLUS */
uvm_pagefree(PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS(pte)));
@@ -1577,6 +1577,11 @@ void
pmap_zero_page(phys)
paddr_t phys;
{
+ vaddr_t va;
+#if defined(MIPS3_PLUS)
+ pv_entry_t pv;
+#endif
+
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_zero_page(%lx)\n", (u_long)phys);
@@ -1585,8 +1590,18 @@ pmap_zero_page(phys)
if (! (phys < MIPS_MAX_MEM_ADDR))
printf("pmap_zero_page(%lx) nonphys\n", (u_long)phys);
#endif
+ va = MIPS_PHYS_TO_KSEG0(phys);
- mips_pagezero((caddr_t)MIPS_PHYS_TO_KSEG0(phys));
+#if defined(MIPS3_PLUS) /* XXX mmu XXX */
+ if (mips_cache_virtual_alias) {
+ pv = pa_to_pvh(phys);
+ if ((pv->pv_flags & PV_UNCACHED) == 0 &&
+ mips_cache_indexof(pv->pv_va) != mips_cache_indexof(va))
+ mips_dcache_wbinv_range_index(pv->pv_va, PAGE_SIZE);
+ }
+#endif
+
+ mips_pagezero((caddr_t)va);
#if defined(MIPS3_PLUS) /* XXX mmu XXX */
/*
@@ -1598,9 +1613,8 @@ pmap_zero_page(phys)
*
* XXXJRT This is totally disgusting.
*/
- if (MIPS_HAS_R4K_MMU &&
- ( (mips_sdcache_line_size == 0) || (mips_sdcache_forceinv) ) )
- mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(phys), NBPG);
+ if (MIPS_HAS_R4K_MMU) /* XXX VCED on kernel stack is not allowed */
+ mips_dcache_wbinv_range(va, PAGE_SIZE);
#endif /* MIPS3_PLUS */
}
@@ -1636,11 +1650,12 @@ pmap_copy_page(src, dst)
* It would probably be better to map the destination as a
* write-through no allocate to reduce cache thrash.
*/
- if (MIPS_HAS_R4K_MMU &&
- ( (mips_sdcache_line_size == 0) || (mips_sdcache_forceinv)) ) {
+ if (mips_cache_virtual_alias) {
/*XXX FIXME Not very sophisticated */
mips_flushcache_allpvh(src);
-/* mips_flushcache_allpvh(dst); */
+#if 0
+ mips_flushcache_allpvh(dst);
+#endif
}
#endif /* MIPS3_PLUS */
@@ -1659,10 +1674,9 @@ pmap_copy_page(src, dst)
*
* XXXJRT -- This is totally disgusting.
*/
- if (MIPS_HAS_R4K_MMU &&
- ( (mips_sdcache_line_size == 0) || (mips_sdcache_forceinv)) ) {
- mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(src), NBPG);
- mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(dst), NBPG);
+ if (mips_cache_virtual_alias) {
+ mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(src), PAGE_SIZE);
+ mips_dcache_wbinv_range(MIPS_PHYS_TO_KSEG0(dst), PAGE_SIZE);
}
#endif /* MIPS3_PLUS */
}
@@ -1891,7 +1905,7 @@ pmap_enter_pv(pmap, va, pa, npte)
pv->pv_next = NULL;
} else {
#if defined(MIPS3_PLUS) /* XXX mmu XXX */
- if (MIPS_HAS_R4K_MMU && mips_sdcache_line_size == 0) {
+ if (mips_cache_virtual_alias) {
/*
* There is at least one other VA mapping this page.
* Check if they are cache index compatible.
@@ -2103,12 +2117,27 @@ void *
pmap_pv_page_alloc(struct pool *pp, int flags)
{
struct vm_page *pg;
+ paddr_t phys;
+#if defined(MIPS3_PLUS)
+ pv_entry_t pv;
+#endif
+ vaddr_t va;
pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_USERESERVE);
if (pg == NULL) {
return NULL;
}
- return ((void *)MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(pg)));
+ phys = VM_PAGE_TO_PHYS(pg);
+ va = MIPS_PHYS_TO_KSEG0(phys);
+#if defined(MIPS3_PLUS)
+ if (mips_cache_virtual_alias) {
+ pv = pa_to_pvh(phys);
+ if ((pv->pv_flags & PV_UNCACHED) == 0 &&
+ mips_cache_indexof(pv->pv_va) != mips_cache_indexof(va))
+ mips_dcache_wbinv_range_index(pv->pv_va, PAGE_SIZE);
+ }
+#endif
+ return ((void *)va);
}
/*
@@ -2119,6 +2148,11 @@ pmap_pv_page_alloc(struct pool *pp, int flags)
void
pmap_pv_page_free(struct pool *pp, void *v)
{
+
+#ifdef MIPS3_PLUS
+ if (mips_cache_virtual_alias)
+ mips_dcache_inv_range((vaddr_t)v, PAGE_SIZE);
+#endif
uvm_pagefree(PHYS_TO_VM_PAGE(MIPS_KSEG0_TO_PHYS((vaddr_t)v)));
}
@@ -2162,6 +2196,40 @@ pmap_prefer(foff, vap, td)
}
#endif /* MIPS3_PLUS */
+vaddr_t
+mips_pmap_map_poolpage(paddr_t pa)
+{
+ vaddr_t va;
+#if defined(MIPS3_PLUS)
+ pv_entry_t pv;
+#endif
+
+ va = MIPS_PHYS_TO_KSEG0(pa);
+#if defined(MIPS3_PLUS)
+ if (mips_cache_virtual_alias) {
+ pv = pa_to_pvh(pa);
+ if ((pv->pv_flags & PV_UNCACHED) == 0 &&
+ mips_cache_indexof(pv->pv_va) != mips_cache_indexof(va))
+ mips_dcache_wbinv_range_index(pv->pv_va, PAGE_SIZE);
+ }
+#endif
+ return va;
+}
+
+paddr_t
+mips_pmap_unmap_poolpage(vaddr_t va)
+{
+ paddr_t pa;
+
+ pa = MIPS_KSEG0_TO_PHYS(va);
+#if defined(MIPS3_PLUS)
+ if (mips_cache_virtual_alias) {
+ mips_dcache_inv_range(va, PAGE_SIZE);
+ }
+#endif
+ return pa;
+}
+
/******************** page table page management ********************/
/* TO BE DONE */
View
16 sys/arch/mips/mips/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.105.4.2 2005/03/09 23:06:13 yamt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.105.4.3 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -79,7 +79,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.105.4.2 2005/03/09 23:06:13 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.105.4.3 2005/03/26 18:19:17 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -131,18 +131,6 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
pt_entry_t *pte;
int i, x;
-#ifdef MIPS3_PLUS
- /*
- * To eliminate virtual aliases created by pmap_zero_page(),
- * this cache flush operation is necessary.
- * VCED on kernel stack is not allowed.
- * XXXJRT Confirm that this is necessry, and/or fix
- * XXXJRT pmap_zero_page().
- */
- if (CPUISMIPS3 && mips_sdcache_line_size)
- mips_dcache_wbinv_range((vaddr_t) l2->l_addr, USPACE);
-#endif
-
#ifdef DIAGNOSTIC
/*
* If l1 != curlwp && l1 == &lwp0, we're creating a kernel thread.
View
5 sys/arch/prep/conf/GENERIC
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.85.2.2 2005/03/19 08:33:12 yamt Exp $
+# $NetBSD: GENERIC,v 1.85.2.3 2005/03/26 18:19:17 yamt Exp $
#
# GENERIC machine description file
#
@@ -24,7 +24,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary
makeoptions COPTS="-Os -mmultiple" # -Os -mmultiple to reduce size.
-#ident "GENERIC-$Revision: 1.85.2.2 $"
+#ident "GENERIC-$Revision: 1.85.2.3 $"
maxusers 32
@@ -233,6 +233,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa? # AT Timer
pcppi0 at isa? # PC prog. periph. interface
isabeep0 at pcppi? # "keyboard" beep
View
3  sys/arch/prep/conf/INSTALL
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.29.6.2 2005/03/19 08:33:12 yamt Exp $
+# $NetBSD: INSTALL,v 1.29.6.3 2005/03/26 18:19:17 yamt Exp $
#
# INSTALL -- Installation kernel
#
@@ -17,6 +17,7 @@ options MEMORY_DISK_ROOT_SIZE=4096 # 2 Megabytes
maxusers 8
# Platform support
+options PLATFORM_IBM_6015 # IBM RS/6000 40P
options PLATFORM_IBM_6040 # IBM ThinkPad 820
options PLATFORM_IBM_6050 # IBM Personal Power Series 830
options PLATFORM_IBM_7248 # IBM RS/6000 7248-100/120/133
View
3  sys/arch/prep/conf/NATSUMI
@@ -1,4 +1,4 @@
-# $NetBSD: NATSUMI,v 1.29.6.2 2005/03/19 08:33:12 yamt Exp $
+# $NetBSD: NATSUMI,v 1.29.6.3 2005/03/26 18:19:17 yamt Exp $
#
# for development
#
@@ -181,6 +181,7 @@ wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
+attimer0 at isa? # AT Timer
pcppi0 at isa? # PC prog. periph. interface
isabeep0 at pcppi? # "keyboard" beep
View
6 sys/arch/sgimips/sgimips/machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.89.4.1 2005/03/19 08:33:13 yamt Exp $ */
+/* $NetBSD: machdep.c,v 1.89.4.2 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.89.4.1 2005/03/19 08:33:13 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.89.4.2 2005/03/26 18:19:17 yamt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -865,9 +865,7 @@ void mips_machdep_cache_config(void)
#if defined(MIPS3)
case MIPS_R5000:
case MIPS_RM5200:
- mips_sdcache_forceinv = 1;
break;
-
#endif
}
}
View
22 sys/arch/sparc64/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.26 2003/10/21 12:08:11 kleink Exp $ */
+/* $NetBSD: vmparam.h,v 1.26.10.1 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -120,6 +120,26 @@
#define MAXSSIZ (8*1024*1024) /* max stack size */
#endif
#endif
+
+/*
+ * 32-bit emulation limits.
+ */
+#ifndef MAXTSIZ32
+#define MAXTSIZ32 (1*1024*1024*1024) /* max text size */
+#endif
+#ifndef DFLDSIZ32
+#define DFLDSIZ32 (128*1024*1024) /* initial data size limit */
+#endif
+#ifndef MAXDSIZ32
+#define MAXDSIZ32 (1*1024*1024*1024) /* max data size */
+#endif
+#ifndef DFLSSIZ32
+#define DFLSSIZ32 (2*1024*1024) /* initial stack size limit */
+#endif
+#ifndef MAXSSIZ32
+#define MAXSSIZ32 (8*1024*1024) /* max stack size */
+#endif
+
/*
* Size of shared memory map
*/
View
12 sys/arch/sparc64/sparc64/netbsd32_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_machdep.c,v 1.44 2004/11/08 17:05:37 kleink Exp $ */
+/* $NetBSD: netbsd32_machdep.c,v 1.44.6.1 2005/03/26 18:19:17 yamt Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.44 2004/11/08 17:05:37 kleink Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.44.6.1 2005/03/26 18:19:17 yamt Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -106,6 +106,8 @@ netbsd32_setregs(struct lwp *l, struct exec_package *pack, u_long stack)
/* Mark this as a 32-bit emulation */
p->p_flag |= P_32;
+ netbsd32_adjust_limits(p);
+
/* Setup the ev_out32 hook */
#if NFIRM_EVENTS > 0
if (ev_out32_hook == NULL)
@@ -1262,3 +1264,9 @@ cpu_getmcontext32(struct lwp *l, mcontext32_t *mcp, unsigned int *flags)
mcp->__fpregs.__fpu_en = 0;
}
}
+
+vaddr_t
+netbsd32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t size)
+{
+ return round_page((vaddr_t)(base) + (vsize_t)MAXDSIZ32);
+}
View
12 sys/arch/sparc64/sparc64/svr4_32_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_32_machdep.c,v 1.18.10.1 2005/03/19 08:33:14 yamt Exp $ */
+/* $NetBSD: svr4_32_machdep.c,v 1.18.10.2 2005/03/26 18:19:17 yamt Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.18.10.1 2005/03/19 08:33:14 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.18.10.2 2005/03/26 18:19:17 yamt Exp $");
#ifndef _LKM
#include "opt_ddb.h"
@@ -61,6 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.18.10.1 2005/03/19 08:33:14 ya
#include <sys/exec_elf.h>
#include <sys/types.h>
+#include <uvm/uvm_param.h>
+
#include <compat/svr4_32/svr4_32_types.h>
#include <compat/svr4_32/svr4_32_lwp.h>
#include <compat/svr4_32/svr4_32_ucontext.h>
@@ -687,3 +689,9 @@ svr4_32_sys_sysarch(l, v, retval)
return EINVAL;
}
}
+
+vaddr_t
+svr4_32_vm_default_addr(struct proc *p, vaddr_t base, vsize_t size)
+{
+ return round_page((vaddr_t)(base) + (vsize_t)MAXDSIZ32);
+}
View
13 sys/arch/xen/i386/gdt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gdt.c,v 1.1.14.3 2005/03/21 16:51:15 bouyer Exp $ */
+/* $NetBSD: gdt.c,v 1.1.14.4 2005/03/26 18:19:17 yamt Exp $ */
/* NetBSD: gdt.c,v 1.32 2004/02/13 11:36:13 wiz Exp */
/*-
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.1.14.3 2005/03/21 16:51:15 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gdt.c,v 1.1.14.4 2005/03/26 18:19:17 yamt Exp $");
#include "opt_multiprocessor.h"
#include "opt_xen.h"
@@ -370,19 +370,28 @@ gdt_put_slot1(int slot, int which)
int
tss_alloc(struct pcb *pcb)
{
+#ifndef XEN
int slot;
slot = gdt_get_slot();
setgdt(slot, &pcb->pcb_tss, sizeof(struct pcb) - 1,
SDT_SYS386TSS, SEL_KPL, 0, 0);
return GSEL(slot, SEL_KPL);
+#else
+
+ return GSEL(GNULL_SEL, SEL_KPL);
+#endif
}
void
tss_free(int sel)
{
+#ifndef XEN
gdt_put_slot(IDXSEL(sel));
+#else
+ KASSERT(sel == GSEL(GNULL_SEL, SEL_KPL));
+#endif
}
/*
View
10 sys/arch/xen/i386/npx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: npx.c,v 1.3 2004/05/07 13:48:32 cl Exp $ */
+/* $NetBSD: npx.c,v 1.3.10.1 2005/03/26 18:19:17 yamt Exp $ */
/* NetBSD: npx.c,v 1.103 2004/03/21 10:56:24 simonb Exp */
/*-
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.3 2004/05/07 13:48:32 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.3.10.1 2005/03/26 18:19:17 yamt Exp $");
#if 0
#define IPRINTF(x) printf x
@@ -381,12 +381,6 @@ npxintr(void *arg, struct intrframe iframe)
uvmexp.traps++;
IPRINTF(("%s: fp intr\n", ci->ci_dev->dv_xname));
- panic("not supported\n");
-
- /*
- * Clear the interrupt latch.
- */
- bus_space_write_1(sc->sc_iot, sc->sc_ioh, 0, 0);
/*
* If we're saving, ignore the interrupt. The FPU will generate
View
7 sys/compat/aoutm68k/aoutm68k_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aoutm68k_exec.c,v 1.18 2004/09/12 11:09:32 jdolecek Exp $ */
+/* $NetBSD: aoutm68k_exec.c,v 1.18.6.1 2005/03/26 18:19:17 yamt Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.18 2004/09/12 11:09:32 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.18.6.1 2005/03/26 18:19:17 yamt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_syscall_debug.h"
@@ -50,6 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: aoutm68k_exec.c,v 1.18 2004/09/12 11:09:32 jdolecek
#include <sys/exec.h>
#include <sys/signalvar.h>
+#include <uvm/uvm_extern.h>
+
#include <compat/aoutm68k/aoutm68k_syscall.h>
extern struct sysent aoutm68k_sysent[];
@@ -91,4 +93,5 @@ const struct emul emul_netbsd_aoutm68k = {
aoutm68k_syscall_intern,
NULL,
NULL,
+ uvm_default_mapaddr,
};
View
7 sys/compat/darwin/darwin_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_exec.c,v 1.38.6.1 2005/03/19 08:33:28 yamt Exp $ */
+/* $NetBSD: darwin_exec.c,v 1.38.6.2 2005/03/26 18:19:17 yamt Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.38.6.1 2005/03/19 08:33:28 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.38.6.2 2005/03/26 18:19:17 yamt Exp $");
#include "opt_syscall_debug.h"
@@ -125,6 +125,9 @@ const struct emul emul_darwin = {
syscall,
#endif
NULL,
+ NULL,
+
+ uvm_default_mapaddr,
};
/*
View
8 sys/compat/freebsd/freebsd_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: freebsd_exec.c,v 1.26 2004/09/12 10:38:25 jdolecek Exp $ */
+/* $NetBSD: freebsd_exec.c,v 1.26.6.1 2005/03/26 18:19:18 yamt Exp $ */
/*
* Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: freebsd_exec.c,v 1.26 2004/09/12 10:38:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: freebsd_exec.c,v 1.26.6.1 2005/03/26 18:19:18 yamt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_syscall_debug.h"
@@ -42,6 +42,8 @@ __KERNEL_RCSID(0, "$NetBSD: freebsd_exec.c,v 1.26 2004/09/12 10:38:25 jdolecek E
#include <sys/proc.h>
#include <machine/freebsd_machdep.h>
+#include <uvm/uvm_extern.h>
+
#include <compat/freebsd/freebsd_syscall.h>
#include <compat/freebsd/freebsd_exec.h>
#include <compat/freebsd/freebsd_signal.h>
@@ -91,4 +93,6 @@ const struct emul emul_freebsd = {
#endif
NULL,
NULL,
+
+ uvm_default_mapaddr,
};
View
8 sys/compat/hpux/hpux_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpux_exec.c,v 1.44.6.1 2005/03/19 08:33:31 yamt Exp $ */
+/* $NetBSD: hpux_exec.c,v 1.44.6.2 2005/03/26 18:19:18 yamt Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpux_exec.c,v 1.44.6.1 2005/03/19 08:33:31 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpux_exec.c,v 1.44.6.2 2005/03/26 18:19:18 yamt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_syscall_debug.h"
@@ -90,6 +90,8 @@ __KERNEL_RCSID(0, "$NetBSD: hpux_exec.c,v 1.44.6.1 2005/03/19 08:33:31 yamt Exp
#include <sys/mman.h>
#include <sys/stat.h>
+#include <uvm/uvm_extern.h>
+
#include <machine/cpu.h>
#include <machine/reg.h>
@@ -149,6 +151,8 @@ const struct emul emul_hpux = {
#endif
NULL,
NULL,
+
+ uvm_default_mapaddr,
};
/*
View
8 sys/compat/ibcs2/ibcs2_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_exec.c,v 1.60.6.1 2005/03/19 08:33:32 yamt Exp $ */
+/* $NetBSD: ibcs2_exec.c,v 1.60.6.2 2005/03/26 18:19:18 yamt Exp $ */
/*
* Copyright (c) 1994, 1995, 1998 Scott Bartram
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c,v 1.60.6.1 2005/03/19 08:33:32 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c,v 1.60.6.2 2005/03/26 18:19:18 yamt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_syscall_debug.h"
@@ -51,6 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_exec.c,v 1.60.6.1 2005/03/19 08:33:32 yamt Exp
#include <sys/mount.h>
#include <sys/exec.h>
+#include <uvm/uvm_extern.h>
+
#include <machine/ibcs2_machdep.h>
#include <compat/ibcs2/ibcs2_types.h>
@@ -108,6 +110,8 @@ const struct emul emul_ibcs2 = {
#endif
NULL,
NULL,
+
+ uvm_default_mapaddr,
};
/*
View
6 sys/compat/irix/irix_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: irix_exec.c,v 1.39.6.1 2005/03/19 08:33:34 yamt Exp $ */
+/* $NetBSD: irix_exec.c,v 1.39.6.2 2005/03/26 18:19:18 yamt Exp $ */
/*-
* Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.39.6.1 2005/03/19 08:33:34 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.39.6.2 2005/03/26 18:19:18 yamt Exp $");
#ifdef _KERNEL_OPT
#include "opt_syscall_debug.h"
@@ -121,6 +121,8 @@ const struct emul emul_irix = {
#endif
NULL,
irix_vm_fault,
+
+ uvm_default_mapaddr,
};
/*
View
8 sys/compat/linux/common/linux_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec.c,v 1.72 2004/08/08 19:52:37 jdolecek Exp $ */
+/* $NetBSD: linux_exec.c,v 1.72.6.1 2005/03/26 18:19:18 yamt Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.72 2004/08/08 19:52:37 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.72.6.1 2005/03/26 18:19:18 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,6 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.72 2004/08/08 19:52:37 jdolecek Exp
#include <sys/sa.h>
#include <sys/syscallargs.h>
+#include <uvm/uvm_extern.h>
+
#include <machine/cpu.h>
#include <machine/reg.h>
@@ -144,6 +146,8 @@ const struct emul emul_linux = {