|
33 | 33 | #include <asm/fadump-internal.h>
|
34 | 34 | #include <asm/setup.h>
|
35 | 35 | #include <asm/interrupt.h>
|
| 36 | +#include <asm/prom.h> |
36 | 37 |
|
37 | 38 | /*
|
38 | 39 | * The CPU who acquired the lock to trigger the fadump crash should
|
@@ -1712,19 +1713,19 @@ void __init fadump_setup_param_area(void)
|
1712 | 1713 | range_end = memblock_end_of_DRAM();
|
1713 | 1714 | } else {
|
1714 | 1715 | /*
|
1715 |
| - * Passing additional parameters is supported for hash MMU only |
1716 |
| - * if the first memory block size is 768MB or higher. |
| 1716 | + * Memory range for passing additional parameters for HASH MMU |
| 1717 | + * must meet the following conditions: |
| 1718 | + * 1. The first memory block size must be higher than the |
| 1719 | + * minimum RMA (MIN_RMA) size. Bootloader can use memory |
| 1720 | + * upto RMA size. So it should be avoided. |
| 1721 | + * 2. The range should be between MIN_RMA and RMA size (ppc64_rma_size) |
| 1722 | + * 3. It must not overlap with the fadump reserved area. |
1717 | 1723 | */
|
1718 |
| - if (ppc64_rma_size < 0x30000000) |
| 1724 | + if (ppc64_rma_size < MIN_RMA*1024*1024) |
1719 | 1725 | return;
|
1720 | 1726 |
|
1721 |
| - /* |
1722 |
| - * 640 MB to 768 MB is not used by PFW/bootloader. So, try reserving |
1723 |
| - * memory for passing additional parameters in this range to avoid |
1724 |
| - * being stomped on by PFW/bootloader. |
1725 |
| - */ |
1726 |
| - range_start = 0x2A000000; |
1727 |
| - range_end = range_start + 0x4000000; |
| 1727 | + range_start = MIN_RMA * 1024 * 1024; |
| 1728 | + range_end = min(ppc64_rma_size, fw_dump.boot_mem_top); |
1728 | 1729 | }
|
1729 | 1730 |
|
1730 | 1731 | fw_dump.param_area = memblock_phys_alloc_range(COMMAND_LINE_SIZE,
|
|
0 commit comments