summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2013-02-08 12:39:28 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-03-22 16:20:08 +0100
commitd1cc812799d3156888cd667d13f93bfa44c639c1 (patch)
treed7f370b1b6e19828bdc0705d32a6450c2e832767 /payloads/libpayload/include
parent57686f848597f6b133c9d45a9b98a54638399b32 (diff)
downloadcoreboot-d1cc812799d3156888cd667d13f93bfa44c639c1.tar.xz
libpayload: Add comments on virtual pointers in lib_sysinfo
After another incident related to virtual pointers in lib_sysinfo (and resulting confusion), I decided to put some comments on the matter into the code. Remember, we decided to always use virtual pointers in lib_sysinfo, but it's not always obvious from the code, that they are. See also: 425973c libpayload: Always use virtual pointers in struct sysinfo_t 593f577 libpayload: Fix use of virtual pointers in sysinfo Change-Id: I886c3b1d182cba07f1aab1667e702e2868ad4b68 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/2878 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/sysinfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index 4c7ce4521b..e05ef9f4d6 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -39,6 +39,12 @@
struct cb_serial;
+/*
+ * All pointers in here shall be virtual.
+ *
+ * If a relocation happens after the last call to lib_get_sysinfo(),
+ * it is up to the user to call lib_get_sysinfo() again.
+ */
struct sysinfo_t {
unsigned int cpu_khz;
struct cb_serial *serial;