From owner-p4-projects@FreeBSD.ORG Sat May 20 06:29:15 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 EB35816A487; Sat, 20 May 2006 06:29:14 +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 C2B1716A435 for ; Sat, 20 May 2006 06:29:14 +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 82F7943D45 for ; Sat, 20 May 2006 06:29:14 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4K6SgSo011503 for ; Sat, 20 May 2006 06:28:42 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4K6SfA4011500 for perforce@freebsd.org; Sat, 20 May 2006 06:28:41 GMT (envelope-from imp@freebsd.org) Date: Sat, 20 May 2006 06:28:41 GMT Message-Id: <200605200628.k4K6SfA4011500@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 97499 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: Sat, 20 May 2006 06:29:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=97499 Change 97499 by imp@imp_plunger on 2006/05/20 06:28:14 Move p_ functions out of p_string.h into lib.h in anticpation of merging p_* and non p_* functions while bringing in boot2. This may save a few hundred bytes. But we need to save more like 2k if we're going to add SD booting in 12k, or we're going to have to move the stack to SDRAM and/or have a multi-stage boot (or pseudo-multi-stage boot by moving the stack to SDRAM and then loading another 4k from the spi). Or we may go to a full /boot/loader phase. I'd rather not since I don't think we need anything that heavy weight. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#11 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#9 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#10 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/env_vars.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/loader_prompt.c#9 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#13 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#10 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#6 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.h#6 delete .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#13 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#7 (text+ko) ==== @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.2 2006/04/21 06:43:32 imp Exp $ -SUBDIR= libat91 boot0 boot0iic boot0spi bootiic bootspi +SUBDIR= libat91 boot0 boot0iic boot0spi boot2 bootiic bootspi .include ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#11 (text) ==== @@ -26,7 +26,6 @@ #include "at91rm9200.h" #include "lib.h" -#include "p_string.h" #include "at91rm9200_lowlevel.h" #include "spi_flash.h" #include "fpga.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/env_vars.c#9 (text+ko) ==== @@ -22,7 +22,6 @@ #include "env_vars.h" #include "loader_prompt.h" -#include "p_string.h" #include "eeprom.h" #include "lib.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/loader_prompt.c#10 (text+ko) ==== @@ -23,7 +23,6 @@ *****************************************************************************/ #include "at91rm9200_lowlevel.h" -#include "p_string.h" #include "eeprom.h" #ifdef SUPPORT_TAG_LIST #include "tag_list.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/env_vars.c#3 (text+ko) ==== @@ -22,7 +22,6 @@ #include "env_vars.h" #include "loader_prompt.h" -#include "p_string.h" #include "eeprom.h" #include "lib.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/loader_prompt.c#9 (text+ko) ==== @@ -24,7 +24,6 @@ #include "at91rm9200_lowlevel.h" #include "at91rm9200.h" -#include "p_string.h" #include "eeprom.h" #include "emac.h" #include "loader_prompt.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#13 (text+ko) ==== @@ -23,7 +23,6 @@ #include "at91rm9200.h" #include "at91rm9200_lowlevel.h" #include "emac.h" -#include "p_string.h" #include "lib.h" /* ****************************** GLOBALS *************************************/ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#10 (text) ==== @@ -46,4 +46,18 @@ /* Delay us */ void Delay(int us); +#define ToASCII(x) ((x > 9) ? (x + 'A' - 0xa) : (x + '0')) + +int p_IsWhiteSpace(char cValue); +unsigned p_HexCharValue(char cValue); +unsigned p_ASCIIToHex(const char *buf); +unsigned p_ASCIIToDec(const char *buf); + +void p_memset(char *buffer, char value, int size); +int p_strlen(const char *buffer); +char *p_strcpy(char *to, const char *from); +void p_memcpy(char *to, const char *from, unsigned size); +int p_memcmp(const char *to, const char *from, unsigned size); +int p_strcmp(const char *to, const char *from); + #endif ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/p_string.c#6 (text+ko) ==== @@ -23,7 +23,7 @@ * $FreeBSD: src/sys/boot/arm/at91/libat91/p_string.c,v 1.1 2006/04/19 17:16:49 imp Exp $ *****************************************************************************/ -#include "p_string.h" +#include "lib.h" /* * .KB_C_FN_DEFINITION_START ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/spi_flash.c#13 (text+ko) ==== @@ -23,7 +23,6 @@ #include "at91rm9200.h" #include "spi_flash.h" #include "lib.h" -#include "p_string.h" /*********************** PRIVATE FUNCTIONS/DATA ******************************/