aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbfs.h3
-rw-r--r--src/include/program_loading.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index 6063dd6f9e..8538b3d119 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -47,6 +47,9 @@ size_t cbfs_boot_load_struct(const char *name, void *buf, size_t buf_size);
size_t cbfs_load_and_decompress(const struct region_device *rdev, size_t offset,
size_t in_size, void *buffer, size_t buffer_size, uint32_t compression);
+/* Return the size and fill base of the memory pstage will occupy after loaded. */
+size_t cbfs_prog_stage_section(struct prog *pstage, uintptr_t *base);
+
/* Load stage into memory filling in prog. Return 0 on success. < 0 on error. */
int cbfs_prog_stage_load(struct prog *prog);
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 08687f3128..416e2e9418 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -173,6 +173,10 @@ uintptr_t romstage_ram_stack_base(size_t size, int src);
uintptr_t romstage_ram_stack_top(void);
uintptr_t romstage_ram_stack_bottom(void);
+/* Backup OS memory to CBMEM_ID_RESUME on ACPI S3 resume path,
+ * if ramstage overwrites low memory. */
+void backup_ramstage_section(uintptr_t base, size_t size);
+
/***********************
* PAYLOAD LOADING *
***********************/