|
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
|
@@ -1764,19 +1765,19 @@ void __init fadump_setup_param_area(void)
|
1764 | 1765 | range_end = memblock_end_of_DRAM();
|
1765 | 1766 | } else {
|
1766 | 1767 | /*
|
1767 |
| - * Passing additional parameters is supported for hash MMU only |
1768 |
| - * if the first memory block size is 768MB or higher. |
| 1768 | + * Memory range for passing additional parameters for HASH MMU |
| 1769 | + * must meet the following conditions: |
| 1770 | + * 1. The first memory block size must be higher than the |
| 1771 | + * minimum RMA (MIN_RMA) size. Bootloader can use memory |
| 1772 | + * upto RMA size. So it should be avoided. |
| 1773 | + * 2. The range should be between MIN_RMA and RMA size (ppc64_rma_size) |
| 1774 | + * 3. It must not overlap with the fadump reserved area. |
1769 | 1775 | */
|
1770 |
| - if (ppc64_rma_size < 0x30000000) |
| 1776 | + if (ppc64_rma_size < MIN_RMA*1024*1024) |
1771 | 1777 | return;
|
1772 | 1778 |
|
1773 |
| - /* |
1774 |
| - * 640 MB to 768 MB is not used by PFW/bootloader. So, try reserving |
1775 |
| - * memory for passing additional parameters in this range to avoid |
1776 |
| - * being stomped on by PFW/bootloader. |
1777 |
| - */ |
1778 |
| - range_start = 0x2A000000; |
1779 |
| - range_end = range_start + 0x4000000; |
| 1779 | + range_start = MIN_RMA * 1024 * 1024; |
| 1780 | + range_end = min(ppc64_rma_size, fw_dump.boot_mem_top); |
1780 | 1781 | }
|
1781 | 1782 |
|
1782 | 1783 | fw_dump.param_area = memblock_phys_alloc_range(COMMAND_LINE_SIZE,
|
|
0 commit comments