Home | History | Annotate | Line # | Download | only in libkvm
kvm_arm.c revision 1.1
      1  1.1  bjh21 /*	$NetBSD: kvm_arm.c,v 1.1 2001/01/08 18:30:03 bjh21 Exp $	*/
      2  1.1  bjh21 
      3  1.1  bjh21 /*-
      4  1.1  bjh21  * Copyright (C) 1996 Wolfgang Solfrank.
      5  1.1  bjh21  * Copyright (C) 1996 TooLs GmbH.
      6  1.1  bjh21  * All rights reserved.
      7  1.1  bjh21  *
      8  1.1  bjh21  * Redistribution and use in source and binary forms, with or without
      9  1.1  bjh21  * modification, are permitted provided that the following conditions
     10  1.1  bjh21  * are met:
     11  1.1  bjh21  * 1. Redistributions of source code must retain the above copyright
     12  1.1  bjh21  *    notice, this list of conditions and the following disclaimer.
     13  1.1  bjh21  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1  bjh21  *    notice, this list of conditions and the following disclaimer in the
     15  1.1  bjh21  *    documentation and/or other materials provided with the distribution.
     16  1.1  bjh21  * 3. All advertising materials mentioning features or use of this software
     17  1.1  bjh21  *    must display the following acknowledgement:
     18  1.1  bjh21  *	This product includes software developed by TooLs GmbH.
     19  1.1  bjh21  * 4. The name of TooLs GmbH may not be used to endorse or promote products
     20  1.1  bjh21  *    derived from this software without specific prior written permission.
     21  1.1  bjh21  *
     22  1.1  bjh21  * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
     23  1.1  bjh21  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24  1.1  bjh21  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25  1.1  bjh21  * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26  1.1  bjh21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     27  1.1  bjh21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     28  1.1  bjh21  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     29  1.1  bjh21  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     30  1.1  bjh21  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     31  1.1  bjh21  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  bjh21  *
     33  1.1  bjh21  *	from: kvm_powerpc.c,v 1.3 1997/09/19 04:00:23 thorpej Exp
     34  1.1  bjh21  */
     35  1.1  bjh21 
     36  1.1  bjh21 /*
     37  1.1  bjh21  * arm32 machine dependent routines for kvm.
     38  1.1  bjh21  */
     39  1.1  bjh21 
     40  1.1  bjh21 #include <sys/param.h>
     41  1.1  bjh21 
     42  1.1  bjh21 #include <uvm/uvm_extern.h>
     43  1.1  bjh21 
     44  1.1  bjh21 #include <stdlib.h>
     45  1.1  bjh21 #include <db.h>
     46  1.1  bjh21 #include <limits.h>
     47  1.1  bjh21 #include <kvm.h>
     48  1.1  bjh21 
     49  1.1  bjh21 #include "kvm_private.h"
     50  1.1  bjh21 
     51  1.1  bjh21 void
     52  1.1  bjh21 _kvm_freevtop(kd)
     53  1.1  bjh21 	kvm_t *kd;
     54  1.1  bjh21 {
     55  1.1  bjh21 	if (kd->vmst != 0)
     56  1.1  bjh21 		free(kd->vmst);
     57  1.1  bjh21 }
     58  1.1  bjh21 
     59  1.1  bjh21 int
     60  1.1  bjh21 _kvm_initvtop(kd)
     61  1.1  bjh21 	kvm_t *kd;
     62  1.1  bjh21 {
     63  1.1  bjh21 	return 0;
     64  1.1  bjh21 }
     65  1.1  bjh21 
     66  1.1  bjh21 int
     67  1.1  bjh21 _kvm_kvatop(kd, va, pa)
     68  1.1  bjh21 	kvm_t *kd;
     69  1.1  bjh21 	u_long va;
     70  1.1  bjh21 	u_long *pa;
     71  1.1  bjh21 {
     72  1.1  bjh21 	_kvm_err(kd, 0, "vatop not yet implemented!");
     73  1.1  bjh21 	return 0;
     74  1.1  bjh21 }
     75  1.1  bjh21 
     76  1.1  bjh21 off_t
     77  1.1  bjh21 _kvm_pa2off(kd, pa)
     78  1.1  bjh21 	kvm_t *kd;
     79  1.1  bjh21 	u_long pa;
     80  1.1  bjh21 {
     81  1.1  bjh21 	_kvm_err(kd, 0, "pa2off not yet implemented!");
     82  1.1  bjh21 	return 0;
     83  1.1  bjh21 }
     84  1.1  bjh21 
     85  1.1  bjh21 /*
     86  1.1  bjh21  * Machine-dependent initialization for ALL open kvm descriptors,
     87  1.1  bjh21  * not just those for a kernel crash dump.  Some architectures
     88  1.1  bjh21  * have to deal with these NOT being constants!  (i.e. m68k)
     89  1.1  bjh21  */
     90  1.1  bjh21 int
     91  1.1  bjh21 _kvm_mdopen(kd)
     92  1.1  bjh21 	kvm_t	*kd;
     93  1.1  bjh21 {
     94  1.1  bjh21 
     95  1.1  bjh21 	kd->usrstack = USRSTACK;
     96  1.1  bjh21 	kd->min_uva = VM_MIN_ADDRESS;
     97  1.1  bjh21 	kd->max_uva = VM_MAXUSER_ADDRESS;
     98  1.1  bjh21 
     99  1.1  bjh21 	return (0);
    100  1.1  bjh21 }
    101