PERFORCE change 38485 for review
Sam Leffler
sam at FreeBSD.org
Tue Sep 23 09:16:05 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38485
Change 38485 by sam at sam_ebb on 2003/09/23 09:15:06
IFC @ 38484
Affected files ...
.. //depot/projects/netperf/sys/alpha/include/bus.h#3 integrate
.. //depot/projects/netperf/sys/amd64/acpica/acpi_machdep.c#4 integrate
.. //depot/projects/netperf/sys/amd64/amd64/busdma_machdep.c#4 integrate
.. //depot/projects/netperf/sys/amd64/amd64/exception.S#3 integrate
.. //depot/projects/netperf/sys/amd64/amd64/machdep.c#5 integrate
.. //depot/projects/netperf/sys/amd64/amd64/trap.c#3 integrate
.. //depot/projects/netperf/sys/amd64/amd64/tsc.c#3 integrate
.. //depot/projects/netperf/sys/amd64/ia32/ia32_syscall.c#4 integrate
.. //depot/projects/netperf/sys/amd64/include/acpica_machdep.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/bus_amd64.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/clock.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/cpu.h#3 integrate
.. //depot/projects/netperf/sys/amd64/include/endian.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/legacyvar.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/md_var.h#3 integrate
.. //depot/projects/netperf/sys/amd64/include/pci_cfgreg.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/segments.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/specialreg.h#2 integrate
.. //depot/projects/netperf/sys/amd64/include/vmparam.h#2 integrate
.. //depot/projects/netperf/sys/amd64/isa/clock.c#3 integrate
.. //depot/projects/netperf/sys/amd64/pci/pci_bus.c#5 integrate
.. //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#6 integrate
.. //depot/projects/netperf/sys/dev/ata/atapi-cd.c#7 integrate
.. //depot/projects/netperf/sys/dev/ata/atapi-cd.h#6 integrate
.. //depot/projects/netperf/sys/dev/bge/if_bge.c#8 integrate
.. //depot/projects/netperf/sys/dev/em/if_em.c#5 integrate
.. //depot/projects/netperf/sys/dev/em/if_em.h#6 integrate
.. //depot/projects/netperf/sys/dev/uart/uart.h#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_bus_pccard.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_core.c#3 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu.h#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu_alpha.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu_amd64.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu_i386.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu_ia64.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu_pc98.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_cpu_sparc64.c#2 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_dev_sab82532.c#3 integrate
.. //depot/projects/netperf/sys/dev/uart/uart_dev_z8530.c#3 integrate
.. //depot/projects/netperf/sys/geom/geom_disk.c#3 integrate
.. //depot/projects/netperf/sys/i386/include/bus_at386.h#2 integrate
.. //depot/projects/netperf/sys/i386/include/bus_pc98.h#2 integrate
.. //depot/projects/netperf/sys/i386/include/endian.h#3 integrate
.. //depot/projects/netperf/sys/ia64/include/bus.h#3 integrate
.. //depot/projects/netperf/sys/kern/kern_linker.c#3 integrate
.. //depot/projects/netperf/sys/net/radix.c#4 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_radiotap.h#2 integrate
.. //depot/projects/netperf/sys/pc98/i386/busiosubr.c#2 integrate
.. //depot/projects/netperf/sys/sparc64/include/bus.h#3 integrate
.. //depot/projects/netperf/sys/sys/kobj.h#2 integrate
.. //depot/projects/netperf/sys/vm/vm_map.c#5 integrate
Differences ...
==== //depot/projects/netperf/sys/alpha/include/bus.h#3 (text+ko) ====
@@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.23 2003/07/27 13:52:09 mux Exp $ */
+/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.24 2003/09/23 08:22:33 nyan Exp $ */
#ifndef _ALPHA_BUS_H_
#define _ALPHA_BUS_H_
@@ -91,6 +91,24 @@
#define BUS_SPACE_UNRESTRICTED (~0UL)
/*
+ * Map a region of device bus space into CPU virtual address space.
+ */
+
+static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
+ bus_size_t size, int flags,
+ bus_space_handle_t *bshp);
+
+static __inline int
+bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr,
+ bus_size_t size __unused, int flags __unused,
+ bus_space_handle_t *bshp)
+{
+
+ *bshp = addr;
+ return (0);
+}
+
+/*
* Unmap a region of device bus space.
*/
==== //depot/projects/netperf/sys/amd64/acpica/acpi_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.11 2003/08/28 16:30:31 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.12 2003/09/22 22:12:46 peter Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -33,6 +33,8 @@
#include "acpi.h"
#include <dev/acpica/acpivar.h>
+static int intr_model = ACPI_INTR_PIC;
+
int
acpi_machdep_init(device_t dev)
{
@@ -43,5 +45,15 @@
acpi_install_wakeup_handler(sc);
+ if (intr_model != ACPI_INTR_PIC)
+ acpi_SetIntrModel(intr_model);
+
return (0);
}
+
+void
+acpi_SetDefaultIntrModel(int model)
+{
+
+ intr_model = model;
+}
==== //depot/projects/netperf/sys/amd64/amd64/busdma_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.51 2003/08/04 23:40:35 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.54 2003/09/22 23:11:42 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,6 +65,7 @@
int map_count;
bus_dma_lock_t *lockfunc;
void *lockfuncarg;
+ bus_dma_segment_t *segments;
};
struct bounce_page {
@@ -169,11 +170,7 @@
static void
dflt_lock(void *arg, bus_dma_lock_op_t op)
{
-#ifdef INVARIANTS
panic("driver error: busdma dflt_lock called");
-#else
- printf("DRIVER_ERROR: busdma dflt_lock called\n");
-#endif
}
#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4
@@ -219,7 +216,8 @@
newtag->lockfunc = dflt_lock;
newtag->lockfuncarg = NULL;
}
-
+ newtag->segments = NULL;
+
/* Take into account any restrictions imposed by our parent tag */
if (parent != NULL) {
newtag->lowaddr = MIN(parent->lowaddr, newtag->lowaddr);
@@ -289,6 +287,8 @@
parent = dmat->parent;
atomic_subtract_int(&dmat->ref_count, 1);
if (dmat->ref_count == 0) {
+ if (dmat->segments != NULL)
+ free(dmat->segments, M_DEVBUF);
free(dmat, M_DEVBUF);
/*
* Last reference count, so
@@ -314,6 +314,14 @@
error = 0;
+ if (dmat->segments == NULL) {
+ dmat->segments = (bus_dma_segment_t *)malloc(
+ sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
+ M_NOWAIT);
+ if (dmat->segments == NULL)
+ return (ENOMEM);
+ }
+
if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) {
/* Must bounce */
int maxpages;
@@ -402,6 +410,14 @@
/* If we succeed, no mapping/bouncing will be required */
*mapp = NULL;
+ if (dmat->segments == NULL) {
+ dmat->segments = (bus_dma_segment_t *)malloc(
+ sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
+ M_NOWAIT);
+ if (dmat->segments == NULL)
+ return (ENOMEM);
+ }
+
if ((dmat->maxsize <= PAGE_SIZE) &&
dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags);
@@ -452,7 +468,6 @@
static int
_bus_dmamap_load_buffer(bus_dma_tag_t dmat,
bus_dmamap_t map,
- bus_dma_segment_t segs[],
void *buf, bus_size_t buflen,
struct thread *td,
int flags,
@@ -460,6 +475,7 @@
int *segp,
int first)
{
+ bus_dma_segment_t *segs;
bus_size_t sgsize;
bus_addr_t curaddr, lastaddr, baddr, bmask;
vm_offset_t vaddr;
@@ -468,6 +484,8 @@
int seg;
pmap_t pmap;
+ segs = dmat->segments;
+
if (map == NULL)
map = &nobounce_dmamap;
@@ -589,8 +607,6 @@
return (buflen != 0 ? EFBIG : 0); /* XXX better return value here? */
}
-#define BUS_DMAMAP_NSEGS ((64 * 1024) / PAGE_SIZE + 1)
-
/*
* Map the buffer buf into bus space using the dmamap map.
*/
@@ -599,11 +615,6 @@
bus_size_t buflen, bus_dmamap_callback_t *callback,
void *callback_arg, int flags)
{
-#ifdef __GNUC__
- bus_dma_segment_t dm_segments[dmat->nsegments];
-#else
- bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS];
-#endif
bus_addr_t lastaddr = 0;
int error, nsegs = 0;
@@ -613,16 +624,16 @@
map->callback_arg = callback_arg;
}
- error = _bus_dmamap_load_buffer(dmat, map, dm_segments, buf, buflen,
- NULL, flags, &lastaddr, &nsegs, 1);
+ error = _bus_dmamap_load_buffer(dmat, map, buf, buflen, NULL, flags,
+ &lastaddr, &nsegs, 1);
if (error == EINPROGRESS)
return (error);
if (error)
- (*callback)(callback_arg, dm_segments, 0, error);
+ (*callback)(callback_arg, dmat->segments, 0, error);
else
- (*callback)(callback_arg, dm_segments, nsegs + 1, 0);
+ (*callback)(callback_arg, dmat->segments, nsegs + 1, 0);
return (0);
}
@@ -637,11 +648,6 @@
bus_dmamap_callback2_t *callback, void *callback_arg,
int flags)
{
-#ifdef __GNUC__
- bus_dma_segment_t dm_segments[dmat->nsegments];
-#else
- bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS];
-#endif
int nsegs, error;
M_ASSERTPKTHDR(m0);
@@ -657,7 +663,6 @@
for (m = m0; m != NULL && error == 0; m = m->m_next) {
if (m->m_len > 0) {
error = _bus_dmamap_load_buffer(dmat, map,
- dm_segments,
m->m_data, m->m_len,
NULL, flags, &lastaddr,
&nsegs, first);
@@ -670,9 +675,9 @@
if (error) {
/* force "no valid mappings" in callback */
- (*callback)(callback_arg, dm_segments, 0, 0, error);
+ (*callback)(callback_arg, dmat->segments, 0, 0, error);
} else {
- (*callback)(callback_arg, dm_segments,
+ (*callback)(callback_arg, dmat->segments,
nsegs+1, m0->m_pkthdr.len, error);
}
return (error);
@@ -688,11 +693,6 @@
int flags)
{
bus_addr_t lastaddr;
-#ifdef __GNUC__
- bus_dma_segment_t dm_segments[dmat->nsegments];
-#else
- bus_dma_segment_t dm_segments[BUS_DMAMAP_NSEGS];
-#endif
int nsegs, error, first, i;
bus_size_t resid;
struct iovec *iov;
@@ -722,7 +722,6 @@
if (minlen > 0) {
error = _bus_dmamap_load_buffer(dmat, map,
- dm_segments,
addr, minlen,
td, flags, &lastaddr, &nsegs, first);
first = 0;
@@ -733,9 +732,9 @@
if (error) {
/* force "no valid mappings" in callback */
- (*callback)(callback_arg, dm_segments, 0, 0, error);
+ (*callback)(callback_arg, dmat->segments, 0, 0, error);
} else {
- (*callback)(callback_arg, dm_segments,
+ (*callback)(callback_arg, dmat->segments,
nsegs+1, uio->uio_resid, error);
}
return (error);
==== //depot/projects/netperf/sys/amd64/amd64/exception.S#3 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.111 2003/09/09 19:32:09 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.112 2003/09/22 22:54:14 peter Exp $
*/
#include <machine/asmacros.h>
@@ -332,7 +332,7 @@
doreti_ast:
/*
* Check for ASTs atomically with returning. Disabling CPU
- * interrupts provides sufficient locking evein the SMP case,
+ * interrupts provides sufficient locking eve in the SMP case,
* since we will be informed of any new ASTs by an IPI.
*/
cli
==== //depot/projects/netperf/sys/amd64/amd64/machdep.c#5 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.589 2003/09/09 19:32:09 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.593 2003/09/23 00:45:55 peter Exp $");
#include "opt_atalk.h"
#include "opt_compat.h"
@@ -756,6 +756,8 @@
u_int32_t type;
} __packed;
+u_int basemem;
+
/*
* Populate the (physmap) array with base/bound pairs describing the
* available physical memory in the system, then test this memory and
@@ -773,7 +775,7 @@
getmemsize(caddr_t kmdp, u_int64_t first)
{
int i, physmap_idx, pa_indx;
- u_int basemem, extmem;
+ u_int extmem;
vm_paddr_t pa, physmap[PHYSMAP_SIZE];
pt_entry_t *pte;
char *cp;
@@ -1166,32 +1168,31 @@
* under witness.
*/
mutex_init();
- mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_RECURSE);
+ mtx_init(&clock_lock, "clk", NULL, MTX_SPIN);
mtx_init(&icu_lock, "icu", NULL, MTX_SPIN | MTX_NOWITNESS);
/* exceptions */
for (x = 0; x < NIDT; x++)
setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0);
- setidt(0, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0);
- setidt(1, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0);
- setidt(2, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0);
- setidt(3, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0);
- setidt(4, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0);
- setidt(5, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0);
- setidt(6, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0);
- setidt(7, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0);
- setidt(8, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1);
- setidt(9, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0);
- setidt(10, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0);
- setidt(11, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0);
- setidt(12, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0);
- setidt(13, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0);
- setidt(14, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0);
- setidt(15, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0);
- setidt(16, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0);
- setidt(17, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0);
- setidt(18, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0);
- setidt(19, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0);
+ setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_UD, &IDTVEC(ill), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_NM, &IDTVEC(dna), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_DF, &IDTVEC(dblfault), SDT_SYSIGT, SEL_KPL, 1);
+ setidt(IDT_FPUGP, &IDTVEC(fpusegm), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_TS, &IDTVEC(tss), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_NP, &IDTVEC(missing), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_SS, &IDTVEC(stk), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_GP, &IDTVEC(prot), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_PF, &IDTVEC(page), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_MF, &IDTVEC(fpu), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_AC, &IDTVEC(align), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_MC, &IDTVEC(mchk), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_XF, &IDTVEC(xmm), SDT_SYSIGT, SEL_KPL, 0);
r_idt.rd_limit = sizeof(idt0) - 1;
r_idt.rd_base = (long) idt;
==== //depot/projects/netperf/sys/amd64/amd64/trap.c#3 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.262 2003/07/25 21:15:44 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.264 2003/09/22 22:52:46 peter Exp $");
/*
* AMD64 Trap and System call handling
@@ -88,8 +88,6 @@
#include <ddb/ddb.h>
-#include <sys/sysctl.h>
-
extern void trap(struct trapframe frame);
extern void syscall(struct trapframe frame);
@@ -239,6 +237,7 @@
case T_BPTFLT: /* bpt instruction fault */
case T_TRCTRAP: /* trace trap */
+ enable_intr();
frame.tf_rflags &= ~PSL_T;
i = SIGTRAP;
break;
==== //depot/projects/netperf/sys/amd64/amd64/tsc.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/tsc.c,v 1.201 2003/07/25 21:15:44 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/tsc.c,v 1.203 2003/09/23 00:18:45 peter Exp $");
#include "opt_clock.h"
@@ -43,7 +43,6 @@
uint64_t tsc_freq;
int tsc_is_broken;
-u_int tsc_present = 1;
#ifdef SMP
static int smp_tsc;
@@ -59,7 +58,8 @@
0, /* no poll_pps */
~0u, /* counter_mask */
0, /* frequency */
- "TSC" /* name */
+ "TSC", /* name */
+ 800, /* quality (adjusted in code) */
};
void
@@ -78,12 +78,17 @@
if (bootverbose)
printf("TSC clock: %lu Hz\n", tsc_freq);
+ return;
+}
+
+void
+init_TSC_tc(void)
+{
+
if (tsc_freq != 0 && !tsc_is_broken) {
tsc_timecounter.tc_frequency = tsc_freq;
tc_init(&tsc_timecounter);
}
-
- return;
}
static int
==== //depot/projects/netperf/sys/amd64/ia32/ia32_syscall.c#4 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.4 2003/08/23 00:04:53 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.5 2003/09/22 22:09:02 peter Exp $");
/*
* 386 Trap and System call handling
@@ -263,14 +263,14 @@
ia32_syscall_enable(void *dummy)
{
- setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0);
+ setidt(IDT_SYSCALL, &IDTVEC(int0x80_syscall), SDT_SYSIGT, SEL_UPL, 0);
}
static void
ia32_syscall_disable(void *dummy)
{
- setidt(0x80, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0);
+ setidt(IDT_SYSCALL, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0);
}
SYSINIT(ia32_syscall, SI_SUB_EXEC, SI_ORDER_ANY, ia32_syscall_enable, NULL);
==== //depot/projects/netperf/sys/amd64/include/acpica_machdep.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.2 2003/05/31 06:43:55 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.3 2003/09/22 22:12:46 peter Exp $
*/
/******************************************************************************
@@ -103,4 +103,6 @@
#define COMPILER_DEPENDENT_INT64 long
#define COMPILER_DEPENDENT_UINT64 unsigned long
+void acpi_SetDefaultIntrModel(int model);
+
#endif /* __ACPICA_MACHDEP_H__ */
==== //depot/projects/netperf/sys/amd64/include/bus_amd64.h#2 (text+ko) ====
@@ -67,7 +67,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.25 2003/05/23 05:04:54 peter Exp $ */
+/* $FreeBSD: src/sys/amd64/include/bus_amd64.h,v 1.26 2003/09/23 08:22:33 nyan Exp $ */
#ifndef _AMD64_BUS_AMD64_H_
#define _AMD64_BUS_AMD64_H_
@@ -114,11 +114,19 @@
* Map a region of device bus space into CPU virtual address space.
*/
-#define BUS_SPACE_MAP_CACHEABLE 0x01
-#define BUS_SPACE_MAP_LINEAR 0x02
+static __inline int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
+ bus_size_t size, int flags,
+ bus_space_handle_t *bshp);
+
+static __inline int
+bus_space_map(bus_space_tag_t t __unused, bus_addr_t addr,
+ bus_size_t size __unused, int flags __unused,
+ bus_space_handle_t *bshp)
+{
-int bus_space_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size,
- int flags, bus_space_handle_t *bshp);
+ *bshp = addr;
+ return (0);
+}
/*
* Unmap a region of device bus space.
==== //depot/projects/netperf/sys/amd64/include/clock.h#2 (text+ko) ====
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $FreeBSD: src/sys/amd64/include/clock.h,v 1.45 2003/05/01 01:05:23 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/clock.h,v 1.46 2003/09/22 23:02:24 peter Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -37,6 +37,7 @@
int rtcin(int val);
int sysbeep(int pitch, int period);
void init_TSC(void);
+void init_TSC_tc(void);
#endif /* _KERNEL */
==== //depot/projects/netperf/sys/amd64/include/cpu.h#3 (text+ko) ====
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.69 2003/08/16 16:57:56 marcel Exp $
+ * $FreeBSD: src/sys/amd64/include/cpu.h,v 1.70 2003/09/23 00:18:45 peter Exp $
*/
#ifndef _MACHINE_CPU_H_
@@ -78,7 +78,6 @@
#ifdef _KERNEL
extern char btext[];
extern char etext[];
-extern u_int tsc_present;
void cpu_halt(void);
void cpu_reset(void);
==== //depot/projects/netperf/sys/amd64/include/endian.h#2 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)endian.h 7.8 (Berkeley) 4/3/91
- * $FreeBSD: src/sys/amd64/include/endian.h,v 1.4 2003/05/01 01:05:23 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/endian.h,v 1.5 2003/09/22 22:37:49 peter Exp $
*/
#ifndef _MACHINE_ENDIAN_H_
@@ -69,26 +69,92 @@
#ifdef __GNUC__
-#define __word_swap_int(x) \
+#define __word_swap_int_var(x) \
__extension__ ({ register __uint32_t __X = (x); \
__asm ("rorl $16, %0" : "+r" (__X)); \
__X; })
-#define __byte_swap_int(x) \
+#ifdef __OPTIMIZE__
+
+#define __word_swap_int_const(x) \
+ ((((x) & 0xffff0000) >> 16) | \
+ (((x) & 0x0000ffff) << 16))
+#define __word_swap_int(x) (__builtin_constant_p(x) ? \
+ __word_swap_int_const(x) : __word_swap_int_var(x))
+
+#else /* __OPTIMIZE__ */
+
+#define __word_swap_int(x) __word_swap_int_var(x)
+
+#endif /* __OPTIMIZE__ */
+
+#define __byte_swap_int_var(x) \
__extension__ ({ register __uint32_t __X = (x); \
__asm ("bswap %0" : "+r" (__X)); \
__X; })
-#define __byte_swap_long(x) \
+#ifdef __OPTIMIZE__
+
+#define __byte_swap_int_const(x) \
+ ((((x) & 0xff000000) >> 24) | \
+ (((x) & 0x00ff0000) >> 8) | \
+ (((x) & 0x0000ff00) << 8) | \
+ (((x) & 0x000000ff) << 24))
+#define __byte_swap_int(x) (__builtin_constant_p(x) ? \
+ __byte_swap_int_const(x) : __byte_swap_int_var(x))
+
+#else /* __OPTIMIZE__ */
+
+#define __byte_swap_int(x) __byte_swap_int_var(x)
+
+#endif /* __OPTIMIZE__ */
+
+#define __byte_swap_long_var(x) \
__extension__ ({ register __uint64_t __X = (x); \
__asm ("bswap %0" : "+r" (__X)); \
__X; })
-#define __byte_swap_word(x) \
+#ifdef __OPTIMIZE__
+
+#define __byte_swap_long_const(x) \
+ (((x >> 56) | \
+ ((x >> 40) & 0xff00) | \
+ ((x >> 24) & 0xff0000) | \
+ ((x >> 8) & 0xff000000) | \
+ ((x << 8) & (0xfful << 32)) | \
+ ((x << 24) & (0xfful << 40)) | \
+ ((x << 40) & (0xfful << 48)) | \
+ ((x << 56))))
+
+#define __byte_swap_long(x) (__builtin_constant_p(x) ? \
+ __byte_swap_long_const(x) : __byte_swap_long_var(x))
+
+#else /* __OPTIMIZE__ */
+
+#define __byte_swap_long(x) __byte_swap_long_var(x)
+
+#endif /* __OPTIMIZE__ */
+
+#define __byte_swap_word_var(x) \
__extension__ ({ register __uint16_t __X = (x); \
__asm ("xchgb %h0, %b0" : "+Q" (__X)); \
__X; })
+#ifdef __OPTIMIZE__
+
+#define __byte_swap_word_const(x) \
+ ((((x) & 0xff00) >> 8) | \
+ (((x) & 0x00ff) << 8))
+
+#define __byte_swap_word(x) (__builtin_constant_p(x) ? \
+ __byte_swap_word_const(x) : __byte_swap_word_var(x))
+
+#else /* __OPTIMIZE__ */
+
+#define __byte_swap_word(x) __byte_swap_word_var(x)
+
+#endif /* __OPTIMIZE__ */
+
static __inline __uint64_t
__bswap64(__uint64_t _x)
{
==== //depot/projects/netperf/sys/amd64/include/legacyvar.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.3 2002/09/23 15:50:06 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/legacyvar.h,v 1.4 2003/09/23 00:03:44 peter Exp $
*/
#ifndef _MACHINE_LEGACYVAR_H_
@@ -40,4 +40,15 @@
#undef LEGACY_ACCESSOR
+int legacy_pcib_attach(device_t dev);
+int legacy_pcib_maxslots(device_t dev);
+u_int32_t legacy_pcib_read_config(device_t dev, int bus, int slot, int func,
+ int reg, int bytes);
+int legacy_pcib_read_ivar(device_t dev, device_t child, int which,
+ uintptr_t *result);
+void legacy_pcib_write_config(device_t dev, int bus, int slot, int func,
+ int reg, u_int32_t data, int bytes);
+int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
+ uintptr_t value);
+
#endif /* !_MACHINE_LEGACYVAR_H_ */
==== //depot/projects/netperf/sys/amd64/include/md_var.h#3 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.67 2003/08/16 16:57:56 marcel Exp $
+ * $FreeBSD: src/sys/amd64/include/md_var.h,v 1.68 2003/09/22 23:33:29 peter Exp $
*/
#ifndef _MACHINE_MD_VAR_H_
@@ -50,6 +50,7 @@
extern char kstack[];
extern char sigcode[];
extern int szsigcode;
+extern u_int basemem;
typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss);
struct thread;
==== //depot/projects/netperf/sys/amd64/include/pci_cfgreg.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/pci_cfgreg.h,v 1.10 2003/05/01 01:05:23 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/pci_cfgreg.h,v 1.11 2003/09/22 22:21:21 peter Exp $
*
*/
@@ -32,7 +32,7 @@
#define CONF1_ENABLE 0x80000000ul
#define CONF1_ENABLE_CHK 0x80000000ul
-#define CONF1_ENABLE_MSK 0x7ff00000ul
+#define CONF1_ENABLE_MSK 0x7f000000ul
#define CONF1_ENABLE_CHK1 0xff000001ul
#define CONF1_ENABLE_MSK1 0x80000001ul
#define CONF1_ENABLE_RES1 0x80000000ul
==== //depot/projects/netperf/sys/amd64/include/segments.h#2 (text+ko) ====
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)segments.h 7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/segments.h,v 1.35 2003/05/14 04:10:49 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/segments.h,v 1.36 2003/09/22 22:09:02 peter Exp $
*/
#ifndef _MACHINE_SEGMENTS_H_
@@ -170,6 +170,30 @@
#define NRSVIDT 32 /* reserved entries for cpu exceptions */
/*
+ * Entries in the Interrupt Descriptor Table (IDT)
+ */
+#define IDT_DE 0 /* #DE: Divide Error */
+#define IDT_DB 1 /* #DB: Debug */
+#define IDT_NMI 2 /* Nonmaskable External Interrupt */
+#define IDT_BP 3 /* #BP: Breakpoint */
+#define IDT_OF 4 /* #OF: Overflow */
+#define IDT_BR 5 /* #BR: Bound Range Exceeded */
+#define IDT_UD 6 /* #UD: Undefined/Invalid Opcode */
+#define IDT_NM 7 /* #NM: No Math Coprocessor */
+#define IDT_DF 8 /* #DF: Double Fault */
+#define IDT_FPUGP 9 /* Coprocessor Segment Overrun */
+#define IDT_TS 10 /* #TS: Invalid TSS */
+#define IDT_NP 11 /* #NP: Segment Not Present */
+#define IDT_SS 12 /* #SS: Stack Segment Fault */
+#define IDT_GP 13 /* #GP: General Protection Fault */
+#define IDT_PF 14 /* #PF: Page Fault */
+#define IDT_MF 16 /* #MF: FPU Floating-Point Error */
+#define IDT_AC 17 /* #AC: Alignment Check */
+#define IDT_MC 18 /* #MC: Machine Check */
+#define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */
+#define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */
+
+/*
* Entries in the Global Descriptor Table (GDT)
*/
#define GNULL_SEL 0 /* Null Descriptor */
==== //depot/projects/netperf/sys/amd64/include/specialreg.h#2 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.24 2003/05/01 01:05:23 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.25 2003/09/22 22:51:46 peter Exp $
*/
#ifndef _MACHINE_SPECIALREG_H_
@@ -133,16 +133,30 @@
#define MSR_P5_MC_ADDR 0x000
#define MSR_P5_MC_TYPE 0x001
#define MSR_TSC 0x010
+#define MSR_P5_CESR 0x011
+#define MSR_P5_CTR0 0x012
+#define MSR_P5_CTR1 0x013
+#define MSR_IA32_PLATFORM_ID 0x017
#define MSR_APICBASE 0x01b
#define MSR_EBL_CR_POWERON 0x02a
+#define MSR_TEST_CTL 0x033
#define MSR_BIOS_UPDT_TRIG 0x079
+#define MSR_BBL_CR_D0 0x088
+#define MSR_BBL_CR_D1 0x089
+#define MSR_BBL_CR_D2 0x08a
#define MSR_BIOS_SIGN 0x08b
#define MSR_PERFCTR0 0x0c1
#define MSR_PERFCTR1 0x0c2
#define MSR_MTRRcap 0x0fe
-#define MSR_SYSENTER_CS 0x174
-#define MSR_SYSENTER_ESP 0x175
-#define MSR_SYSENTER_EIP 0x176
+#define MSR_BBL_CR_ADDR 0x116
+#define MSR_BBL_CR_DECC 0x118
+#define MSR_BBL_CR_CTL 0x119
+#define MSR_BBL_CR_TRIG 0x11a
+#define MSR_BBL_CR_BUSY 0x11b
+#define MSR_BBL_CR_CTL3 0x11e
+#define MSR_SYSENTER_CS_MSR 0x174
+#define MSR_SYSENTER_ESP_MSR 0x175
+#define MSR_SYSENTER_EIP_MSR 0x176
#define MSR_MCG_CAP 0x179
#define MSR_MCG_STATUS 0x17a
#define MSR_MCG_CTL 0x17b
@@ -182,6 +196,14 @@
#define MSR_MC3_MISC 0x413
/*
+ * Constants related to MSR's.
+ */
+#define APICBASE_RESERVED 0x000006ff
+#define APICBASE_BSP 0x00000100
+#define APICBASE_ENABLED 0x00000800
+#define APICBASE_ADDRESS 0xfffff000
+
+/*
* Constants related to MTRRs
*/
#define MTRR_N64K 8 /* numbers of fixed-size entries */
==== //depot/projects/netperf/sys/amd64/include/vmparam.h#2 (text+ko) ====
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.39 2003/07/09 23:04:23 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/vmparam.h,v 1.41 2003/09/23 03:20:34 peter Exp $
*/
==== //depot/projects/netperf/sys/amd64/isa/clock.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.200 2003/07/25 21:18:52 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.202 2003/09/22 23:02:24 peter Exp $");
/*
* Routines to handle clock hardware.
@@ -413,8 +413,18 @@
* takes about 1.5 usec for each of the i/o's in getit(). The loop
* takes about 6 usec on a 486/33 and 13 usec on a 386/20. The
* multiplications and divisions to scale the count take a while).
+ *
+ * However, if ddb is active then use a fake counter since reading
+ * the i8254 counter involves acquiring a lock. ddb must not go
+ * locking for many reasons, but it calls here for at least atkbd
+ * input.
*/
- prev_tick = getit();
+#ifdef DDB
+ if (db_active)
+ prev_tick = 0;
+ else
+#endif
+ prev_tick = getit();
n -= 0; /* XXX actually guess no initial overhead */
/*
* Calculate (n * (timer_freq / 1e6)) without using floating point
@@ -441,7 +451,13 @@
/ 1000000;
while (ticks_left > 0) {
- tick = getit();
+#ifdef DDB
+ if (db_active) {
+ inb(0x84);
+ tick = prev_tick + 1;
+ } else
+#endif
+ tick = getit();
#ifdef DELAYDEBUG
++getit_calls;
#endif
@@ -880,6 +896,8 @@
intr_restore(crit);
writertc(RTC_STATUSB, rtc_statusb);
+
+ init_TSC_tc();
}
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list