Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/stand Make this play with gcc 3.3. Add -ffr...
details: https://anonhg.NetBSD.org/src/rev/48c6dc99aebe
branches: trunk
changeset: 543579:48c6dc99aebe
user: matt <matt%NetBSD.org@localhost>
date: Fri Feb 28 05:24:56 2003 +0000
description:
Make this play with gcc 3.3. Add -ffreestanding. Cleanup bootxx.
diffstat:
sys/arch/macppc/stand/bootxx/Makefile | 4 ++--
sys/arch/macppc/stand/bootxx/bootxx.c | 31 ++++++++++++++++---------------
sys/arch/macppc/stand/ofwboot/Makefile | 4 ++--
3 files changed, 20 insertions(+), 19 deletions(-)
diffs (108 lines):
diff -r 9cd36475f026 -r 48c6dc99aebe sys/arch/macppc/stand/bootxx/Makefile
--- a/sys/arch/macppc/stand/bootxx/Makefile Fri Feb 28 04:37:07 2003 +0000
+++ b/sys/arch/macppc/stand/bootxx/Makefile Fri Feb 28 05:24:56 2003 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.8 2003/02/03 23:35:39 matt Exp $
+# $NetBSD: Makefile,v 1.9 2003/02/28 05:24:56 matt Exp $
PROG= bootxx
NOMAN= # defined
BINMODE= 444
-CFLAGS= -Os -mmultiple -Wall -msoft-float
+CFLAGS= -Os -mmultiple -Wall -msoft-float -ffreestanding
CPPFLAGS+= -D_STANDALONE -DPPC_OEA
STRIPFLAG=
LINKFLAGS= -x -N -Ttext 4000 -e _start
diff -r 9cd36475f026 -r 48c6dc99aebe sys/arch/macppc/stand/bootxx/bootxx.c
--- a/sys/arch/macppc/stand/bootxx/bootxx.c Fri Feb 28 04:37:07 2003 +0000
+++ b/sys/arch/macppc/stand/bootxx/bootxx.c Fri Feb 28 05:24:56 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootxx.c,v 1.10 2002/10/31 21:31:08 matt Exp $ */
+/* $NetBSD: bootxx.c,v 1.11 2003/02/28 05:24:56 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -231,7 +231,7 @@
static __inline int
OF_write(handle, addr, len)
int handle;
- void *addr;
+ const void *addr;
int len;
{
static struct {
@@ -239,7 +239,7 @@
int nargs;
int nreturns;
int ihandle;
- void *addr;
+ const void *addr;
int len;
int actual;
} args = {
@@ -273,7 +273,8 @@
int arg1, arg2;
void *openfirm;
{
- int fd, blk, chosen, options, i;
+ int fd, blk, chosen, options, j;
+ size_t i;
char *addr;
char bootpath[128];
@@ -307,10 +308,10 @@
addr = (char *)entry_point;
putstr("\r\nread stage 2 blocks: ");
- for (i = 0; i < bbinfo.bbi_block_count; i++) {
- if ((blk = bbinfo.bbi_block_table[i]) == 0)
+ for (j = 0; j < bbinfo.bbi_block_count; j++) {
+ if ((blk = bbinfo.bbi_block_table[j]) == 0)
break;
- putc('0' + i % 10);
+ putc('0' + j % 10);
OF_seek(fd, (u_quad_t)blk * 512);
OF_read(fd, addr, bbinfo.bbi_block_size);
addr += bbinfo.bbi_block_size;
@@ -320,14 +321,14 @@
/*
* enable D/I cache
*/
- asm("
- mtdbatu 3,%0
- mtdbatl 3,%1
- mtibatu 3,%0
- mtibatl 3,%1
- isync
- " :: "r"(BATU(0, BAT_BL_256M, BAT_Vs)),
- "r"(BATL(0, 0, BAT_PP_RW)));
+ asm(
+ "mtdbatu 3,%0\n\t"
+ "mtdbatl 3,%1\n\t"
+ "mtibatu 3,%0\n\t"
+ "mtibatl 3,%1\n\t"
+ "isync"
+ :: "r"(BATU(0, BAT_BL_256M, BAT_Vs)),
+ "r"(BATL(0, 0, BAT_PP_RW)));
entry_point(0, 0, openfirm);
for (;;); /* just in case */
diff -r 9cd36475f026 -r 48c6dc99aebe sys/arch/macppc/stand/ofwboot/Makefile
--- a/sys/arch/macppc/stand/ofwboot/Makefile Fri Feb 28 04:37:07 2003 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Makefile Fri Feb 28 05:24:56 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2002/12/09 16:30:40 thorpej Exp $
+# $NetBSD: Makefile,v 1.37 2003/02/28 05:24:57 matt Exp $
S= ${.CURDIR}/../../../..
@@ -7,7 +7,7 @@
SRCS= Locore.c ofdev.c hfs.c net.c netif_of.c alloc.c vers.c
XCOFFXTRA= Xcoffxtra.c
XCOFFXTRAOBJ= Xcoffxtra.o
-CFLAGS+= -Wno-main -msoft-float -mmultiple
+CFLAGS+= -Wno-main -msoft-float -mmultiple -ffreestanding
#CPPFLAGS+= -DDEBUG -DNETIF_DEBUG
CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP
CPPFLAGS+= -DSUPPORT_USTARFS -DHAVE_CHANGEDISK_HOOK
Home |
Main Index |
Thread Index |
Old Index