Commit Graph

15 Commits

Author SHA1 Message Date
Stefan Reinauer f6935a006a libpayload: rename i386 to x86
Change-Id: Ia9170bd3d04e76dbf9321ca7ea4be23b5e468d21
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/2033
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2012-12-14 22:29:17 +01:00
Nico Huber 593f577ffa libpayload: Fix use of virtual pointers in sysinfo
In I4c456f5, I falsely identified struct cb_string.string as a pointer
which it is not. So we don't need phys_to_virt() here.

Change-Id: I3e2b6226ae2b0672dfc6e0fa4f6990e14e1b7089
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1987
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-12-10 16:45:24 +01:00
Nico Huber 425973cf42 libpayload: Always use virtual pointers in struct sysinfo_t
We had mixed virtual and physical pointers in struct sysinfo_t. Some
being virtual by accident which led to problems when we tried to
reinitialize lib_sysinfo after relocating FILO (to get intentionally
virtual pointers valid again). I guess this didn't cause much trouble
before, as lib_get_sysinfo() was always called with physical addresses
being equal to their virtual counterparts.

For FILO, two possibilities seem practical: Either, have all pointers in
struct sysinfo_t physical, so relocation doesn't hurt. Or, have all
pointers virtual and call lib_get_sysinfo() again after relocation.

This patch goes the latter way, changing the following pointers for
situations where virtual pointers differ from physical:
  .extra_version
  .build
  .compile_time
  .compile_by
  .compile_host
  .compile_domain
  .compiler
  .linker
  .assembler
  .cb_version
  .vdat_addr
  .tstamp_table
  .cbmem_cons
  .mrc_cache
We could also just correct the accidentally virtual pointers. But, IMO,
this would lower the risk of future confusion.

Note 1: Looks like .version gets never set.

Note 2: .option_table and .framebuffer were virtual pointers but treated
        like physical ones. Even in FILO, this led to no problems as
        they were set before relocation.

Change-Id: I4c456f56f049d9f8fc40e62520b1d8ec3dad48f8
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1855
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-11-15 18:51:37 +01:00
Nico Huber dd5979ab43 libpayload: Use #ifdef for CONFIG_* checks
Libpayload uses the linux kernel's config style, where CONFIG_* defines
don't get written for unset tristates.

Change-Id: I3f832cf86bca9a1e153d96af4bf6434a19eba2f6
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1847
Tested-by: build bot (Jenkins)
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-11-15 18:51:17 +01:00
Gabe Black d3890cc16d Update libpayloads understanding of the coreboot tables.
Give it somewhere to put the new info in sysinfo, and tell it how to parse
the new tables which it doesn't yet understand.

Change-Id: I01d3318138696e6407553c27c1814f79e3fbc4f8
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1718
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2012-11-08 19:49:46 +01:00
Gabe Black 5ab20054d3 Update the way serial info is read from the coreboot tables.
This information is now stored in a structure instead of in a few seperate
fields. libpayload hadn't been updated to reflect the new layout or to consume
the new information intelligently.

Change-Id: Ice3486ffcdcdbe1f16f9c84515120c591d8dc882
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1724
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Tested-by: build bot (Jenkins)
2012-11-07 18:30:40 +01:00
Philip Prindeville 9a7c246767 Cleanup access to vendor/part # info
Instead of macros to access MAINBOARD record, use convenience functions.

Store pointers to MAINBOARD and HEADER for use outside of CB code.

Change-Id: I074e3a0df7d25726cbd942538bfdc5a63dd17e12
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Reviewed-on: http://review.coreboot.org/502
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2012-01-07 11:49:57 +01:00
Philip Prindeville 965dacebc5 Fix missing VM mapping
When processing FORWARD records, we weren't accounting for the pointer
being in the physical address space and not the virtual space instead.

Change-Id: I35ef637fbec7886d4cfeac5fd650a17eae8d555a
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Reviewed-on: http://review.coreboot.org/499
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2011-12-24 11:55:15 +01:00
Philip Prindeville c10cade404 Use void pointers for untyped memory
To avoid unnecessary casts, we can use untyped pointers when accessing
individual records.

Change-Id: I1d628d6e25f1e53b4fee34e7c2c4688a789c45a3
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Reviewed-on: http://review.coreboot.org/498
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2011-12-24 11:52:15 +01:00
Philip Prindeville 46404d75e4 Replace UNPACK_CB64 macro with inline
Having submitted a module based on coreboot to LKML for acceptance,
it was requested that fewer macros and more inlines be used (because
of their superior type-checking when performing pointer casts, etc).

This is the first of several changes to make the relevant parts of
coreboot comply to linux code standards.

Change-Id: Iffe7061fa62fa639e0cb6ccb9125eb3403d06b1a
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Reviewed-on: http://review.coreboot.org/495
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
2011-12-24 11:50:08 +01:00
Mathias Krause 0805201143 libpayload: Put coreboot version into lib_sysinfo
Change-Id: I22319efe90e475c66b9556f734a7a5e54f7c59bc
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/394
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2011-11-03 19:02:55 +01:00
Stefan Reinauer d1bc331855 Extend coreboot table entry for serial ports
Add information about memory mapped/io mapped base addresses.

and fix up libpayload to use the same structures

Signed-off-by: Stefan Reinauer <reinauer@google.com>

Change-Id: I5f7b5eda6063261b9acb7a46310172d4a5471dfb
Reviewed-on: http://review.coreboot.org/261
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2011-10-21 23:34:30 +02:00
Patrick Georgi 7f96583f0f Reduce warnings/errors in libpayload when using picky compiler options
The new build system uses quite a few more -W flags for the compiler by
default than the old one. And that's for the better.

Change-Id: Ia8e3d28fb35c56760c2bd0983046c7067e8c5dd6
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/72
Tested-by: build bot (Jenkins)
Reviewed-by: Uwe Hermann <uwe@hermann-uwe.de>
2011-06-30 20:41:23 +02:00
Stefan Reinauer b700254aa5 Add coreboot framebuffer support to libpayload
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> 



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5295 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2010-03-25 18:56:26 +00:00
Patrick Georgi d385ed29b9 This change adds PPC support to libpayload, and hooks it up in the build
process.
The PPC support is still stubbed, with commented out x86 code as guide
line for an implementor.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4293 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-05-21 10:02:52 +00:00
Renamed from payloads/libpayload/i386/coreboot.c (Browse further)