Myles Watson | 5817078 | 2009-10-28 16:13:28 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 4 | * Copyright (C) 2009 Myles Watson <mylesgw@gmail.com> |
Myles Watson | 5817078 | 2009-10-28 16:13:28 +0000 | [diff] [blame] | 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 | /* This file is for "nuisance prototypes" that have no other home. */ |
| 21 | |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 22 | #ifndef __LIB_H__ |
| 23 | #define __LIB_H__ |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 24 | #include <stdint.h> |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 25 | |
Alexandru Gagniuc | af4bd59 | 2014-01-12 15:42:58 -0600 | [diff] [blame^] | 26 | #if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */ |
Myles Watson | 5817078 | 2009-10-28 16:13:28 +0000 | [diff] [blame] | 27 | /* Defined in src/lib/clog2.c */ |
| 28 | unsigned long log2(unsigned long x); |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 29 | #endif |
Myles Watson | 5817078 | 2009-10-28 16:13:28 +0000 | [diff] [blame] | 30 | |
| 31 | /* Defined in src/lib/lzma.c */ |
| 32 | unsigned long ulzma(unsigned char *src, unsigned char *dst); |
| 33 | |
Stefan Reinauer | 8677a23 | 2010-12-11 20:33:41 +0000 | [diff] [blame] | 34 | /* Defined in src/arch/x86/boot/gdt.c */ |
Myles Watson | 5817078 | 2009-10-28 16:13:28 +0000 | [diff] [blame] | 35 | void move_gdt(void); |
| 36 | |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 37 | /* Defined in src/lib/ramtest.c */ |
| 38 | void ram_check(unsigned long start, unsigned long stop); |
Sven Schnelle | 3ad8c54 | 2011-12-02 16:23:06 +0100 | [diff] [blame] | 39 | int ram_check_nodie(unsigned long start, unsigned long stop); |
Alexandru Gagniuc | 5239ba2 | 2013-06-08 11:32:36 -0500 | [diff] [blame] | 40 | int ram_check_noprint_nodie(unsigned long start, unsigned long stop); |
Myles Watson | b54deb7 | 2010-04-02 21:39:12 +0000 | [diff] [blame] | 41 | void quick_ram_check(void); |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 42 | |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 43 | /* Defined in src/lib/stack.c */ |
Stefan Reinauer | 75dbc38 | 2012-10-15 15:19:43 -0700 | [diff] [blame] | 44 | int checkstack(void *top_of_stack, int core); |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 45 | |
Stefan Reinauer | 3f5f6d8 | 2013-05-07 20:35:29 +0200 | [diff] [blame] | 46 | #ifndef __PRE_RAM__ // fails in bootblock compiled with romcc |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 47 | /* currently defined by a ldscript */ |
Stefan Reinauer | 75dbc38 | 2012-10-15 15:19:43 -0700 | [diff] [blame] | 48 | extern unsigned char _estack[]; |
Stefan Reinauer | 3f5f6d8 | 2013-05-07 20:35:29 +0200 | [diff] [blame] | 49 | #endif |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 50 | |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 51 | /* Defined in romstage.c */ |
Kyösti Mälkki | 7916f4c | 2012-02-09 16:07:41 +0200 | [diff] [blame] | 52 | #if CONFIG_CPU_AMD_GEODE_LX |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 53 | void cache_as_ram_main(void); |
| 54 | #else |
| 55 | void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx); |
| 56 | #endif |
Kyösti Mälkki | 142b52c | 2013-12-10 07:33:36 +0200 | [diff] [blame] | 57 | void post_cache_as_ram(void); |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 58 | |
Stefan Reinauer | 2f38b07 | 2013-07-18 16:24:08 -0700 | [diff] [blame] | 59 | /* Defined in src/lib/hexdump.c */ |
| 60 | void hexdump(unsigned long memory, int length); |
| 61 | |
Myles Watson | 3426195 | 2010-03-19 02:33:40 +0000 | [diff] [blame] | 62 | #endif /* __LIB_H__ */ |