diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-10-16 05:03:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-10-16 05:03:23 +0000 |
commit | 427b718b0d90748d518598c9bebedad3d4c8edc7 (patch) | |
tree | 956cdcf80ea700d4e90d35d946f90d8724d2d634 /sys | |
parent | eb6b972eb5f7f4aea38051946f3892ad74d5bfaa (diff) |
more white
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/macppc/autoconf.c | 8 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/clock.c | 14 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/cpu.c | 19 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/disksubr.c | 11 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/genassym.cf | 4 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/locore.S | 33 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 16 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/mainbus.c | 18 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/mem.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/ofw_machdep.c | 22 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/ofwreal.S | 8 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/opendev.c | 17 |
12 files changed, 84 insertions, 90 deletions
diff --git a/sys/arch/macppc/macppc/autoconf.c b/sys/arch/macppc/macppc/autoconf.c index d0a551404c4..25c71444418 100644 --- a/sys/arch/macppc/macppc/autoconf.c +++ b/sys/arch/macppc/macppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.12 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: autoconf.c,v 1.13 2003/10/16 05:03:22 deraadt Exp $ */ /* * Copyright (c) 1996, 1997 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -37,7 +37,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.12 2003/10/15 17:50:16 drahn Exp $ + * $Id: autoconf.c,v 1.13 2003/10/16 05:03:22 deraadt Exp $ */ /* @@ -247,7 +247,7 @@ getdisk(char *str, int len, int defpart, dev_t *devp) printf(" %s[a-p]", dv->dv_xname); #ifdef NFSCLIENT if (dv->dv_class == DV_IFNET) - printf(" %s", dv->dv_xname); + printf(" %s", dv->dv_xname); #endif } printf("\n"); @@ -455,7 +455,7 @@ gotswap: } else { /* * Root and Swap are on net. - */ + */ nswapdev = dumpdev = NODEV; } swdevt[0].sw_dev = nswapdev; diff --git a/sys/arch/macppc/macppc/clock.c b/sys/arch/macppc/macppc/clock.c index 0aeabf8e1a2..249836aa5d3 100644 --- a/sys/arch/macppc/macppc/clock.c +++ b/sys/arch/macppc/macppc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.10 2003/07/29 12:13:32 drahn Exp $ */ +/* $OpenBSD: clock.c,v 1.11 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -170,14 +170,14 @@ static u_int32_t chiptotime(int sec, int min, int hour, int day, int mon, int year) { int days, yr; - + sec = FROMBCD(sec); min = FROMBCD(min); hour = FROMBCD(hour); day = FROMBCD(day); mon = FROMBCD(mon); year = FROMBCD(year) + YEAR0; - + /* simple sanity checks */ if (year < 1970 || mon < 1 || mon > 12 || day < 1 || day > 31) return (0); @@ -280,7 +280,7 @@ decr_intr(struct clockframe *frame) * Reenable interrupts */ ppc_intr_enable(1); - + /* * Do standard timer interrupt stuff. * Do softclock stuff only on the last iteration. @@ -355,7 +355,7 @@ calc_delayconst(void) int qhandle, phandle; char name[32]; int s; - + /* * Get this info during autoconf? XXX */ @@ -395,7 +395,7 @@ microtime(struct timeval *tvp) u_int64_t tb; u_int32_t ticks; int s; - + s = ppc_intr_disable(); tb = ppc_mftb(); ticks = (tb - lasttb) * ns_per_tick; @@ -417,7 +417,7 @@ delay(unsigned n) { u_int64_t tb; u_int32_t tbh, tbl, scratch; - + tb = ppc_mftb(); tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; tbh = tb >> 32; diff --git a/sys/arch/macppc/macppc/cpu.c b/sys/arch/macppc/macppc/cpu.c index a37f150ecdf..f404ecb6017 100644 --- a/sys/arch/macppc/macppc/cpu.c +++ b/sys/arch/macppc/macppc/cpu.c @@ -1,9 +1,9 @@ -/* $OpenBSD: cpu.c,v 1.14 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: cpu.c,v 1.15 2003/10/16 05:03:22 deraadt Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom * Copyright (c) 1997 RTMX Inc - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -194,13 +194,13 @@ cpuattach(struct device *parent, struct device *dev, void *aux) case MPC7410: /* select DOZE mode */ hid0 &= ~(HID0_NAP | HID0_SLEEP); - hid0 |= HID0_DOZE | HID0_DPM; + hid0 |= HID0_DOZE | HID0_DPM; break; case MPC7450: case MPC7455: /* select NAP mode */ hid0 &= ~(HID0_DOZE | HID0_SLEEP); - hid0 |= HID0_NAP | HID0_DPM; + hid0 |= HID0_NAP | HID0_DPM; /* try some other flags */ hid0 |= HID0_SGE | HID0_BTIC; hid0 |= HID0_LRSTK | HID0_FOLD | HID0_BHT; @@ -211,7 +211,7 @@ cpuattach(struct device *parent, struct device *dev, void *aux) } ppc_mthid0(hid0); - /* if processor is G3 or G4, configure l2 cache */ + /* if processor is G3 or G4, configure l2 cache */ if ( (cpu == MPC750) || (cpu == MPC7400) || (cpu == IBM750FX) || (cpu == MPC7410) || (cpu == MPC7450) || (cpu == MPC7455)) { config_l2cr(cpu); @@ -288,7 +288,7 @@ config_l2cr(int cpu) do { x = ppc_mfl2cr(); } while (x & L2CR_L2IP); - + /* Enable L2 cache. */ l2cr &= ~L2CR_L2I; l2cr |= L2CR_L2E; @@ -315,7 +315,7 @@ config_l2cr(int cpu) case L2SIZ_512K: printf(": 512KB"); break; - case L2SIZ_1M: + case L2SIZ_1M: printf(": 1MB"); break; default: @@ -337,11 +337,10 @@ config_l2cr(int cpu) default: printf(" unknown type"); } - + if (l2cr & L2CR_L2PE) - printf(" with parity"); + printf(" with parity"); #endif } else printf(": L2 cache not enabled"); - } diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c index 64e8a8eb855..7ebc1e556f9 100644 --- a/sys/arch/macppc/macppc/disksubr.c +++ b/sys/arch/macppc/macppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.8 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: disksubr.c,v 1.9 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -106,7 +106,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), /* DPME (HFS) disklabel */ - bp->b_blkno = 1; + bp->b_blkno = 1; bp->b_bcount = lp->d_secsize; bp->b_flags = B_BUSY | B_READ; bp->b_cylin = 1 / lp->d_secpercyl; @@ -130,7 +130,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), for (i = 0; i < part_cnt; i++) { struct partition *pp = &lp->d_partitions[8+n]; - bp->b_blkno = 1+i; + bp->b_blkno = 1+i; bp->b_bcount = lp->d_secsize; bp->b_flags = B_BUSY | B_READ; bp->b_cylin = 1+i / lp->d_secpercyl; @@ -207,7 +207,7 @@ hfs_done: bp->b_flags = B_BUSY | B_READ; bp->b_cylin = part_blkno / lp->d_secpercyl; (*strat)(bp); - + /* if successful, wander through dos partition table */ if (biowait(bp)) { msg = "dos partition I/O error"; @@ -487,7 +487,6 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, /* try DPME partition */ if (osdep->macparts[0].pmSig == PART_ENTRY_MAGIC) { - /* only write if a valid "OpenBSD" partition type exists */ if (osdep->macparts[1].pmSig == PART_ENTRY_MAGIC) { bp->b_blkno = osdep->macparts[1].pmPyPartStart; @@ -501,7 +500,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, } /* SHOULD FAIL TO WRITE LABEL IF VALID HFS partition exists - * and no OpenBSD partition exists + * and no OpenBSD partition exists */ error = 1; /* EPERM? */ goto done; diff --git a/sys/arch/macppc/macppc/genassym.cf b/sys/arch/macppc/macppc/genassym.cf index abba3655fa4..45d05ddaa5e 100644 --- a/sys/arch/macppc/macppc/genassym.cf +++ b/sys/arch/macppc/macppc/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.8 2003/06/02 23:27:50 millert Exp $ +# $OpenBSD: genassym.cf,v 1.9 2003/10/16 05:03:22 deraadt Exp $ # # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -35,7 +35,7 @@ include <sys/time.h> include <sys/proc.h> include <uvm/uvm_extern.h> -include <machine/pcb.h> +include <machine/pcb.h> include <machine/pmap.h> export FRAMELEN diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index 1e83cba0fb4..234fc87ad6f 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.10 2003/10/15 20:52:44 drahn Exp $ */ +/* $OpenBSD: locore.S,v 1.11 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -67,7 +67,7 @@ _C_LABEL(where): .long 0 */ _ENTRY(_C_LABEL(kernel_text)) _ENTRY(_ASM_LABEL(start)) -/* arguments to start +/* arguments to start * r1 - stack provided by firmware/bootloader * r3 - unused * r4 - unused @@ -82,7 +82,7 @@ start: stw %r6, fwargsave@l(%r3) stw %r7, fwargsave@l+4(%r3) #ifdef SUPPORT_PPC1BUG - mr %r0,%r5 + mr %r0,%r5 cmpwi 0,%r0,0 bne 1f /* need additional tests for other systems??? */ @@ -126,7 +126,7 @@ start: mr %r4,%r1 /* end of mem reserved for kernel */ xor %r0,%r0,%r0 stwu %r0,-16(%r1) /* end of stack chain */ - + li %r0, 2 lis %r9,_C_LABEL(where)@ha stw %r0,_C_LABEL(where)@l(%r9) @@ -153,7 +153,7 @@ _C_LABEL(idle): or. %r9,%r9,%r9 bne- _C_LABEL(sw1) /* at least one queue non-empty */ - + ori %r3,%r3,PSL_EE /* reenable ints again */ mtmsr %r3 isync @@ -163,7 +163,7 @@ _C_LABEL(idle): oris %r3, %r3, PSL_POW@h mtmsr %r3 isync - + /* May do some power saving here? */ b _C_LABEL(idle) @@ -188,7 +188,6 @@ _ENTRY(_C_LABEL(switchexit)) /* Fall through to cpu_switch to actually select another proc */ li %r3,0 /* indicate exited process */ - /* Fall through to cpu_switch to actually select another proc */ /* @@ -232,7 +231,7 @@ _C_LABEL(sw1): addi %r4,%r4,_C_LABEL(qs)@l slwi %r3,%r10,3 add %r3,%r3,%r4 /* select queue */ - + lwz %r31,P_FORW(%r3) /* unlink first proc from queue */ lwz %r4,P_FORW(%r31) stw %r4,P_FORW(%r3) @@ -728,13 +727,13 @@ _C_LABEL(tlbdsmsize) = .-_C_LABEL(tlbdsmiss) */ .local ddbstk .comm ddbstk,INTSTK,8 /* ddb stack */ - + .globl _C_LABEL(ddblow),_C_LABEL(ddbsize) _C_LABEL(ddblow): mtsprg 1,%r1 /* save SP */ stmw %r28,ddbsave(0) /* free r28-r31 */ mflr %r28 /* save LR */ - mfcr %r29 /* save CR */ + mfcr %r29 /* save CR */ lis %r1,ddbstk+INTSTK@ha /* get new SP */ addi %r1,%r1,ddbstk+INTSTK@l bla ddbtrap @@ -865,7 +864,7 @@ realtrap: mfsrr1 %r1 mtcr %r1 /* restore SP (might have been overwritten) */ - mfsprg %r1,1 + mfsprg %r1,1 bc 4,17,s_trap /* branch if PSL_PR is false */ lis %r1,_C_LABEL(curpcb)@ha lwz %r1,_C_LABEL(curpcb)@l(%r1) @@ -1143,7 +1142,7 @@ decrintr: .globl _C_LABEL(ipkdb_trap) .type _C_LABEL(ipkdb_trap),@function _C_LABEL(ipkdb_trap): - + mtsprg %r2,2 mfmsr %r3 mtsrr1 %r3 @@ -1247,10 +1246,10 @@ _C_LABEL(ipkdbsbyte): stw %r5,0(%r9) /* restore previous fault handler */ dcbst 0,%r9 /* and flush data... */ sync - icbi 0,%r9 /* and instruction caches */ + icbi 0,%r9 /* and instruction caches */ blr #endif /* NIPKDB > 0 */ - + /* * int setfault() * @@ -1319,8 +1318,8 @@ _C_LABEL(intrnames): .string "irq52" "irq53" "irq54" "irq55" .string "irq56" "irq57" "irq58" "irq59" .string "irq60" "irq61" "irq62" "irq63" - .string "clock" - .string "stat" + .string "clock" + .string "stat" .space 512 _C_LABEL(eintrnames): .align 4 @@ -1349,7 +1348,7 @@ _C_LABEL(intrcnt): .long 0 _C_LABEL(eintrcnt): -#ifdef DDB +#ifdef DDB /* * Deliberate entry to ddbtrap */ diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 041424d5763..20db259702f 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.57 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: machdep.c,v 1.58 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -800,11 +800,11 @@ cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, switch (name[0]) { case CPU_ALLOWAPERTURE: #ifdef APERTURE - if (securelevel > 0) - return (sysctl_rdint(oldp, oldlenp, newp, + if (securelevel > 0) + return (sysctl_rdint(oldp, oldlenp, newp, allowaperture)); else - return (sysctl_int(oldp, oldlenp, newp, newlen, + return (sysctl_int(oldp, oldlenp, newp, newlen, &allowaperture)); #else return (sysctl_rdint(oldp, oldlenp, newp, 0)); @@ -823,7 +823,7 @@ dumpsys() volatile int cpl, ipending, astpending; int imask[7]; -/* +/* * this is a hack interface to allow zs to work better until * a true soft interrupt mechanism is created. */ @@ -1279,7 +1279,7 @@ bus_space_set_region_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, { u_int8_t *dst; int i; - + dst = (u_int8_t *) (h+o); for (i = 0; i < c; i++) @@ -1292,7 +1292,7 @@ bus_space_set_region_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, { u_int16_t *dst; int i; - + dst = (u_int16_t *) (h+o); if (t->bus_reverse) val = swap16(val); @@ -1306,7 +1306,7 @@ bus_space_set_region_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, { u_int32_t *dst; int i; - + dst = (u_int32_t *) (h+o); if (t->bus_reverse) val = swap32(val); diff --git a/sys/arch/macppc/macppc/mainbus.c b/sys/arch/macppc/macppc/mainbus.c index ca9f61b1f63..f6251b1bd04 100644 --- a/sys/arch/macppc/macppc/mainbus.c +++ b/sys/arch/macppc/macppc/mainbus.c @@ -1,21 +1,21 @@ -/* $OpenBSD: mainbus.c,v 1.8 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: mainbus.c,v 1.9 2003/10/16 05:03:22 deraadt 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 + * + * 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 @@ -97,8 +97,7 @@ mbattach(struct device *parent, struct device *self, void *aux) nca.ca_name = "ofroot"; nca.ca_bus = &sc->sc_bus; config_found(self, &nca, mbprint); - } - + } /* The following machines have an ISA bus */ /* Do ISA first so the interrupt controller is set up! */ @@ -133,8 +132,7 @@ mbattach(struct device *parent, struct device *self, void *aux) nca.ca_node = node; nca.ca_bus = &sc->sc_bus; config_found(self, &nca, mbprint); - } - + } } } else if (system_type != OFWMACH) { nca.ca_name = "mpcpcibr"; diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c index ba285b7d6df..0a8d078cfbd 100644 --- a/sys/arch/macppc/macppc/mem.c +++ b/sys/arch/macppc/macppc/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.11 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: mem.c,v 1.12 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -109,7 +109,7 @@ mmrw(dev_t dev, struct uio *uio, int flags) struct iovec *iov; int error = 0; static caddr_t zeropage; - + while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { diff --git a/sys/arch/macppc/macppc/ofw_machdep.c b/sys/arch/macppc/macppc/ofw_machdep.c index 4b0b14f2e84..3cdf5a2eadf 100644 --- a/sys/arch/macppc/macppc/ofw_machdep.c +++ b/sys/arch/macppc/macppc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.20 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.21 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -91,7 +91,7 @@ void ofw_mem_regions(struct mem_region **memp, struct mem_region **availp) { int phandle; - + /* * Get memory. */ @@ -220,7 +220,7 @@ ofrootfound() { int node; struct ofprobe probe; - + if (!(node = OF_peer(0))) panic("No PROM root"); probe.phandle = node; @@ -309,7 +309,7 @@ ofw_do_pending_int() static pcitag_t ofw_make_tag( void *cpv, int bus, int dev, int fnc); /* ARGSUSED */ -static pcitag_t +static pcitag_t ofw_make_tag(void *cpv, int bus, int dev, int fnc) { return (bus << 16) | (dev << 11) | (fnc << 8); @@ -321,7 +321,7 @@ ofw_make_tag(void *cpv, int bus, int dev, int fnc) #define OFW_PCI_PHYS_HI_DEVICESHIFT 11 #define OFW_PCI_PHYS_HI_FUNCTIONMASK 0x00000700 #define OFW_PCI_PHYS_HI_FUNCTIONSHIFT 8 - + #define pcibus(x) \ (((x) & OFW_PCI_PHYS_HI_BUSMASK) >> OFW_PCI_PHYS_HI_BUSSHIFT) #define pcidev(x) \ @@ -383,7 +383,7 @@ ofwconprobe() return; } - + #define DEVTREE_UNKNOWN 0 #define DEVTREE_USB 1 #define DEVTREE_ADB 2 @@ -467,7 +467,7 @@ ofw_find_keyboard() #if NUKBD > 0 printf("USB and ADB found, using USB\n"); ukbd_cnattach(); -#else +#else ofw_have_kbd = OFW_HAVE_ADBKBD; /* ??? */ #endif } @@ -480,7 +480,7 @@ ofw_find_keyboard() #if NAKBD >0 printf("ADB found\n"); akbd_cnattach(); -#endif +#endif } } @@ -582,7 +582,7 @@ of_display_console() vgafb_pci_console(cons_membus, addr[1].phys_lo, addr[1].size_lo, - cons_membus, + cons_membus, cons_addr, addr[0].size_lo, &pa, pcibus(addr[1].phys_hi), pcidev(addr[1].phys_hi), pcifunc(addr[1].phys_hi)); @@ -629,7 +629,7 @@ of_setbrightness(int brightness) cons_decl(ofw); -/* +/* * Console support functions */ void @@ -646,7 +646,7 @@ void ofwcnputc(dev_t dev, int c) { char ch = c; - + OF_write(OF_stdout, &ch, 1); } int diff --git a/sys/arch/macppc/macppc/ofwreal.S b/sys/arch/macppc/macppc/ofwreal.S index 2bac5f0dc68..6c828984262 100644 --- a/sys/arch/macppc/macppc/ofwreal.S +++ b/sys/arch/macppc/macppc/ofwreal.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ofwreal.S,v 1.2 2003/10/15 20:52:44 drahn Exp $ */ +/* $OpenBSD: ofwreal.S,v 1.3 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: ofwreal.S,v 1.1 1996/09/30 16:34:51 ws Exp $ */ /* @@ -67,7 +67,7 @@ _C_LABEL(fwcall): .long 0 .lcomm clsave,SVSIZE,8 .lcomm clbatsave,BATSIZE,8 .lcomm ofsrsave,16*4,4 /* 16 words of 4 bytes to store OF segment registers */ -.lcomm srsave,16*4,4 /* 16 words of 4 bytes to swap OF segment registers*/ +.lcomm srsave,16*4,4 /* 16 words of 4 bytes to swap OF segment registers*/ .globl _C_LABEL(ofmsr) _C_LABEL(ofmsr): .long 0 /* area to store msr for openfirmware*/ @@ -426,7 +426,7 @@ _ENTRY(_C_LABEL(ofw_stack)) subf %r4,%r5,%r7 /* make room for stack frame on new stack */ stwu %r1,-16(%r7) stw %r6,4(%r7) /* setup return pointer */ - + stw %r7,-16(%r4) addi %r3,%r1,%r8 @@ -442,7 +442,7 @@ ofw_back: lwz %r0,4(%r1) /* get saved msr from abused slot */ mtmsr %r0 - + lwz %r1,0(%r1) /* return */ lwz %r0,4(%r1) mtlr %r0 diff --git a/sys/arch/macppc/macppc/opendev.c b/sys/arch/macppc/macppc/opendev.c index c18cbe30ec3..3a9217b9e87 100644 --- a/sys/arch/macppc/macppc/opendev.c +++ b/sys/arch/macppc/macppc/opendev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opendev.c,v 1.6 2003/10/15 17:50:16 drahn Exp $ */ +/* $OpenBSD: opendev.c,v 1.7 2003/10/16 05:03:22 deraadt Exp $ */ /* $NetBSD: openfirm.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */ /* @@ -80,7 +80,7 @@ OF_package_to_path(int phandle, char *buf, int buflen) 3, 1, }; - + ofw_stack(); if (buflen > PAGE_SIZE) return -1; @@ -112,7 +112,7 @@ OF_call_method(char *method, int ihandle, int nargs, int nreturns, ...) 1, }; int *ip, n; - + if (nargs > 6) return -1; args.nargs = nargs + 2; @@ -153,7 +153,7 @@ OF_call_method_1(char *method, int ihandle, int nargs, ...) 2, }; int *ip, n; - + if (nargs > 6) return -1; args.nargs = nargs + 2; @@ -186,7 +186,7 @@ OF_open(char *dname) 1, }; int l; - + ofw_stack(); if ((l = strlen(dname)) >= PAGE_SIZE) return -1; @@ -216,7 +216,7 @@ OF_close(int handle) openfirmware(&args); } -/* +/* * This assumes that character devices don't read in multiples of PAGE_SIZE. */ int @@ -236,7 +236,7 @@ OF_read(int handle, void *addr, int len) 1, }; int l, act = 0; - + ofw_stack(); args.ihandle = handle; args.addr = OF_buf; @@ -254,7 +254,6 @@ OF_read(int handle, void *addr, int len) return act; else return args.actual; - } } return act; @@ -277,7 +276,7 @@ OF_write(int handle, void *addr, int len) 1, }; int l, act = 0; - + ofw_stack(); args.ihandle = handle; args.addr = OF_buf; |