coreboot/src/include/assert.h
Stefan Reinauer 8c4f31b3b5 Drop the USE_PRINTK_IN_CAR option. It's a bogus decision to make for any user /
board porter: printk should always be available in CAR mode.

Also drop CONFIG_USE_INIT, it's only been selected on one ASROCK board
but it's not been used there. Very odd.

There is one usage of CONFIG_USE_INIT which was always off in 
src/cpu/intel/car/cache_as_ram.inc and we have to figure out what to do with
those few lines.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5682 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-08-03 15:42:29 +00:00

64 lines
1.7 KiB
C

/*
* This file is part of the coreboot project.
*
* Copyright (C) 2010 coresystems GmbH
*
* 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 __ASSERT_H__
#define __ASSERT_H__
#if defined(__PRE_RAM__) && !CONFIG_USE_DCACHE_RAM
/* ROMCC versions */
#define ASSERT(x) { \
if(!(x)) { \
print_emerg("ASSERTION FAILED: file '"); \
print_emerg(__FILE__); \
print_emerg("', line 0x"); \
print_debug_hex32(__LINE__); \
print_emerg("\n"); \
/* die(""); */ \
} \
}
#define BUG() { \
print_emerg("BUG ENCOUNTERED: SYSTEM HALTED at file '");\
print_emerg(__FILE__); \
print_emerg("', line 0x"); \
print_debug_hex32(__LINE__); \
print_emerg("\n"); \
/* die(""); */ \
}
#else
/* GCC and CAR versions */
#define ASSERT(x) { \
if (!(x)) { \
printk(BIOS_EMERG, "ASSERTION FAILED: file '%s', " \
" line %d\n", __FILE__, __LINE__); \
/* die(""); */ \
} \
}
#define BUG() { \
printk(BIOS_EMERG, "BUG ENCOUNTERED: SYSTEM HALTED at file '%s', " \
" line %d\n", __FILE__, __LINE__); \
/* die(""); */ \
}
#endif
#endif // __ASSERT_H__