From owner-p4-projects@FreeBSD.ORG Mon Apr 10 03:09:59 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 6CCAF16A403; Mon, 10 Apr 2006 03:09:59 +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 28FFC16A401 for ; Mon, 10 Apr 2006 03:09:59 +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 A658B43D45 for ; Mon, 10 Apr 2006 03:09:58 +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 k3A39wLw078551 for ; Mon, 10 Apr 2006 03:09:58 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3A39wPg078548 for perforce@freebsd.org; Mon, 10 Apr 2006 03:09:58 GMT (envelope-from imp@freebsd.org) Date: Mon, 10 Apr 2006 03:09:58 GMT Message-Id: <200604100309.k3A39wPg078548@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 94882 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, 10 Apr 2006 03:10:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=94882 Change 94882 by imp@imp_hammer on 2006/04/10 03:09:00 I've rewritten this one from scratch. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/kb920x/boot0/main.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/kb920x/boot0/main.c#3 (text+ko) ==== @@ -1,47 +1,39 @@ -/******************************************************************************* +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. * - * Filename: main.c + * 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. * - * Basic entry points for top-level functions - * - * Revision information: - * - * 20AUG2004 kb_admin initial creation - * 12JAN2005 kb_admin cosmetic changes - * 29APR2005 kb_admin modified boot delay - * - * BEGIN_KBDD_BLOCK - * No warranty, expressed or implied, is included with this software. It is - * provided "AS IS" and no warranty of any kind including statutory or aspects - * relating to merchantability or fitness for any purpose is provided. All - * intellectual property rights of others is maintained with the respective - * owners. This software is not copyrighted and is intended for reference - * only. - * END_BLOCK - ******************************************************************************/ + * 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 "debug_io.h" -#include "at91rm9200_lowlevel.h" #include "AT91RM9200.h" typedef void fn_t(void); -/* - * .KB_C_FN_DEFINITION_START - * int main(void) - * This global function waits at least one second, but not more than two - * seconds, for input from the serial port. If no response is recognized, - * it acts according to the parameters specified by the environment. For - * example, the function might boot an operating system. Do not return - * from this function. - * .KB_C_FN_DEFINITION_END - */ int main(void) { char *addr = (char *)0x20000000 + (1 << 20); /* Load to base + 1MB */ fn_t *fn = (fn_t *)addr; + DebugPrint("FreeBSD AT91 serial bootstrap. XModem download.\r\n"); AT91C_BASE_PIOC->PIO_SODR = AT91C_PIO_PC10; xmodem_rx(addr); AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC10;