From owner-p4-projects@FreeBSD.ORG Mon Apr 17 21:38:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DB4F16A404; Mon, 17 Apr 2006 21:38:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D896616A402 for ; Mon, 17 Apr 2006 21:38:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B37343D46 for ; Mon, 17 Apr 2006 21:38:44 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3HLcipk087793 for ; Mon, 17 Apr 2006 21:38:44 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3HLciWN087787 for perforce@freebsd.org; Mon, 17 Apr 2006 21:38:44 GMT (envelope-from imp@freebsd.org) Date: Mon, 17 Apr 2006 21:38:44 GMT Message-Id: <200604172138.k3HLciWN087787@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95452 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2006 21:38:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=95452 Change 95452 by imp@imp_hammer on 2006/04/17 21:37:52 Get pickier about the code, and start to fix things. boot0 now compiles. bootiic need help. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#5 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#3 (text+ko) ==== @@ -1,6 +1,12 @@ # $FreeBSD$ -CFLAGS=-O2 -mcpu=arm9 -ffreestanding -I${.CURDIR}/../libat91 +CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ + -I${.CURDIR}/../libat91 \ + -Wall -Waggregate-return -Wbad-function-cast -Wcast-align \ + -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ + -Werror + CFLAGS+=-DBOOT0_TSC #CFLAGS+=-DBOOT0_KB920X ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#5 (text) ==== @@ -34,7 +34,7 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - fn_t *fn = (fn_t *)addr; + fn_t *fn = (fn_t *)(SDRAM_BASE + (1 << 20)); /* Load to base + 1MB */ while (xmodem_rx(addr) == -1) continue; ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#2 (text) ==== @@ -46,7 +46,6 @@ AT91PS_PDC pPDC = (AT91PS_PDC)&(pUSART->US_RPR); register unsigned value; - int i; volatile sdram_size_t *p = (sdram_size_t *)SDRAM_BASE; #ifdef BOOT0_TSC ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 (text) ==== @@ -52,6 +52,6 @@ #define GetSeconds() (AT91C_BASE_RTC->RTC_TIMR & AT91C_RTC_SEC) -extern void DefaultSystemInit(void); +extern void _init(void); #endif /* _AT91RM9200_LOWLEVEL_H_ */ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.c#2 (text) ==== @@ -36,6 +36,7 @@ #include "at91rm9200.h" #include "at91rm9200_lowlevel.h" +#include "lib.h" /* * void putc(int ch)