From fe18792a0887b5ba1ce8e0c8f9f6f1911395552a Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Fri, 1 Feb 2013 01:09:24 +0800 Subject: armv7: Add 'bootblock' build class. For ARM platform, the bootblock may need more C source files to initialize UART / SPI for loading romstage. To preventing making complex and implicit dependency by using #include inside bootblock.c, we should add a new build class "bootblock". Also #ifdef __BOOT_BLOCK__ can be used to detect if the source is being compiled for boot block. For x86, the bootblock is limited to fewer assembly files so it's not using this class. (Some files shared by x86 and arm in top level or lib are also changed but nothing should be changed in x86 build process.) Change-Id: Ia81bccc366d2082397d133d9245f7ecb33b8bc8b Signed-off-by: Hung-Te Lin Reviewed-on: http://review.coreboot.org/2252 Reviewed-by: Ronald G. Minnich Tested-by: build bot (Jenkins) --- src/arch/armv7/include/arch/cbfs.h | 60 -------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/arch/armv7/include/arch/cbfs.h (limited to 'src/arch/armv7/include') diff --git a/src/arch/armv7/include/arch/cbfs.h b/src/arch/armv7/include/arch/cbfs.h deleted file mode 100644 index e34a0d2b27..0000000000 --- a/src/arch/armv7/include/arch/cbfs.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2012 The ChromiumOS Authors. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef __INCLUDE_ARCH_CBFS__ -#define __INCLUDE_ARCH_CBFS__ - -#include -#include - -// TODO FIXME This file is only for providing CBFS function in bootblock. -// Should be removed once bootblock can link lib/* files. -#include "lib/cbfs.c" - -// mem* and ulzma are now workarounds for bootblock compilation. -void *memcpy(void *dest, const void *src, size_t n) { - char *d = (char *)dest; - const char *s = (const char*)src; - while (n-- > 0) - *d++ = *s++; - return dest; -} - -void *memset(void *dest, int c, size_t n) { - char *d = (char*)dest; - while (n-- > 0) - *d++ = c; - return dest; -} - -int memcmp(const void *ptr1, const void *ptr2, size_t n) { - const char *s1 = (const char*)ptr1, *s2 = (const char*)ptr2; - int c; - while (n-- > 0) - if ((c = *s1++ - *s2++)) - return c; - return 0; -} - -unsigned long ulzma(unsigned char *src, unsigned char *dest) { - // TODO remove this. - return -1; -} - -#endif // __INCLUDE_ARCH_CBFS__ -- cgit v1.2.3