Date: Mon, 17 May 2004 17:15:31 -0700 (PDT) From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 52960 for review Message-ID: <200405180015.i4I0FVM4019062@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=52960 Change 52960 by julian@julian_desk on 2004/05/17 17:15:13 IFC Affected files ... .. //depot/projects/nsched/sys/Makefile#2 integrate .. //depot/projects/nsched/sys/alpha/alpha/elf_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/acpica/madt.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/apic_vector.S#3 integrate .. //depot/projects/nsched/sys/amd64/amd64/cpu_switch.S#3 integrate .. //depot/projects/nsched/sys/amd64/amd64/elf_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/genassym.c#3 integrate .. //depot/projects/nsched/sys/amd64/amd64/intr_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/io_apic.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/legacy.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/local_apic.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/mptable.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/mptable_pci.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/nexus.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/pmap.c#5 integrate .. //depot/projects/nsched/sys/amd64/amd64/support.S#4 integrate .. //depot/projects/nsched/sys/amd64/conf/GENERIC#3 integrate .. //depot/projects/nsched/sys/amd64/conf/NOTES#2 integrate .. //depot/projects/nsched/sys/amd64/include/apicvar.h#2 integrate .. //depot/projects/nsched/sys/amd64/include/intr_machdep.h#2 integrate .. //depot/projects/nsched/sys/amd64/include/legacyvar.h#2 integrate .. //depot/projects/nsched/sys/amd64/include/pcb.h#3 integrate .. //depot/projects/nsched/sys/amd64/include/pmap.h#5 integrate .. //depot/projects/nsched/sys/amd64/include/smp.h#2 integrate .. //depot/projects/nsched/sys/amd64/isa/atpic.c#2 integrate .. //depot/projects/nsched/sys/amd64/isa/atpic_vector.S#3 integrate .. //depot/projects/nsched/sys/amd64/isa/clock.c#3 integrate .. //depot/projects/nsched/sys/amd64/isa/elcr.c#1 branch .. //depot/projects/nsched/sys/amd64/isa/icu.h#3 integrate .. //depot/projects/nsched/sys/amd64/isa/nmi.c#3 integrate .. //depot/projects/nsched/sys/amd64/pci/pci_bus.c#2 integrate .. //depot/projects/nsched/sys/arm/arm/autoconf.c#1 branch .. //depot/projects/nsched/sys/arm/arm/bcopy_page.S#1 branch .. //depot/projects/nsched/sys/arm/arm/bcopyinout.S#1 branch .. //depot/projects/nsched/sys/arm/arm/bcopyinout_xscale.S#1 branch .. //depot/projects/nsched/sys/arm/arm/blockio.S#1 branch .. //depot/projects/nsched/sys/arm/arm/bootconfig.c#1 branch .. //depot/projects/nsched/sys/arm/arm/bus_space_asm_generic.S#1 branch .. //depot/projects/nsched/sys/arm/arm/busdma_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/arm/copystr.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc.c#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_arm10.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_arm3.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_arm67.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_arm7tdmi.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_arm8.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_arm9.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_armv4.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_ixp12x0.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_sa1.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_sa11x0.S#1 branch .. //depot/projects/nsched/sys/arm/arm/cpufunc_asm_xscale.S#1 branch .. //depot/projects/nsched/sys/arm/arm/critical.c#1 branch .. //depot/projects/nsched/sys/arm/arm/db_disasm.c#1 branch .. //depot/projects/nsched/sys/arm/arm/db_interface.c#1 branch .. //depot/projects/nsched/sys/arm/arm/db_trace.c#1 branch .. //depot/projects/nsched/sys/arm/arm/disassem.c#1 branch .. //depot/projects/nsched/sys/arm/arm/dump_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/arm/elf_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/arm/exception.S#1 branch .. //depot/projects/nsched/sys/arm/arm/fiq.c#1 branch .. //depot/projects/nsched/sys/arm/arm/fiq_subr.S#1 branch .. //depot/projects/nsched/sys/arm/arm/fusu.S#1 branch .. //depot/projects/nsched/sys/arm/arm/genassym.c#1 branch .. //depot/projects/nsched/sys/arm/arm/identcpu.c#1 branch .. //depot/projects/nsched/sys/arm/arm/in_cksum.c#1 branch .. //depot/projects/nsched/sys/arm/arm/in_cksum_arm.S#1 branch .. //depot/projects/nsched/sys/arm/arm/intr.c#1 branch .. //depot/projects/nsched/sys/arm/arm/irq_dispatch.S#1 branch .. //depot/projects/nsched/sys/arm/arm/locore.S#1 branch .. //depot/projects/nsched/sys/arm/arm/machdep.c#1 branch .. //depot/projects/nsched/sys/arm/arm/nexus.c#1 branch .. //depot/projects/nsched/sys/arm/arm/nexus_io.c#1 branch .. //depot/projects/nsched/sys/arm/arm/nexus_io_asm.S#1 branch .. //depot/projects/nsched/sys/arm/arm/pmap.c#1 branch .. //depot/projects/nsched/sys/arm/arm/setcpsr.S#1 branch .. //depot/projects/nsched/sys/arm/arm/setstack.s#1 branch .. //depot/projects/nsched/sys/arm/arm/support.S#1 branch .. //depot/projects/nsched/sys/arm/arm/swtch.S#1 branch .. //depot/projects/nsched/sys/arm/arm/sys_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/arm/trap.c#1 branch .. //depot/projects/nsched/sys/arm/arm/uio_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/arm/undefined.c#1 branch .. //depot/projects/nsched/sys/arm/arm/vectors.S#1 branch .. //depot/projects/nsched/sys/arm/arm/vm_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/conf/SIMICS#1 branch .. //depot/projects/nsched/sys/arm/include/_inttypes.h#1 branch .. //depot/projects/nsched/sys/arm/include/armreg.h#1 branch .. //depot/projects/nsched/sys/arm/include/asm.h#1 branch .. //depot/projects/nsched/sys/arm/include/asmacros.h#1 branch .. //depot/projects/nsched/sys/arm/include/atomic.h#1 branch .. //depot/projects/nsched/sys/arm/include/blockio.h#1 branch .. //depot/projects/nsched/sys/arm/include/bootconfig.h#1 branch .. //depot/projects/nsched/sys/arm/include/bus.h#1 branch .. //depot/projects/nsched/sys/arm/include/clock.h#1 branch .. //depot/projects/nsched/sys/arm/include/cpu.h#1 branch .. //depot/projects/nsched/sys/arm/include/cpuconf.h#1 branch .. //depot/projects/nsched/sys/arm/include/cpufunc.h#1 branch .. //depot/projects/nsched/sys/arm/include/critical.h#1 branch .. //depot/projects/nsched/sys/arm/include/db_machdep.h#1 branch .. //depot/projects/nsched/sys/arm/include/disassem.h#1 branch .. //depot/projects/nsched/sys/arm/include/fiq.h#1 branch .. //depot/projects/nsched/sys/arm/include/float.h#1 branch .. //depot/projects/nsched/sys/arm/include/floatingpoint.h#1 branch .. //depot/projects/nsched/sys/arm/include/fp.h#1 branch .. //depot/projects/nsched/sys/arm/include/frame.h#1 branch .. //depot/projects/nsched/sys/arm/include/ieee.h#1 branch .. //depot/projects/nsched/sys/arm/include/ieeefp.h#1 branch .. //depot/projects/nsched/sys/arm/include/in_cksum.h#1 branch .. //depot/projects/nsched/sys/arm/include/intr.h#1 branch .. //depot/projects/nsched/sys/arm/include/katelib.h#1 branch .. //depot/projects/nsched/sys/arm/include/machdep.h#1 branch .. //depot/projects/nsched/sys/arm/include/md_var.h#1 branch .. //depot/projects/nsched/sys/arm/include/metadata.h#1 branch .. //depot/projects/nsched/sys/arm/include/mutex.h#1 branch .. //depot/projects/nsched/sys/arm/include/param.h#2 integrate .. //depot/projects/nsched/sys/arm/include/pcb.h#1 branch .. //depot/projects/nsched/sys/arm/include/pcpu.h#1 branch .. //depot/projects/nsched/sys/arm/include/pmap.h#1 branch .. //depot/projects/nsched/sys/arm/include/proc.h#1 branch .. //depot/projects/nsched/sys/arm/include/profile.h#1 branch .. //depot/projects/nsched/sys/arm/include/psl.h#1 branch .. //depot/projects/nsched/sys/arm/include/pte.h#1 branch .. //depot/projects/nsched/sys/arm/include/ptrace.h#1 branch .. //depot/projects/nsched/sys/arm/include/reg.h#1 branch .. //depot/projects/nsched/sys/arm/include/reloc.h#1 branch .. //depot/projects/nsched/sys/arm/include/resource.h#1 branch .. //depot/projects/nsched/sys/arm/include/runq.h#1 branch .. //depot/projects/nsched/sys/arm/include/setjmp.h#1 branch .. //depot/projects/nsched/sys/arm/include/sf_buf.h#1 branch .. //depot/projects/nsched/sys/arm/include/sigframe.h#1 branch .. //depot/projects/nsched/sys/arm/include/smp.h#1 branch .. //depot/projects/nsched/sys/arm/include/stdarg.h#1 branch .. //depot/projects/nsched/sys/arm/include/swi.h#1 branch .. //depot/projects/nsched/sys/arm/include/trap.h#1 branch .. //depot/projects/nsched/sys/arm/include/ucontext.h#2 integrate .. //depot/projects/nsched/sys/arm/include/undefined.h#1 branch .. //depot/projects/nsched/sys/arm/include/utrap.h#1 branch .. //depot/projects/nsched/sys/arm/include/vmparam.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/assabet_machdep.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/files.sa11x0#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_dmacreg.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_gpioreg.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_io.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_io_asm.S#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_irq.S#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_irqhandler.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_ost.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_ostreg.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_ppcreg.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_reg.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/sa11x0_var.h#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/std.sa11x0#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/uart_bus_sa1110.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/uart_cpu_sa1110.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/uart_dev_sa1110.c#1 branch .. //depot/projects/nsched/sys/arm/sa11x0/uart_dev_sa1110.h#1 branch .. //depot/projects/nsched/sys/boot/Makefile#2 integrate .. //depot/projects/nsched/sys/boot/common/loader.8#3 integrate .. //depot/projects/nsched/sys/boot/forth/loader.conf.5#2 integrate .. //depot/projects/nsched/sys/boot/i386/boot0/boot0.S#2 integrate .. //depot/projects/nsched/sys/boot/i386/boot2/boot1.S#3 integrate .. //depot/projects/nsched/sys/boot/i386/boot2/sio.S#3 integrate .. //depot/projects/nsched/sys/boot/i386/btx/btx/btx.S#3 integrate .. //depot/projects/nsched/sys/boot/i386/btx/btxldr/btxldr.S#3 integrate .. //depot/projects/nsched/sys/boot/i386/libi386/amd64_tramp.S#3 integrate .. //depot/projects/nsched/sys/boot/i386/libi386/biosacpi.c#2 integrate .. //depot/projects/nsched/sys/boot/i386/pxeldr/pxeldr.S#3 integrate .. //depot/projects/nsched/sys/boot/pc98/boot2/serial_16550.S#3 integrate .. //depot/projects/nsched/sys/boot/pc98/boot2/serial_8251.S#3 integrate .. //depot/projects/nsched/sys/boot/pc98/btx/btx/btx.S#3 integrate .. //depot/projects/nsched/sys/boot/pc98/btx/btxldr/btxldr.S#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.arm#1 branch .. //depot/projects/nsched/sys/conf/files.alpha#2 integrate .. //depot/projects/nsched/sys/conf/files.amd64#3 integrate .. //depot/projects/nsched/sys/conf/files.arm#1 branch .. //depot/projects/nsched/sys/conf/files.i386#4 integrate .. //depot/projects/nsched/sys/conf/files.ia64#3 integrate .. //depot/projects/nsched/sys/conf/files.pc98#4 integrate .. //depot/projects/nsched/sys/conf/kern.mk#2 integrate .. //depot/projects/nsched/sys/conf/kmod.mk#2 integrate .. //depot/projects/nsched/sys/conf/ldscript.arm#1 branch .. //depot/projects/nsched/sys/conf/options#4 integrate .. //depot/projects/nsched/sys/conf/options.arm#1 branch .. //depot/projects/nsched/sys/dev/aac/aac_pci.c#2 integrate .. //depot/projects/nsched/sys/dev/acpica/acpi_ec.c#4 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic79xx.c#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic79xx.h#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic79xx.reg#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic79xx.seq#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic79xx_inline.h#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic79xx_pci.c#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic7xxx.c#2 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/aic_osm_lib.h#2 integrate .. //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#3 integrate .. //depot/projects/nsched/sys/dev/ciss/ciss.c#3 integrate .. //depot/projects/nsched/sys/dev/ciss/cissreg.h#3 integrate .. //depot/projects/nsched/sys/dev/cy/cy.c#2 integrate .. //depot/projects/nsched/sys/dev/fdc/fdc.c#1 branch .. //depot/projects/nsched/sys/dev/fdc/fdcreg.h#1 branch .. //depot/projects/nsched/sys/dev/firewire/firewire.c#2 integrate .. //depot/projects/nsched/sys/dev/ichwd/ichwd.c#1 branch .. //depot/projects/nsched/sys/dev/ichwd/ichwd.h#1 branch .. //depot/projects/nsched/sys/dev/if_ndis/if_ndis.c#4 integrate .. //depot/projects/nsched/sys/dev/iicbus/iic.c#2 integrate .. //depot/projects/nsched/sys/dev/iicbus/iicbus.c#2 integrate .. //depot/projects/nsched/sys/dev/pccard/pccarddevs#4 integrate .. //depot/projects/nsched/sys/dev/pccard/pccarddevs.h#4 integrate .. //depot/projects/nsched/sys/dev/puc/pucdata.c#3 integrate .. //depot/projects/nsched/sys/dev/smbus/smb.c#2 integrate .. //depot/projects/nsched/sys/dev/smbus/smb.h#2 integrate .. //depot/projects/nsched/sys/dev/sound/isa/sb.h#2 integrate .. //depot/projects/nsched/sys/dev/sound/isa/sb16.c#3 integrate .. //depot/projects/nsched/sys/dev/sound/isa/sbc.c#3 integrate .. //depot/projects/nsched/sys/dev/twa/twa.h#2 integrate .. //depot/projects/nsched/sys/dev/twa/twa_cam.c#2 integrate .. //depot/projects/nsched/sys/dev/twa/twa_freebsd.c#2 integrate .. //depot/projects/nsched/sys/dev/twe/twe.c#2 integrate .. //depot/projects/nsched/sys/dev/twe/twereg.h#2 integrate .. //depot/projects/nsched/sys/dev/twe/twevar.h#2 integrate .. //depot/projects/nsched/sys/dev/uart/uart_cpu_pc98.c#2 integrate .. //depot/projects/nsched/sys/dev/usb/umodem.c#2 integrate .. //depot/projects/nsched/sys/dev/wl/if_wl.c#3 integrate .. //depot/projects/nsched/sys/fs/fifofs/fifo_vnops.c#3 integrate .. //depot/projects/nsched/sys/geom/geom_disk.c#2 integrate .. //depot/projects/nsched/sys/i386/acpica/madt.c#3 integrate .. //depot/projects/nsched/sys/i386/conf/NOTES#4 integrate .. //depot/projects/nsched/sys/i386/i386/elf_machdep.c#2 integrate .. //depot/projects/nsched/sys/i386/i386/io_apic.c#3 integrate .. //depot/projects/nsched/sys/i386/isa/atpic.c#3 integrate .. //depot/projects/nsched/sys/i386/isa/atpic_vector.s#4 integrate .. //depot/projects/nsched/sys/i386/isa/clock.c#4 integrate .. //depot/projects/nsched/sys/i386/isa/icu.h#3 integrate .. //depot/projects/nsched/sys/i386/isa/npx.c#3 integrate .. //depot/projects/nsched/sys/ia64/conf/NOTES#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/elf_machdep.c#2 integrate .. //depot/projects/nsched/sys/isa/fd.c#4 delete .. //depot/projects/nsched/sys/isa/fdreg.h#3 delete .. //depot/projects/nsched/sys/kern/kern_linker.c#3 integrate .. //depot/projects/nsched/sys/kern/kern_synch.c#4 integrate .. //depot/projects/nsched/sys/kern/link_elf.c#2 integrate .. //depot/projects/nsched/sys/kern/link_elf_obj.c#2 integrate .. //depot/projects/nsched/sys/kern/subr_sleepqueue.c#3 integrate .. //depot/projects/nsched/sys/kern/vfs_syscalls.c#4 integrate .. //depot/projects/nsched/sys/libkern/arm/divsi3.S#1 branch .. //depot/projects/nsched/sys/libkern/arm/ffs.S#1 branch .. //depot/projects/nsched/sys/libkern/arm/muldi3.c#1 branch .. //depot/projects/nsched/sys/modules/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/fdc/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/ichwd/Makefile#1 branch .. //depot/projects/nsched/sys/netgraph/ng_ether.c#3 integrate .. //depot/projects/nsched/sys/netinet/ip_output.c#4 integrate .. //depot/projects/nsched/sys/netinet6/ip6_output.c#3 integrate .. //depot/projects/nsched/sys/pci/agp_via.c#3 integrate .. //depot/projects/nsched/sys/pci/agpreg.h#3 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/elf_machdep.c#2 integrate .. //depot/projects/nsched/sys/security/mac_portacl/mac_portacl.c#2 integrate .. //depot/projects/nsched/sys/sparc64/sparc64/elf_machdep.c#2 integrate .. //depot/projects/nsched/sys/sys/linker.h#2 integrate .. //depot/projects/nsched/sys/ufs/ffs/ffs_alloc.c#3 integrate .. //depot/projects/nsched/sys/vm/vm_mmap.c#3 integrate .. //depot/projects/nsched/sys/vm/vm_page.c#4 integrate .. //depot/projects/nsched/sys/vm/vm_pageout.c#2 integrate Differences ... ==== //depot/projects/nsched/sys/Makefile#2 (text+ko) ==== @@ -1,7 +1,9 @@ -# $FreeBSD: src/sys/Makefile,v 1.29 2004/01/17 03:28:27 ru Exp $ +# $FreeBSD: src/sys/Makefile,v 1.30 2004/05/16 00:19:12 cognet Exp $ # The boot loader +.if ${MACHINE_ARCH} != "arm" SUBDIR= boot +.endif # Loadable kernel modules .if defined(MODULES_WITH_WORLD) ==== //depot/projects/nsched/sys/alpha/alpha/elf_machdep.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.17 2003/12/23 02:42:38 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.18 2004/05/16 20:00:27 peter Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -108,9 +108,9 @@ /* Process one elf relocation with addend. */ static int -elf_reloc_internal(linker_file_t lf, const void *data, int type, int local) +elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, int local, elf_lookup_fn lookup) { - Elf_Addr relocbase = (Elf_Addr) lf->address; Elf_Addr *where; Elf_Addr addr; Elf_Addr addend; @@ -152,7 +152,7 @@ break; case R_ALPHA_REFQUAD: - addr = elf_lookup(lf, symidx, 1); + addr = lookup(lf, symidx, 1); if (addr == 0) return -1; addr += addend; @@ -161,7 +161,7 @@ break; case R_ALPHA_GLOB_DAT: - addr = elf_lookup(lf, symidx, 1); + addr = lookup(lf, symidx, 1); if (addr == 0) return -1; addr += addend; @@ -171,7 +171,7 @@ case R_ALPHA_JMP_SLOT: /* No point in lazy binding for kernel modules. */ - addr = elf_lookup(lf, symidx, 1); + addr = lookup(lf, symidx, 1); if (addr == 0) return -1; if (*where != addr) @@ -198,17 +198,19 @@ } int -elf_reloc(linker_file_t lf, const void *data, int type) +elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, + elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, data, type, 0)); + return (elf_reloc_internal(lf, relocbase, data, type, 0, lookup)); } int -elf_reloc_local(linker_file_t lf, const void *data, int type) +elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, data, type, 1)); + return (elf_reloc_internal(lf, relocbase, data, type, 1, lookup)); } int ==== //depot/projects/nsched/sys/amd64/acpica/madt.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.11 2004/01/30 00:24:45 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.12 2004/05/16 20:30:46 peter Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -49,6 +49,7 @@ #include <machine/specialreg.h> #include "acpi.h" +#include <contrib/dev/acpica/actables.h> #include <dev/acpica/acpivar.h> #include <dev/pci/pcivar.h> @@ -69,14 +70,15 @@ u_int la_apic_id:8; } lapics[NLAPICS + 1]; +static int madt_found_sci_override; static MULTIPLE_APIC_TABLE *madt; static vm_paddr_t madt_physaddr; static vm_offset_t madt_length; MALLOC_DEFINE(M_MADT, "MADT Table", "ACPI MADT Table Items"); -static u_char interrupt_polarity(UINT16 Polarity); -static u_char interrupt_trigger(UINT16 TriggerMode); +static enum intr_polarity interrupt_polarity(UINT16 Polarity, UINT8 Source); +static enum intr_trigger interrupt_trigger(UINT16 TriggerMode, UINT8 Source); static int madt_find_cpu(u_int acpi_id, u_int *apic_id); static int madt_find_interrupt(int intr, void **apic, u_int *pin); static void *madt_map(vm_paddr_t pa, int offset, vm_offset_t length); @@ -157,6 +159,7 @@ { ACPI_TABLE_HEADER *header; vm_offset_t length; + void *table; header = madt_map(pa, offset, sizeof(ACPI_TABLE_HEADER)); if (strncmp(header->Signature, sig, 4) != 0) { @@ -165,7 +168,14 @@ } length = header->Length; madt_unmap(header, sizeof(ACPI_TABLE_HEADER)); - return (madt_map(pa, offset, length)); + table = madt_map(pa, offset, length); + if (ACPI_FAILURE(AcpiTbVerifyTableChecksum(table))) { + if (bootverbose) + printf("MADT: Failed checksum for table %s\n", sig); + madt_unmap(table, length); + return (NULL); + } + return (table); } static void @@ -215,6 +225,16 @@ * Page 0 is used to map in the headers of candidate ACPI tables. */ if (rsdp->Revision >= 2) { + /* + * AcpiOsGetRootPointer only verifies the checksum for + * the version 1.0 portion of the RSDP. Version 2.0 has + * an additional checksum that we verify first. + */ + if (AcpiTbChecksum(rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0) { + if (bootverbose) + printf("MADT: RSDP failed extended checksum\n"); + return (ENXIO); + } xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 1, XSDT_SIG); if (xsdt == NULL) { if (bootverbose) @@ -251,6 +271,16 @@ printf("MADT: Found table at 0x%jx\n", (uintmax_t)madt_physaddr); + /* + * Verify that we can map the full table and that its checksum is + * correct, etc. + */ + madt = madt_map_table(madt_physaddr, 0, APIC_SIG); + if (madt == NULL) + return (ENXIO); + madt_unmap_table(madt); + madt = NULL; + return (0); } @@ -273,7 +303,6 @@ printf("Table '%.4s' at 0x%jx\n", table->Signature, (uintmax_t)address); - /* XXX: Verify checksum? */ if (strncmp(table->Signature, APIC_SIG, 4) != 0) { madt_unmap(table, sizeof(ACPI_TABLE_HEADER)); return (0); @@ -325,6 +354,8 @@ static int madt_setup_io(void) { + void *ioapic; + u_int pin; int i; /* Try to initialize ACPI so that we can access the FADT. */ @@ -337,11 +368,30 @@ } /* First, we run through adding I/O APIC's. */ + if (madt->PCATCompat) + ioapic_enable_mixed_mode(); madt_walk_table(madt_parse_apics, NULL); /* Second, we run through the table tweaking interrupt sources. */ madt_walk_table(madt_parse_ints, NULL); + /* + * If there was not an explicit override entry for the SCI, + * force it to use level trigger and active-low polarity. + */ + if (!madt_found_sci_override) { + if (madt_find_interrupt(AcpiGbl_FADT->SciInt, &ioapic, &pin) + != 0) + printf("MADT: Could not find APIC for SCI IRQ %d\n", + AcpiGbl_FADT->SciInt); + else { + printf( + "MADT: Forcing active-low polarity and level trigger for SCI\n"); + ioapic_set_polarity(ioapic, pin, INTR_POLARITY_LOW); + ioapic_set_triggermode(ioapic, pin, INTR_TRIGGER_LEVEL); + } + } + /* Third, we register all the I/O APIC's. */ for (i = 0; i < NIOAPICS; i++) if (ioapics[i].io_apic != NULL) @@ -446,35 +496,44 @@ } /* - * Determine properties of an interrupt source. Note that for ACPI, - * these are only used for ISA interrupts, so we assume ISA bus values - * (Active Hi, Edge Triggered) for conforming values. + * Determine properties of an interrupt source. Note that for ACPI these + * functions are only used for ISA interrupts, so we assume ISA bus values + * (Active Hi, Edge Triggered) for conforming values except for the ACPI + * SCI for which we use Active Lo, Level Triggered. */ -static u_char -interrupt_polarity(UINT16 Polarity) +static enum intr_polarity +interrupt_polarity(UINT16 Polarity, UINT8 Source) { switch (Polarity) { case POLARITY_CONFORMS: + if (Source == AcpiGbl_FADT->SciInt) + return (INTR_POLARITY_LOW); + else + return (INTR_POLARITY_HIGH); case POLARITY_ACTIVE_HIGH: - return (1); + return (INTR_POLARITY_HIGH); case POLARITY_ACTIVE_LOW: - return (0); + return (INTR_POLARITY_LOW); default: panic("Bogus Interrupt Polarity"); } } -static u_char -interrupt_trigger(UINT16 TriggerMode) +static enum intr_trigger +interrupt_trigger(UINT16 TriggerMode, UINT8 Source) { switch (TriggerMode) { case TRIGGER_CONFORMS: + if (Source == AcpiGbl_FADT->SciInt) + return (INTR_TRIGGER_LEVEL); + else + return (INTR_TRIGGER_EDGE); case TRIGGER_EDGE: - return (1); + return (INTR_TRIGGER_EDGE); case TRIGGER_LEVEL: - return (0); + return (INTR_TRIGGER_LEVEL); default: panic("Bogus Interrupt Trigger Mode"); } @@ -532,7 +591,9 @@ { void *new_ioapic, *old_ioapic; u_int new_pin, old_pin; - int force_lo; + enum intr_trigger trig; + enum intr_polarity pol; + char buf[64]; if (bootverbose) printf("MADT: intr override: source %u, irq %u\n", @@ -546,18 +607,46 @@ } /* - * If the SCI is remapped to a non-ISA global interrupt, - * force it to level trigger and active-lo polarity. + * Lookup the appropriate trigger and polarity modes for this + * entry. + */ + trig = interrupt_trigger(intr->TriggerMode, intr->Source); + pol = interrupt_polarity(intr->Polarity, intr->Source); + + /* * If the SCI is identity mapped but has edge trigger and - * active-hi polarity, also force it to use level/lo. + * active-hi polarity or the force_sci_lo tunable is set, + * force it to use level/lo. */ - force_lo = 0; - if (intr->Source == AcpiGbl_FADT->SciInt) - if (intr->Interrupt > 15 || (intr->Interrupt == intr->Source && - intr->TriggerMode == TRIGGER_EDGE && - intr->Polarity == POLARITY_ACTIVE_HIGH)) - force_lo = 1; + if (intr->Source == AcpiGbl_FADT->SciInt) { + madt_found_sci_override = 1; + if (getenv_string("hw.acpi.sci.trigger", buf, sizeof(buf))) { + if (tolower(buf[0]) == 'e') + trig = INTR_TRIGGER_EDGE; + else if (tolower(buf[0]) == 'l') + trig = INTR_TRIGGER_LEVEL; + else + panic( + "Invalid trigger %s: must be 'edge' or 'level'", + buf); + printf("MADT: Forcing SCI to %s trigger\n", + trig == INTR_TRIGGER_EDGE ? "edge" : "level"); + } + if (getenv_string("hw.acpi.sci.polarity", buf, sizeof(buf))) { + if (tolower(buf[0]) == 'h') + pol = INTR_POLARITY_HIGH; + else if (tolower(buf[0]) == 'l') + pol = INTR_POLARITY_LOW; + else + panic( + "Invalid polarity %s: must be 'high' or 'low'", + buf); + printf("MADT: Forcing SCI to active %s polarity\n", + pol == INTR_POLARITY_HIGH ? "high" : "low"); + } + } + /* Remap the IRQ if it is mapped to a different interrupt vector. */ if (intr->Source != intr->Interrupt) { /* * If the SCI is remapped to a non-ISA global interrupt, @@ -577,18 +666,10 @@ intr->Source) ioapic_disable_pin(old_ioapic, old_pin); } - if (force_lo) { - printf( - "MADT: Forcing active-lo polarity and level trigger for IRQ %d\n", - intr->Source); - ioapic_set_polarity(new_ioapic, new_pin, 0); - ioapic_set_triggermode(new_ioapic, new_pin, 0); - } else { - ioapic_set_polarity(new_ioapic, new_pin, - interrupt_polarity(intr->Polarity)); - ioapic_set_triggermode(new_ioapic, new_pin, - interrupt_trigger(intr->TriggerMode)); - } + + /* Program the polarity and trigger mode. */ + ioapic_set_triggermode(new_ioapic, new_pin, trig); + ioapic_set_polarity(new_ioapic, new_pin, pol); } /* @@ -609,10 +690,10 @@ ioapic_set_nmi(ioapic, pin); if (nmi->TriggerMode != TRIGGER_CONFORMS) ioapic_set_triggermode(ioapic, pin, - interrupt_trigger(nmi->TriggerMode)); + interrupt_trigger(nmi->TriggerMode, 0)); if (nmi->Polarity != TRIGGER_CONFORMS) ioapic_set_polarity(ioapic, pin, - interrupt_polarity(nmi->Polarity)); + interrupt_polarity(nmi->Polarity, 0)); } /* @@ -638,10 +719,10 @@ lapic_set_lvt_mode(apic_id, pin, APIC_LVT_DM_NMI); if (nmi->TriggerMode != TRIGGER_CONFORMS) lapic_set_lvt_triggermode(apic_id, pin, - interrupt_trigger(nmi->TriggerMode)); + interrupt_trigger(nmi->TriggerMode, 0)); if (nmi->Polarity != POLARITY_CONFORMS) lapic_set_lvt_polarity(apic_id, pin, - interrupt_polarity(nmi->Polarity)); + interrupt_polarity(nmi->Polarity, 0)); } /* ==== //depot/projects/nsched/sys/amd64/amd64/apic_vector.S#3 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * from: vector.s, 386BSD 0.1 unknown origin - * $FreeBSD: src/sys/amd64/amd64/apic_vector.S,v 1.97 2004/04/05 21:25:51 imp Exp $ + * $FreeBSD: src/sys/amd64/amd64/apic_vector.S,v 1.98 2004/05/16 22:11:49 peter Exp $ */ /* @@ -321,19 +321,4 @@ movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ POP_FRAME /* Why not doreti? */ iretq - -#ifdef LAZY_SWITCH -/* - * Clean up when we lose out on the lazy context switch optimization. - * ie: when we are about to release a PTD but a cpu is still borrowing it. - */ - SUPERALIGN_TEXT -IDTVEC(lazypmap) - PUSH_FRAME - call pmap_lazyfix_action - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - POP_FRAME /* Why not doreti? */ - iretq -#endif #endif /* SMP */ ==== //depot/projects/nsched/sys/amd64/amd64/cpu_switch.S#3 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.148 2004/04/05 23:55:13 imp Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.150 2004/05/16 22:43:57 peter Exp $ */ #include <machine/asmacros.h> @@ -103,6 +103,17 @@ pushfq /* PSL */ popq PCB_RFLAGS(%r8) + testl $PCB_32BIT,PCB_FLAGS(%r8) + jz 1f /* no, skip over */ + + /* Save segment selector numbers */ + movl %ds,PCB_DS(%r8) + movl %es,PCB_ES(%r8) + movl %fs,PCB_FS(%r8) + movl %gs,PCB_GS(%r8) + jmp 2f +1: + /* Save userland %fs */ movl $MSR_FSBASE,%ecx rdmsr @@ -114,13 +125,8 @@ rdmsr movl %eax,PCB_GSBASE(%r8) movl %edx,PCB_GSBASE+4(%r8) +2: - /* Save segment selector numbers */ - movl %ds,PCB_DS(%r8) - movl %es,PCB_ES(%r8) - movl %fs,PCB_FS(%r8) - movl %gs,PCB_GS(%r8) - /* Test if debug registers should be saved. */ testl $PCB_DBREGS,PCB_FLAGS(%r8) jz 1f /* no, skip over */ @@ -158,10 +164,6 @@ /* switch address space */ movq PCB_CR3(%r8),%rdx -#ifdef LAZY_SWITCH - cmpq %rdx,KPML4phys /* Kernel address space? */ - je sw1 -#endif movq %cr3,%rax cmpq %rdx,%rax /* Same address space? */ je sw1 @@ -185,6 +187,9 @@ */ movq TD_PCB(%rsi),%r8 + testl $PCB_32BIT,PCB_FLAGS(%r8) + jz 1f /* no, skip over */ + /* Restore segment selector numbers */ movl PCB_DS(%r8),%ds movl PCB_ES(%r8),%es @@ -195,6 +200,8 @@ rdmsr movl PCB_GS(%r8),%gs wrmsr + jmp 2f +1: /* Restore userland %fs */ movl $MSR_FSBASE,%ecx @@ -207,6 +214,7 @@ movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx wrmsr +2: /* Update the TSS_RSP0 pointer for the next interrupt */ movq PCPU(TSSP), %rax @@ -252,7 +260,6 @@ orq %rcx,%rax movq %rax,%dr7 1: - ret /* ==== //depot/projects/nsched/sys/amd64/amd64/elf_machdep.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.19 2003/12/23 02:42:37 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/elf_machdep.c,v 1.21 2004/05/17 21:16:49 peter Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -104,10 +104,11 @@ /* Process one elf relocation with addend. */ static int -elf_reloc_internal(linker_file_t lf, const void *data, int type, int local) +elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, int local, elf_lookup_fn lookup) { - Elf_Addr relocbase = (Elf_Addr) lf->address; - Elf_Addr *where; + Elf64_Addr *where, val; + Elf32_Addr *where32, val32; Elf_Addr addr; Elf_Addr addend; Elf_Word rtype, symidx; @@ -118,9 +119,18 @@ case ELF_RELOC_REL: rel = (const Elf_Rel *)data; where = (Elf_Addr *) (relocbase + rel->r_offset); - addend = *where; rtype = ELF_R_TYPE(rel->r_info); symidx = ELF_R_SYM(rel->r_info); + /* Addend is 32 bit on 32 bit relocs */ + switch (rtype) { + case R_X86_64_PC32: + case R_X86_64_32S: + addend = *(Elf32_Addr *)where; + break; + default: + addend = *where; + break; + } break; case ELF_RELOC_RELA: rela = (const Elf_Rela *)data; @@ -133,37 +143,38 @@ panic("unknown reloc type %d\n", type); } - if (local) { - if (rtype == R_X86_64_RELATIVE) { /* A + B */ - addr = relocbase + addend; - if (*where != addr) - *where = addr; - } - return (0); - } - switch (rtype) { case R_X86_64_NONE: /* none */ break; case R_X86_64_64: /* S + A */ - addr = elf_lookup(lf, symidx, 1); + addr = lookup(lf, symidx, 1); + val = addr + addend; if (addr == 0) return -1; - addr += addend; - if (*where != addr) - *where = addr; + if (*where != val) + *where = val; break; case R_X86_64_PC32: /* S + A - P */ - addr = elf_lookup(lf, symidx, 1); + addr = lookup(lf, symidx, 1); + where32 = (Elf32_Addr *)where; + val32 = (Elf32_Addr)(addr + addend - (Elf_Addr)where); + if (addr == 0) + return -1; + if (*where32 != val32) + *where32 = val32; + break; + + case R_X86_64_32S: /* S + A sign extend */ + addr = lookup(lf, symidx, 1); + val32 = (Elf32_Addr)(addr + addend); + where32 = (Elf32_Addr *)where; if (addr == 0) return -1; - addr += addend - (Elf_Addr)where; - /* XXX needs to be 32 bit *where, not 64 bit */ - if (*where != addr) - *where = addr; + if (*where32 != val32) + *where32 = val32; break; case R_X86_64_COPY: /* none */ @@ -176,7 +187,7 @@ break; case R_X86_64_GLOB_DAT: /* S */ - addr = elf_lookup(lf, symidx, 1); + addr = lookup(lf, symidx, 1); if (addr == 0) return -1; if (*where != addr) @@ -184,6 +195,10 @@ break; case R_X86_64_RELATIVE: /* B + A */ + addr = relocbase + addend; + val = addr; + if (*where != val) + *where = val; break; default: @@ -195,17 +210,19 @@ } int -elf_reloc(linker_file_t lf, const void *data, int type) +elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, + elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, data, type, 0)); + return (elf_reloc_internal(lf, relocbase, data, type, 0, lookup)); } int -elf_reloc_local(linker_file_t lf, const void *data, int type) +elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, + int type, elf_lookup_fn lookup) { - return (elf_reloc_internal(lf, data, type, 1)); + return (elf_reloc_internal(lf, relocbase, data, type, 1, lookup)); } int ==== //depot/projects/nsched/sys/amd64/amd64/genassym.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.153 2004/04/05 21:25:51 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.154 2004/05/16 22:43:57 peter Exp $"); #include "opt_compat.h" #include "opt_kstack_pages.h" @@ -138,6 +138,7 @@ ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); ASSYM(PCB_DBREGS, PCB_DBREGS); +ASSYM(PCB_32BIT, PCB_32BIT); ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_FULLCTX, PCB_FULLCTX); ==== //depot/projects/nsched/sys/amd64/amd64/intr_machdep.c#2 (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/amd64/intr_machdep.c,v 1.4 2003/11/17 06:10:14 peter Exp $ + * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.5 2004/05/16 20:30:46 peter Exp $ */ /* @@ -138,6 +138,17 @@ return (error); } +int +intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol) +{ + struct intsrc *isrc; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + return (isrc->is_pic->pic_config_intr(isrc, trig, pol)); +} + void intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe) { >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405180015.i4I0FVM4019062>