diff options
-rw-r--r-- | include/linux/memblock.h | 1 | ||||
-rw-r--r-- | mm/memblock.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 7525e38c434d..e6b843e16e81 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -80,6 +80,7 @@ extern phys_addr_t __memblock_alloc_base(phys_addr_t size, | |||
80 | phys_addr_t align, | 80 | phys_addr_t align, |
81 | phys_addr_t max_addr); | 81 | phys_addr_t max_addr); |
82 | extern phys_addr_t memblock_phys_mem_size(void); | 82 | extern phys_addr_t memblock_phys_mem_size(void); |
83 | extern phys_addr_t memblock_start_of_DRAM(void); | ||
83 | extern phys_addr_t memblock_end_of_DRAM(void); | 84 | extern phys_addr_t memblock_end_of_DRAM(void); |
84 | extern void memblock_enforce_memory_limit(phys_addr_t memory_limit); | 85 | extern void memblock_enforce_memory_limit(phys_addr_t memory_limit); |
85 | extern int memblock_is_memory(phys_addr_t addr); | 86 | extern int memblock_is_memory(phys_addr_t addr); |
diff --git a/mm/memblock.c b/mm/memblock.c index ccbf97339592..b7ed63633581 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -626,6 +626,12 @@ phys_addr_t __init memblock_phys_mem_size(void) | |||
626 | return memblock.memory_size; | 626 | return memblock.memory_size; |
627 | } | 627 | } |
628 | 628 | ||
629 | /* lowest address */ | ||
630 | phys_addr_t __init_memblock memblock_start_of_DRAM(void) | ||
631 | { | ||
632 | return memblock.memory.regions[0].base; | ||
633 | } | ||
634 | |||
629 | phys_addr_t __init_memblock memblock_end_of_DRAM(void) | 635 | phys_addr_t __init_memblock memblock_end_of_DRAM(void) |
630 | { | 636 | { |
631 | int idx = memblock.memory.cnt - 1; | 637 | int idx = memblock.memory.cnt - 1; |