From d67a4bd5a7f2270294a83a15ba4bc58d16e67180 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 10 Apr 2018 09:31:10 +0200 Subject: lib/memrange: Introduce method to clone memrange Add a new method to clone an existing memrange with all of its entries. Required for new bootmem type LB_MEM_RAM_DONT_OVERLAP. Change-Id: I64b27bf2611ca310385ef680f030a3e4aa0c2680 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/25582 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/include/memrange.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/include') diff --git a/src/include/memrange.h b/src/include/memrange.h index 46a992adb5..7f42aa2b0b 100644 --- a/src/include/memrange.h +++ b/src/include/memrange.h @@ -98,6 +98,9 @@ void memranges_init(struct memranges *ranges, unsigned long mask, unsigned long match, unsigned long tag); +/* Clone a memrange. The new memrange has the same entries as the old one. */ +void memranges_clone(struct memranges *newranges, struct memranges *oldranges); + /* Remove and free all entries within the memranges structure. */ void memranges_teardown(struct memranges *ranges); -- cgit v1.2.3