PERFORCE change 48092 for review
Robert Watson
rwatson at FreeBSD.org
Wed Mar 3 18:08:14 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=48092
Change 48092 by rwatson at rwatson_tislabs on 2004/03/03 18:07:13
Integrate netperf_socket:
- ACPI upgrade
- amd64 NOTES
- DUMMYNET locking fixes
- IPv6 scope changes
Affected files ...
.. //depot/projects/netperf_socket/sys/amd64/conf/NOTES#2 integrate
.. //depot/projects/netperf_socket/sys/amd64/include/dvcfg.h#1 branch
.. //depot/projects/netperf_socket/sys/amd64/include/physio_proc.h#1 branch
.. //depot/projects/netperf_socket/sys/compat/ndis/subr_ndis.c#3 integrate
.. //depot/projects/netperf_socket/sys/compat/ndis/subr_ntoskrnl.c#3 integrate
.. //depot/projects/netperf_socket/sys/conf/files#6 integrate
.. //depot/projects/netperf_socket/sys/conf/files.amd64#3 integrate
.. //depot/projects/netperf_socket/sys/conf/kern.mk#3 integrate
.. //depot/projects/netperf_socket/sys/conf/options.amd64#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/Osd/OsdHardware.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_acad.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_ec.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_lid.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib_acpi.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_powerres.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_thermal.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_timer.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_video.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpivar.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/drm/drm_drv.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/drm/drm_os_freebsd.h#3 integrate
.. //depot/projects/netperf_socket/sys/dev/drm/drm_vm.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/drm/radeon_state.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/drm/sis_ds.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/drm/sis_mm.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/ed/if_ed.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/ed/if_edvar.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/lnc/if_lnc.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/lnc/if_lncvar.h#2 integrate
.. //depot/projects/netperf_socket/sys/fs/udf/udf_vnops.c#2 integrate
.. //depot/projects/netperf_socket/sys/geom/concat/g_concat.c#3 integrate
.. //depot/projects/netperf_socket/sys/geom/concat/g_concat.h#3 integrate
.. //depot/projects/netperf_socket/sys/i386/acpica/acpi_toshiba.c#2 integrate
.. //depot/projects/netperf_socket/sys/i386/conf/NOTES#5 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_sig.c#3 integrate
.. //depot/projects/netperf_socket/sys/modules/ndis/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/netinet/ip_dummynet.c#4 integrate
.. //depot/projects/netperf_socket/sys/netinet6/in6.c#3 integrate
Differences ...
==== //depot/projects/netperf_socket/sys/amd64/conf/NOTES#2 (text+ko) ====
@@ -4,31 +4,68 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.4 2004/02/19 04:39:14 obrien Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.5 2004/03/03 09:26:40 obrien Exp $
#
+# We don't have modules on amd64.
+makeoptions NO_MODULES=not_yet
+
#
# This directive is mandatory; it defines the architecture to be
# configured for; in this case, the 386 family based IBM-PC and
# compatibles.
#
machine amd64
-cpu HAMMER
-#
+#
# We want LINT to cover profiling as well
-profile 2
+#XXX#profile 2
+
+
+#####################################################################
+# SMP OPTIONS:
+#
+# The apic device enables the use of the I/O APIC for interrupt delivery.
+# The apic device can be used in both UP and SMP kernels, but is required
+# for SMP kernels. Thus, the apic device is not strictly an SMP option,
+# but it is a prerequisite for SMP.
+#
+# Notes:
+#
+# By default, mixed mode is used to route IRQ0 from the AT timer via
+# the 8259A master PIC through the ExtINT pin on the first I/O APIC.
+# This can be disabled via the NO_MIXED_MODE option. In that case,
+# IRQ0 will be routed via an intpin on the first I/O APIC. Not all
+# motherboards hook IRQ0 up to the first I/O APIC even though their
+# MP table or MADT may claim to do so. That is why mixed mode is
+# enabled by default.
+#
+
+# Optional:
+device atpic # Legacy pic
+device mptable
+options NO_MIXED_MODE # Disable use of mixed mode
-# Debug options
-options NPX_DEBUG # enable npx debugging (FPU/math emu)
- #new math emulator
+#####################################################################
+# CPU OPTIONS
+
+#
+# You must specify at least one CPU (the one you intend to run on);
+# deleting the specification for CPUs you don't need to use may make
+# parts of the system run faster.
+#
+cpu HAMMER # aka K8, aka Opteron & Athlon64
+
+#
+# Options for CPU features.
+#
#
# PERFMON causes the driver for Pentium/Pentium Pro performance counters
# to be compiled. See perfmon(4) for more information.
#
-options PERFMON
+#XXX#options PERFMON
#####################################################################
@@ -39,7 +76,7 @@
# of network device drivers, which has significant benefits in terms
# of robustness to overloads and responsivity, as well as permitting
# accurate scheduling of the CPU time between kernel network processing
-# and other activities. The drawback is a moderate (up to 1/HZ seconds)
+# and other activities. The drawback is a moderate (up to 1/HZ seconds)
# potential increase in response times.
# It is strongly recommended to use HZ=1000 or 2000 with DEVICE_POLLING
# to achieve smoother behaviour.
@@ -48,8 +85,8 @@
# the CPU fraction reserved to userland with the sysctl variable
# kern.polling.user_frac (default 50, range 0..100).
#
-# Only the "dc" "fxp" and "sis" devices support this mode of operation at
-# the time of this writing.
+# Not all device drivers support this mode of operation at the time of
+# this writing. See polling(4) for more details.
options DEVICE_POLLING
@@ -59,20 +96,22 @@
# The following options are used for debugging clock behavior only, and
# should not be used for production systems.
-#
-# CLK_CALIBRATION_LOOP will run the clock calibration loop at startup
-# until the user presses a key.
+# CLK_CALIBRATION_LOOP causes clock calibration to be run in a loop at
+# startup until the user presses a key. (The i8254 clock is always
+# calibrated relative to the RTC (mc146818a) and this option causes the
+# calibration to be repeated.)
options CLK_CALIBRATION_LOOP
+# CLK_USE_I8254_CALIBRATION causes the calibrated frequency of the i8254
+# clock to actually be used.
+options CLK_USE_I8254_CALIBRATION
+
#####################################################################
# MISCELLANEOUS DEVICES AND OPTIONS
-hint.speaker.0.at="isa"
-hint.speaker.0.port="0x61"
-device gzip #Exec gzipped a.out's. REQUIRES COMPAT_AOUT!
-device apm_saver # Requires APM
+device gzip #Exec gzipped a.out's. REQUIRES COMPAT_AOUT!
#####################################################################
@@ -109,6 +148,9 @@
# reset the CPU for reboot. This is needed on some systems with broken
# keyboard controllers.
+options AUTO_EOI_1
+#options AUTO_EOI_2
+
options MAXMEM=(128*1024)
#options BROKEN_KEYBOARD_RESET
@@ -125,13 +167,27 @@
#####################################################################
# HARDWARE DEVICE CONFIGURATION
+# To include support for VGA VESA video modes
+options VESA
+
+# Turn on extra debugging checks and output for VESA support.
+options VESA_DEBUG
+
#
-# Mandatory devices:
+# Optional devices:
#
+# 3Dfx Voodoo Graphics, Voodoo II /dev/3dfx CDEV support. This will create
+# the /dev/3dfx0 device to work with glide implementations. This should get
+# linked to /dev/3dfx and /dev/voodoo. Note that this is not the same as
+# the tdfx DRI module from XFree86 and is completely unrelated.
#
-# Optional devices:
-#
+# To enable Linuxulator support, one must also include COMPAT_LINUX in the
+# config as well, or you will not have the dependencies. The other option
+# is to load both as modules.
+
+device tdfx # Enable 3Dfx Voodoo support
+#XXX#options TDFX_LINUX # Enable Linuxulator support
#
# ACPI support using the Intel ACPI Component Architecture reference
@@ -142,17 +198,29 @@
# Intel ACPICA code. (Note that the Intel code must also have USE_DEBUGGER
# defined when it is built).
#
+# ACPI_MAX_THREADS sets the number of task threads started.
+#
+# ACPI_NO_SEMAPHORES makes the AcpiOs*Semaphore routines a no-op.
+#
+# ACPICA_PEDANTIC enables strict checking of AML. Our default is to
+# relax these checks to allow code generated by the Microsoft compiler
+# to still execute.
+#
# Note that building ACPI into the kernel is deprecated; the module is
# normally loaded automatically by the loader.
-#
+
device acpi
options ACPI_DEBUG
+options ACPI_MAX_THREADS=1
+#!options ACPI_NO_SEMAPHORES
+#!options ACPICA_PEDANTIC
# DRM options:
# mgadrm: AGP Matrox G200, G400, G450, G550
-# tdfxdrm: 3dfx Voodoo 3/4/5 and Banshee
# r128drm: ATI Rage 128
# radeondrm: ATI Radeon up to 9000/9100
+# sisdrm: SiS 300/305,540,630
+# tdfxdrm: 3dfx Voodoo 3/4/5 and Banshee
# DRM_DEBUG: include debug printfs, very slow
#
# mga requires AGP in the kernel, and it is recommended
@@ -161,60 +229,39 @@
device mgadrm
device "r128drm"
device radeondrm
+device sisdrm
device tdfxdrm
options DRM_DEBUG
-# M-systems DiskOnchip products see src/sys/contrib/dev/fla/README
-###device fla
-###hint.fla.0.at="isa"
-
#
# Network interfaces:
#
# ed: Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503
-# HP PC Lan+, various PC Card devices (refer to etc/defauls/pccard.conf)
-# (requires miibus)
-# ie: AT&T StarLAN 10 and EN100; 3Com 3C507; unknown NI5210;
-# Intel EtherExpress
+# HP PC Lan+, various PC Card devices (refer to etc/defaults/pccard.conf)
# lnc: Lance/PCnet cards (Isolan, Novell NE2100, NE32-VL, AMD Am7990 and
# Am79C960)
-# sr: RISCom/N2 hdlc sync 1/2 port V.35/X.21 serial driver (requires sppp)
-# wl: Lucent Wavelan (ISA card only).
+
+#XXX# Needs to be busdma'ed.
+#XXX#device ed
+#XXX#device lnc
-# Order for ISA/EISA devices is important here
+# ath: Atheros a/b/g WiFi adapters (requires ath_hal and wlan)
-device ed
-#options ED_NO_MIIBUS # Disable ed miibus support
-hint.ed.0.at="isa"
-hint.ed.0.port="0x280"
-hint.ed.0.irq="5"
-hint.ed.0.maddr="0xd8000"
-device lnc
-hint.lnc.0.at="isa"
-hint.lnc.0.port="0x280"
-hint.lnc.0.irq="10"
-hint.lnc.0.drq="0"
-device sr
-hint.sr.0.at="isa"
-hint.sr.0.port="0x300"
-hint.sr.0.irq="5"
-hint.sr.0.maddr="0xd0000"
-device wl
-hint.wl.0.at="isa"
-hint.wl.0.port="0x300"
-options WLCACHE # enables the signal-strength cache
-options WLDEBUG # enables verbose debugging output
+#XXX#device ath
+#XXX#device ath_hal # Atheros HAL (includes binary component)
+device wlan # 802.11 layer
#
# ATA raid adapters
#
-device pst
+#XXX this stores pointers in a 32bit field that is defined by the hardware
+#device pst
-#
+#
# SCSI host adapters:
-#
+#
# ncv: NCR 53C500 based SCSI host adapters.
# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters.
# stg: TMC 18C30, 18C50 based SCSI host adapters.
@@ -222,9 +269,6 @@
device ncv
device nsp
device stg
-hint.stg.0.at="isa"
-hint.stg.0.port="0x140"
-hint.stg.0.port="11"
#
# Adaptec FSA RAID controllers, including integrated DELL controllers,
@@ -249,12 +293,9 @@
#
# Miscellaneous hardware:
#
-# dgb: Digiboard PC/Xi and PC/Xe series driver (ALPHA QUALITY!)
+# cy: Cyclades serial driver
# digi: Digiboard driver
-# gsc: Genius GS-4500 hand scanner.
-# spic: Sony Programmable I/O controller (VAIO notebooks)
# stl: Stallion EasyIO and EasyConnection 8/32 (cd1400 based)
-# stli: Stallion EasyConnection 8/64, ONboard, Brumby (intelligent)
# Notes on the Specialix SI/XIO driver:
# The host card is memory, not IO mapped.
@@ -262,15 +303,6 @@
# The Rev 2 host cards use a 32K chunk, on a 32K boundary.
# The cards can use an IRQ of 11, 12 or 15.
-# Notes on the Digiboard PC/Xi and PC/Xe series driver
-#
-# The NDGBPORTS option specifies the number of ports controlled by the
-# dgb(4) driver. The default value is 16 ports per device.
-#
-# The following flag values have special meanings in dgb:
-# 0x01 - alternate layout of pins
-# 0x02 - use the windowed PC/Xe in 64K mode
-
device digi
hint.digi.0.at="isa"
hint.digi.0.port="0x104"
@@ -283,30 +315,128 @@
device digi_Xe
device digi_Xem
device digi_Xr
+#XXX# PCI versions exist, but driver needs to be moved and split up.
+#XXX#device stl
# HOT1 Xilinx 6200 card (http://www.vcc.com/)
device xrpu
#
# Laptop/Notebook options:
#
-# See also:
-# apm under `Miscellaneous hardware'
-# above.
+
+
+#
+# I2C Bus
+#
+#---------------------------------------------------------------------------
+# ISDN4BSD
+#
+# See /usr/share/examples/isdn/ROADMAP for an introduction to isdn4bsd.
+#
+# i4b passive ISDN cards support contains the following hardware drivers:
+#
+# isic - Siemens/Infineon ISDN ISAC/HSCX/IPAC chipset driver
+# iwic - Winbond W6692 PCI bus ISDN S/T interface controller
+# ifpi - AVM Fritz!Card PCI driver
+# ifpi2 - AVM Fritz!Card PCI version 2 driver
+# itjc - Siemens ISAC / TJNet Tiger300/320 chipset
+#
+# i4b active ISDN cards support contains the following hardware drivers:
+#
+# iavc - AVM B1 PCI, AVM B1 ISA, AVM T1
+#
+# Note that the ``options'' (if given) and ``device'' lines must BOTH
+# be uncommented to enable support for a given card !
+#
+# In addition to a hardware driver (and probably an option) the mandatory
+# ISDN protocol stack devices and the mandatory support device must be
+# enabled as well as one or more devices from the optional devices section.
+#
+#---------------------------------------------------------------------------
+# isic driver (Siemens/Infineon chipsets)
+#
+#XXX#device isic
+#
# PCI bus Cards:
# --------------
#
-# Cyclades Cyclom-Y PCI serial driver
-device cy
-options CY_PCI_FASTINTR # Use with cy_pci unless irq is shared
-#hint.cy.0.at="isa"
-#hint.cy.0.irq="10"
-#hint.cy.0.maddr="0xd4000"
-#hint.cy.0.msize="0x2000"
+# ELSA MicroLink ISDN/PCI (same as ELSA QuickStep 1000pro PCI)
+options ELSA_QS1PCI
+#
+#---------------------------------------------------------------------------
+# ifpi2 driver for AVM Fritz!Card PCI version 2
+#
+# AVM Fritz!Card PCI version 2
+#XXX#device "ifpi2"
+#
+#---------------------------------------------------------------------------
+# iwic driver for Winbond W6692 chipset
+#
+# ASUSCOM P-IN100-ST-D (and other Winbond W6692 based cards)
+#XXX#device iwic
+#
+#---------------------------------------------------------------------------
+# itjc driver for Siemens ISAC / TJNet Tiger300/320 chipset
+#
+# Traverse Technologies NETjet-S
+# Teles PCI-TJ
+#XXX#device itjc
+#
+#---------------------------------------------------------------------------
+# iavc driver (AVM active cards, needs i4bcapi driver!)
+#
+#XXX#device iavc
+#
+#---------------------------------------------------------------------------
+# ISDN Protocol Stack - mandatory for all hardware drivers
+#
+# Q.921 / layer 2 - i4b passive cards D channel handling
+#XXX#device "i4bq921"
+#
+# Q.931 / layer 3 - i4b passive cards D channel handling
+#XXX#device "i4bq931"
+#
+# layer 4 - i4b common passive and active card handling
+#XXX#device "i4b"
+#
+#---------------------------------------------------------------------------
+# ISDN devices - mandatory for all hardware drivers
+#
+# userland driver to do ISDN tracing (for passive cards only)
+#XXX#device "i4btrc" 4
+#
+# userland driver to control the whole thing
+#XXX#device "i4bctl"
+#
+#---------------------------------------------------------------------------
+# ISDN devices - optional
+#
+# userland driver for access to raw B channel
+#XXX#device "i4brbch" 4
+#
+# userland driver for telephony
+#XXX#device "i4btel" 2
+#
+# network driver for IP over raw HDLC ISDN
+#XXX#device "i4bipr" 4
+# enable VJ header compression detection for ipr i/f
+options IPR_VJ
+# enable logging of the first n IP packets to isdnd (n=32 here)
+options IPR_LOG=32
+#
+# network driver for sync PPP over ISDN; requires an equivalent
+# number of sppp device to be configured
+#XXX#device "i4bisppp" 4
+#
+# B-channel interface to the netgraph subsystem
+#XXX#device "i4bing" 2
+#
+#---------------------------------------------------------------------------
#
# Set the number of PV entries per process. Increasing this can
-# stop panics related to heavy use of shared memory. However, that can
+# stop panics related to heavy use of shared memory. However, that can
# (combined with large amounts of physical memory) cause panics at
# boot time due the kernel running out of VM space.
#
@@ -315,48 +445,52 @@
#
# The value below is the one more than the default.
#
-#options PMAP_SHPGPERPROC=201
+options PMAP_SHPGPERPROC=201
-#
-# Change the size of the kernel virtual address space. Due to
-# constraints in loader(8) on i386, this must be a multiple of 4.
-# 256 = 1 GB of kernel address space. Increasing this also causes
-# a reduction of the address space in user processes. 512 splits
-# the 4GB cpu address space in half (2GB user, 2GB kernel).
-#
-options KVA_PAGES=260
-
#####################################################################
# ABI Emulation
+#XXX keep these here for now and reactivate when support for emulating
+#XXX these 32 bit binaries is added.
+
+# Enable iBCS2 runtime support for SCO and ISC binaries
+#XXX#options IBCS2
+
+# Emulate spx device for client side of SVR3 local X interface
+#XXX#options SPX_HACK
+
# Enable Linux ABI emulation
-#options COMPAT_LINUX
+#XXX#options COMPAT_LINUX
# Enable the linux-like proc filesystem support (requires COMPAT_LINUX
# and PSEUDOFS)
-#options LINPROCFS
+#XXX#options LINPROCFS
+
+#
+# SysVR4 ABI emulation
+#
+# The svr4 ABI emulator can be statically compiled into the kernel or loaded as
+# a KLD module.
+# The STREAMS network emulation code can also be compiled statically or as a
+# module. If loaded as a module, it must be loaded before the svr4 module
+# (the /usr/sbin/svr4 script does this for you). If compiling statically,
+# the `streams' device must be configured into any kernel which also
+# specifies COMPAT_SVR4. It is possible to have a statically-configured
+# STREAMS device and a dynamically loadable svr4 emulator; the /usr/sbin/svr4
+# script understands that it doesn't need to load the `streams' module under
+# those circumstances.
+# Caveat: At this time, `options KTRACE' is required for the svr4 emulator
+# (whether static or dynamic).
+#
+#XXX#options COMPAT_SVR4 # build emulator statically
+options DEBUG_SVR4 # enable verbose debugging
+#XXX#device streams # STREAMS network driver (required for svr4).
#####################################################################
# VM OPTIONS
-# Disable the 4 MByte page PSE CPU feature. The PSE feature allows the
-# kernel to use a 4 MByte pages to map the kernel instead of 4k pages.
-# This saves on the amount of memory needed for page tables needed to
-# map the kernel. You should only disable this feature as a temporary
-# workaround if you are having problems with it enabled.
-#
-#options DISABLE_PSE
-
-# Disable the global pages PGE CPU feature. The PGE feature allows pages
-# to be marked with the PG_G bit. TLB entries for these pages are not
-# flushed from the cache when %cr3 is reloaded. This can make context
-# switches less expensive. You should only disable this feature as a
-# temporary workaround if you are having problems with it enabled.
-#
-#options DISABLE_PG_G
-
# KSTACK_PAGES is the number of memory pages to assign to the kernel
# stack of each thread.
@@ -369,6 +503,10 @@
options FB_INSTALL_CDEV # install a CDEV entry in /dev
+# PECOFF module (Win32 Execution Format)
+options PECOFF_SUPPORT
+options PECOFF_DEBUG
+
options ENABLE_ALART
options KBDIO_DEBUG=2
options KBD_MAXRETRY=4
==== //depot/projects/netperf_socket/sys/compat/ndis/subr_ndis.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.48 2004/02/16 02:50:03 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.49 2004/03/04 00:17:14 wpaul Exp $");
/*
* This file implements a translation layer between the BSD networking
@@ -1559,6 +1559,7 @@
cur = (ndis_packet *)*pool;
cur->np_private.npp_flags = 0x1; /* mark the head of the list */
+ cur->np_private.npp_totlen = 0; /* init deletetion flag */
for (i = 0; i < (descnum + NDIS_POOL_EXTRA); i++) {
cur->np_private.npp_head = (ndis_handle)(cur + 1);
cur++;
@@ -1595,7 +1596,21 @@
ndis_free_packetpool(pool)
ndis_handle pool;
{
- free(pool, M_DEVBUF);
+ ndis_packet *head;
+
+ head = pool;
+
+ /* Mark this pool as 'going away.' */
+
+ head->np_private.npp_totlen = 1;
+
+ /* If there are no buffers loaned out, destroy the pool. */
+
+ if (head->np_private.npp_count == 0)
+ free(pool, M_DEVBUF);
+ else
+ printf("NDIS: buggy driver deleting active packet pool!\n");
+
return;
}
@@ -1614,6 +1629,16 @@
return;
}
+ /*
+ * If this pool is marked as 'going away' don't allocate any
+ * more packets out of it.
+ */
+
+ if (head->np_private.npp_totlen) {
+ *status = NDIS_STATUS_FAILURE;
+ return;
+ }
+
pkt = (ndis_packet *)head->np_private.npp_head;
if (pkt == NULL) {
@@ -1662,6 +1687,14 @@
head->np_private.npp_head = (ndis_buffer *)packet;
head->np_private.npp_count--;
+ /*
+ * If the pool has been marked for deletion and there are
+ * no more packets outstanding, nuke the pool.
+ */
+
+ if (head->np_private.npp_totlen && head->np_private.npp_count == 0)
+ free(head, M_DEVBUF);
+
return;
}
@@ -1749,6 +1782,8 @@
cur = (ndis_buffer *)*pool;
cur->nb_flags = 0x1; /* mark the head of the list */
+ cur->nb_bytecount = 0; /* init usage count */
+ cur->nb_byteoffset = 0; /* init deletetion flag */
for (i = 0; i < (descnum + NDIS_POOL_EXTRA); i++) {
cur->nb_next = cur + 1;
cur++;
@@ -1762,7 +1797,20 @@
ndis_free_bufpool(pool)
ndis_handle pool;
{
- free(pool, M_DEVBUF);
+ ndis_buffer *head;
+
+ head = pool;
+
+ /* Mark this pool as 'going away.' */
+
+ head->nb_byteoffset = 1;
+
+ /* If there are no buffers loaned out, destroy the pool. */
+ if (head->nb_bytecount == 0)
+ free(pool, M_DEVBUF);
+ else
+ printf("NDIS: buggy driver deleting active buffer pool!\n");
+
return;
}
@@ -1785,6 +1833,16 @@
return;
}
+ /*
+ * If this pool is marked as 'going away' don't allocate any
+ * more buffers out of it.
+ */
+
+ if (head->nb_byteoffset) {
+ *status = NDIS_STATUS_FAILURE;
+ return;
+ }
+
buf = head->nb_next;
if (buf == NULL) {
@@ -1801,6 +1859,10 @@
*buffer = buf;
+ /* Increment count of busy buffers. */
+
+ head->nb_bytecount++;
+
*status = NDIS_STATUS_SUCCESS;
return;
}
@@ -1822,6 +1884,18 @@
buf->nb_next = head->nb_next;
head->nb_next = buf;
+ /* Decrement count of busy buffers. */
+
+ head->nb_bytecount--;
+
+ /*
+ * If the pool has been marked for deletion and there are
+ * no more buffers outstanding, nuke the pool.
+ */
+
+ if (head->nb_byteoffset && head->nb_bytecount == 0)
+ free(head, M_DEVBUF);
+
return;
}
==== //depot/projects/netperf_socket/sys/compat/ndis/subr_ntoskrnl.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.23 2004/02/17 21:50:39 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.25 2004/03/04 00:17:14 wpaul Exp $");
#include <sys/ctype.h>
#include <sys/unistd.h>
@@ -64,6 +64,8 @@
#include <compat/ndis/ntoskrnl_var.h>
#include <compat/ndis/ndis_var.h>
+#include "opt_ddb.h"
+
#define __regparm __attribute__((regparm(3)))
#define FUNC void(*)(void)
@@ -166,6 +168,8 @@
uint8_t, void **, void **);
__stdcall static void ntoskrnl_objderef(/*void * */ void);
__stdcall static uint32_t ntoskrnl_zwclose(ndis_handle);
+static uint32_t ntoskrnl_dbgprint(char *, ...);
+__stdcall static void ntoskrnl_debugger(void);
__stdcall static void dummy(void);
static struct mtx *ntoskrnl_interlock;
@@ -1113,6 +1117,18 @@
mdl->nb_next = head->nb_next;
head->nb_next = mdl;
+ /* Decrement count of busy buffers. */
+
+ head->nb_bytecount--;
+
+ /*
+ * If the pool has been marked for deletion and there are
+ * no more buffers outstanding, nuke the pool.
+ */
+
+ if (head->nb_byteoffset && head->nb_bytecount == 0)
+ free(head, M_DEVBUF);
+
return;
}
@@ -1604,6 +1620,30 @@
return(0); /* notreached */
}
+static uint32_t
+ntoskrnl_dbgprint(char *fmt, ...)
+{
+ va_list ap;
+
+ if (bootverbose) {
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ }
+
+ return(STATUS_SUCCESS);
+}
+
+__stdcall static void
+ntoskrnl_debugger(void)
+{
+#ifdef DDB
+ Debugger("debug from winkernel module");
+#else
+ printf("ntoskrnl_debugger(): DDB not present\n");
+#endif
+ return;
+}
+
__stdcall static void
dummy()
{
@@ -1625,7 +1665,8 @@
{ "RtlUnicodeStringToInteger", (FUNC)ntoskrnl_unicode_to_int },
{ "sprintf", (FUNC)sprintf },
{ "vsprintf", (FUNC)vsprintf },
- { "DbgPrint", (FUNC)printf },
+ { "DbgPrint", (FUNC)ntoskrnl_dbgprint },
+ { "DbgBreakPoint", (FUNC)ntoskrnl_debugger },
{ "strncmp", (FUNC)strncmp },
{ "strcmp", (FUNC)strcmp },
{ "strncpy", (FUNC)strncpy },
==== //depot/projects/netperf_socket/sys/conf/files#6 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.871 2004/03/01 08:12:55 njl Exp $
+# $FreeBSD: src/sys/conf/files,v 1.872 2004/03/03 09:33:03 obrien Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -383,12 +383,14 @@
dev/drm/mga_dma.c optional mgadrm
dev/drm/mga_drv.c optional mgadrm
dev/drm/mga_irq.c optional mgadrm
-dev/drm/mga_state.c optional mgadrm
+dev/drm/mga_state.c optional mgadrm \
+ compile-with "${NORMAL_C} -finline-limit=13500"
dev/drm/mga_warp.c optional mgadrm
dev/drm/r128_cce.c optional r128drm
dev/drm/r128_drv.c optional r128drm
dev/drm/r128_irq.c optional r128drm
-dev/drm/r128_state.c optional r128drm
+dev/drm/r128_state.c optional r128drm \
+ compile-with "${NORMAL_C} -finline-limit=13500"
dev/drm/radeon_cp.c optional radeondrm
dev/drm/radeon_drv.c optional radeondrm
dev/drm/radeon_irq.c optional radeondrm
==== //depot/projects/netperf_socket/sys/conf/files.amd64#3 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.amd64,v 1.28 2004/02/05 01:09:29 peter Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.29 2004/03/03 09:37:44 obrien Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -20,6 +20,21 @@
no-obj no-implicit-rule before-depend \
clean "ia32_assym.h"
#
+font.h optional sc_dflt_font \
+ compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'static u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'static u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'static u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
+ no-obj no-implicit-rule before-depend \
+ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
+#
+atkbdmap.h optional atkbd_dflt_keymap \
+ compile-with "/usr/sbin/kbdcontrol -L ${ATKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > atkbdmap.h" \
+ no-obj no-implicit-rule before-depend \
+ clean "atkbdmap.h"
+#
+ukbdmap.h optional ukbd_dflt_keymap \
+ compile-with "/usr/sbin/kbdcontrol -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \
+ no-obj no-implicit-rule before-depend \
+ clean "ukbdmap.h"
+#
amd64/acpica/OsdEnvironment.c optional acpi
amd64/acpica/acpi_machdep.c optional acpi
amd64/acpica/acpi_wakeup.c optional acpi
==== //depot/projects/netperf_socket/sys/conf/kern.mk#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.mk,v 1.39 2004/02/06 20:40:04 peter Exp $
+# $FreeBSD: src/sys/conf/kern.mk,v 1.40 2004/03/03 09:35:06 obrien Exp $
#
# Warning flags for compiling the kernel and components of the kernel.
@@ -24,7 +24,7 @@
#
.if ${MACHINE_ARCH} == "i386"
CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2
-INLINE_LIMIT?= 15000
+INLINE_LIMIT?= 8000
.endif
#
==== //depot/projects/netperf_socket/sys/conf/options.amd64#2 (text+ko) ====
@@ -1,16 +1,29 @@
-# $FreeBSD: src/sys/conf/options.amd64,v 1.10 2003/11/17 08:58:16 peter Exp $
+# $FreeBSD: src/sys/conf/options.amd64,v 1.11 2004/03/03 09:35:47 obrien Exp $
# Options specific to AMD64 platform kernels
AUTO_EOI_1 opt_auto_eoi.h
AUTO_EOI_2 opt_auto_eoi.h
MAXMEM
PERFMON opt_perfmon.h
+PMAP_SHPGPERPROC opt_pmap.h
+
+# Options for emulators. These should only be used at config time, so
+# they are handled like options for static filesystems
+# (see src/sys/conf/options), except for broken debugging options.
+IBCS2 opt_dontuse.h
+COMPAT_LINUX opt_dontuse.h
+COMPAT_SVR4 opt_dontuse.h
+DEBUG_SVR4 opt_svr4.h
+NDISAPI opt_dontuse.h
+PECOFF_DEBUG opt_pecoff.h
+PECOFF_SUPPORT opt_dontuse.h
# Change KVM size. Changes things all over the kernel.
KVA_PAGES opt_global.h
-CLK_CALIBRATION_LOOP opt_clock.h
-TIMER_FREQ opt_clock.h
+CLK_CALIBRATION_LOOP opt_clock.h
+CLK_USE_I8254_CALIBRATION opt_clock.h
+TIMER_FREQ opt_clock.h
VGA_ALT_SEQACCESS opt_vga.h
VGA_DEBUG opt_vga.h
@@ -19,9 +32,25 @@
VGA_SLOW_IOACCESS opt_vga.h
VGA_WIDTH90 opt_vga.h
+VESA
+VESA_DEBUG opt_vesa.h
+
ATKBD_DFLT_KEYMAP opt_atkbd.h
# -------------------------------
+# isdn4bsd: passive PCI cards
+# -------------------------------
+ELSA_QS1PCI opt_i4b.h
+# -------------------------------
+# isdn4bsd: misc options
+# -------------------------------
+# temporary workaround for SMP machines
+I4B_SMP_WORKAROUND opt_i4b.h
+# enable VJ compression code for ipr i/f
+IPR_VJ opt_i4b.h
+IPR_LOG opt_i4b.h
+
+# -------------------------------
# EOF
# -------------------------------
HAMMER opt_cpu.h
==== //depot/projects/netperf_socket/sys/dev/acpica/Osd/OsdHardware.c#2 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.11 2003/08/28 21:22:25 jhb Exp $
+ * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.12 2004/03/03 18:34:42 njl Exp $
*/
/*
@@ -166,7 +166,7 @@
}
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list