mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
dtc: Automatically pick a sensible boot_cpuid_phys
Currently, when in -Idts -Odtb or -Ifs -Odtb modes, dtc always defaults to using 0 as the value for the boot_cpuid_phys header field. That's correct quite often, but there are some systems where there is no CPU with hardware ID of 0, or where we don't want to use the CPU with hardware ID 0 at all (e.g. for AMP-style partitioning). The only way to override this default currently, is with the -b command line option. This patch improves dtc to instead base the default boot_cpuid_phys value on the reg property of the first listed subnode of /cpus. This means that dtc will get boot_cpuid_phys correct by default in a greater proportion of cases (since the boot cpu is usually listed first, and this way at least the boot_cpuid_phys default will match some existing cpu node). If the node doesn't exist or has an invalid 'reg' property (missing or not 4 bytes in length), then boot_cpuid_phys is set to 0. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
5c8d2e2b57
commit
15ad6d862e
6 changed files with 64 additions and 8 deletions
|
@ -85,7 +85,8 @@ static unsigned long long eval_literal(const char *s, int base, int bits);
|
|||
sourcefile:
|
||||
DT_V1 ';' memreserves devicetree
|
||||
{
|
||||
the_boot_info = build_boot_info($3, $4, 0);
|
||||
the_boot_info = build_boot_info($3, $4,
|
||||
guess_boot_cpuid($4));
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue