Make some things (die, mem*, resourcemap code, option code) SHARED.

The option code is tricky as it is used by standalone code. If you 
include that file and you are standalone, you now have to define 
STANDALONE (is there a better way?)
Change the cpuid to be a 24-byte string instead of 3 u32s.
Make the CPUID usage PIC-safe by not using %ebx.

Test building on two different geodes, tested to boot on dbe62

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@750 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Ronald G. Minnich 2008-08-12 03:39:39 +00:00
commit 7e78ce492a
8 changed files with 40 additions and 12 deletions

View file

@ -22,6 +22,7 @@
#define STRING_H
#include <types.h>
#include <shared.h>
/* lib/string.c */
size_t strnlen(const char *str, size_t maxlen);
@ -30,10 +31,10 @@ int strcmp(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, int maxlen);
/* lib/mem.c */
void *memcpy(void *dest, const void *src, size_t len);
void *memmove(void *dest, const void *src, size_t len);
void *memset(void *s, int c, size_t len);
int memcmp(const void *s1, const void *s2, size_t len);
SHARED(memcpy, void *, void *dest, const void *src, size_t len);
SHARED(memmove, void *, void *dest, const void *src, size_t len);
SHARED(memset, void *, void *s, int c, size_t len);
SHARED(memcmp, int , const void *s1, const void *s2, size_t len);
/* console/vsprintf.c */
int sprintf(char *buf, const char *fmt, ...);