[coreboot] New patch to review for coreboot: 273e929 Do not allow modifying memory table directly

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Tue Aug 7 06:50:01 CEST 2012


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1415

-gerrit

commit 273e92999ff827454d12bc121bc2cf7e8e0db9f5
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Thu Aug 2 09:49:11 2012 +0300

    Do not allow modifying memory table directly
    
    Adding ranges directly into coreboot memory table raised issues
    as those methods bypassed the MTRR setup. Such regions are now
    added as resources, so declare the functions again as static.
    
    Change-Id: If78613da40eabc5c99c49dbe2d6047cb22a71b69
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/arch/x86/boot/coreboot_table.c          |    5 ++---
 src/arch/x86/include/arch/coreboot_tables.h |    3 ---
 src/include/boot/tables.h                   |    3 ---
 3 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/arch/x86/boot/coreboot_table.c b/src/arch/x86/boot/coreboot_table.c
index 9050836..d056837 100644
--- a/src/arch/x86/boot/coreboot_table.c
+++ b/src/arch/x86/boot/coreboot_table.c
@@ -338,7 +338,7 @@ static struct lb_forward *lb_forward(struct lb_header *header, struct lb_header
 }
 #endif
 
-void lb_memory_range(struct lb_memory *mem,
+static void lb_memory_range(struct lb_memory *mem,
 	uint32_t type, uint64_t start, uint64_t size)
 {
 	int entries;
@@ -503,8 +503,7 @@ static void lb_remove_memory_range(struct lb_memory *mem,
 	}
 }
 
-/* This function is used in mainboard specific code, too */
-void lb_add_memory_range(struct lb_memory *mem,
+static void lb_add_memory_range(struct lb_memory *mem,
 	uint32_t type, uint64_t start, uint64_t size)
 {
 	lb_remove_memory_range(mem, start, size);
diff --git a/src/arch/x86/include/arch/coreboot_tables.h b/src/arch/x86/include/arch/coreboot_tables.h
index 8fc648b..e9790db 100644
--- a/src/arch/x86/include/arch/coreboot_tables.h
+++ b/src/arch/x86/include/arch/coreboot_tables.h
@@ -8,9 +8,6 @@ unsigned long write_coreboot_table(
 	unsigned long low_table_start, unsigned long low_table_end,
 	unsigned long rom_table_start, unsigned long rom_table_end);
 
-void lb_memory_range(struct lb_memory *mem,
-	uint32_t type, uint64_t start, uint64_t size);
-
 /* Routines to extract part so the coreboot table or information
  * from the coreboot table.
  */
diff --git a/src/include/boot/tables.h b/src/include/boot/tables.h
index 4b3f70c..869da26 100644
--- a/src/include/boot/tables.h
+++ b/src/include/boot/tables.h
@@ -4,9 +4,6 @@
 #include <boot/coreboot_tables.h>
 #include <arch/coreboot_tables.h>
 
-void lb_add_memory_range(struct lb_memory *mem,
-	uint32_t type, uint64_t start, uint64_t size);
-
 struct lb_memory *write_tables(void);
 
 #endif /* BOOT_TABLES_H */




More information about the coreboot mailing list