blob: 9d8108532c6de863df3947a279274e2597d4478a [file] [log] [blame]
Myles Watson58170782009-10-28 16:13:28 +00001/*
2 * This file is part of the coreboot project.
3 *
Uwe Hermannc70e9fc2010-02-15 23:10:19 +00004 * Copyright (C) 2009 Myles Watson <mylesgw@gmail.com>
Myles Watson58170782009-10-28 16:13:28 +00005 *
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 Watson34261952010-03-19 02:33:40 +000022#ifndef __LIB_H__
23#define __LIB_H__
Ronald G. Minnich9764d4c2012-06-12 16:29:32 -070024#include <stdint.h>
Myles Watson34261952010-03-19 02:33:40 +000025#ifndef __ROMCC__ /* romcc doesn't support prototypes. */
26
27#ifndef __PRE_RAM__ /* Conflicts with romcc_io.h */
Myles Watson58170782009-10-28 16:13:28 +000028/* Defined in src/lib/clog2.c */
29unsigned long log2(unsigned long x);
Myles Watson34261952010-03-19 02:33:40 +000030#endif
Myles Watson58170782009-10-28 16:13:28 +000031
32/* Defined in src/lib/lzma.c */
33unsigned long ulzma(unsigned char *src, unsigned char *dst);
34
Stefan Reinauer8677a232010-12-11 20:33:41 +000035/* Defined in src/arch/x86/boot/gdt.c */
Myles Watson58170782009-10-28 16:13:28 +000036void move_gdt(void);
37
Myles Watson34261952010-03-19 02:33:40 +000038/* Defined in src/lib/ramtest.c */
39void ram_check(unsigned long start, unsigned long stop);
Sven Schnelle3ad8c542011-12-02 16:23:06 +010040int ram_check_nodie(unsigned long start, unsigned long stop);
Myles Watsonb54deb72010-04-02 21:39:12 +000041void quick_ram_check(void);
Myles Watson34261952010-03-19 02:33:40 +000042
Ronald G. Minnich9764d4c2012-06-12 16:29:32 -070043/* Defined in src/lib/stack.c */
Stefan Reinauer75dbc382012-10-15 15:19:43 -070044int checkstack(void *top_of_stack, int core);
Ronald G. Minnich9764d4c2012-06-12 16:29:32 -070045
46/* currently defined by a ldscript */
Stefan Reinauer75dbc382012-10-15 15:19:43 -070047extern unsigned char _estack[];
Ronald G. Minnich9764d4c2012-06-12 16:29:32 -070048
Myles Watson34261952010-03-19 02:33:40 +000049/* Defined in romstage.c */
Kyösti Mälkki7916f4c2012-02-09 16:07:41 +020050#if CONFIG_CPU_AMD_GEODE_LX
Myles Watson34261952010-03-19 02:33:40 +000051void cache_as_ram_main(void);
52#else
53void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
54#endif
55
56#endif /* __ROMCC__ */
57#endif /* __LIB_H__ */