projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add constants for fast path resume copying
[coreboot.git]
/
src
/
include
/
cbmem.h
diff --git
a/src/include/cbmem.h
b/src/include/cbmem.h
index 5fd2e78aff7cb00015ee8b1bffc4bdb8bb280e91..c55a7cac22d1c0f1314a2c69dba77b4c71803b53 100644
(file)
--- a/
src/include/cbmem.h
+++ b/
src/include/cbmem.h
@@
-20,13
+20,22
@@
#ifndef _CBMEM_H_
#define _CBMEM_H_
#ifndef _CBMEM_H_
#define _CBMEM_H_
-/* Reserve 64k for ACPI and other tables */
-#define HIGH_MEMORY_DEF_SIZE ( 64 * 1024 )
-extern uint64_t high_tables_base, high_tables_size;
+/* Reserve 128k for ACPI and other tables */
+#if CONFIG_CONSOLE_CBMEM
+#define HIGH_MEMORY_DEF_SIZE ( 256 * 1024 )
+#else
+#define HIGH_MEMORY_DEF_SIZE ( 128 * 1024 )
+#endif
#if CONFIG_HAVE_ACPI_RESUME
#define HIGH_MEMORY_SIZE ((CONFIG_RAMTOP - CONFIG_RAMBASE) + HIGH_MEMORY_DEF_SIZE)
#define HIGH_MEMORY_SAVE ( HIGH_MEMORY_SIZE - HIGH_MEMORY_DEF_SIZE )
#if CONFIG_HAVE_ACPI_RESUME
#define HIGH_MEMORY_SIZE ((CONFIG_RAMTOP - CONFIG_RAMBASE) + HIGH_MEMORY_DEF_SIZE)
#define HIGH_MEMORY_SAVE ( HIGH_MEMORY_SIZE - HIGH_MEMORY_DEF_SIZE )
+
+/* Delegation of resume backup memory so we don't have to
+ * (slowly) handle backing up OS memory in romstage.c
+ */
+#define CBMEM_BOOT_MODE 0x610
+#define CBMEM_RESUME_BACKUP 0x614
#else
#define HIGH_MEMORY_SIZE HIGH_MEMORY_DEF_SIZE
#endif
#else
#define HIGH_MEMORY_SIZE HIGH_MEMORY_DEF_SIZE
#endif
@@
-38,9
+47,18
@@
extern uint64_t high_tables_base, high_tables_size;
#define CBMEM_ID_PIRQ 0x49525154
#define CBMEM_ID_MPTABLE 0x534d5054
#define CBMEM_ID_RESUME 0x5245534d
#define CBMEM_ID_PIRQ 0x49525154
#define CBMEM_ID_MPTABLE 0x534d5054
#define CBMEM_ID_RESUME 0x5245534d
+#define CBMEM_ID_SMBIOS 0x534d4254
+#define CBMEM_ID_TIMESTAMP 0x54494d45
+#define CBMEM_ID_MRCDATA 0x4d524344
+#define CBMEM_ID_CONSOLE 0x434f4e53
#define CBMEM_ID_NONE 0x00000000
#define CBMEM_ID_NONE 0x00000000
-void cbmem_initialize(void);
+#ifndef __ASSEMBLER__
+#ifndef __PRE_RAM__
+extern uint64_t high_tables_base, high_tables_size;
+#endif
+
+int cbmem_initialize(void);
void cbmem_init(u64 baseaddr, u64 size);
int cbmem_reinit(u64 baseaddr);
void cbmem_init(u64 baseaddr, u64 size);
int cbmem_reinit(u64 baseaddr);
@@
-49,8
+67,10
@@
void *cbmem_find(u32 id);
void cbmem_list(void);
void cbmem_arch_init(void);
void cbmem_list(void);
void cbmem_arch_init(void);
+extern struct cbmem_entry *get_cbmem_toc(void);
+
#ifndef __PRE_RAM__
#ifndef __PRE_RAM__
-struct cbmem_entry *get_cbmem_toc(void);
void set_cbmem_toc(struct cbmem_entry *);
#endif
#endif
void set_cbmem_toc(struct cbmem_entry *);
#endif
#endif
+#endif