[Skiboot] [PATCH] core/fdt: Always add a reserve map

Stewart Smith stewart at linux.vnet.ibm.com
Thu Jun 15 14:07:15 AEST 2017


Oliver O'Halloran <oohall at gmail.com> writes:
> Currently we skip adding the reserved ranges block to the generated
> FDT blob if we are excluding the root node. This can result in a DTB
> that dtc will barf on because the reserved memory ranges overlap with
> the start of the dt_struct block. As an example:
>
> $ fdtdump broken.dtb -d
> /dts-v1/;
> // magic:               0xd00dfeed
> // totalsize:           0x7f3 (2035)
> // off_dt_struct:       0x30  <----\
> // off_dt_strings:      0x7b8       | this is bad!
> // off_mem_rsvmap:      0x30  <----/
> // version:             17
> // last_comp_version:   16
> // boot_cpuid_phys:     0x0
> // size_dt_strings:     0x3b
> // size_dt_struct:      0x788
>
> /memreserve/ 0x100000000 0x300000004;
> /memreserve/ 0x3300000001 0x169626d2c;
> /memreserve/ 0x706369652d736c6f 0x7473000000000003;
> 	*continues*
>
> With this patch:
>
> $ fdtdump working.dtb -d
> /dts-v1/;
> // magic:               0xd00dfeed
> // totalsize:           0x803 (2051)
> // off_dt_struct:       0x40
> // off_dt_strings:      0x7c8
> // off_mem_rsvmap:      0x30
> // version:             17
> // last_comp_version:   16
> // boot_cpuid_phys:     0x0
> // size_dt_strings:     0x3b
> // size_dt_struct:      0x788
>
> // 0040: tag: 0x00000001 (FDT_BEGIN_NODE)
> / {
> // 0048: tag: 0x00000003 (FDT_PROP)
> // 07fb: string: phandle
> // 0054: value
>     phandle = <0x00000001>;
> 	*continues*
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

Merged to master as of 106557d9d1888765cf6fccca7fe0dcf2b8fbe7fb

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list