Date: Thu, 20 Apr 2006 17:44:42 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95700 for review Message-ID: <200604201744.k3KHigCA074062@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95700 Change 95700 by imp@imp_hammer on 2006/04/20 17:44:12 No need to read in the rest of the eeprom into memory. We're now < 8k again: 7821 bytes. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#7 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#4 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#6 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= libat91 boot0 bootiic bootspi +SUBDIR= libat91 boot0 boot0iic boot0spi bootiic bootspi .include <bsd.subdir.mk> ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#7 (text) ==== @@ -2,7 +2,7 @@ P=boot0 FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.s main.c doit.c NO_MAN= LDFLAGS=-e 0 -T linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/main.c#7 (text) ==== @@ -28,16 +28,15 @@ #include "lib.h" #include "at91rm9200_lowlevel.h" -typedef void fn_t(void); +extern void doit(void *); int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - fn_t *fn = (fn_t *)(SDRAM_BASE + (1 << 20)); /* Load to base + 1MB */ while (xmodem_rx(addr) == -1) continue; - fn(); + doit(addr); return (1); } ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#2 (text) ==== @@ -1,10 +1,12 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ -P=boot0 +.PATH: ${.CURDIR}/../boot0 + +P=boot0iic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.s main.c doit.c NO_MAN= -LDFLAGS=-e 0 -T linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include <bsd.prog.mk> ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#2 (text) ==== @@ -1,10 +1,12 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.3 2006/04/19 17:16:48 imp Exp $ -P=boot0 +.PATH: ${.CURDIR}/../boot0 + +P=boot0spi FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.s main.c doit.c NO_MAN= -LDFLAGS=-e 0 -T linker.cfg +LDFLAGS=-e 0 -T ${.CURDIR}/../boot0/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include <bsd.prog.mk> ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/arm_init.s#4 (text+ko) ==== @@ -83,18 +83,6 @@ ldr r1, = SVC_STACK_USE mov sp, r1 @ ; Move the stack to SDRAM -/* Copy the rest of the load image from EEPROM */ - .extern InitEEPROM - - bl InitEEPROM - - .extern ReadEEPROM - - mov r0, #8192 - mov r1, #8192 - mov r2, #8192 - bl ReadEEPROM - /* Start execution at main */ .extern main ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/main.c#6 (text+ko) ==== @@ -25,6 +25,7 @@ #include "loader_prompt.h" #include "emac.h" #include "lib.h" +#include "eeprom.h" /* * .KB_C_FN_DEFINITION_START @@ -39,16 +40,12 @@ int main(void) { - + InitEEPROM(); EMAC_Init(); - LoadBootCommands(); - printf("\n\rKB9202(www.kwikbyte.com)\n\rAuto boot..\n\r"); - if (getc(1) == -1) ExecuteEnvironmentFunctions(); - Bootloader(0); return (1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604201744.k3KHigCA074062>