summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-08-23 12:12:56 +0000
committerru <ru@FreeBSD.org>2006-08-23 12:12:56 +0000
commitaa1113efeac4967bde68a5bfe0a4d71645df8c2d (patch)
treee023655c23405d4cc96c02a952364de070070e61 /lib
parent266d19dde4623a7ff15746d6f0c550664635f2db (diff)
downloadFreeBSD-src-aa1113efeac4967bde68a5bfe0a4d71645df8c2d.zip
FreeBSD-src-aa1113efeac4967bde68a5bfe0a4d71645df8c2d.tar.gz
Remove alpha-specific stuff.
Diffstat (limited to 'lib')
-rw-r--r--lib/libdisk/write_alpha_disk.c88
-rw-r--r--lib/libkvm/kvm_alpha.c213
-rw-r--r--lib/libthread_db/arch/alpha/libc_r_md.c73
-rw-r--r--lib/libthread_db/arch/alpha/libpthread_md.c62
4 files changed, 0 insertions, 436 deletions
diff --git a/lib/libdisk/write_alpha_disk.c b/lib/libdisk/write_alpha_disk.c
deleted file mode 100644
index 251282e..0000000
--- a/lib/libdisk/write_alpha_disk.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <paths.h>
-#include "libdisk.h"
-
-/*
- * XXX: A lot of hardcoded 512s probably should be foo->sector_size;
- * I'm not sure which, so I leave it like it worked before. --schweikh
- */
-int
-Write_Disk(const struct disk *d1)
-{
- u_char buf[BBSIZE];
- char device[64];
- struct chunk *c1;
- struct disklabel *dl;
- void *p;
- uint64_t *lp, sum;
- int fd, i;
-
- strcpy(device, _PATH_DEV);
- strcat(device, d1->name);
-
- fd = open(device, O_RDWR);
- if (fd < 0)
- return (1);
-
- c1 = d1->chunks->part;
- if (!strcmp(c1->name, "X") || c1->type != freebsd) {
- close (fd);
- return (0);
- }
-
- for (i = 0; i < BBSIZE/512; i++) {
- if (!(p = read_block(fd, i + c1->offset, 512))) {
- close (fd);
- return (1);
- }
- memcpy(buf + 512 * i, p, 512);
- free(p);
- }
- if (d1->boot1)
- memcpy(buf + 512, d1->boot1, BBSIZE - 512);
-
- dl = (struct disklabel *)(buf + 512 * LABELSECTOR + LABELOFFSET);
- Fill_Disklabel(dl, d1, c1);
-
- /*
- * Tell SRM where the bootstrap is.
- */
- lp = (uint64_t *)buf;
- lp[60] = (BBSIZE - 512) / 512; /* Length */
- lp[61] = 1; /* Start */
- lp[62] = 0; /* Flags */
-
- /*
- * Generate the bootblock checksum for the SRM console.
- */
- sum = 0;
- for (i = 0; i < 63; i++)
- sum += lp[i];
- lp[63] = sum;
-
- for (i = 0; i < BBSIZE / 512; i++)
- write_block(fd, i + c1->offset, buf + 512 * i, 512);
- close(fd);
-
- return (0);
-}
diff --git a/lib/libkvm/kvm_alpha.c b/lib/libkvm/kvm_alpha.c
deleted file mode 100644
index 011c397..0000000
--- a/lib/libkvm/kvm_alpha.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/* $NetBSD: kvm_alpha.c,v 1.7.2.1 1997/11/02 20:34:26 mellon Exp $ */
-
-/*
- * Copyright (c) 1994, 1995 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
- * 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 <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-
-#include <limits.h>
-#include <stdlib.h>
-#include <machine/pmap.h>
-#include "kvm_private.h"
-
-static off_t _kvm_pa2off(kvm_t *kd, u_long pa);
-
-struct vmstate {
- u_int64_t lev1map_pa; /* PA of Lev1map */
- u_int64_t page_size; /* Page size */
- u_int64_t nmemsegs; /* Number of RAM segm */
-};
-
-void
-_kvm_freevtop(kd)
- kvm_t *kd;
-{
-
- /* Not actually used for anything right now, but safe. */
- if (kd->vmst != 0)
- free(kd->vmst);
-}
-
-int
-_kvm_initvtop(kd)
- kvm_t *kd;
-{
- struct vmstate *vm;
- struct nlist nlist[2];
- u_long pa;
-
- vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
- if (vm == 0) {
- _kvm_err(kd, kd->program, "cannot allocate vm");
- return (-1);
- }
- kd->vmst = vm;
- vm->page_size = ALPHA_PGBYTES;
-
- nlist[0].n_name = "_Lev1map";
- nlist[1].n_name = 0;
-
- if (kvm_nlist(kd, nlist) != 0) {
- _kvm_err(kd, kd->program, "bad namelist");
- return (-1);
- }
-
- if(!ISALIVE(kd)) {
- if (kvm_read(kd, (nlist[0].n_value), &pa, sizeof(pa)) != sizeof(pa)) {
- _kvm_err(kd, kd->program, "cannot read Lev1map");
- return (-1);
- }
- } else
- if (kvm_read(kd, (nlist[0].n_value), &pa, sizeof(pa)) != sizeof(pa)) {
- _kvm_err(kd, kd->program, "cannot read Lev1map");
- return (-1);
- }
- vm->lev1map_pa = pa;
- return (0);
-
-}
-
-int
-_kvm_kvatop(kd, va, pa)
- kvm_t *kd;
- u_long va;
- off_t *pa;
-{
- u_int64_t lev1map_pa; /* PA of Lev1map */
- u_int64_t page_size;
- int rv, page_off;
- alpha_pt_entry_t pte;
- off_t pteoff;
- struct vmstate *vm;
- vm = kd->vmst ;
-
-
- if (ISALIVE(kd)) {
- _kvm_err(kd, 0, "vatop called in live kernel!");
- return(0);
- }
- lev1map_pa = vm->lev1map_pa;
- page_size = vm->page_size;
-
- page_off = va & (page_size - 1);
- if (va >= ALPHA_K0SEG_BASE && va <= ALPHA_K0SEG_END) {
- /*
- * Direct-mapped address: just convert it.
- */
-
- *pa = ALPHA_K0SEG_TO_PHYS(va);
- rv = page_size - page_off;
- } else if (va >= ALPHA_K1SEG_BASE && va <= ALPHA_K1SEG_END) {
- /*
- * Real kernel virtual address: do the translation.
- */
-#define PTMASK ((1 << ALPHA_PTSHIFT) - 1)
-#define pmap_lev1_index(va) (((va) >> ALPHA_L1SHIFT) & PTMASK)
-#define pmap_lev2_index(va) (((va) >> ALPHA_L2SHIFT) & PTMASK)
-#define pmap_lev3_index(va) (((va) >> ALPHA_L3SHIFT) & PTMASK)
-
- /* Find and read the L1 PTE. */
- pteoff = lev1map_pa +
- pmap_lev1_index(va) * sizeof(alpha_pt_entry_t);
- if (lseek(kd->pmfd, _kvm_pa2off(kd, pteoff), 0) == -1 ||
- read(kd->pmfd, (char *)&pte, sizeof(pte)) != sizeof(pte)) {
- _kvm_syserr(kd, 0, "could not read L1 PTE");
- goto lose;
- }
-
- /* Find and read the L2 PTE. */
- if ((pte & ALPHA_PTE_VALID) == 0) {
- _kvm_err(kd, 0, "invalid translation (invalid L1 PTE)");
- goto lose;
- }
- pteoff = ALPHA_PTE_TO_PFN(pte) * page_size +
- pmap_lev2_index(va) * sizeof(alpha_pt_entry_t);
- if (lseek(kd->pmfd, _kvm_pa2off(kd, pteoff), 0) == -1 ||
- read(kd->pmfd, (char *)&pte, sizeof(pte)) != sizeof(pte)) {
- _kvm_syserr(kd, 0, "could not read L2 PTE");
- goto lose;
- }
-
- /* Find and read the L3 PTE. */
- if ((pte & ALPHA_PTE_VALID) == 0) {
- _kvm_err(kd, 0, "invalid translation (invalid L2 PTE)");
- goto lose;
- }
- pteoff = ALPHA_PTE_TO_PFN(pte) * page_size +
- pmap_lev3_index(va) * sizeof(alpha_pt_entry_t);
- if (lseek(kd->pmfd, _kvm_pa2off(kd, pteoff), 0) == -1 ||
- read(kd->pmfd, (char *)&pte, sizeof(pte)) != sizeof(pte)) {
- _kvm_syserr(kd, 0, "could not read L3 PTE");
- goto lose;
- }
-
- /* Fill in the PA. */
- if ((pte & ALPHA_PTE_VALID) == 0) {
- _kvm_err(kd, 0, "invalid translation (invalid L3 PTE)");
- goto lose;
- }
- *pa = ALPHA_PTE_TO_PFN(pte) * page_size + page_off;
- rv = page_size - page_off;
- } else {
- /*
- * Bogus address (not in KV space): punt.
- */
-
- _kvm_err(kd, 0, "invalid kernel virtual address");
-lose:
- *pa = -1;
- rv = 0;
- }
-
- return (rv);
-}
-
-/*
- * Translate a physical address to a file-offset in the crash-dump.
- */
-off_t
-_kvm_pa2off(kd, pa)
- kvm_t *kd;
- u_long pa;
-{
- return ALPHA_K0SEG_TO_PHYS(pa);
-}
-
diff --git a/lib/libthread_db/arch/alpha/libc_r_md.c b/lib/libthread_db/arch/alpha/libc_r_md.c
deleted file mode 100644
index 227440c..0000000
--- a/lib/libthread_db/arch/alpha/libc_r_md.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2004 Marcel Moolenaar
- * All rights reserved.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/procfs.h>
-#include <machine/setjmp.h>
-
-void
-libc_r_md_getgregs(jmp_buf jb, prgregset_t r)
-{
- r->r_regs[R_V0] = jb->_jb[4];
- r->r_regs[R_T0] = jb->_jb[5];
- r->r_regs[R_T1] = jb->_jb[6];
- r->r_regs[R_T2] = jb->_jb[7];
- r->r_regs[R_T3] = jb->_jb[8];
- r->r_regs[R_T4] = jb->_jb[9];
- r->r_regs[R_T5] = jb->_jb[10];
- r->r_regs[R_T6] = jb->_jb[11];
- r->r_regs[R_T7] = jb->_jb[12];
- r->r_regs[R_S0] = jb->_jb[13];
- r->r_regs[R_S1] = jb->_jb[14];
- r->r_regs[R_S2] = jb->_jb[15];
- r->r_regs[R_S3] = jb->_jb[16];
- r->r_regs[R_S4] = jb->_jb[17];
- r->r_regs[R_S5] = jb->_jb[18];
- r->r_regs[R_S6] = jb->_jb[19];
- r->r_regs[R_A0] = jb->_jb[20];
- r->r_regs[R_A1] = jb->_jb[21];
- r->r_regs[R_A2] = jb->_jb[22];
- r->r_regs[R_A3] = jb->_jb[23];
- r->r_regs[R_A4] = jb->_jb[24];
- r->r_regs[R_A5] = jb->_jb[25];
- r->r_regs[R_T8] = jb->_jb[26];
- r->r_regs[R_T9] = jb->_jb[27];
- r->r_regs[R_T10] = jb->_jb[28];
- r->r_regs[R_T11] = jb->_jb[29];
- r->r_regs[R_RA] = jb->_jb[30];
- r->r_regs[R_T12] = jb->_jb[31];
- r->r_regs[R_AT] = jb->_jb[32];
- r->r_regs[R_GP] = jb->_jb[33];
- r->r_regs[R_SP] = jb->_jb[34];
- r->r_regs[R_ZERO] = jb->_jb[35];
-}
-
-void
-libc_r_md_getfpregs(jmp_buf jb, prfpregset_t *r)
-{
-}
diff --git a/lib/libthread_db/arch/alpha/libpthread_md.c b/lib/libthread_db/arch/alpha/libpthread_md.c
deleted file mode 100644
index 7553ed1..0000000
--- a/lib/libthread_db/arch/alpha/libpthread_md.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2004 Marcel Moolenaar
- * All rights reserved.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/procfs.h>
-#include <ucontext.h>
-
-void
-pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
-{
-}
-
-void
-pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
-{
-}
-
-void
-pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
-{
-}
-
-void
-pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
-{
-}
-
-void
-pt_md_init(void)
-{
-}
-
-int
-pt_reg_sstep(struct reg *reg, int step)
-{
- return (0);
-}
OpenPOWER on IntegriCloud