Commit graph

15 commits

Author SHA1 Message Date
Carl-Daniel Hailfinger
9342d1be4e The ABI wrapper from r775 made the SHARED definitions obsolete. They're
not that readable anyway, so kill them and use standard definitions
instead.

Introduce EXPORT_SYMBOL for shared symbols. EXPORT_SYMBOL tells the
compiler to use the standard calling conventions for a given symbol and
not to optimize it away.
Benefits:
- We can later use gcc -combine -fwhole-program without problems.
- It's a correctness fix for some optimizations.
- We could check for duplicated exported functions at link time.
- We could check whether exported functions are linked into initram or
stage2 by accident.
- We could generate usage statistics and possibly optimize away unused
shared functions.
- Through the above points, significant side reductions of 10-40%

Build and boot tested on qemu.
Build tested on all targets.

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


git-svn-id: svn://coreboot.org/repository/coreboot-v3@780 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-08-17 21:51:13 +00:00
Ronald G. Minnich
7e78ce492a 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
2008-08-12 03:39:39 +00:00
Stefan Reinauer
6220b632e7 Now version 3: LinuxBIOS -> coreboot rename.
- I left LB_TAG_ intact because they are used by the payloads
- file renames are still missing. see next commit
- some lb_ renames might be missing. feel free to provide patches.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@564 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-01-27 18:54:57 +00:00
Uwe Hermann
5ff0fdb354 Move the code from strings.h to a C file. We should really avoid
to have code in header files.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@518 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-11-24 22:17:26 +00:00
Uwe Hermann
872be1d31b Add a simple strncmp() implementation in include/string.h.
Change lib/lar.c to use strncmp() for magic check. Current code
depends on that the len field will never hold a value bigger than
0xffffff, which is a working assumption given current flash sizes, but
my next patch might affect this.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@496 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-09-08 19:36:35 +00:00
Uwe Hermann
71ccb36afc Massive file rename and moving orgy:
- Everything in include/cpu/generic/x86/arch/* goes into
   include/arch/x86 now.

 - include/cpu/generic/x86/div64.h moves into include/arch/x86, too.

 - The former include/cpu/generic/x86/arch/elf.h moved to
   include/arch/x86/archelf.h, as elf.h already exists in include/
   and we must prevent a name clash.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@314 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-05 21:36:52 +00:00
Stefan Reinauer
109adc1598 fix size_t and memory types. We need to be careful, because gcc
calls memcpy etc itself. This is trivial (not easy), as it is just
reading man pages.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@308 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-05 16:56:34 +00:00
Uwe Hermann
7666e8d31b Use size_t (instead of int) whereever the manpage of the respective
function specifies size_t.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@301 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-05-02 22:56:21 +00:00
Stefan Reinauer
bea6044faa Trivial:
* include cleanup. We don't provide stdint.h, so use arch/types.h
  instead.
* drop some unused variables
* fix comment style in some headers to match the template
* Fix the loglevel of some debugging output.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@275 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-04-06 14:05:26 +00:00
Stefan Reinauer
e21a1bddd3 small fixup missing in last patch.. trivial, as we agreed on the
solution already.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@255 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-12 12:30:57 +00:00
Uwe Hermann
a73a37d820 Fix strcmp to match strcmp(3).
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@254 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-12 11:49:59 +00:00
Uwe Hermann
2115b87f68 Reimplement the complete include/string.h file, as it has a bogus license
header, and I'm too lazy to do the research for such simple functions.

First, drop all functions, as we don't really use all of them. Only
reimplement from scratch the following ones: strnlen(), strlen(), strcmp().

No fancy, fast, or small implementations, but I think we don't care
(they're only called once or twice anyway). But, at least all functions
are well-documented now.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@247 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-03-12 00:59:13 +00:00
Stefan Reinauer
5a65718dcc clean up headers as requested. drop some dead code.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@111 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-02-24 17:03:53 +00:00
Uwe Hermann
110c9f7e1c For some files:
indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs *.[ch]

(trivial)

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@65 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-01-30 13:15:04 +00:00
Stefan Reinauer
c275218a89 Add a first bit of a framework. Builds the following parts, in
accordance to the newboot document:

* reset vector (16 bytes)
* vpd (240bytes)
* boot block (8k - 256b)
* lar archive (256-8 k)

The boot block is kind of simple, still. It enables pmode, car, and
starts looking for an initram module in the lar archive.

Note: This doesnt do much at the moment,
as gas seems to produce buggy code in init.S.

Take this as a suggestion of how it might work and please provide
patches fixing it and bringing it into shape.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@62 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-01-29 22:09:50 +00:00