coreboot-kgpe-d16/payloads/libpayload/drivers
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
..
storage libpayload: Export device count in storage interface 2012-11-14 17:39:03 +01:00
usb libpayload: Add init() function to hci_t and rework uhci_reset() 2012-11-14 17:45:16 +01:00
video libpayload: Always use virtual pointers in struct sysinfo_t 2012-11-15 18:51:37 +01:00
Makefile.inc libpayload: Add support for the CBMEM in memory console. 2012-11-09 19:01:15 +01:00
cbmem_console.c libpayload: Add support for the CBMEM in memory console. 2012-11-09 19:01:15 +01:00
hid.c make keyboard reset driver generic (not pc keyboard driver dependent) 2010-03-25 18:52:24 +00:00
keyboard.c libpayload: Fix handling of CAPS LOCK key on PS/2 keyboards 2011-11-10 17:51:53 +01:00
nvram.c Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
options.c libpayload: Always use virtual pointers in struct sysinfo_t 2012-11-15 18:51:37 +01:00
pci.c [PATCH] libpayload: Fix the PCI search function 2008-10-20 16:52:06 +00:00
serial.c Update the way serial info is read from the coreboot tables. 2012-11-07 18:30:40 +01:00
speaker.c Fix libpayload speaker driver 2011-10-27 10:49:41 +02:00