PERFORCE change 72684 for review
John-Mark Gurney
jmg at FreeBSD.org
Mon Mar 7 22:16:01 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=72684
Change 72684 by jmg at jmg_carbon on 2005/03/08 06:14:57
pull in the latest changes, and pull in config since I need to fix
the fact that we can only have one hint file...
Affected files ...
.. //depot/projects/arm/src/sys/Makefile#3 integrate
.. //depot/projects/arm/src/sys/alpha/alpha/busdma_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/alpha/linux/linux_proto.h#2 integrate
.. //depot/projects/arm/src/sys/alpha/linux/linux_syscall.h#2 integrate
.. //depot/projects/arm/src/sys/alpha/linux/linux_sysent.c#2 integrate
.. //depot/projects/arm/src/sys/alpha/linux/syscalls.master#2 integrate
.. //depot/projects/arm/src/sys/amd64/amd64/busdma_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_proto.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_syscall.h#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysent.c#2 integrate
.. //depot/projects/arm/src/sys/amd64/linux32/syscalls.master#2 integrate
.. //depot/projects/arm/src/sys/arm/arm/busdma_machdep.c#3 integrate
.. //depot/projects/arm/src/sys/arm/arm/pmap.c#5 integrate
.. //depot/projects/arm/src/sys/arm/arm/support.S#2 integrate
.. //depot/projects/arm/src/sys/arm/arm/swtch.S#4 integrate
.. //depot/projects/arm/src/sys/boot/efi/include/i386/efibind.h#2 integrate
.. //depot/projects/arm/src/sys/boot/efi/include/ia64/efibind.h#3 integrate
.. //depot/projects/arm/src/sys/compat/linprocfs/linprocfs.c#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_misc.c#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_socket.c#2 integrate
.. //depot/projects/arm/src/sys/compat/linux/linux_sysproto.h#1 branch
.. //depot/projects/arm/src/sys/compat/ndis/kern_ndis.c#3 integrate
.. //depot/projects/arm/src/sys/compat/ndis/subr_ntoskrnl.c#3 integrate
.. //depot/projects/arm/src/sys/conf/NOTES#4 integrate
.. //depot/projects/arm/src/sys/conf/options#3 integrate
.. //depot/projects/arm/src/sys/dev/adlink/adlink.c#2 integrate
.. //depot/projects/arm/src/sys/dev/amd/amd.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ata/ata-lowlevel.c#3 integrate
.. //depot/projects/arm/src/sys/dev/fxp/if_fxp.c#4 integrate
.. //depot/projects/arm/src/sys/dev/fxp/if_fxpreg.h#2 integrate
.. //depot/projects/arm/src/sys/dev/fxp/if_fxpvar.h#2 integrate
.. //depot/projects/arm/src/sys/dev/ieee488/ibfoo.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ieee488/upd7210.c#2 integrate
.. //depot/projects/arm/src/sys/dev/if_ndis/if_ndis.c#3 integrate
.. //depot/projects/arm/src/sys/dev/isp/ispvar.h#3 integrate
.. //depot/projects/arm/src/sys/dev/led/led.c#2 integrate
.. //depot/projects/arm/src/sys/dev/ppbus/pps.c#3 integrate
.. //depot/projects/arm/src/sys/dev/sym/sym_hipd.c#3 integrate
.. //depot/projects/arm/src/sys/dev/twa/twa_freebsd.c#3 integrate
.. //depot/projects/arm/src/sys/dev/twe/twe_freebsd.c#3 integrate
.. //depot/projects/arm/src/sys/dev/usb/ehci.c#2 integrate
.. //depot/projects/arm/src/sys/geom/geom_dev.c#2 integrate
.. //depot/projects/arm/src/sys/geom/vinum/geom_vinum.c#2 integrate
.. //depot/projects/arm/src/sys/geom/vinum/geom_vinum_drive.c#2 integrate
.. //depot/projects/arm/src/sys/i386/i386/busdma_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux_proto.h#2 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux_syscall.h#2 integrate
.. //depot/projects/arm/src/sys/i386/linux/linux_sysent.c#2 integrate
.. //depot/projects/arm/src/sys/i386/linux/syscalls.master#2 integrate
.. //depot/projects/arm/src/sys/ia64/ia64/busdma_machdep.c#2 integrate
.. //depot/projects/arm/src/sys/kern/kern_descrip.c#2 integrate
.. //depot/projects/arm/src/sys/kern/subr_unit.c#2 integrate
.. //depot/projects/arm/src/sys/kern/subr_witness.c#2 integrate
.. //depot/projects/arm/src/sys/kern/tty.c#2 integrate
.. //depot/projects/arm/src/sys/kern/uipc_mbuf.c#4 integrate
.. //depot/projects/arm/src/sys/kern/uipc_socket2.c#3 integrate
.. //depot/projects/arm/src/sys/net/if_ef.c#2 integrate
.. //depot/projects/arm/src/sys/net/if_ethersubr.c#3 integrate
.. //depot/projects/arm/src/sys/pc98/i386/machdep.c#4 integrate
.. //depot/projects/arm/src/sys/powerpc/powerpc/machdep.c#3 integrate
.. //depot/projects/arm/src/sys/powerpc/powerpc/pmap.c#3 integrate
.. //depot/projects/arm/src/sys/sparc64/include/smp.h#2 integrate
.. //depot/projects/arm/src/sys/sys/cdefs.h#3 integrate
.. //depot/projects/arm/src/sys/sys/mbuf.h#3 integrate
.. //depot/projects/arm/src/sys/sys/systm.h#3 integrate
.. //depot/projects/arm/src/usr.sbin/config/Makefile#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/0.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/1.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/2.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/3.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/4.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/5.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/6.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/a.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/b.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/c.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/d.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/e.t#1 branch
.. //depot/projects/arm/src/usr.sbin/config/SMM.doc/spell.ok#1 branch
.. //depot/projects/arm/src/usr.sbin/config/config.8#1 branch
.. //depot/projects/arm/src/usr.sbin/config/config.h#1 branch
.. //depot/projects/arm/src/usr.sbin/config/config.y#1 branch
.. //depot/projects/arm/src/usr.sbin/config/configvers.h#1 branch
.. //depot/projects/arm/src/usr.sbin/config/lang.l#1 branch
.. //depot/projects/arm/src/usr.sbin/config/main.c#1 branch
.. //depot/projects/arm/src/usr.sbin/config/mkheaders.c#1 branch
.. //depot/projects/arm/src/usr.sbin/config/mkmakefile.c#1 branch
.. //depot/projects/arm/src/usr.sbin/config/mkoptions.c#1 branch
Differences ...
==== //depot/projects/arm/src/sys/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/Makefile,v 1.32 2005/03/05 00:56:15 grog Exp $
+# $FreeBSD: src/sys/Makefile,v 1.33 2005/03/08 00:09:41 grog Exp $
# The boot loader
.if !defined(NO_BOOT)
@@ -13,7 +13,7 @@
netinet netinet6 netipx netkey netnatm netncp netsmb nfs \
pccard pci posix4 sys ufs vm ${ARCHDIR}
-ARCHDIR ?= i386
+ARCHDIR ?= ${MACHINE}
# Loadable kernel modules
==== //depot/projects/arm/src/sys/alpha/alpha/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.48 2005/01/15 20:11:25 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.49 2005/03/07 02:18:08 scottl Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -85,7 +85,6 @@
static int reserved_bpages;
static int active_bpages;
static int total_bpages;
-static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR;
struct bus_dmamap {
struct bp_list bpages;
@@ -250,14 +249,6 @@
if (newtag->lowaddr < ptoa(Maxmem) && (flags & BUS_DMA_ALLOCNOW) != 0) {
/* Must bounce */
- if (lowaddr > bounce_lowaddr) {
- /*
- * Go through the pool and kill any pages
- * that don't reside below lowaddr.
- */
- panic("bus_dma_tag_create: page reallocation "
- "not implemented");
- }
if (ptoa(total_bpages) < maxsize) {
int pages;
@@ -367,14 +358,6 @@
&& total_bpages < maxpages)) {
int pages;
- if (dmat->lowaddr > bounce_lowaddr) {
- /*
- * Go through the pool and kill any pages
- * that don't reside below lowaddr.
- */
- panic("bus_dmamap_create: page reallocation "
- "not implemented");
- }
pages = atop(dmat->maxsize) + 1;
pages = MIN(maxpages - total_bpages, pages);
==== //depot/projects/arm/src/sys/alpha/linux/linux_proto.h#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/alpha/linux/linux_proto.h,v 1.19 2004/08/24 20:24:33 jhb Exp $
- * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp
+ * $FreeBSD: src/sys/alpha/linux/linux_proto.h,v 1.20 2005/03/07 00:23:58 sobomax Exp $
+ * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.60 2005/03/07 00:18:06 sobomax Exp
*/
#ifndef _LINUX_SYSPROTO_H_
@@ -32,6 +32,7 @@
#define PADR_(t) 0
#endif
+#define nosys linux_nosys
struct linux_fork_args {
register_t dummy;
};
@@ -581,6 +582,7 @@
char dirent_l_[PADL_(void *)]; void * dirent; char dirent_r_[PADR_(void *)];
char count_l_[PADL_(l_uint)]; l_uint count; char count_r_[PADR_(l_uint)];
};
+#define nosys linux_nosys
int linux_fork(struct thread *, struct linux_fork_args *);
int osf1_wait4(struct thread *, struct osf1_wait4_args *);
int linux_link(struct thread *, struct linux_link_args *);
@@ -716,12 +718,14 @@
#ifdef COMPAT_43
+#define nosys linux_nosys
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
+#define nosys linux_nosys
#endif /* COMPAT_FREEBSD4 */
==== //depot/projects/arm/src/sys/alpha/linux/linux_syscall.h#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/alpha/linux/linux_syscall.h,v 1.17 2004/08/24 20:24:33 jhb Exp $
- * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp
+ * $FreeBSD: src/sys/alpha/linux/linux_syscall.h,v 1.18 2005/03/07 00:23:58 sobomax Exp $
+ * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.60 2005/03/07 00:18:06 sobomax Exp
*/
#define LINUX_SYS_exit 1
==== //depot/projects/arm/src/sys/alpha/linux/linux_sysent.c#2 (text+ko) ====
@@ -2,14 +2,15 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/alpha/linux/linux_sysent.c,v 1.17 2004/08/24 20:24:33 jhb Exp $
- * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp
+ * $FreeBSD: src/sys/alpha/linux/linux_sysent.c,v 1.18 2005/03/07 00:23:58 sobomax Exp $
+ * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.60 2005/03/07 00:18:06 sobomax Exp
*/
#include "opt_compat.h"
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
+#include <compat/linux/linux_sysproto.h>
#include <alpha/linux/linux.h>
#include <alpha/linux/linux_proto.h>
@@ -17,6 +18,7 @@
/* The casts are bogus but will do for now. */
struct sysent linux_sysent[] = {
+#define nosys linux_nosys
{ 0, (sy_call_t *)nosys }, /* 0 = */
{ SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 1 = exit */
{ SYF_MPSAFE | 0, (sy_call_t *)linux_fork }, /* 2 = linux_fork */
==== //depot/projects/arm/src/sys/alpha/linux/syscalls.master#2 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.59 2004/08/24 20:21:21 jhb Exp $
+ $FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.60 2005/03/07 00:18:06 sobomax Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from LINUX).
@@ -31,9 +31,13 @@
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
+#include <compat/linux/linux_sysproto.h>
#include <alpha/linux/linux.h>
#include <alpha/linux/linux_proto.h>
+; Isn't pretty, but there seems to be no other way to trap nosys
+#define nosys linux_nosys
+
; #ifdef's, etc. may be included, and are copied to the output files.
0 UNIMPL
==== //depot/projects/arm/src/sys/amd64/amd64/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.66 2005/01/07 07:57:18 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.67 2005/03/07 02:16:03 scottl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,7 +105,6 @@
static int total_bpages;
static int busdma_zonecount;
static STAILQ_HEAD(, bounce_zone) bounce_zone_list;
-static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR;
SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters");
SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0,
@@ -290,14 +289,6 @@
return (error);
bz = newtag->bounce_zone;
- if (lowaddr > bounce_lowaddr) {
- /*
- * Go through the pool and kill any pages
- * that don't reside below lowaddr.
- */
- panic("bus_dma_tag_create: page reallocation "
- "not implemented");
- }
if (ptoa(bz->total_bpages) < maxsize) {
int pages;
@@ -419,14 +410,6 @@
|| (dmat->map_count > 0 && total_bpages < maxpages)) {
int pages;
- if (dmat->lowaddr > bounce_lowaddr) {
- /*
- * Go through the pool and kill any pages
- * that don't reside below lowaddr.
- */
- panic("bus_dmamap_create: page reallocation "
- "not implemented");
- }
pages = MAX(atop(dmat->maxsize), 1);
pages = MIN(maxpages - total_bpages, pages);
if (alloc_bounce_pages(dmat, pages) < pages)
==== //depot/projects/arm/src/sys/amd64/linux32/linux32_proto.h#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.2 2004/08/16 08:07:06 tjr Exp $
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.1 2004/08/16 07:55:06 tjr Exp
+ * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.3 2005/03/07 00:23:58 sobomax Exp $
+ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.2 2005/03/07 00:18:06 sobomax Exp
*/
#ifndef _LINUX_SYSPROTO_H_
@@ -32,6 +32,7 @@
#define PADR_(t) 0
#endif
+#define nosys linux_nosys
struct linux_fork_args {
register_t dummy;
};
@@ -685,6 +686,7 @@
struct linux_fadvise64_args {
register_t dummy;
};
+#define nosys linux_nosys
int linux_fork(struct thread *, struct linux_fork_args *);
int linux_open(struct thread *, struct linux_open_args *);
int linux_waitpid(struct thread *, struct linux_waitpid_args *);
@@ -853,12 +855,14 @@
#ifdef COMPAT_43
+#define nosys linux_nosys
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
+#define nosys linux_nosys
#endif /* COMPAT_FREEBSD4 */
==== //depot/projects/arm/src/sys/amd64/linux32/linux32_syscall.h#2 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.2 2004/08/16 08:07:06 tjr Exp $
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.1 2004/08/16 07:55:06 tjr Exp
+ * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.3 2005/03/07 00:23:58 sobomax Exp $
+ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.2 2005/03/07 00:18:06 sobomax Exp
*/
#define LINUX_SYS_exit 1
==== //depot/projects/arm/src/sys/amd64/linux32/linux32_sysent.c#2 (text+ko) ====
@@ -2,14 +2,15 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.2 2004/08/16 08:07:06 tjr Exp $
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.1 2004/08/16 07:55:06 tjr Exp
+ * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.3 2005/03/07 00:23:58 sobomax Exp $
+ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.2 2005/03/07 00:18:06 sobomax Exp
*/
#include "opt_compat.h"
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
+#include <compat/linux/linux_sysproto.h>
#include <amd64/linux32/linux.h>
#include <amd64/linux32/linux32_proto.h>
@@ -17,6 +18,7 @@
/* The casts are bogus but will do for now. */
struct sysent linux_sysent[] = {
+#define nosys linux_nosys
{ 0, (sy_call_t *)nosys }, /* 0 = setup */
{ SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 1 = exit */
{ SYF_MPSAFE | 0, (sy_call_t *)linux_fork }, /* 2 = linux_fork */
==== //depot/projects/arm/src/sys/amd64/linux32/syscalls.master#2 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.1 2004/08/16 07:55:06 tjr Exp $
+ $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.2 2005/03/07 00:18:06 sobomax Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from LINUX).
@@ -25,9 +25,13 @@
#include <sys/param.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
+#include <compat/linux/linux_sysproto.h>
#include <amd64/linux32/linux.h>
#include <amd64/linux32/linux32_proto.h>
+; Isn't pretty, but there seems to be no other way to trap nosys
+#define nosys linux_nosys
+
; #ifdef's, etc. may be included, and are copied to the output files.
0 UNIMPL setup
==== //depot/projects/arm/src/sys/arm/arm/busdma_machdep.c#3 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.15 2005/03/02 21:33:22 joerg Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.16 2005/03/07 00:24:52 mux Exp $");
/*
* MacPPC bus dma support routines
@@ -337,7 +337,7 @@
newmap = malloc(sizeof(*newmap), M_DEVBUF, M_NOWAIT | M_ZERO);
if (newmap == NULL) {
CTR3(KTR_BUSDMA, "bus_dmamem_alloc: tag %p tag "
- "flags %0x%x error Md", dmat, dmat->flags, ENOMEM);
+ "flags 0x%x error %d", dmat, dmat->flags, ENOMEM);
return (ENOMEM);
}
dmat->map_count++;
==== //depot/projects/arm/src/sys/arm/arm/pmap.c#5 (text+ko) ====
@@ -147,7 +147,7 @@
#include "opt_vm.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.24 2005/02/26 18:59:01 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.25 2005/03/06 21:10:31 cognet Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -2392,6 +2392,7 @@
virtual_avail = firstaddr;
kernel_pmap = &kernel_pmap_store;
kernel_pmap->pm_l1 = l1;
+
/*
* Scan the L1 translation table created by initarm() and create
* the required metadata for all valid mappings found in it.
@@ -2806,9 +2807,7 @@
PDEBUG(1, printf("pmap_kenter: pte = %08x, opte = %08x, npte = %08x\n",
(uint32_t) pte, opte, *pte));
if (l2pte_valid(opte)) {
-#if 0
cpu_dcache_wbinv_range(va, PAGE_SIZE);
-#endif
cpu_tlb_flushD_SE(va);
cpu_cpwait();
} else {
@@ -2833,7 +2832,14 @@
void
pmap_kenter_user(vm_offset_t va, vm_paddr_t pa)
{
+
pmap_kenter_internal(va, pa, KENTER_CACHE|KENTER_USER);
+ /*
+ * Call pmap_fault_fixup now, to make sure we'll have no exception
+ * at the first use of the new address, or bad things will happen,
+ * as we use one of these addresses in the exception handlers.
+ */
+ pmap_fault_fixup(pmap_kernel(), va, VM_PROT_READ|VM_PROT_WRITE, 1);
}
/*
==== //depot/projects/arm/src/sys/arm/arm/support.S#2 (text+ko) ====
@@ -26,7 +26,7 @@
#include <machine/asm.h>
#include <machine/asmacros.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/support.S,v 1.7 2004/11/09 16:47:47 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/support.S,v 1.8 2005/03/06 13:11:32 cognet Exp $");
#include "assym.s"
@@ -302,9 +302,548 @@
RET
ENTRY(bcopy)
- mov r3, r0
- mov r0, r1
- mov r1, r3
+ /* switch the source and destination registers */
+ eor r0, r1, r0
+ eor r1, r0, r1
+ eor r0, r1, r0
+ENTRY(memmove)
+ /* Do the buffers overlap? */
+ cmp r0, r1
+ RETeq /* Bail now if src/dst are the same */
+ subcc r3, r0, r1 /* if (dst > src) r3 = dst - src */
+ subcs r3, r1, r0 /* if (src > dsr) r3 = src - dst */
+ cmp r3, r2 /* if (r3 < len) we have an overlap */
+ bcc PIC_SYM(_C_LABEL(memcpy), PLT)
+
+ /* Determine copy direction */
+ cmp r1, r0
+ bcc .Lmemmove_backwards
+
+ moveq r0, #0 /* Quick abort for len=0 */
+ RETeq
+
+ stmdb sp!, {r0, lr} /* memmove() returns dest addr */
+ subs r2, r2, #4
+ blt .Lmemmove_fl4 /* less than 4 bytes */
+ ands r12, r0, #3
+ bne .Lmemmove_fdestul /* oh unaligned destination addr */
+ ands r12, r1, #3
+ bne .Lmemmove_fsrcul /* oh unaligned source addr */
+
+.Lmemmove_ft8:
+ /* We have aligned source and destination */
+ subs r2, r2, #8
+ blt .Lmemmove_fl12 /* less than 12 bytes (4 from above) */
+ subs r2, r2, #0x14
+ blt .Lmemmove_fl32 /* less than 32 bytes (12 from above) */
+ stmdb sp!, {r4} /* borrow r4 */
+
+ /* blat 32 bytes at a time */
+ /* XXX for really big copies perhaps we should use more registers */
+.Lmemmove_floop32:
+ ldmia r1!, {r3, r4, r12, lr}
+ stmia r0!, {r3, r4, r12, lr}
+ ldmia r1!, {r3, r4, r12, lr}
+ stmia r0!, {r3, r4, r12, lr}
+ subs r2, r2, #0x20
+ bge .Lmemmove_floop32
+
+ cmn r2, #0x10
+ ldmgeia r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */
+ stmgeia r0!, {r3, r4, r12, lr}
+ subge r2, r2, #0x10
+ ldmia sp!, {r4} /* return r4 */
+
+.Lmemmove_fl32:
+ adds r2, r2, #0x14
+
+ /* blat 12 bytes at a time */
+.Lmemmove_floop12:
+ ldmgeia r1!, {r3, r12, lr}
+ stmgeia r0!, {r3, r12, lr}
+ subges r2, r2, #0x0c
+ bge .Lmemmove_floop12
+
+.Lmemmove_fl12:
+ adds r2, r2, #8
+ blt .Lmemmove_fl4
+
+ subs r2, r2, #4
+ ldrlt r3, [r1], #4
+ strlt r3, [r0], #4
+ ldmgeia r1!, {r3, r12}
+ stmgeia r0!, {r3, r12}
+ subge r2, r2, #4
+
+.Lmemmove_fl4:
+ /* less than 4 bytes to go */
+ adds r2, r2, #4
+ ldmeqia sp!, {r0, pc} /* done */
+
+ /* copy the crud byte at a time */
+ cmp r2, #2
+ ldrb r3, [r1], #1
+ strb r3, [r0], #1
+ ldrgeb r3, [r1], #1
+ strgeb r3, [r0], #1
+ ldrgtb r3, [r1], #1
+ strgtb r3, [r0], #1
+ ldmia sp!, {r0, pc}
+
+ /* erg - unaligned destination */
+.Lmemmove_fdestul:
+ rsb r12, r12, #4
+ cmp r12, #2
+
+ /* align destination with byte copies */
+ ldrb r3, [r1], #1
+ strb r3, [r0], #1
+ ldrgeb r3, [r1], #1
+ strgeb r3, [r0], #1
+ ldrgtb r3, [r1], #1
+ strgtb r3, [r0], #1
+ subs r2, r2, r12
+ blt .Lmemmove_fl4 /* less the 4 bytes */
+
+ ands r12, r1, #3
+ beq .Lmemmove_ft8 /* we have an aligned source */
+
+ /* erg - unaligned source */
+ /* This is where it gets nasty ... */
+.Lmemmove_fsrcul:
+ bic r1, r1, #3
+ ldr lr, [r1], #4
+ cmp r12, #2
+ bgt .Lmemmove_fsrcul3
+ beq .Lmemmove_fsrcul2
+ cmp r2, #0x0c
+ blt .Lmemmove_fsrcul1loop4
+ sub r2, r2, #0x0c
+ stmdb sp!, {r4, r5}
+
+.Lmemmove_fsrcul1loop16:
+#ifdef __ARMEB__
+ mov r3, lr, lsl #8
+#else
+ mov r3, lr, lsr #8
+#endif
+ ldmia r1!, {r4, r5, r12, lr}
+#ifdef __ARMEB__
+ orr r3, r3, r4, lsr #24
+ mov r4, r4, lsl #8
+ orr r4, r4, r5, lsr #24
+ mov r5, r5, lsl #8
+ orr r5, r5, r12, lsr #24
+ mov r12, r12, lsl #8
+ orr r12, r12, lr, lsr #24
+#else
+ orr r3, r3, r4, lsl #24
+ mov r4, r4, lsr #8
+ orr r4, r4, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r12, lsl #24
+ mov r12, r12, lsr #8
+ orr r12, r12, lr, lsl #24
+#endif
+ stmia r0!, {r3-r5, r12}
+ subs r2, r2, #0x10
+ bge .Lmemmove_fsrcul1loop16
+ ldmia sp!, {r4, r5}
+ adds r2, r2, #0x0c
+ blt .Lmemmove_fsrcul1l4
+
+.Lmemmove_fsrcul1loop4:
+#ifdef __ARMEB__
+ mov r12, lr, lsl #8
+#else
+ mov r12, lr, lsr #8
+#endif
+ ldr lr, [r1], #4
+#ifdef __ARMEB__
+ orr r12, r12, lr, lsr #24
+#else
+ orr r12, r12, lr, lsl #24
+#endif
+ str r12, [r0], #4
+ subs r2, r2, #4
+ bge .Lmemmove_fsrcul1loop4
+
+.Lmemmove_fsrcul1l4:
+ sub r1, r1, #3
+ b .Lmemmove_fl4
+
+.Lmemmove_fsrcul2:
+ cmp r2, #0x0c
+ blt .Lmemmove_fsrcul2loop4
+ sub r2, r2, #0x0c
+ stmdb sp!, {r4, r5}
+
+.Lmemmove_fsrcul2loop16:
+#ifdef __ARMEB__
+ mov r3, lr, lsl #16
+#else
+ mov r3, lr, lsr #16
+#endif
+ ldmia r1!, {r4, r5, r12, lr}
+#ifdef __ARMEB__
+ orr r3, r3, r4, lsr #16
+ mov r4, r4, lsl #16
+ orr r4, r4, r5, lsr #16
+ mov r5, r5, lsl #16
+ orr r5, r5, r12, lsr #16
+ mov r12, r12, lsl #16
+ orr r12, r12, lr, lsr #16
+#else
+ orr r3, r3, r4, lsl #16
+ mov r4, r4, lsr #16
+ orr r4, r4, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r12, lsl #16
+ mov r12, r12, lsr #16
+ orr r12, r12, lr, lsl #16
+#endif
+ stmia r0!, {r3-r5, r12}
+ subs r2, r2, #0x10
+ bge .Lmemmove_fsrcul2loop16
+ ldmia sp!, {r4, r5}
+ adds r2, r2, #0x0c
+ blt .Lmemmove_fsrcul2l4
+
+.Lmemmove_fsrcul2loop4:
+#ifdef __ARMEB__
+ mov r12, lr, lsl #16
+#else
+ mov r12, lr, lsr #16
+#endif
+ ldr lr, [r1], #4
+#ifdef __ARMEB__
+ orr r12, r12, lr, lsr #16
+#else
+ orr r12, r12, lr, lsl #16
+#endif
+ str r12, [r0], #4
+ subs r2, r2, #4
+ bge .Lmemmove_fsrcul2loop4
+
+.Lmemmove_fsrcul2l4:
+ sub r1, r1, #2
+ b .Lmemmove_fl4
+
+.Lmemmove_fsrcul3:
+ cmp r2, #0x0c
+ blt .Lmemmove_fsrcul3loop4
+ sub r2, r2, #0x0c
+ stmdb sp!, {r4, r5}
+
+.Lmemmove_fsrcul3loop16:
+#ifdef __ARMEB__
+ mov r3, lr, lsl #24
+#else
+ mov r3, lr, lsr #24
+#endif
+ ldmia r1!, {r4, r5, r12, lr}
+#ifdef __ARMEB__
+ orr r3, r3, r4, lsr #8
+ mov r4, r4, lsl #24
+ orr r4, r4, r5, lsr #8
+ mov r5, r5, lsl #24
+ orr r5, r5, r12, lsr #8
+ mov r12, r12, lsl #24
+ orr r12, r12, lr, lsr #8
+#else
+ orr r3, r3, r4, lsl #8
+ mov r4, r4, lsr #24
+ orr r4, r4, r5, lsl #8
+ mov r5, r5, lsr #24
+ orr r5, r5, r12, lsl #8
+ mov r12, r12, lsr #24
+ orr r12, r12, lr, lsl #8
+#endif
+ stmia r0!, {r3-r5, r12}
+ subs r2, r2, #0x10
+ bge .Lmemmove_fsrcul3loop16
+ ldmia sp!, {r4, r5}
+ adds r2, r2, #0x0c
+ blt .Lmemmove_fsrcul3l4
+
+.Lmemmove_fsrcul3loop4:
+#ifdef __ARMEB__
+ mov r12, lr, lsl #24
+#else
+ mov r12, lr, lsr #24
+#endif
+ ldr lr, [r1], #4
+#ifdef __ARMEB__
+ orr r12, r12, lr, lsr #8
+#else
+ orr r12, r12, lr, lsl #8
+#endif
+ str r12, [r0], #4
+ subs r2, r2, #4
+ bge .Lmemmove_fsrcul3loop4
+
+.Lmemmove_fsrcul3l4:
+ sub r1, r1, #1
+ b .Lmemmove_fl4
+
+.Lmemmove_backwards:
+ add r1, r1, r2
+ add r0, r0, r2
+ subs r2, r2, #4
+ blt .Lmemmove_bl4 /* less than 4 bytes */
+ ands r12, r0, #3
+ bne .Lmemmove_bdestul /* oh unaligned destination addr */
+ ands r12, r1, #3
+ bne .Lmemmove_bsrcul /* oh unaligned source addr */
+
+.Lmemmove_bt8:
+ /* We have aligned source and destination */
+ subs r2, r2, #8
+ blt .Lmemmove_bl12 /* less than 12 bytes (4 from above) */
+ stmdb sp!, {r4, lr}
+ subs r2, r2, #0x14 /* less than 32 bytes (12 from above) */
+ blt .Lmemmove_bl32
+
+ /* blat 32 bytes at a time */
+ /* XXX for really big copies perhaps we should use more registers */
+.Lmemmove_bloop32:
+ ldmdb r1!, {r3, r4, r12, lr}
+ stmdb r0!, {r3, r4, r12, lr}
+ ldmdb r1!, {r3, r4, r12, lr}
+ stmdb r0!, {r3, r4, r12, lr}
+ subs r2, r2, #0x20
+ bge .Lmemmove_bloop32
+
+.Lmemmove_bl32:
+ cmn r2, #0x10
+ ldmgedb r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */
+ stmgedb r0!, {r3, r4, r12, lr}
+ subge r2, r2, #0x10
+ adds r2, r2, #0x14
+ ldmgedb r1!, {r3, r12, lr} /* blat a remaining 12 bytes */
+ stmgedb r0!, {r3, r12, lr}
+ subge r2, r2, #0x0c
+ ldmia sp!, {r4, lr}
+
+.Lmemmove_bl12:
+ adds r2, r2, #8
+ blt .Lmemmove_bl4
+ subs r2, r2, #4
+ ldrlt r3, [r1, #-4]!
+ strlt r3, [r0, #-4]!
+ ldmgedb r1!, {r3, r12}
+ stmgedb r0!, {r3, r12}
+ subge r2, r2, #4
+
+.Lmemmove_bl4:
+ /* less than 4 bytes to go */
+ adds r2, r2, #4
+ RETeq /* done */
+
+ /* copy the crud byte at a time */
+ cmp r2, #2
+ ldrb r3, [r1, #-1]!
+ strb r3, [r0, #-1]!
+ ldrgeb r3, [r1, #-1]!
+ strgeb r3, [r0, #-1]!
+ ldrgtb r3, [r1, #-1]!
+ strgtb r3, [r0, #-1]!
+ RET
+
+ /* erg - unaligned destination */
+.Lmemmove_bdestul:
+ cmp r12, #2
+
+ /* align destination with byte copies */
+ ldrb r3, [r1, #-1]!
+ strb r3, [r0, #-1]!
+ ldrgeb r3, [r1, #-1]!
+ strgeb r3, [r0, #-1]!
+ ldrgtb r3, [r1, #-1]!
+ strgtb r3, [r0, #-1]!
+ subs r2, r2, r12
+ blt .Lmemmove_bl4 /* less than 4 bytes to go */
+ ands r12, r1, #3
+ beq .Lmemmove_bt8 /* we have an aligned source */
+
+ /* erg - unaligned source */
+ /* This is where it gets nasty ... */
+.Lmemmove_bsrcul:
+ bic r1, r1, #3
+ ldr r3, [r1, #0]
+ cmp r12, #2
+ blt .Lmemmove_bsrcul1
+ beq .Lmemmove_bsrcul2
+ cmp r2, #0x0c
+ blt .Lmemmove_bsrcul3loop4
+ sub r2, r2, #0x0c
+ stmdb sp!, {r4, r5, lr}
+
+.Lmemmove_bsrcul3loop16:
+#ifdef __ARMEB__
+ mov lr, r3, lsr #8
+#else
+ mov lr, r3, lsl #8
+#endif
+ ldmdb r1!, {r3-r5, r12}
+#ifdef __ARMEB__
+ orr lr, lr, r12, lsl #24
+ mov r12, r12, lsr #8
+ orr r12, r12, r5, lsl #24
+ mov r5, r5, lsr #8
+ orr r5, r5, r4, lsl #24
+ mov r4, r4, lsr #8
+ orr r4, r4, r3, lsl #24
+#else
+ orr lr, lr, r12, lsr #24
+ mov r12, r12, lsl #8
+ orr r12, r12, r5, lsr #24
+ mov r5, r5, lsl #8
+ orr r5, r5, r4, lsr #24
+ mov r4, r4, lsl #8
+ orr r4, r4, r3, lsr #24
+#endif
+ stmdb r0!, {r4, r5, r12, lr}
+ subs r2, r2, #0x10
+ bge .Lmemmove_bsrcul3loop16
+ ldmia sp!, {r4, r5, lr}
+ adds r2, r2, #0x0c
+ blt .Lmemmove_bsrcul3l4
+
+.Lmemmove_bsrcul3loop4:
+#ifdef __ARMEB__
+ mov r12, r3, lsr #8
+#else
+ mov r12, r3, lsl #8
+#endif
+ ldr r3, [r1, #-4]!
+#ifdef __ARMEB__
+ orr r12, r12, r3, lsl #24
+#else
+ orr r12, r12, r3, lsr #24
+#endif
+ str r12, [r0, #-4]!
+ subs r2, r2, #4
+ bge .Lmemmove_bsrcul3loop4
+
+.Lmemmove_bsrcul3l4:
+ add r1, r1, #3
+ b .Lmemmove_bl4
+
+.Lmemmove_bsrcul2:
+ cmp r2, #0x0c
+ blt .Lmemmove_bsrcul2loop4
+ sub r2, r2, #0x0c
+ stmdb sp!, {r4, r5, lr}
+
+.Lmemmove_bsrcul2loop16:
+#ifdef __ARMEB__
+ mov lr, r3, lsr #16
+#else
+ mov lr, r3, lsl #16
+#endif
+ ldmdb r1!, {r3-r5, r12}
+#ifdef __ARMEB__
+ orr lr, lr, r12, lsl #16
+ mov r12, r12, lsr #16
+ orr r12, r12, r5, lsl #16
+ mov r5, r5, lsr #16
+ orr r5, r5, r4, lsl #16
+ mov r4, r4, lsr #16
+ orr r4, r4, r3, lsl #16
+#else
+ orr lr, lr, r12, lsr #16
+ mov r12, r12, lsl #16
+ orr r12, r12, r5, lsr #16
+ mov r5, r5, lsl #16
+ orr r5, r5, r4, lsr #16
+ mov r4, r4, lsl #16
+ orr r4, r4, r3, lsr #16
+#endif
+ stmdb r0!, {r4, r5, r12, lr}
+ subs r2, r2, #0x10
+ bge .Lmemmove_bsrcul2loop16
+ ldmia sp!, {r4, r5, lr}
+ adds r2, r2, #0x0c
+ blt .Lmemmove_bsrcul2l4
+
+.Lmemmove_bsrcul2loop4:
+#ifdef __ARMEB__
+ mov r12, r3, lsr #16
+#else
+ mov r12, r3, lsl #16
+#endif
+ ldr r3, [r1, #-4]!
+#ifdef __ARMEB__
+ orr r12, r12, r3, lsl #16
+#else
+ orr r12, r12, r3, lsr #16
+#endif
+ str r12, [r0, #-4]!
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list