PERFORCE change 98297 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Jun 2 03:48:45 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=98297
Change 98297 by marcel at marcel_nfs on 2006/06/02 03:46:55
IFC @98296
Affected files ...
.. //depot/projects/uart/Makefile#6 integrate
.. //depot/projects/uart/amd64/amd64/busdma_machdep.c#15 integrate
.. //depot/projects/uart/arm/arm/busdma_machdep.c#10 integrate
.. //depot/projects/uart/arm/arm/elf_trampoline.c#3 integrate
.. //depot/projects/uart/arm/arm/pmap.c#15 integrate
.. //depot/projects/uart/arm/include/cpuconf.h#5 integrate
.. //depot/projects/uart/arm/include/cpufunc.h#6 integrate
.. //depot/projects/uart/arm/include/pmap.h#11 integrate
.. //depot/projects/uart/arm/sa11x0/assabet_machdep.c#8 integrate
.. //depot/projects/uart/arm/sa11x0/sa11x0_var.h#3 integrate
.. //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#12 integrate
.. //depot/projects/uart/boot/i386/libi386/biosdisk.c#5 integrate
.. //depot/projects/uart/cam/cam_ccb.h#6 integrate
.. //depot/projects/uart/cam/cam_periph.c#10 integrate
.. //depot/projects/uart/cam/cam_xpt.c#11 integrate
.. //depot/projects/uart/cam/scsi/scsi_all.h#3 integrate
.. //depot/projects/uart/cam/scsi/scsi_target.c#9 integrate
.. //depot/projects/uart/conf/Makefile.arm#9 integrate
.. //depot/projects/uart/conf/files#70 integrate
.. //depot/projects/uart/conf/kern.mk#7 integrate
.. //depot/projects/uart/conf/kmod.mk#21 integrate
.. //depot/projects/uart/dev/ahb/ahb.c#7 integrate
.. //depot/projects/uart/dev/bfe/if_bfe.c#15 integrate
.. //depot/projects/uart/dev/bfe/if_bfereg.h#6 integrate
.. //depot/projects/uart/dev/bktr/bktr_os.c#11 integrate
.. //depot/projects/uart/dev/ciss/ciss.c#17 integrate
.. //depot/projects/uart/dev/dcons/dcons_os.c#6 integrate
.. //depot/projects/uart/dev/digi/digi.c#7 integrate
.. //depot/projects/uart/dev/hme/if_hme.c#14 integrate
.. //depot/projects/uart/dev/isp/isp_freebsd.c#16 integrate
.. //depot/projects/uart/dev/mpt/mpt.c#16 integrate
.. //depot/projects/uart/dev/mpt/mpt.h#13 integrate
.. //depot/projects/uart/dev/mpt/mpt_cam.c#14 integrate
.. //depot/projects/uart/dev/mpt/mpt_cam.h#3 integrate
.. //depot/projects/uart/dev/mpt/mpt_debug.c#12 integrate
.. //depot/projects/uart/dev/mpt/mpt_pci.c#18 integrate
.. //depot/projects/uart/dev/mpt/mpt_raid.c#5 integrate
.. //depot/projects/uart/dev/mpt/mpt_raid.h#2 integrate
.. //depot/projects/uart/dev/mpt/mpt_reg.h#4 integrate
.. //depot/projects/uart/dev/ofw/ofw_console.c#8 integrate
.. //depot/projects/uart/dev/pccbb/pccbb.c#19 integrate
.. //depot/projects/uart/dev/pccbb/pccbb_pci.c#9 integrate
.. //depot/projects/uart/dev/pccbb/pccbbvar.h#7 integrate
.. //depot/projects/uart/dev/pci/fixup_pci.c#5 integrate
.. //depot/projects/uart/dev/pci/pcireg.h#11 integrate
.. //depot/projects/uart/dev/re/if_re.c#18 integrate
.. //depot/projects/uart/dev/sio/sio.c#16 integrate
.. //depot/projects/uart/dev/sound/midi/midi.c#3 branch
.. //depot/projects/uart/dev/sound/midi/midi.h#3 branch
.. //depot/projects/uart/dev/sound/midi/midiq.h#1 branch
.. //depot/projects/uart/dev/sound/midi/mpu401.c#1 branch
.. //depot/projects/uart/dev/sound/midi/mpu401.h#1 branch
.. //depot/projects/uart/dev/sound/midi/mpu_if.m#1 branch
.. //depot/projects/uart/dev/sound/midi/mpufoi_if.m#1 branch
.. //depot/projects/uart/dev/sound/midi/sequencer.c#3 branch
.. //depot/projects/uart/dev/sound/midi/sequencer.h#3 branch
.. //depot/projects/uart/dev/sound/midi/synth_if.m#1 branch
.. //depot/projects/uart/dev/sound/pci/cmi.c#10 integrate
.. //depot/projects/uart/dev/sound/pci/emu10k1.c#10 integrate
.. //depot/projects/uart/dev/syscons/apm/apm_saver.c#3 integrate
.. //depot/projects/uart/dev/syscons/syscons.c#15 integrate
.. //depot/projects/uart/dev/uart/uart.h#10 integrate
.. //depot/projects/uart/dev/uart/uart_dbg.c#3 integrate
.. //depot/projects/uart/dev/uart/uart_tty.c#29 integrate
.. //depot/projects/uart/dev/usb/ehci.c#17 integrate
.. //depot/projects/uart/dev/usb/ehci_pci.c#12 integrate
.. //depot/projects/uart/dev/usb/ehcivar.h#9 integrate
.. //depot/projects/uart/dev/usb/if_axe.c#12 integrate
.. //depot/projects/uart/dev/usb/if_axereg.h#6 integrate
.. //depot/projects/uart/dev/usb/ohci.c#18 integrate
.. //depot/projects/uart/dev/usb/ohci_pci.c#11 integrate
.. //depot/projects/uart/dev/usb/ohcireg.h#6 integrate
.. //depot/projects/uart/dev/usb/ohcivar.h#9 integrate
.. //depot/projects/uart/dev/usb/sl811hs.c#3 integrate
.. //depot/projects/uart/dev/usb/sl811hsvar.h#2 integrate
.. //depot/projects/uart/dev/usb/uhci.c#17 integrate
.. //depot/projects/uart/dev/usb/uhci_pci.c#7 integrate
.. //depot/projects/uart/dev/usb/uhcivar.h#8 integrate
.. //depot/projects/uart/dev/usb/usb_mem.c#9 integrate
.. //depot/projects/uart/dev/usb/usbdi.c#11 integrate
.. //depot/projects/uart/dev/usb/usbdivar.h#9 integrate
.. //depot/projects/uart/dev/zs/zs.c#7 integrate
.. //depot/projects/uart/doc/subsys/Dependencies#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-cam#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-crypto#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-dev_pci#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-dev_sound#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-dev_usb#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-geom#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-i4b#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-kern#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-libkern#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-linux#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-net80211#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-netgraph#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-netinet#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-netinet6#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-netipsec#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-opencrypto#1 branch
.. //depot/projects/uart/doc/subsys/Doxyfile-vm#1 branch
.. //depot/projects/uart/doc/subsys/Makefile#1 branch
.. //depot/projects/uart/doc/subsys/README#1 branch
.. //depot/projects/uart/doc/subsys/common-Doxyfile#1 branch
.. //depot/projects/uart/doc/subsys/notreviewed.dox#1 branch
.. //depot/projects/uart/fs/msdosfs/msdosfs_vfsops.c#15 integrate
.. //depot/projects/uart/fs/ntfs/ntfs_vfsops.c#15 integrate
.. //depot/projects/uart/fs/nullfs/null_vfsops.c#10 integrate
.. //depot/projects/uart/fs/nwfs/nwfs_io.c#10 integrate
.. //depot/projects/uart/fs/procfs/procfs.c#4 integrate
.. //depot/projects/uart/fs/smbfs/smbfs_io.c#10 integrate
.. //depot/projects/uart/fs/smbfs/smbfs_vnops.c#10 integrate
.. //depot/projects/uart/fs/udf/udf_vfsops.c#13 integrate
.. //depot/projects/uart/gdb/gdb.h#3 integrate
.. //depot/projects/uart/gdb/gdb_cons.c#2 integrate
.. //depot/projects/uart/gdb/gdb_main.c#5 integrate
.. //depot/projects/uart/gdb/gdb_packet.c#3 integrate
.. //depot/projects/uart/geom/geom_bsd.c#8 integrate
.. //depot/projects/uart/gnu/fs/ext2fs/ext2_vfsops.c#4 integrate
.. //depot/projects/uart/gnu/fs/reiserfs/reiserfs_vfsops.c#3 integrate
.. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_frw.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_iget.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_ioctl.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_mountops.c#3 integrate
.. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_super.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_attr.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_bit.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_dfrag.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_dir2_trace.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_inode.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_iomap.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_trans.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_vfsops.c#2 integrate
.. //depot/projects/uart/gnu/fs/xfs/xfs_vnodeops.c#2 integrate
.. //depot/projects/uart/i386/bios/apm.c#6 integrate
.. //depot/projects/uart/i386/bios/apm.h#4 integrate
.. //depot/projects/uart/i386/i386/busdma_machdep.c#18 integrate
.. //depot/projects/uart/i386/i386/initcpu.c#8 integrate
.. //depot/projects/uart/i386/i386/machdep.c#23 integrate
.. //depot/projects/uart/i386/i386/ptrace_machdep.c#3 integrate
.. //depot/projects/uart/i386/i386/vm_machdep.c#17 integrate
.. //depot/projects/uart/i386/include/md_var.h#9 integrate
.. //depot/projects/uart/i386/include/npx.h#5 integrate
.. //depot/projects/uart/i386/isa/npx.c#13 integrate
.. //depot/projects/uart/ia64/ia64/busdma_machdep.c#8 integrate
.. //depot/projects/uart/ia64/ia64/ssc.c#6 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_vfsops.c#14 integrate
.. //depot/projects/uart/kern/kern_exec.c#19 integrate
.. //depot/projects/uart/kern/kern_exit.c#16 integrate
.. //depot/projects/uart/kern/kern_linker.c#8 integrate
.. //depot/projects/uart/kern/kern_switch.c#11 integrate
.. //depot/projects/uart/kern/subr_disk.c#7 integrate
.. //depot/projects/uart/kern/subr_stack.c#2 integrate
.. //depot/projects/uart/kern/subr_taskqueue.c#10 integrate
.. //depot/projects/uart/kern/tty_cons.c#9 integrate
.. //depot/projects/uart/kern/uipc_syscalls.c#19 integrate
.. //depot/projects/uart/kern/vfs_mount.c#24 integrate
.. //depot/projects/uart/kern/vfs_subr.c#31 integrate
.. //depot/projects/uart/kern/vnode_if.src#13 integrate
.. //depot/projects/uart/modules/Makefile#36 integrate
.. //depot/projects/uart/modules/acpi/acpi/Makefile#5 integrate
.. //depot/projects/uart/modules/acpi/acpi_asus/Makefile#4 integrate
.. //depot/projects/uart/modules/acpi/acpi_panasonic/Makefile#3 integrate
.. //depot/projects/uart/modules/acpi/acpi_toshiba/Makefile#3 integrate
.. //depot/projects/uart/modules/acpi/acpi_video/Makefile#4 integrate
.. //depot/projects/uart/modules/cpufreq/Makefile#3 integrate
.. //depot/projects/uart/modules/fdc/Makefile#4 integrate
.. //depot/projects/uart/modules/geom/geom_eli/Makefile#3 integrate
.. //depot/projects/uart/modules/mfi/Makefile#3 integrate
.. //depot/projects/uart/modules/sound/driver/cmi/Makefile#2 integrate
.. //depot/projects/uart/modules/sound/driver/emu10k1/Makefile#3 integrate
.. //depot/projects/uart/modules/sound/sound/Makefile#4 integrate
.. //depot/projects/uart/net/bpf.c#13 integrate
.. //depot/projects/uart/net/bpf_filter.c#6 integrate
.. //depot/projects/uart/net/if.c#18 integrate
.. //depot/projects/uart/net/if_tap.c#10 integrate
.. //depot/projects/uart/net80211/ieee80211_node.c#18 integrate
.. //depot/projects/uart/netinet/ip_fw.h#13 integrate
.. //depot/projects/uart/netinet/ip_fw2.c#23 integrate
.. //depot/projects/uart/nfs4client/nfs4_vnops.c#6 integrate
.. //depot/projects/uart/nfsclient/nfs.h#8 integrate
.. //depot/projects/uart/nfsclient/nfs_bio.c#14 integrate
.. //depot/projects/uart/nfsclient/nfs_nfsiod.c#8 integrate
.. //depot/projects/uart/nfsclient/nfs_vfsops.c#15 integrate
.. //depot/projects/uart/pc98/cbus/sio.c#5 integrate
.. //depot/projects/uart/pci/agp_amd64.c#6 integrate
.. //depot/projects/uart/pci/agp_sis.c#7 integrate
.. //depot/projects/uart/pci/if_rlreg.h#16 integrate
.. //depot/projects/uart/security/audit/audit_bsm_klib.c#3 integrate
.. //depot/projects/uart/sparc64/include/pmap.h#7 integrate
.. //depot/projects/uart/sparc64/sparc64/pmap.c#21 integrate
.. //depot/projects/uart/sys/cons.h#7 integrate
.. //depot/projects/uart/sys/elf_common.h#4 integrate
.. //depot/projects/uart/sys/kernel.h#12 integrate
.. //depot/projects/uart/sys/queue.h#9 integrate
.. //depot/projects/uart/tools/vnode_if.awk#9 integrate
.. //depot/projects/uart/ufs/ffs/ffs_vfsops.c#24 integrate
.. //depot/projects/uart/ufs/ufs/ufs_vnops.c#16 integrate
.. //depot/projects/uart/vm/vm_extern.h#8 integrate
.. //depot/projects/uart/vm/vm_glue.c#14 integrate
.. //depot/projects/uart/vm/vm_map.c#20 integrate
.. //depot/projects/uart/vm/vm_map.h#11 integrate
.. //depot/projects/uart/vm/vm_meter.c#6 integrate
.. //depot/projects/uart/vm/vm_page.c#21 integrate
Differences ...
==== //depot/projects/uart/Makefile#6 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/Makefile,v 1.35 2006/03/17 18:54:34 ru Exp $
+# $FreeBSD: src/sys/Makefile,v 1.36 2006/05/29 19:29:41 maxim Exp $
.include <bsd.own.mk>
@@ -11,10 +11,10 @@
# Directories to include in cscope name file and TAGS.
CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs gnu i4b isa \
- isofs kern libkern modules net netatalk netatm netgraph \
- netinet netinet6 netipx netkey netnatm netncp netsmb nfs \
- nfsclient nfs4client rpc pccard pci posix4 sys ufs vm \
- ${ARCHDIR}
+ isofs kern libkern modules net net80211 netatalk netatm \
+ netgraph netinet netinet6 netipx netkey netnatm netncp \
+ netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \
+ ufs vm ${ARCHDIR}
ARCHDIR ?= ${MACHINE}
==== //depot/projects/uart/amd64/amd64/busdma_machdep.c#15 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.74 2006/05/03 04:14:17 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.77 2006/06/01 04:49:29 silby Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -492,7 +492,16 @@
}
}
+ /*
+ * XXX:
+ * (dmat->alignment < dmat->maxsize) is just a quick hack; the exact
+ * alignment guarantees of malloc need to be nailed down, and the
+ * code below should be rewritten to take that into account.
+ *
+ * In the meantime, we'll warn the user if malloc gets it wrong.
+ */
if ((dmat->maxsize <= PAGE_SIZE) &&
+ (dmat->alignment < dmat->maxsize) &&
dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) {
*vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags);
} else {
@@ -510,6 +519,8 @@
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
+ } else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) {
+ printf("bus_dmamem_alloc failed to align memory properly.");
}
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
@@ -529,8 +540,9 @@
*/
if (map != NULL)
panic("bus_dmamem_free: Invalid map freed\n");
- if ((dmat->maxsize <= PAGE_SIZE)
- && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem))
+ if ((dmat->maxsize <= PAGE_SIZE) &&
+ (dmat->alignment < dmat->maxsize) &&
+ dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem))
free(vaddr, M_DEVBUF);
else {
contigfree(vaddr, dmat->maxsize, M_DEVBUF);
==== //depot/projects/uart/arm/arm/busdma_machdep.c#10 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.25 2006/03/01 23:04:25 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.26 2006/05/31 15:50:33 cognet Exp $");
/*
* MacPPC bus dma support routines
@@ -806,13 +806,16 @@
if (op & BUS_DMASYNC_PREWRITE)
cpu_dcache_wb_range((vm_offset_t)buf, len);
- if (op & BUS_DMASYNC_POSTREAD) {
- if ((((vm_offset_t)buf | len) & arm_dcache_align_mask) == 0)
- cpu_dcache_inv_range((vm_offset_t)buf, len);
- else
- cpu_dcache_wbinv_range((vm_offset_t)buf, len);
-
+ if (op & BUS_DMASYNC_PREREAD) {
+ if ((vm_offset_t)buf & arm_dcache_align_mask)
+ cpu_dcache_wbinv_range((vm_offset_t)buf &
+ ~arm_dcache_align_mask, arm_dcache_align);
+ if (((vm_offset_t)buf + len) & arm_dcache_align_mask)
+ cpu_dcache_wbinv_range(((vm_offset_t)buf + len) &
+ ~arm_dcache_align_mask, arm_dcache_align);
}
+ if (op & BUS_DMASYNC_POSTREAD)
+ cpu_dcache_inv_range((vm_offset_t)buf, len);
}
void
@@ -823,7 +826,7 @@
int resid;
struct iovec *iov;
- if (!(op & (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_POSTREAD)))
+ if (op == BUS_DMASYNC_POSTWRITE)
return;
if (map->flags & DMAMAP_COHERENT)
return;
==== //depot/projects/uart/arm/arm/elf_trampoline.c#3 (text+ko) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.5 2006/01/20 00:46:44 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.6 2006/05/30 21:13:47 cognet Exp $");
#include <machine/asm.h>
#include <sys/types.h>
#include <sys/elf32.h>
@@ -31,6 +31,7 @@
#include <sys/inflate.h>
#include <machine/elf.h>
#include <machine/pte.h>
+#include <machine/cpufunc.h>
#include <stdlib.h>
@@ -44,6 +45,24 @@
#define GZ_HEAD 0xa
+#ifdef CPU_ARM7TDMI
+#define cpu_idcache_wbinv_all arm7tdmi_cache_flushID
+#elif defined(CPU_ARM8)
+#define cpu_idcache_wbinv_all arm8_cache_purgeID
+#elif defined(CPU_ARM9)
+#define cpu_idcache_wbinv_all arm9_dcache_wbinv_all
+#elif defined(CPU_ARM10)
+#define cpu_idcache_wbinv_all arm10_idcache_wbinv_all
+#elif defined(CPU_SA110) || defined(CPU_SA1110) || defined(CPU_SA1100) || \
+ defined(CPU_IXP12X0)
+#define cpu_idcache_wbinv_all sa1_cache_purgeID
+#elif defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
+ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425)
+#define cpu_idcache_wbinv_all xscale_cache_purgeID
+#endif
+int arm_pdcache_line_size = 32;
+int block_userspace_access = 0;
+
static __inline void *
memcpy(void *dst, const void *src, int len)
{
@@ -160,7 +179,7 @@
static int
input(void *dummy)
{
- if ((size_t)(i_input - orig_input) >= KERNSIZE) {
+ if ((size_t)(i_input - orig_input) >= KERNCOMPSIZE) {
return (GZ_EOF);
}
return *i_input++;
@@ -383,7 +402,7 @@
__start(void)
{
void *curaddr;
- void *dst;
+ void *dst, *altdst;
char *kernel = (char *)&kernel_start;
__asm __volatile("mov %0, pc" :
@@ -393,11 +412,22 @@
if (*kernel == 0x1f && kernel[1] == 0x8b) {
int pt_addr = (((int)&_end + KERNSIZE + 0x100) &
~(L1_TABLE_SIZE - 1)) + L1_TABLE_SIZE;
+
setup_pagetables(pt_addr, (vm_paddr_t)curaddr,
(vm_paddr_t)curaddr + 0x10000000);
/* Gzipped kernel */
dst = inflate_kernel(kernel, &_end);
kernel = (char *)&_end;
+ altdst = 4 + load_kernel((unsigned int)kernel,
+ (unsigned int)curaddr,
+ (unsigned int)&func_end , 0);
+ if (altdst > dst)
+ dst = altdst;
+ cpu_idcache_wbinv_all();
+ __asm __volatile("mrc p15, 0, %0, c1, c0, 0\n"
+ "bic %0, %0, #1\n" /* MMU_ENABLE */
+ "mcr p15, 0, %0, c1, c0, 0\n"
+ : "=r" (pt_addr));
} else
#endif
dst = 4 + load_kernel((unsigned int)&kernel_start,
==== //depot/projects/uart/arm/arm/pmap.c#15 (text+ko) ====
@@ -147,7 +147,7 @@
#include "opt_vm.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.47 2006/04/22 22:51:32 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.52 2006/06/01 01:31:07 alc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -198,6 +198,8 @@
static void pmap_free_pv_entry (pv_entry_t);
static pv_entry_t pmap_get_pv_entry(void);
+static void pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t,
+ vm_prot_t, boolean_t);
static void pmap_vac_me_harder(struct vm_page *, pmap_t,
vm_offset_t);
static void pmap_vac_me_kpmap(struct vm_page *, pmap_t,
@@ -230,6 +232,8 @@
static pt_entry_t *csrc_pte, *cdst_pte;
static vm_offset_t csrcp, cdstp;
+static struct mtx cmtx;
+
static void pmap_init_l1(struct l1_ttable *, pd_entry_t *);
/*
* These routines are called when the CPU type is identified to set up
@@ -913,20 +917,38 @@
l1idx = L1_IDX(va);
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if ((l2 = pm->pm_l2[L2_IDX(l1idx)]) == NULL) {
/*
* No mapping at this address, as there is
* no entry in the L1 table.
* Need to allocate a new l2_dtable.
*/
+again_l2table:
+ vm_page_unlock_queues();
if ((l2 = pmap_alloc_l2_dtable()) == NULL) {
+ vm_page_lock_queues();
return (NULL);
}
- bzero(l2, sizeof(*l2));
- /*
- * Link it into the parent pmap
- */
- pm->pm_l2[L2_IDX(l1idx)] = l2;
+ vm_page_lock_queues();
+ if (pm->pm_l2[L2_IDX(l1idx)] != NULL) {
+ vm_page_unlock_queues();
+ uma_zfree(l2table_zone, l2);
+ vm_page_lock_queues();
+ l2 = pm->pm_l2[L2_IDX(l1idx)];
+ if (l2 == NULL)
+ goto again_l2table;
+ /*
+ * Someone already allocated the l2_dtable while
+ * we were doing the same.
+ */
+ } else {
+ bzero(l2, sizeof(*l2));
+ /*
+ * Link it into the parent pmap
+ */
+ pm->pm_l2[L2_IDX(l1idx)] = l2;
+ }
}
l2b = &l2->l2_bucket[L2_BUCKET(l1idx)];
@@ -941,7 +963,19 @@
* No L2 page table has been allocated. Chances are, this
* is because we just allocated the l2_dtable, above.
*/
+again_ptep:
+ vm_page_unlock_queues();
ptep = (void*)uma_zalloc(l2zone, M_NOWAIT);
+ vm_page_lock_queues();
+ if (l2b->l2b_kva != 0) {
+ /* We lost the race. */
+ vm_page_unlock_queues();
+ uma_zfree(l2zone, ptep);
+ vm_page_lock_queues();
+ if (l2b->l2b_kva == 0)
+ goto again_ptep;
+ return (l2b);
+ }
l2b->l2b_phys = vtophys(ptep);
if (ptep == NULL) {
/*
@@ -2541,6 +2575,7 @@
virtual_end = lastaddr;
kernel_vm_end = pmap_curmaxkvaddr;
arm_nocache_startaddr = lastaddr;
+ mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF);
#ifdef ARM_USE_SMALL_ALLOC
mtx_init(&smallalloc_mtx, "Small alloc page list", NULL, MTX_DEF);
@@ -3067,6 +3102,7 @@
if (!pmap_get_pde_pte(pmap, addr, &pde, &pte))
return (FALSE);
+ KASSERT(pte != NULL, ("Valid mapping but no pte ?"));
if (*pte == 0)
return (TRUE);
return (FALSE);
@@ -3303,6 +3339,19 @@
pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
boolean_t wired)
{
+
+ vm_page_lock_queues();
+ pmap_enter_locked(pmap, va, m, prot, wired);
+ vm_page_unlock_queues();
+}
+
+/*
+ * The page queues and pmap must be locked.
+ */
+static void
+pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
+ boolean_t wired)
+{
struct l2_bucket *l2b = NULL;
struct vm_page *opg;
struct pv_entry *pve = NULL;
@@ -3311,7 +3360,7 @@
u_int oflags;
vm_paddr_t pa;
- vm_page_lock_queues();
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if (va == vector_page) {
pa = systempage.pv_pa;
m = NULL;
@@ -3428,9 +3477,11 @@
simple_lock(&opg->mdpage.pvh_slock);
#endif
pve = pmap_remove_pv(opg, pmap, va);
- if (m && (m->flags & (PG_UNMANAGED | PG_FICTITIOUS)) && pve)
+ if (m && (m->flags & (PG_UNMANAGED | PG_FICTITIOUS)) &&
+ pve)
pmap_free_pv_entry(pve);
- else if (!pve)
+ else if (!pve &&
+ !(m->flags & (PG_UNMANAGED | PG_FICTITIOUS)))
pve = pmap_get_pv_entry();
KASSERT(pve != NULL, ("No pv"));
#if 0
@@ -3525,7 +3576,6 @@
if (m)
pmap_vac_me_harder(m, pmap, va);
}
- vm_page_unlock_queues();
}
/*
@@ -3542,15 +3592,9 @@
vm_page_t mpte)
{
- vm_page_busy(m);
- vm_page_unlock_queues();
- VM_OBJECT_UNLOCK(m->object);
- mtx_lock(&Giant);
- pmap_enter(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE);
- mtx_unlock(&Giant);
- VM_OBJECT_LOCK(m->object);
- vm_page_lock_queues();
- vm_page_wakeup(m);
+ mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+ pmap_enter_locked(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE),
+ FALSE);
return (NULL);
}
@@ -4002,6 +4046,7 @@
return;
+ mtx_lock(&cmtx);
/*
* Hook in the page, zero it, and purge the cache for that
* zeroed page. Invalidate the TLB as needed.
@@ -4015,6 +4060,7 @@
bzero((void *)(cdstp + off), size);
else
bzero_page(cdstp);
+ mtx_unlock(&cmtx);
cpu_dcache_wbinv_range(cdstp, PAGE_SIZE);
}
#endif /* (ARM_MMU_GENERIC + ARM_MMU_SA1) != 0 */
@@ -4027,6 +4073,7 @@
if (_arm_bzero &&
_arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0)
return;
+ mtx_lock(&cmtx);
/*
* Hook in the page, zero it, and purge the cache for that
* zeroed page. Invalidate the TLB as needed.
@@ -4041,6 +4088,7 @@
bzero((void *)(cdstp + off), size);
else
bzero_page(cdstp);
+ mtx_unlock(&cmtx);
xscale_cache_clean_minidata();
}
@@ -4263,6 +4311,7 @@
* the cache for the appropriate page. Invalidate the TLB
* as required.
*/
+ mtx_lock(&cmtx);
*csrc_pte = L2_S_PROTO | src |
L2_S_PROT(PTE_KERNEL, VM_PROT_READ) | pte_l2_s_cache_mode;
PTE_SYNC(csrc_pte);
@@ -4273,6 +4322,7 @@
cpu_tlb_flushD_SE(cdstp);
cpu_cpwait();
bcopy_page(csrcp, cdstp);
+ mtx_unlock(&cmtx);
cpu_dcache_inv_range(csrcp, PAGE_SIZE);
#if 0
mtx_lock(&src_pg->md.pvh_mtx);
@@ -4314,6 +4364,7 @@
* the cache for the appropriate page. Invalidate the TLB
* as required.
*/
+ mtx_lock(&cmtx);
*csrc_pte = L2_S_PROTO | src |
L2_S_PROT(PTE_KERNEL, VM_PROT_READ) |
L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); /* mini-data */
@@ -4326,6 +4377,7 @@
cpu_tlb_flushD_SE(cdstp);
cpu_cpwait();
bcopy_page(csrcp, cdstp);
+ mtx_unlock(&cmtx);
xscale_cache_clean_minidata();
}
#endif /* ARM_MMU_XSCALE == 1 */
@@ -4474,7 +4526,7 @@
pa += PAGE_SIZE;
}
- return ((void *)(va));
+ return ((void *)(va + offset));
}
#define BOOTSTRAP_DEBUG
==== //depot/projects/uart/arm/include/cpuconf.h#5 (text+ko) ====
@@ -34,7 +34,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/arm/include/cpuconf.h,v 1.5 2005/05/26 16:05:22 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/cpuconf.h,v 1.6 2006/05/31 13:06:08 cognet Exp $
*
*/
@@ -57,15 +57,15 @@
*/
#if (defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined(CPU_ARM9) || \
- defined(CPU_ARM10) || defined(CPU_SA110) || defined(CPU_SA1100) || \
- defined(CPU_SA1110) || defined(CPU_IXP12X0) || defined(CPU_XSCALE_IXP425))
+ defined(CPU_SA110) || defined(CPU_SA1100) || defined(CPU_SA1110) || \
+ defined(CPU_IXP12X0) || defined(CPU_XSCALE_IXP425))
#define ARM_ARCH_4 1
#else
#define ARM_ARCH_4 0
#endif
#if (defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
- defined(CPU_XSCALE_PXA2X0))
+ defined(CPU_XSCALE_PXA2X0)) || defined(CPU_ARM10)
#define ARM_ARCH_5 1
#else
#define ARM_ARCH_5 0
==== //depot/projects/uart/arm/include/cpufunc.h#6 (text+ko) ====
@@ -38,7 +38,7 @@
*
* Prototypes for cpu, mmu and tlb related functions.
*
- * $FreeBSD: src/sys/arm/include/cpufunc.h,v 1.7 2005/06/03 19:49:53 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/cpufunc.h,v 1.8 2006/06/01 16:17:44 cognet Exp $
*/
#ifndef _MACHINE_CPUFUNC_H_
@@ -460,7 +460,7 @@
(mask) & (I32_bit | F32_bit)))
#define enable_interrupts(mask) \
- (__set_cpsr_c((mask | F32_bit) & (I32_bit | F32_bit), 0))
+ (__set_cpsr_c((mask) & (I32_bit | F32_bit), 0))
#define restore_interrupts(old_cpsr) \
(__set_cpsr_c((I32_bit | F32_bit), (old_cpsr) & (I32_bit | F32_bit)))
==== //depot/projects/uart/arm/include/pmap.h#11 (text+ko) ====
@@ -44,14 +44,14 @@
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
* from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30
*
- * $FreeBSD: src/sys/arm/include/pmap.h,v 1.17 2006/05/13 23:41:15 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/pmap.h,v 1.18 2006/05/31 11:57:37 cognet Exp $
*/
#ifndef _MACHINE_PMAP_H_
#define _MACHINE_PMAP_H_
#include <machine/pte.h>
-
+#include <machine/cpuconf.h>
/*
* Pte related macros
*/
==== //depot/projects/uart/arm/sa11x0/assabet_machdep.c#8 (text+ko) ====
@@ -47,7 +47,7 @@
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.12 2006/05/23 12:14:14 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.15 2006/05/30 15:47:55 cognet Exp $");
#include "opt_md.h"
@@ -153,7 +153,6 @@
struct pv_addr undstack;
struct pv_addr abtstack;
struct pv_addr kernelstack;
-void enable_mmu(vm_offset_t);
static struct trapframe proc0_tf;
/* Static device mappings. */
@@ -222,6 +221,7 @@
vm_size_t pt_size;
int i = 0;
uint32_t fake_preload[35];
+ uint32_t memsize = 32 * 1024 * 1024;
boothowto = RB_VERBOSE | RB_SINGLE;
cninit();
@@ -258,7 +258,7 @@
fake_preload[i] = 0;
preload_metadata = (void *)fake_preload;
- physmem =( 16 * 1024 * 1024) / PAGE_SIZE;
+ physmem = memsize / PAGE_SIZE;
pc = &__pcpu;
pcpu_init(pc, 0, sizeof(struct pcpu));
PCPU_SET(curthread, &thread0);
@@ -406,7 +406,7 @@
* After booting there are no gross reloations of the kernel thus
* this problem will not occur after initarm().
*/
-/* cpu_idcache_wbinv_all();*/
+ cpu_idcache_wbinv_all();
bootverbose = 1;
@@ -445,7 +445,7 @@
init_param1();
init_param2(physmem);
kdb_init();
- avail_end = 0xc0000000 + 0x02000000 - 1;
+ avail_end = 0xc0000000 + memsize - 1;
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
sizeof(struct pcb)));
}
==== //depot/projects/uart/arm/sa11x0/sa11x0_var.h#3 (text+ko) ====
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/arm/sa11x0/sa11x0_var.h,v 1.2 2005/09/25 21:06:50 cognet Exp $
+ * $FreeBSD: src/sys/arm/sa11x0/sa11x0_var.h,v 1.3 2006/05/29 19:32:32 cognet Exp $
*
*/
@@ -64,15 +64,6 @@
typedef void *sa11x0_chipset_tag_t;
extern struct bus_space sa11x0_bs_tag;
-struct sa11x0_attach_args {
- sa11x0_chipset_tag_t sa_sc;
- bus_space_tag_t sa_iot; /* Bus tag */
- bus_addr_t sa_addr; /* i/o address */
- bus_size_t sa_size;
-
- int sa_intr;
- int sa_gpio;
-};
void *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int,
int (*)(void *), void *);
==== //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#12 (text+ko) ====
@@ -49,7 +49,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.18 2005/12/21 15:01:49 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.19 2006/05/26 01:41:46 cognet Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -147,7 +147,6 @@
struct pv_addr kernelstack;
struct pv_addr minidataclean;
-void enable_mmu(vm_offset_t);
static struct trapframe proc0_tf;
#define IQ80321_OBIO_BASE 0xfe800000UL
==== //depot/projects/uart/boot/i386/libi386/biosdisk.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.46 2005/12/19 09:00:11 sobomax Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.47 2006/05/31 09:05:49 iedowse Exp $");
/*
* BIOS disk device handling.
@@ -1037,9 +1037,6 @@
*/
if (bbuf != NULL)
bcopy(p, breg, x * BIOSDISK_SECSIZE);
- p += (x * BIOSDISK_SECSIZE);
- dblk += x;
- resid -= x;
/* Loop retrying the operation a couple of times. The BIOS may also retry. */
for (retry = 0; retry < 3; retry++) {
@@ -1103,6 +1100,9 @@
if (result) {
return(-1);
}
+ p += (x * BIOSDISK_SECSIZE);
+ dblk += x;
+ resid -= x;
}
/* hexdump(dest, (blks * BIOSDISK_SECSIZE)); */
==== //depot/projects/uart/cam/cam_ccb.h#6 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.29 2006/01/20 19:21:38 mjacob Exp $
+ * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.31 2006/05/24 15:23:27 mjacob Exp $
*/
#ifndef _CAM_CAM_CCB_H
==== //depot/projects/uart/cam/cam_periph.c#10 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.61 2006/01/08 20:04:55 iedowse Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.62 2006/05/24 15:22:21 mjacob Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -673,6 +673,16 @@
mapinfo->num_bufs_used++;
}
+ /*
+ * Now that we've gotten this far, change ownership to the kernel
+ * of the buffers so that we don't run afoul of returning to user
+ * space with locks (on the buffer) held.
+ */
+ for (i = 0; i < numbufs; i++) {
+ BUF_KERNPROC(mapinfo->bp[i]);
+ }
+
+
return(0);
}
==== //depot/projects/uart/cam/cam_xpt.c#11 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.158 2006/01/20 19:21:38 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.159 2006/05/30 22:44:00 mjacob Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -3502,8 +3502,7 @@
if ((crs->release_flags & RELSIM_ADJUST_OPENINGS) != 0) {
- if ((dev->inq_data.flags & SID_CmdQue) != 0) {
-
+ if (INQ_DATA_TQ_ENABLED(&dev->inq_data)) {
/* Don't ever go below one opening */
if (crs->openings > 0) {
xpt_dev_ccbq_resize(crs->ccb_h.path,
@@ -5991,7 +5990,7 @@
#ifdef CAM_NEW_TRAN_CODE
xpt_devise_transport(path);
#endif /* CAM_NEW_TRAN_CODE */
- if ((inq_buf->flags & SID_CmdQue) != 0)
+ if (INQ_DATA_TQ_ENABLED(inq_buf))
softc->action = PROBE_MODE_SENSE;
else
softc->action = PROBE_SERIAL_NUM;
@@ -6416,7 +6415,7 @@
/* SCSI specific sanity checking */
if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0
- || (inq_data->flags & SID_CmdQue) == 0
+ || (INQ_DATA_TQ_ENABLED(inq_data)) == 0
|| (device->queue_flags & SCP_QUEUE_DQUE) != 0
|| (device->quirk->mintags == 0)) {
/*
@@ -6712,7 +6711,7 @@
}
if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0
- || (inq_data->flags & SID_CmdQue) == 0
+ || (INQ_DATA_TQ_ENABLED(inq_data)) == 0
|| (device->queue_flags & SCP_QUEUE_DQUE) != 0
|| (device->quirk->mintags == 0)) {
/*
==== //depot/projects/uart/cam/scsi/scsi_all.h#3 (text+ko) ====
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian at tfs.com) Sept 1992
*
- * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.24 2005/01/05 22:34:34 imp Exp $
+ * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.25 2006/05/30 22:44:00 mjacob Exp $
*/
/*
@@ -599,7 +599,19 @@
#define SID_AENC 0x80
#define SID_TrmIOP 0x40
u_int8_t additional_length;
- u_int8_t reserved[2];
+ u_int8_t reserved;
+ u_int8_t spc2_flags;
+#define SPC2_SID_MChngr 0x08
+#define SPC2_SID_MultiP 0x10
+#define SPC2_SID_EncServ 0x40
+#define SPC2_SID_BQueue 0x80
+
+#define INQ_DATA_TQ_ENABLED(iqd) \
+ ((SID_ANSI_REV(iqd) < SCSI_REV_SPC2)? ((iqd)->flags & SID_CmdQue) : \
+ (((iqd)->flags & SID_CmdQue) && !((iqd)->spc2_flags & SPC2_SID_BQueue)) || \
+ (!((iqd)->flags & SID_CmdQue) && ((iqd)->spc2_flags & SPC2_SID_BQueue)))
+
+
u_int8_t flags;
#define SID_SftRe 0x01
#define SID_CmdQue 0x02
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list