PERFORCE change 109899 for review
Matt Jacob
mjacob at FreeBSD.org
Tue Nov 14 00:15:44 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=109899
Change 109899 by mjacob at newisp on 2006/11/14 00:15:10
IFC
Affected files ...
.. //depot/projects/newisp/Makefile#2 integrate
.. //depot/projects/newisp/amd64/amd64/db_disasm.c#2 integrate
.. //depot/projects/newisp/amd64/amd64/local_apic.c#7 integrate
.. //depot/projects/newisp/amd64/amd64/machdep.c#6 integrate
.. //depot/projects/newisp/amd64/amd64/mptable_pci.c#2 integrate
.. //depot/projects/newisp/amd64/amd64/msi.c#1 branch
.. //depot/projects/newisp/amd64/amd64/nexus.c#3 integrate
.. //depot/projects/newisp/amd64/amd64/pmap.c#3 integrate
.. //depot/projects/newisp/amd64/include/apicvar.h#3 integrate
.. //depot/projects/newisp/amd64/include/intr_machdep.h#3 integrate
.. //depot/projects/newisp/amd64/include/pmap.h#2 integrate
.. //depot/projects/newisp/amd64/linux32/linux.h#4 integrate
.. //depot/projects/newisp/amd64/linux32/linux32_proto.h#5 integrate
.. //depot/projects/newisp/amd64/linux32/linux32_syscall.h#5 integrate
.. //depot/projects/newisp/amd64/linux32/linux32_sysent.c#5 integrate
.. //depot/projects/newisp/amd64/pci/pci_bus.c#2 integrate
.. //depot/projects/newisp/arm/arm/cpufunc.c#3 integrate
.. //depot/projects/newisp/arm/arm/identcpu.c#2 integrate
.. //depot/projects/newisp/arm/arm/intr.c#2 integrate
.. //depot/projects/newisp/arm/arm/pmap.c#3 integrate
.. //depot/projects/newisp/arm/arm/vm_machdep.c#3 integrate
.. //depot/projects/newisp/arm/at91/kb920x_machdep.c#5 integrate
.. //depot/projects/newisp/arm/include/armreg.h#2 integrate
.. //depot/projects/newisp/arm/include/cpuconf.h#2 integrate
.. //depot/projects/newisp/arm/include/cpufunc.h#2 integrate
.. //depot/projects/newisp/arm/include/pmap.h#2 integrate
.. //depot/projects/newisp/arm/sa11x0/assabet_machdep.c#3 integrate
.. //depot/projects/newisp/boot/arm/at91/Makefile#2 integrate
.. //depot/projects/newisp/boot/arm/at91/Makefile.inc#3 integrate
.. //depot/projects/newisp/boot/arm/at91/boot0iic/main.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/boot2/Makefile#2 integrate
.. //depot/projects/newisp/boot/arm/at91/boot2/board.h#1 branch
.. //depot/projects/newisp/boot/arm/at91/boot2/boot2.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/boot2/kb920x_board.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootiic/Makefile#2 integrate
.. //depot/projects/newisp/boot/arm/at91/bootspi/Makefile#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/Makefile#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/emac.c#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/emac.h#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/emac_init.c#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/mci_device.h#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/memcmp.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/memcpy.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/memset.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/sd-card.c#3 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/strcmp.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/strcpy.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/strcvt.c#2 integrate
.. //depot/projects/newisp/boot/arm/at91/libat91/strlen.c#2 integrate
.. //depot/projects/newisp/boot/pc98/btx/btx/btx.S#2 integrate
.. //depot/projects/newisp/boot/pc98/libpc98/biossmap.c#1 branch
.. //depot/projects/newisp/coda/coda_vnops.c#2 integrate
.. //depot/projects/newisp/coda/coda_vnops.h#2 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_proto.h#12 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_syscall.h#12 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_syscalls.c#12 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_sysent.c#12 integrate
.. //depot/projects/newisp/compat/linux/linux_misc.c#7 integrate
.. //depot/projects/newisp/compat/svr4/svr4_proto.h#2 integrate
.. //depot/projects/newisp/compat/svr4/svr4_syscall.h#2 integrate
.. //depot/projects/newisp/compat/svr4/svr4_syscallnames.c#2 integrate
.. //depot/projects/newisp/compat/svr4/svr4_sysent.c#2 integrate
.. //depot/projects/newisp/conf/NOTES#13 integrate
.. //depot/projects/newisp/conf/files#12 integrate
.. //depot/projects/newisp/conf/files.amd64#6 integrate
.. //depot/projects/newisp/conf/files.arm#2 integrate
.. //depot/projects/newisp/conf/files.i386#5 integrate
.. //depot/projects/newisp/conf/files.sun4v#2 integrate
.. //depot/projects/newisp/conf/options#7 integrate
.. //depot/projects/newisp/dev/acpica/acpi_pci_link.c#2 integrate
.. //depot/projects/newisp/dev/acpica/acpi_pcib_acpi.c#2 integrate
.. //depot/projects/newisp/dev/acpica/acpi_pcib_pci.c#2 integrate
.. //depot/projects/newisp/dev/aha/ahareg.h#2 integrate
.. //depot/projects/newisp/dev/em/if_em.c#12 integrate
.. //depot/projects/newisp/dev/em/if_em.h#6 integrate
.. //depot/projects/newisp/dev/iwi/if_iwi.c#4 integrate
.. //depot/projects/newisp/dev/pci/pci.c#7 integrate
.. //depot/projects/newisp/dev/pci/pci_if.m#3 integrate
.. //depot/projects/newisp/dev/pci/pci_pci.c#4 integrate
.. //depot/projects/newisp/dev/pci/pci_private.h#3 integrate
.. //depot/projects/newisp/dev/pci/pcib_if.m#2 integrate
.. //depot/projects/newisp/dev/pci/pcib_private.h#2 integrate
.. //depot/projects/newisp/dev/pci/pcireg.h#2 integrate
.. //depot/projects/newisp/dev/pci/pcivar.h#4 integrate
.. //depot/projects/newisp/dev/usb/usb_quirks.c#4 integrate
.. //depot/projects/newisp/dev/usb/usbdevs#4 integrate
.. //depot/projects/newisp/fs/nullfs/null_vnops.c#2 integrate
.. //depot/projects/newisp/i386/i386/identcpu.c#2 integrate
.. //depot/projects/newisp/i386/i386/local_apic.c#7 integrate
.. //depot/projects/newisp/i386/i386/machdep.c#5 integrate
.. //depot/projects/newisp/i386/i386/mptable_pci.c#2 integrate
.. //depot/projects/newisp/i386/i386/msi.c#1 branch
.. //depot/projects/newisp/i386/i386/nexus.c#3 integrate
.. //depot/projects/newisp/i386/i386/pmap.c#3 integrate
.. //depot/projects/newisp/i386/ibcs2/ibcs2_proto.h#2 integrate
.. //depot/projects/newisp/i386/ibcs2/ibcs2_xenix.h#2 integrate
.. //depot/projects/newisp/i386/include/apicvar.h#3 integrate
.. //depot/projects/newisp/i386/include/intr_machdep.h#3 integrate
.. //depot/projects/newisp/i386/include/pmap.h#2 integrate
.. //depot/projects/newisp/i386/linux/linux_proto.h#6 integrate
.. //depot/projects/newisp/i386/pci/pci_bus.c#2 integrate
.. //depot/projects/newisp/i386/pci/pci_pir.c#2 integrate
.. //depot/projects/newisp/ia64/ia64/pmap.c#3 integrate
.. //depot/projects/newisp/ia64/include/pmap.h#2 integrate
.. //depot/projects/newisp/kern/Make.tags.inc#2 integrate
.. //depot/projects/newisp/kern/init_main.c#5 integrate
.. //depot/projects/newisp/kern/init_sysent.c#9 integrate
.. //depot/projects/newisp/kern/kern_idle.c#3 integrate
.. //depot/projects/newisp/kern/kern_lock.c#3 integrate
.. //depot/projects/newisp/kern/kern_mutex.c#2 integrate
.. //depot/projects/newisp/kern/kern_rwlock.c#2 integrate
.. //depot/projects/newisp/kern/kern_sig.c#6 integrate
.. //depot/projects/newisp/kern/kern_sx.c#2 integrate
.. //depot/projects/newisp/kern/kern_thr.c#5 integrate
.. //depot/projects/newisp/kern/kern_time.c#5 integrate
.. //depot/projects/newisp/kern/ksched.c#1 branch
.. //depot/projects/newisp/kern/makesyscalls.sh#2 integrate
.. //depot/projects/newisp/kern/p1003_1b.c#1 branch
.. //depot/projects/newisp/kern/posix4_mib.c#1 branch
.. //depot/projects/newisp/kern/sched_4bsd.c#3 integrate
.. //depot/projects/newisp/kern/sched_ule.c#3 integrate
.. //depot/projects/newisp/kern/subr_lock.c#2 integrate
.. //depot/projects/newisp/kern/subr_witness.c#4 integrate
.. //depot/projects/newisp/kern/syscalls.c#9 integrate
.. //depot/projects/newisp/kern/systrace_args.c#9 integrate
.. //depot/projects/newisp/kern/uipc_mqueue.c#4 integrate
.. //depot/projects/newisp/kern/uipc_sem.c#4 integrate
.. //depot/projects/newisp/kern/uipc_syscalls.c#5 integrate
.. //depot/projects/newisp/kern/vfs_aio.c#5 integrate
.. //depot/projects/newisp/kern/vfs_default.c#3 integrate
.. //depot/projects/newisp/kern/vfs_subr.c#8 integrate
.. //depot/projects/newisp/kern/vfs_vnops.c#4 integrate
.. //depot/projects/newisp/kern/vnode_if.src#2 integrate
.. //depot/projects/newisp/modules/Makefile#4 integrate
.. //depot/projects/newisp/modules/acpi/Makefile#3 integrate
.. //depot/projects/newisp/modules/if_ppp/Makefile#2 integrate
.. //depot/projects/newisp/net/bridgestp.c#5 integrate
.. //depot/projects/newisp/net/bridgestp.h#3 integrate
.. //depot/projects/newisp/net/if_bridge.c#7 integrate
.. //depot/projects/newisp/net/if_bridgevar.h#3 integrate
.. //depot/projects/newisp/net/if_ppp.c#5 integrate
.. //depot/projects/newisp/net/if_pppvar.h#2 integrate
.. //depot/projects/newisp/netinet/ip_fw2.c#7 integrate
.. //depot/projects/newisp/netinet/libalias/alias_smedia.c#3 integrate
.. //depot/projects/newisp/netinet/sctp_asconf.c#2 integrate
.. //depot/projects/newisp/netinet/sctp_constants.h#2 integrate
.. //depot/projects/newisp/netinet/sctp_indata.c#2 integrate
.. //depot/projects/newisp/netinet/sctp_input.c#2 integrate
.. //depot/projects/newisp/netinet/sctp_output.c#2 integrate
.. //depot/projects/newisp/netinet/sctp_pcb.c#2 integrate
.. //depot/projects/newisp/netinet/sctp_structs.h#2 integrate
.. //depot/projects/newisp/netinet/sctp_uio.h#2 integrate
.. //depot/projects/newisp/netinet/sctp_usrreq.c#2 integrate
.. //depot/projects/newisp/netinet/sctputil.c#2 integrate
.. //depot/projects/newisp/netinet/sctputil.h#2 integrate
.. //depot/projects/newisp/netinet6/sctp6_usrreq.c#2 integrate
.. //depot/projects/newisp/pc98/pc98/machdep.c#4 integrate
.. //depot/projects/newisp/pci/if_pcn.c#2 integrate
.. //depot/projects/newisp/pci/if_pcnreg.h#2 integrate
.. //depot/projects/newisp/posix4/_semaphore.h#2 delete
.. //depot/projects/newisp/posix4/ksched.c#3 delete
.. //depot/projects/newisp/posix4/ksem.h#2 delete
.. //depot/projects/newisp/posix4/p1003_1b.c#3 delete
.. //depot/projects/newisp/posix4/posix4.h#2 delete
.. //depot/projects/newisp/posix4/posix4_mib.c#2 delete
.. //depot/projects/newisp/posix4/sched.h#2 delete
.. //depot/projects/newisp/posix4/semaphore.h#2 delete
.. //depot/projects/newisp/powerpc/powerpc/mmu_oea.c#2 integrate
.. //depot/projects/newisp/powerpc/powerpc/pmap_dispatch.c#2 integrate
.. //depot/projects/newisp/security/mac/mac_posix_sem.c#4 integrate
.. //depot/projects/newisp/security/mac_biba/mac_biba.c#3 integrate
.. //depot/projects/newisp/security/mac_mls/mac_mls.c#4 integrate
.. //depot/projects/newisp/security/mac_stub/mac_stub.c#3 integrate
.. //depot/projects/newisp/security/mac_test/mac_test.c#2 integrate
.. //depot/projects/newisp/sparc64/sparc64/pmap.c#3 integrate
.. //depot/projects/newisp/sun4v/conf/GENERIC#2 integrate
.. //depot/projects/newisp/sun4v/include/cpufunc.h#2 integrate
.. //depot/projects/newisp/sun4v/include/pmap.h#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/hcall.S#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/interrupt.S#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/intr_machdep.c#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/pmap.c#4 integrate
.. //depot/projects/newisp/sun4v/sun4v/rtc.c#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/support.S#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/trap.c#4 integrate
.. //depot/projects/newisp/sys/_lock.h#2 integrate
.. //depot/projects/newisp/sys/_mutex.h#2 integrate
.. //depot/projects/newisp/sys/_semaphore.h#1 branch
.. //depot/projects/newisp/sys/ksem.h#1 branch
.. //depot/projects/newisp/sys/lock.h#2 integrate
.. //depot/projects/newisp/sys/lock_profile.h#1 branch
.. //depot/projects/newisp/sys/lockmgr.h#3 integrate
.. //depot/projects/newisp/sys/mutex.h#2 integrate
.. //depot/projects/newisp/sys/param.h#8 integrate
.. //depot/projects/newisp/sys/posix4.h#1 branch
.. //depot/projects/newisp/sys/proc.h#4 integrate
.. //depot/projects/newisp/sys/sched.h#3 integrate
.. //depot/projects/newisp/sys/sem.h#3 integrate
.. //depot/projects/newisp/sys/semaphore.h#1 branch
.. //depot/projects/newisp/sys/syscall.h#9 integrate
.. //depot/projects/newisp/sys/syscall.mk#9 integrate
.. //depot/projects/newisp/sys/sysproto.h#9 integrate
.. //depot/projects/newisp/sys/thr.h#3 integrate
.. //depot/projects/newisp/sys/umtx.h#5 integrate
.. //depot/projects/newisp/sys/vnode.h#3 integrate
.. //depot/projects/newisp/ufs/ffs/ffs_vnops.c#4 integrate
.. //depot/projects/newisp/vm/vm_contig.c#5 integrate
.. //depot/projects/newisp/vm/vm_fault.c#4 integrate
.. //depot/projects/newisp/vm/vm_kern.c#3 integrate
.. //depot/projects/newisp/vm/vm_page.c#6 integrate
Differences ...
==== //depot/projects/newisp/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $
+# $FreeBSD: src/sys/Makefile,v 1.39 2006/11/11 16:26:55 trhodes Exp $
.include <bsd.own.mk>
@@ -11,7 +11,7 @@
CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \
isofs kern libkern modules net net80211 netatalk netatm \
netgraph netinet netinet6 netipx netkey netnatm netncp \
- netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \
+ netsmb nfs nfsclient nfs4client rpc pccard pci sys \
ufs vm ${ARCHDIR}
ARCHDIR ?= ${MACHINE}
==== //depot/projects/newisp/amd64/amd64/db_disasm.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.30 2005/03/30 22:57:41 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.31 2006/11/13 21:14:54 jhb Exp $");
/*
* Instruction disassembler.
@@ -84,6 +84,7 @@
#define Ib 21 /* byte immediate, unsigned */
#define Ibs 22 /* byte immediate, signed */
#define Iw 23 /* word immediate, unsigned */
+#define Ilq 24 /* long/quad immediate, unsigned */
#define O 25 /* direct address */
#define Db 26 /* byte displacement from EIP */
#define Dl 27 /* long displacement from EIP */
@@ -351,7 +352,6 @@
0,
0,
0,
- 0,
db_inst_0f8x,
db_inst_0f9x,
db_inst_0fax,
@@ -752,14 +752,14 @@
/*b6*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 },
/*b7*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 },
-/*b8*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*b9*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*ba*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*bb*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*bc*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*bd*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*be*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
-/*bf*/ { "mov", FALSE, LONG, op2(I, Ri), 0 },
+/*b8*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*b9*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*ba*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*bb*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*bc*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*bd*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*be*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
+/*bf*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 },
/*c0*/ { "", TRUE, BYTE, op2(Ib, E), db_Grp2 },
/*c1*/ { "", TRUE, LONG, op2(Ib, E), db_Grp2 },
@@ -854,17 +854,6 @@
int ss;
};
-static const char * const db_index_reg_16[8] = {
- "%bx,%si",
- "%bx,%di",
- "%bp,%si",
- "%bp,%di",
- "%si",
- "%di",
- "%bp",
- "%bx"
-};
-
static const char * const db_reg[2][4][16] = {
{{"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
@@ -927,7 +916,7 @@
int regmodrm;
struct i_addr * addrp; /* out */
{
- int mod, rm, sib, index, disp;
+ int mod, rm, sib, index, disp, size, have_sib;
mod = f_mod(rex, regmodrm);
rm = f_rm(rex, regmodrm);
@@ -940,68 +929,49 @@
addrp->is_reg = FALSE;
addrp->index = 0;
- if (short_addr) {
- addrp->index = 0;
- addrp->ss = 0;
- switch (mod) {
- case 0:
- if (rm == 6) {
- get_value_inc(disp, loc, 2, FALSE);
- addrp->disp = disp;
- addrp->base = 0;
- }
- else {
- addrp->disp = 0;
- addrp->base = db_index_reg_16[rm];
- }
- break;
- case 1:
- get_value_inc(disp, loc, 1, TRUE);
- disp &= 0xFFFF;
- addrp->disp = disp;
- addrp->base = db_index_reg_16[rm];
- break;
- case 2:
- get_value_inc(disp, loc, 2, FALSE);
- addrp->disp = disp;
- addrp->base = db_index_reg_16[rm];
- break;
- }
- }
- else {
- if (mod != 3 && rm == 4) {
- get_value_inc(sib, loc, 1, FALSE);
- rm = sib_base(rex, sib);
- index = sib_index(rex, sib);
- if (index != 4)
- addrp->index = db_reg[1][QUAD][index];
- addrp->ss = sib_ss(rex, sib);
- }
+ if (short_addr)
+ size = LONG;
+ else
+ size = QUAD;
+
+ if ((rm & 0x7) == 4) {
+ get_value_inc(sib, loc, 1, FALSE);
+ rm = sib_base(rex, sib);
+ index = sib_index(rex, sib);
+ if (index != 4)
+ addrp->index = db_reg[1][size][index];
+ addrp->ss = sib_ss(rex, sib);
+ have_sib = 1;
+ } else
+ have_sib = 0;
- switch (mod) {
- case 0:
- if (rm == 5) {
- get_value_inc(addrp->disp, loc, 4, FALSE);
+ switch (mod) {
+ case 0:
+ if (rm == 5) {
+ get_value_inc(addrp->disp, loc, 4, FALSE);
+ if (have_sib)
addrp->base = 0;
- }
- else {
- addrp->disp = 0;
- addrp->base = db_reg[1][QUAD][rm];
- }
- break;
+ else if (short_addr)
+ addrp->base = "%eip";
+ else
+ addrp->base = "%rip";
+ } else {
+ addrp->disp = 0;
+ addrp->base = db_reg[1][size][rm];
+ }
+ break;
- case 1:
- get_value_inc(disp, loc, 1, TRUE);
- addrp->disp = disp;
- addrp->base = db_reg[1][QUAD][rm];
- break;
+ case 1:
+ get_value_inc(disp, loc, 1, TRUE);
+ addrp->disp = disp;
+ addrp->base = db_reg[1][size][rm];
+ break;
- case 2:
- get_value_inc(disp, loc, 4, FALSE);
- addrp->disp = disp;
- addrp->base = db_reg[1][QUAD][rm];
- break;
- }
+ case 2:
+ get_value_inc(disp, loc, 4, FALSE);
+ addrp->disp = disp;
+ addrp->base = db_reg[1][size][rm];
+ break;
}
return (loc);
}
@@ -1022,7 +992,8 @@
db_printf("%s:", seg);
}
- db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY);
+ if (addrp->disp != 0 || (addrp->base == 0 && addrp->index == 0))
+ db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY);
if (addrp->base != 0 || addrp->index != 0) {
db_printf("(");
if (addrp->base)
@@ -1154,6 +1125,7 @@
int prefix;
int imm;
int imm2;
+ long imm64;
int len;
struct i_addr address;
@@ -1426,6 +1398,12 @@
db_printf("$%#r", imm);
break;
+ case Ilq:
+ len = db_lengths[rex & REX_W ? QUAD : LONG];
+ get_value_inc(imm64, loc, len, FALSE);
+ db_printf("$%#lr", imm64);
+ break;
+
case O:
len = (short_addr ? 2 : 4);
get_value_inc(displ, loc, len, FALSE);
==== //depot/projects/newisp/amd64/amd64/local_apic.c#7 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.32 2006/10/10 23:23:11 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.33 2006/11/13 22:23:32 jhb Exp $");
#include "opt_hwpmc_hooks.h"
@@ -744,6 +744,65 @@
panic("Couldn't find an APIC vector for IRQ %u", irq);
}
+/*
+ * Request 'count' free contiguous IDT vectors to be used by 'count'
+ * IRQs. 'count' must be a power of two and the vectors will be
+ * aligned on a boundary of 'align'. If the request cannot be
+ * satisfied, 0 is returned.
+ */
+u_int
+apic_alloc_vectors(u_int *irqs, u_int count, u_int align)
+{
+ u_int first, run, vector;
+
+ KASSERT(powerof2(count), ("bad count"));
+ KASSERT(powerof2(align), ("bad align"));
+ KASSERT(align >= count, ("align < count"));
+#ifdef INVARIANTS
+ for (run = 0; run < count; run++)
+ KASSERT(irqs[run] < NUM_IO_INTS, ("Invalid IRQ %u at index %u",
+ irqs[run], run));
+#endif
+
+ /*
+ * Search for 'count' free vectors. As with apic_alloc_vector(),
+ * this just uses a simple first fit algorithm.
+ */
+ run = 0;
+ first = 0;
+ mtx_lock_spin(&icu_lock);
+ for (vector = 0; vector < APIC_NUM_IOINTS; vector++) {
+
+ /* Vector is in use, end run. */
+ if (ioint_irqs[vector] != 0) {
+ run = 0;
+ first = 0;
+ continue;
+ }
+
+ /* Start a new run if run == 0 and vector is aligned. */
+ if (run == 0) {
+ if ((vector & (align - 1)) != 0)
+ continue;
+ first = vector;
+ }
+ run++;
+
+ /* Keep looping if the run isn't long enough yet. */
+ if (run < count)
+ continue;
+
+ /* Found a run, assign IRQs and return the first vector. */
+ for (vector = 0; vector < count; vector++)
+ ioint_irqs[first + vector] = irqs[vector];
+ mtx_unlock_spin(&icu_lock);
+ return (first + APIC_IO_INTS);
+ }
+ mtx_unlock_spin(&icu_lock);
+ printf("APIC: Couldn't find APIC vectors for %u IRQs\n", count);
+ return (0);
+}
+
void
apic_enable_vector(u_int vector)
{
@@ -1002,6 +1061,9 @@
intr_register_pic(&lapic_pic);
if (bootverbose)
lapic_dump("BSP");
+
+ /* Enable the MSI "pic". */
+ msi_init();
}
SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_SECOND, apic_setup_io, NULL)
==== //depot/projects/newisp/amd64/amd64/machdep.c#6 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.657 2006/10/26 21:42:16 jb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $");
#include "opt_atalk.h"
#include "opt_atpic.h"
@@ -196,7 +196,7 @@
#ifdef PERFMON
perfmon_init();
#endif
- printf("usable memory = %ju (%ju MB)\n", ptoa((uintmax_t)physmem),
+ printf("usable memory = %ju (%ju MB)\n", ptoa((uintmax_t)physmem),
ptoa((uintmax_t)physmem) / 1048576);
realmem = Maxmem;
/*
@@ -220,7 +220,7 @@
vm_ksubmap_init(&kmi);
- printf("avail memory = %ju (%ju MB)\n",
+ printf("avail memory = %ju (%ju MB)\n",
ptoa((uintmax_t)cnt.v_free_count),
ptoa((uintmax_t)cnt.v_free_count) / 1048576);
@@ -747,8 +747,6 @@
ip->gd_hioffset = ((uintptr_t)func)>>16 ;
}
-#define IDTVEC(name) __CONCAT(X,name)
-
extern inthand_t
IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm),
@@ -877,7 +875,7 @@
if (smap->base < physmap[i + 1]) {
if (boothowto & RB_VERBOSE)
printf(
- "Overlapping or non-montonic memory region, ignoring second region\n");
+ "Overlapping or non-monotonic memory region, ignoring second region\n");
continue;
}
}
==== //depot/projects/newisp/amd64/amd64/mptable_pci.c#2 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.4 2006/01/06 19:22:18 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.5 2006/11/13 22:23:32 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -96,6 +96,10 @@
DEVMETHOD(pcib_read_config, legacy_pcib_read_config),
DEVMETHOD(pcib_write_config, legacy_pcib_write_config),
DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt),
+ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi),
+ DEVMETHOD(pcib_release_msi, pcib_release_msi),
+ DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix),
+ DEVMETHOD(pcib_release_msix, pcib_release_msix),
{ 0, 0 }
};
@@ -148,6 +152,10 @@
DEVMETHOD(pcib_read_config, pcib_read_config),
DEVMETHOD(pcib_write_config, pcib_write_config),
DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt),
+ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi),
+ DEVMETHOD(pcib_release_msi, pcib_release_msi),
+ DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix),
+ DEVMETHOD(pcib_release_msix, pcib_release_msix),
{0, 0}
};
==== //depot/projects/newisp/amd64/amd64/nexus.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.69 2006/09/11 19:31:51 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.70 2006/11/13 22:23:32 jhb Exp $");
/*
* This code implements a `root nexus' for Intel Architecture
@@ -61,6 +61,8 @@
#include <machine/resource.h>
+#include "pcib_if.h"
+
#ifdef DEV_ISA
#include <isa/isavar.h>
#include <amd64/isa/isa.h>
@@ -100,6 +102,10 @@
static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long);
static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *);
static void nexus_delete_resource(device_t, device_t, int, int);
+static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs);
+static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs);
+static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq);
+static int nexus_release_msix(device_t pcib, device_t dev, int irq);
static device_method_t nexus_methods[] = {
/* Device interface */
@@ -125,6 +131,12 @@
DEVMETHOD(bus_get_resource, nexus_get_resource),
DEVMETHOD(bus_delete_resource, nexus_delete_resource),
+ /* pcib interface */
+ DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi),
+ DEVMETHOD(pcib_release_msi, nexus_release_msi),
+ DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix),
+ DEVMETHOD(pcib_release_msix, nexus_release_msix),
+
{ 0, 0 }
};
@@ -504,6 +516,47 @@
resource_list_delete(rl, type, rid);
}
+static int
+nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq)
+{
+ int error, new;
+
+ error = msix_alloc(dev, index, irq, &new);
+ if (new)
+ rman_manage_region(&irq_rman, *irq, *irq);
+ return (error);
+}
+
+static int
+nexus_release_msix(device_t pcib, device_t dev, int irq)
+{
+
+ return (msix_release(irq));
+}
+
+static int
+nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs)
+{
+ int error, i, newirq, newcount;
+
+ /* First alloc the messages. */
+ error = msi_alloc(dev, count, maxcount, irqs, &newirq, &newcount);
+
+ /* Always add any new IRQs to the rman, even on failure. */
+ for (i = 0; i < newcount; i++)
+ rman_manage_region(&irq_rman, irqs[newirq + i],
+ irqs[newirq + i]);
+
+ return (error);
+}
+
+static int
+nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs)
+{
+
+ return (msi_release(irqs, count));
+}
+
#ifdef DEV_ISA
/*
* Placeholder which claims PnP 'devices' which describe system
==== //depot/projects/newisp/amd64/amd64/pmap.c#3 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.572 2006/10/22 04:18:01 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.573 2006/11/12 21:48:32 alc Exp $");
/*
* Manages physical address maps.
@@ -2357,8 +2357,10 @@
* Now validate mapping with desired protection/wiring.
*/
newpte = (pt_entry_t)(pa | PG_V);
- if ((prot & VM_PROT_WRITE) != 0)
+ if ((prot & VM_PROT_WRITE) != 0) {
newpte |= PG_RW;
+ vm_page_flag_set(m, PG_WRITEABLE);
+ }
if ((prot & VM_PROT_EXECUTE) == 0)
newpte |= pg_nx;
if (wired)
==== //depot/projects/newisp/amd64/include/apicvar.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/apicvar.h,v 1.19 2006/10/10 23:23:11 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.20 2006/11/13 22:23:33 jhb Exp $
*/
#ifndef _MACHINE_APICVAR_H_
@@ -175,6 +175,7 @@
IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint);
u_int apic_alloc_vector(u_int irq);
+u_int apic_alloc_vectors(u_int *irqs, u_int count, u_int align);
void apic_enable_vector(u_int vector);
void apic_free_vector(u_int vector, u_int irq);
u_int apic_idt_to_irq(u_int vector);
==== //depot/projects/newisp/amd64/include/intr_machdep.h#3 (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/intr_machdep.h,v 1.11 2006/10/10 23:23:11 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.12 2006/11/13 22:23:33 jhb Exp $
*/
#ifndef __MACHINE_INTR_MACHDEP_H__
@@ -43,11 +43,18 @@
* 191 and still be safe since only interrupt sources in actual use will
* allocate IDT vectors.
*
- * For now we stick with 255 as ISA IRQs and PCI intline IRQs only allow
- * for IRQs in the range 0 - 254. When MSI support is added this number
- * will likely increase.
+ * The first 255 IRQs (0 - 254) are reserved for ISA IRQs and PCI intline IRQs.
+ * IRQ values beyond 256 are used by MSI. We leave 255 unused to avoid
+ * confusion since 255 is used in PCI to indicate an invalid IRQ.
+ */
+#define NUM_MSI_INTS 128
+#define FIRST_MSI_INT 256
+#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS)
+
+/*
+ * Default base address for MSI messages on x86 platforms.
*/
-#define NUM_IO_INTS 255
+#define MSI_INTEL_ADDR_BASE 0xfee00000
/*
* - 1 ??? dummy counter.
@@ -140,6 +147,12 @@
void intr_resume(void);
void intr_suspend(void);
void intrcnt_add(const char *name, u_long **countp);
+void msi_init(void);
+int msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq,
+ int *newcount);
+int msi_release(int *irqs, int count);
+int msix_alloc(device_t dev, int index, int *irq, int *new);
+int msix_release(int irq);
#endif /* !LOCORE */
#endif /* _KERNEL */
==== //depot/projects/newisp/amd64/include/pmap.h#2 (text+ko) ====
@@ -39,7 +39,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.134 2006/08/11 19:22:56 jhb Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.136 2006/11/13 20:33:54 ru Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -101,9 +101,10 @@
((unsigned long)(l2) << PDRSHIFT) | \
((unsigned long)(l1) << PAGE_SHIFT))
-/* Initial number of kernel page tables */
+/* Initial number of kernel page tables. */
#ifndef NKPT
-#define NKPT 240 /* Enough for 16GB (2MB page tables) */
+/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */
+#define NKPT 240
#endif
#define NKPML4E 1 /* number of kernel PML4 slots */
@@ -262,7 +263,7 @@
/*
* For each vm_page_t, there is a list of all currently valid virtual
- * mappings of that page. An entry is a pv_entry_t, the list is pv_table.
+ * mappings of that page. An entry is a pv_entry_t, the list is pv_list.
*/
typedef struct pv_entry {
vm_offset_t pv_va; /* virtual address for mapping */
==== //depot/projects/newisp/amd64/linux32/linux.h#4 (text+ko) ====
@@ -27,14 +27,12 @@
* (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/linux32/linux.h,v 1.8 2006/10/29 14:02:38 netchild Exp $
+ * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.9 2006/11/07 18:53:49 jhb Exp $
*/
#ifndef _AMD64_LINUX_LINUX_H_
#define _AMD64_LINUX_LINUX_H_
-#include <sys/signal.h> /* for sigval union */
-
#include <amd64/linux32/linux32_syscall.h>
/*
@@ -379,6 +377,11 @@
#define LINUX_SI_MAX_SIZE 128
#define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(l_int)) - 3)
+union l_sigval {
+ l_int sival_int;
+ l_uintptr_t sival_ptr;
+};
+
typedef struct l_siginfo {
l_int lsi_signo;
l_int lsi_errno;
@@ -399,7 +402,7 @@
struct {
l_pid_t _pid; /* sender's pid */
l_uid16_t _uid; /* sender's uid */
- union sigval _sigval;
+ union l_sigval _sigval;
} __packed _rt;
struct {
==== //depot/projects/newisp/amd64/linux32/linux32_proto.h#5 (text+ko) ====
@@ -2,7 +2,7 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.25 2006/10/29 14:12:44 netchild Exp $
+ * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.26 2006/11/11 21:49:07 ru Exp $
* created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp
*/
@@ -11,7 +11,7 @@
#include <sys/signal.h>
#include <sys/acl.h>
-#include <posix4/_semaphore.h>
+#include <sys/_semaphore.h>
#include <sys/ucontext.h>
#include <bsm/audit_kevents.h>
==== //depot/projects/newisp/amd64/linux32/linux32_syscall.h#5 (text+ko) ====
@@ -2,7 +2,7 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.25 2006/10/29 14:12:44 netchild Exp $
+ * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.26 2006/11/11 21:49:07 ru Exp $
* created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp
*/
==== //depot/projects/newisp/amd64/linux32/linux32_sysent.c#5 (text+ko) ====
@@ -2,7 +2,7 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.25 2006/10/29 14:12:44 netchild Exp $
+ * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.26 2006/11/11 21:49:07 ru Exp $
* created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp
*/
==== //depot/projects/newisp/amd64/pci/pci_bus.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.117 2006/03/13 23:58:40 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.118 2006/11/13 22:23:33 jhb Exp $");
#include "opt_cpu.h"
@@ -322,6 +322,10 @@
DEVMETHOD(pcib_read_config, legacy_pcib_read_config),
DEVMETHOD(pcib_write_config, legacy_pcib_write_config),
DEVMETHOD(pcib_route_interrupt, legacy_pcib_route_interrupt),
+ DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi),
+ DEVMETHOD(pcib_release_msi, pcib_release_msi),
+ DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix),
+ DEVMETHOD(pcib_release_msix, pcib_release_msix),
{ 0, 0 }
};
==== //depot/projects/newisp/arm/arm/cpufunc.c#3 (text+ko) ====
@@ -45,7 +45,7 @@
* Created : 30/01/97
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.12 2006/10/21 04:25:00 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.13 2006/11/07 22:36:56 cognet Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -73,13 +73,17 @@
#include <arm/xscale/i80321/i80321var.h>
#endif
+#if defined(CPU_XSCALE_81342)
+#include <arm/xscale/i8134x/i81342reg.h>
+#endif
+
#ifdef CPU_XSCALE_IXP425
#include <arm/xscale/ixp425/ixp425reg.h>
#include <arm/xscale/ixp425/ixp425var.h>
#endif
#if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
- defined(CPU_XSCALE_80219)
+ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342)
#include <arm/xscale/xscalereg.h>
#endif
@@ -570,6 +574,62 @@
/* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425
CPU_XSCALE_80219 */
+#ifdef CPU_XSCALE_81342
+struct cpu_functions xscalec3_cpufuncs = {
+ /* CPU functions */
+
+ cpufunc_id, /* id */
+ xscale_cpwait, /* cpwait */
+
+ /* MMU functions */
+
+ xscale_control, /* control */
+ cpufunc_domains, /* domain */
+ xscalec3_setttb, /* setttb */
+ cpufunc_faultstatus, /* faultstatus */
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list