PERFORCE change 97499 for review

Warner Losh imp at FreeBSD.org
Sat May 20 06:29:15 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=97499

Change 97499 by imp at 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 <bsd.subdir.mk>

==== //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 ******************************/
 


More information about the p4-projects mailing list