coreboot-kgpe-d16/payloads/libpayload/arch/i386
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
..
Config.in Refactor the endianness conversion functions and header files. 2012-11-08 19:49:51 +01:00
Makefile.inc libpayload: Add faster, architecture specific versions of memset and memcpy. 2012-11-07 18:31:15 +01:00
coreboot.c libpayload: Always use virtual pointers in struct sysinfo_t 2012-11-15 18:51:37 +01:00
exec.S This change adds PPC support to libpayload, and hooks it up in the build 2009-05-21 10:02:52 +00:00
head.S Don't do a call as the first instruction in libpayload. 2011-10-11 11:47:06 +02:00
main.c libpayload: Use #ifdef for CONFIG_* checks 2012-11-15 18:51:17 +01:00
multiboot.c Reduce warnings/errors in libpayload when using picky compiler options 2011-06-30 20:41:23 +02:00
string.c libpayload: Add faster, architecture specific versions of memset and memcpy. 2012-11-07 18:31:15 +01:00
sysinfo.c Let lib_get_sysinfo() pass through the success of get_coreboot_info() 2011-12-24 12:02:18 +01:00
timer.c prevent timer overflows in libpayload 2010-03-25 18:53:20 +00:00
util.S This change adds PPC support to libpayload, and hooks it up in the build 2009-05-21 10:02:52 +00:00
virtual.c Reduce warnings/errors in libpayload when using picky compiler options 2011-06-30 20:41:23 +02:00