|
@@ -878,8 +878,19 @@ static void fadump_setup_crash_memory_ranges(void)
|
|
for_each_memblock(memory, reg) {
|
|
for_each_memblock(memory, reg) {
|
|
start = (unsigned long long)reg->base;
|
|
start = (unsigned long long)reg->base;
|
|
end = start + (unsigned long long)reg->size;
|
|
end = start + (unsigned long long)reg->size;
|
|
- if (start == RMA_START && end >= fw_dump.boot_memory_size)
|
|
|
|
- start = fw_dump.boot_memory_size;
|
|
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * skip the first memory chunk that is already added (RMA_START
|
|
|
|
+ * through boot_memory_size). This logic needs a relook if and
|
|
|
|
+ * when RMA_START changes to a non-zero value.
|
|
|
|
+ */
|
|
|
|
+ BUILD_BUG_ON(RMA_START != 0);
|
|
|
|
+ if (start < fw_dump.boot_memory_size) {
|
|
|
|
+ if (end > fw_dump.boot_memory_size)
|
|
|
|
+ start = fw_dump.boot_memory_size;
|
|
|
|
+ else
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
|
|
/* add this range excluding the reserved dump area. */
|
|
/* add this range excluding the reserved dump area. */
|
|
fadump_exclude_reserved_area(start, end);
|
|
fadump_exclude_reserved_area(start, end);
|