Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/alpha/alpha pull up 1.167 -> 1.168:



details:   https://anonhg.NetBSD.org/src/rev/ced243e875fd
branches:  netbsd-1-4
changeset: 468256:ced243e875fd
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Apr 16 16:13:49 1999 +0000

description:
pull up 1.167 -> 1.168:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.

diffstat:

 sys/arch/alpha/alpha/machdep.c |  2226 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 2226 insertions(+), 0 deletions(-)

diffs (truncated from 2230 to 300 lines):

diff -r 3b96a03a8a9a -r ced243e875fd sys/arch/alpha/alpha/machdep.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Fri Apr 16 16:13:49 1999 +0000
@@ -0,0 +1,2226 @@
+/* $NetBSD: machdep.c,v 1.167.2.2 1999/04/16 16:13:49 chs Exp $ */
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
+ * NASA Ames Research Center and by Chris G. Demetriou.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ * 
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ *
+ *  Software Distribution Coordinator  or  Software.Distribution%CS.CMU.EDU@localhost
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#include "opt_bufcache.h"
+#include "opt_ddb.h"
+#include "opt_multiprocessor.h"
+#include "opt_pmap_new.h"
+#include "opt_dec_3000_300.h"
+#include "opt_dec_3000_500.h"
+#include "opt_compat_osf1.h"
+#include "opt_compat_netbsd.h"
+#include "opt_inet.h"
+#include "opt_atalk.h"
+#include "opt_ccitt.h"
+#include "opt_iso.h"
+#include "opt_ns.h"
+#include "opt_natm.h"
+#include "opt_sysv.h"
+
+#include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
+
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.167.2.2 1999/04/16 16:13:49 chs Exp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/signalvar.h>
+#include <sys/kernel.h>
+#include <sys/map.h>
+#include <sys/proc.h>
+#include <sys/buf.h>
+#include <sys/reboot.h>
+#include <sys/device.h>
+#include <sys/file.h>
+#ifdef REAL_CLISTS
+#include <sys/clist.h>
+#endif
+#include <sys/callout.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/mman.h>
+#include <sys/msgbuf.h>
+#include <sys/ioctl.h>
+#include <sys/tty.h>
+#include <sys/user.h>
+#include <sys/exec.h>
+#include <sys/exec_ecoff.h>
+#include <vm/vm.h>
+#include <sys/sysctl.h>
+#include <sys/core.h>
+#include <sys/kcore.h>
+#include <machine/kcore.h>
+#ifdef SYSVMSG
+#include <sys/msg.h>
+#endif
+#ifdef SYSVSEM
+#include <sys/sem.h>
+#endif
+#ifdef SYSVSHM
+#include <sys/shm.h>
+#endif
+
+#include <sys/mount.h>
+#include <sys/syscallargs.h>
+
+#include <vm/vm_kern.h>
+
+#include <uvm/uvm_extern.h>
+
+#include <dev/cons.h>
+
+#include <machine/autoconf.h>
+#include <machine/cpu.h>
+#include <machine/reg.h>
+#include <machine/rpb.h>
+#include <machine/prom.h>
+#include <machine/conf.h>
+
+#include <alpha/alpha/cpuvar.h>
+
+#include <net/netisr.h>
+#include <net/if.h>
+
+#ifdef INET
+#include <net/route.h>
+#include <netinet/in.h>
+#include <netinet/ip_var.h>
+#include "arp.h"
+#if NARP > 0
+#include <netinet/if_inarp.h>
+#endif
+#endif
+#ifdef NS
+#include <netns/ns_var.h>
+#endif
+#ifdef ISO
+#include <netiso/iso.h>
+#include <netiso/clnp.h>
+#endif
+#ifdef CCITT
+#include <netccitt/x25.h>
+#include <netccitt/pk.h>
+#include <netccitt/pk_extern.h>
+#endif
+#ifdef NATM
+#include <netnatm/natm.h>
+#endif
+#ifdef NETATALK
+#include <netatalk/at_extern.h>
+#endif
+#include "ppp.h"
+#if NPPP > 0
+#include <net/ppp_defs.h>
+#include <net/if_ppp.h>
+#endif
+
+#ifdef DDB
+#include <machine/db_machdep.h>
+#include <ddb/db_access.h>
+#include <ddb/db_sym.h>
+#include <ddb/db_extern.h>
+#include <ddb/db_interface.h>
+#endif
+
+#include <machine/alpha.h>
+#include <machine/intrcnt.h>
+
+#include "com.h"
+#if NCOM > 0
+extern void comsoft __P((void));
+#endif
+
+vm_map_t exec_map = NULL;
+vm_map_t mb_map = NULL;
+vm_map_t phys_map = NULL;
+
+/*
+ * Declare these as initialized data so we can patch them.
+ */
+int    nswbuf = 0;
+#ifdef NBUF
+int    nbuf = NBUF;
+#else
+int    nbuf = 0;
+#endif
+
+#ifndef        BUFPAGES
+#define BUFPAGES 0
+#endif
+#ifndef BUFCACHE
+#define BUFCACHE 10
+#endif
+
+int    bufpages = BUFPAGES;    /* optional hardwired count */
+int    bufcache = BUFCACHE;    /* % of RAM to use for buffer cache */
+
+caddr_t msgbufaddr;
+
+int    maxmem;                 /* max memory per process */
+
+int    totalphysmem;           /* total amount of physical memory in system */
+int    physmem;                /* physical memory used by NetBSD + some rsvd */
+int    resvmem;                /* amount of memory reserved for PROM */
+int    unusedmem;              /* amount of memory for OS that we don't use */
+int    unknownmem;             /* amount of memory with an unknown use */
+
+int    cputype;                /* system type, from the RPB */
+
+/*
+ * XXX We need an address to which we can assign things so that they
+ * won't be optimized away because we didn't use the value.
+ */
+u_int32_t no_optimize;
+
+/* the following is used externally (sysctl_hw) */
+char   machine[] = MACHINE;            /* from <machine/param.h> */
+char   machine_arch[] = MACHINE_ARCH;  /* from <machine/param.h> */
+char   cpu_model[128];
+
+struct user *proc0paddr;
+
+/* Number of machine cycles per microsecond */
+u_int64_t      cycles_per_usec;
+
+/* number of cpus in the box.  really! */
+int            ncpus;
+
+/* machine check info array, valloc()'ed in allocsys() */
+
+static struct mchkinfo startup_info,
+                       *mchkinfo_all_cpus;
+
+struct bootinfo_kernel bootinfo;
+
+/* For built-in TCDS */
+#if defined(DEC_3000_300) || defined(DEC_3000_500)
+u_int8_t       dec_3000_scsiid[2], dec_3000_scsifast[2];
+#endif
+
+struct platform platform;
+
+u_int32_t vm_kmem_size = _VM_KMEM_SIZE;
+u_int32_t vm_phys_size = _VM_PHYS_SIZE;
+
+#ifdef DDB
+/* start and end of kernel symbol table */
+void   *ksym_start, *ksym_end;
+#endif
+
+/* for cpu_sysctl() */
+int    alpha_unaligned_print = 1;      /* warn about unaligned accesses */
+int    alpha_unaligned_fix = 1;        /* fix up unaligned accesses */
+int    alpha_unaligned_sigbus = 0;     /* don't SIGBUS on fixed-up accesses */
+
+/*
+ * XXX This should be dynamically sized, but we have the chicken-egg problem!
+ * XXX it should also be larger than it is, because not all of the mddt
+ * XXX clusters end up being used for VM.
+ */
+phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];   /* low size bits overloaded */
+int    mem_cluster_cnt;
+
+caddr_t        allocsys __P((caddr_t));
+int    cpu_dump __P((void));
+int    cpu_dumpsize __P((void));
+u_long cpu_dump_mempagecnt __P((void));
+void   dumpsys __P((void));
+void   identifycpu __P((void));
+void   netintr __P((void));
+void   printregs __P((struct reg *));
+
+void
+alpha_init(pfn, ptb, bim, bip, biv)
+       u_long pfn;             /* first free PFN number */



Home | Main Index | Thread Index | Old Index