diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-06-17 11:02:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-06-17 11:02:33 +0000 |
commit | 845687583c0aab8d67c8bf104bd084ab1dac56cc (patch) | |
tree | 27c36b850add0cf518915948ce843cf8199b64ed /sys/arch | |
parent | f00da9eeb3eae27653555459386b6318b09af638 (diff) |
Remove leftover loongson or sgi references.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/octeon/conf/Makefile.octeon | 4 | ||||
-rw-r--r-- | sys/arch/octeon/dev/octeon_intr.c | 2 | ||||
-rw-r--r-- | sys/arch/octeon/octeon/autoconf.c | 59 | ||||
-rw-r--r-- | sys/arch/octeon/octeon/locore.S | 6 | ||||
-rw-r--r-- | sys/arch/octeon/octeon/machdep.c | 16 |
5 files changed, 11 insertions, 76 deletions
diff --git a/sys/arch/octeon/conf/Makefile.octeon b/sys/arch/octeon/conf/Makefile.octeon index f6e9752e8c8..3ad996a5ff9 100644 --- a/sys/arch/octeon/conf/Makefile.octeon +++ b/sys/arch/octeon/conf/Makefile.octeon @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.octeon,v 1.8 2011/11/08 18:41:34 matthieu Exp $ +# $OpenBSD: Makefile.octeon,v 1.9 2012/06/17 11:02:32 miod Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -150,7 +150,7 @@ db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.awk locore.o: ${_machdir}/${_mach}/locore.S assym.h cache_octeon2.o context.o cp0access.o exception.o: assym.h -fp.o lcore_access.o lcore_float.o tlbhandler.o lcore_ddb.o pmon32.o: assym.h +fp.o lcore_access.o lcore_float.o tlbhandler.o lcore_ddb.o: assym.h # The install target can be redefined by putting a # install-kernel-${MACHINE_NAME} target into /etc/mk.conf diff --git a/sys/arch/octeon/dev/octeon_intr.c b/sys/arch/octeon/dev/octeon_intr.c index 915982681bc..01dc7172788 100644 --- a/sys/arch/octeon/dev/octeon_intr.c +++ b/sys/arch/octeon/dev/octeon_intr.c @@ -296,7 +296,7 @@ octeon_iointr(uint32_t hwpend, struct trap_frame *frame) __asm__ ("sync\n\t.set reorder\n"); } if (rc == 0) - printf("spurious crime interrupt %d\n", bitno); + printf("spurious interrupt %d\n", bitno); isr ^= mask; if ((tmpisr ^= mask) == 0) diff --git a/sys/arch/octeon/octeon/autoconf.c b/sys/arch/octeon/octeon/autoconf.c index 0b39e0680a0..f5f45e8f201 100644 --- a/sys/arch/octeon/octeon/autoconf.c +++ b/sys/arch/octeon/octeon/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.2 2010/10/26 00:02:01 syuu Exp $ */ +/* $OpenBSD: autoconf.c,v 1.3 2012/06/17 11:02:32 miod Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. * @@ -24,15 +24,12 @@ #include <machine/autoconf.h> extern void dumpconf(void); -void parsepmonbp(void); int cold = 1; struct device *bootdv = NULL; char bootdev[16]; enum devclass bootdev_class = DV_DULL; -extern char pmon_bootp[]; - void cpu_configure(void) { @@ -46,48 +43,8 @@ cpu_configure(void) } void -parsepmonbp(void) -{ - char *p, *q; - size_t len; - - if (strncmp(pmon_bootp, "tftp://", 7) == 0) { - bootdev_class = DV_IFNET; - strlcpy(bootdev, "netboot", sizeof bootdev); - return; - } - strlcpy(bootdev, "unknown", sizeof bootdev); - - if (strncmp(pmon_bootp, "/dev/disk/", 10) == 0) { - /* kernel loaded by our boot blocks */ - p = pmon_bootp + 10; - len = strlen(p); - } else { - /* kernel loaded by PMON */ - p = strchr(pmon_bootp, '@'); - if (p == NULL) - return; - p++; - - q = strchr(p, '/'); - if (q == NULL) - return; - len = q - p; - } - - if (len <= 2 || len >= sizeof bootdev - 1) - return; - memcpy(bootdev, p, len); - bootdev[len] = '\0'; - bootdev_class = DV_DISK; -} - -void diskconf(void) { - if (*pmon_bootp != '\0') - printf("pmon bootpath: %s\n", pmon_bootp); - if (bootdv != NULL) printf("boot device: %s\n", bootdv->dv_xname); @@ -107,26 +64,12 @@ device_register(struct device *dev, void *aux) if (dev->dv_class != bootdev_class) return; - /* - * The device numbering must match. There's no way - * pmon tells us more info. Depending on the usb slot - * and hubs used you may be lucky. Also, assume umass/sd for usb - * attached devices. - */ switch (bootdev_class) { case DV_DISK: if (strcmp(drvrname, "wd") == 0 && strcmp(name, bootdev) == 0) bootdv = dev; if (strcmp(drvrname, "octcf") == 0 && strcmp(name, bootdev) == 0) bootdv = dev; - else { - /* XXX this really only works safely for usb0... */ - if ((strcmp(drvrname, "sd") == 0 || - strcmp(drvrname, "cd") == 0) && - strncmp(bootdev, "usb", 3) == 0 && - strcmp(name + 2, bootdev + 3) == 0) - bootdv = dev; - } break; case DV_IFNET: /* diff --git a/sys/arch/octeon/octeon/locore.S b/sys/arch/octeon/octeon/locore.S index 19711476d68..a44d3f93cc4 100644 --- a/sys/arch/octeon/octeon/locore.S +++ b/sys/arch/octeon/octeon/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.3 2010/11/23 22:06:57 syuu Exp $ */ +/* $OpenBSD: locore.S,v 1.4 2012/06/17 11:02:32 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -89,13 +89,13 @@ start: * Initialize stack and call machine startup. */ LA t0, start - FRAMESZ(CF_SZ) - PTR_S ra, CF_RA_OFFS(t0) # save pmon return address + PTR_S ra, CF_RA_OFFS(t0) # save uboot return address PTR_S sp, 0(t0) # and stack move sp, t0 jal mips_init # mips_init(argc, argv, envp, nop # callvec, esym) - beqz v0, 1f # upon failure, return to pmon + beqz v0, 1f # upon failure, return to uboot nop PTR_S zero, CF_RA_OFFS(sp) # Zero out old ra for debugger diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index 15c99f61cbe..1a49513a5d5 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.17 2012/03/25 13:52:52 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.18 2012/06/17 11:02:32 miod Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -153,13 +153,7 @@ struct boot_info { /* The following is used externally (sysctl_hw) */ char machine[] = MACHINE; /* Machine "architecture" */ char cpu_model[30]; -char pmon_bootp[80]; -/* - * Even though the system is 64bit, the hardware is constrained to up - * to 2G of contigous physical memory (direct 2GB DMA area), so there - * is no particular constraint. paddr_t is long so: - */ struct uvm_constraint_range dma_constraint = { 0x0, 0xffffffffUL }; struct uvm_constraint_range *uvm_md_constraints[] = { NULL }; @@ -189,7 +183,6 @@ struct phys_mem_desc mem_layout[MAXMEMSEGS]; void dumpsys(void); void dumpconf(void); -extern void parsepmonbp(void); vaddr_t mips_init(__register_t, __register_t, __register_t, __register_t); boolean_t is_memory_range(paddr_t, psize_t, psize_t); void octeon_memory_init(struct boot_info *); @@ -256,7 +249,7 @@ octeon_memory_init(struct boot_info *boot_info) * 0000 0003 FFFF FFFF to 0000 0003 FFFF FFFF * */ - physmem = btoc(phys_avail[1] - phys_avail[0]); + physmem = atop(phys_avail[1] - phys_avail[0]); if (boot_info->board_type != BOARD_TYPE_SIM) { if(realmem_bytes > OCTEON_DRAM_FIRST_256_END){ @@ -422,9 +415,8 @@ mips_init(__register_t a0, __register_t a1, __register_t a2 __unused, bootcpu_hwinfo.c0prid = prid; bootcpu_hwinfo.type = (prid >> 8) & 0xff; - /* FPU reports itself as type 5, version 0.1... */ - bootcpu_hwinfo.c1prid = bootcpu_hwinfo.c0prid; - bootcpu_hwinfo.tlbsize = 64; + bootcpu_hwinfo.c1prid = 0; /* No FPU */ + bootcpu_hwinfo.tlbsize = 1 + ((cp0_get_config_1() >> 25) & 0x3f); bcopy(&bootcpu_hwinfo, &curcpu()->ci_hw, sizeof(struct cpu_hwinfo)); /* |