2009-10-28 17:13:28 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
2010-02-16 00:10:19 +01:00
|
|
|
* Copyright (C) 2009 Myles Watson <mylesgw@gmail.com>
|
2009-10-28 17:13:28 +01:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* This file is for "nuisance prototypes" that have no other home. */
|
|
|
|
|
2010-03-19 03:33:40 +01:00
|
|
|
#ifndef __LIB_H__
|
|
|
|
#define __LIB_H__
|
2012-06-13 01:29:32 +02:00
|
|
|
#include <stdint.h>
|
2013-12-27 04:53:52 +01:00
|
|
|
#include <types.h>
|
2010-03-19 03:33:40 +01:00
|
|
|
|
2014-01-12 22:42:58 +01:00
|
|
|
#if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */
|
2009-10-28 17:13:28 +01:00
|
|
|
/* Defined in src/lib/clog2.c */
|
|
|
|
unsigned long log2(unsigned long x);
|
2010-03-19 03:33:40 +01:00
|
|
|
#endif
|
2009-10-28 17:13:28 +01:00
|
|
|
|
|
|
|
/* Defined in src/lib/lzma.c */
|
|
|
|
unsigned long ulzma(unsigned char *src, unsigned char *dst);
|
|
|
|
|
2010-12-11 21:33:41 +01:00
|
|
|
/* Defined in src/arch/x86/boot/gdt.c */
|
2009-10-28 17:13:28 +01:00
|
|
|
void move_gdt(void);
|
|
|
|
|
2010-03-19 03:33:40 +01:00
|
|
|
/* Defined in src/lib/ramtest.c */
|
|
|
|
void ram_check(unsigned long start, unsigned long stop);
|
2011-12-02 16:23:06 +01:00
|
|
|
int ram_check_nodie(unsigned long start, unsigned long stop);
|
2013-06-08 18:32:36 +02:00
|
|
|
int ram_check_noprint_nodie(unsigned long start, unsigned long stop);
|
2010-04-02 23:39:12 +02:00
|
|
|
void quick_ram_check(void);
|
2010-03-19 03:33:40 +01:00
|
|
|
|
2012-06-13 01:29:32 +02:00
|
|
|
/* Defined in src/lib/stack.c */
|
2012-10-16 00:19:43 +02:00
|
|
|
int checkstack(void *top_of_stack, int core);
|
2012-06-13 01:29:32 +02:00
|
|
|
|
2013-05-07 20:35:29 +02:00
|
|
|
#ifndef __PRE_RAM__ // fails in bootblock compiled with romcc
|
2012-06-13 01:29:32 +02:00
|
|
|
/* currently defined by a ldscript */
|
2012-10-16 00:19:43 +02:00
|
|
|
extern unsigned char _estack[];
|
2013-05-07 20:35:29 +02:00
|
|
|
#endif
|
2012-06-13 01:29:32 +02:00
|
|
|
|
2010-03-19 03:33:40 +01:00
|
|
|
/* Defined in romstage.c */
|
2012-02-09 15:07:41 +01:00
|
|
|
#if CONFIG_CPU_AMD_GEODE_LX
|
2010-03-19 03:33:40 +01:00
|
|
|
void cache_as_ram_main(void);
|
|
|
|
#else
|
|
|
|
void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
|
|
|
|
#endif
|
2013-12-10 06:33:36 +01:00
|
|
|
void post_cache_as_ram(void);
|
2010-03-19 03:33:40 +01:00
|
|
|
|
2013-07-19 01:24:08 +02:00
|
|
|
/* Defined in src/lib/hexdump.c */
|
2013-12-27 04:53:52 +01:00
|
|
|
void hexdump(const void *memory, size_t length);
|
2013-07-19 01:24:08 +02:00
|
|
|
|
2010-03-19 03:33:40 +01:00
|
|
|
#endif /* __LIB_H__ */
|