Add support to run SMM handler in TSEG instead of ASEG
[coreboot.git] / src / include / console / vtxprintf.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2009 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19
20 #ifndef __CONSOLE_VTXPRINTF_H
21 #define __CONSOLE_VTXPRINTF_H
22
23 /* With GCC we use -nostdinc -ffreestanding to keep out system includes.
24  * Unfortunately this also gets us rid of the _compiler_ includes, like
25  * stdarg.h. To work around the issue, we define varargs directly here.
26  * On LLVM we can still just include stdarg.h.
27  */
28 #ifdef __GNUC__
29 #define va_start(v,l)           __builtin_va_start(v,l)
30 #define va_end(v)               __builtin_va_end(v)
31 #define va_arg(v,l)             __builtin_va_arg(v,l)
32 typedef __builtin_va_list       va_list;
33 #else
34 #include <stdarg.h>
35 #endif
36
37 int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args);
38
39 #endif