summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers/options.c')
-rw-r--r--payloads/libpayload/drivers/options.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c
index 61e6cc565f..36d8a9b5b0 100644
--- a/payloads/libpayload/drivers/options.c
+++ b/payloads/libpayload/drivers/options.c
@@ -30,11 +30,28 @@
#include <libpayload.h>
#include <coreboot_tables.h>
+u8 *mem_accessor_base;
+
+static u8 mem_read(u8 reg)
+{
+ return mem_accessor_base[reg];
+}
+
+static void mem_write(u8 val, u8 reg)
+{
+ mem_accessor_base[reg] = val;
+}
+
struct nvram_accessor *use_nvram = &(struct nvram_accessor) {
nvram_read,
nvram_write
};
+struct nvram_accessor *use_mem = &(struct nvram_accessor) {
+ mem_read,
+ mem_write
+};
+
struct cb_cmos_option_table *get_system_option_table(void)
{
return phys_to_virt(lib_sysinfo.option_table);