mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: Use FDT_MAGIC from libfdt instead of local macro
Remove the redundant local 'DTB_MAGIC' definition and replace its usage
with the canonical 'FDT_MAGIC' from 'libfdt'.
Amends: 66edeb2e39 (arm: copy DTB appended to zImage)
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
a71f56be01
commit
c53f71b2ee
1 file changed
+1
-3
@@ -40,8 +40,6 @@ struct minimal_dtb_header {
|
||||
/* There are other fields but we don't use them yet. */
|
||||
};
|
||||
|
||||
#define DTB_MAGIC 0xd00dfeedU
|
||||
|
||||
static void __init place_modules(struct kernel_info *info,
|
||||
paddr_t kernbase, paddr_t kernend)
|
||||
{
|
||||
@@ -383,7 +381,7 @@ static int __init kernel_zimage32_probe(struct kernel_info *info,
|
||||
if ( addr + end - start + sizeof(dtb_hdr) <= size )
|
||||
{
|
||||
copy_from_paddr(&dtb_hdr, addr + end - start, sizeof(dtb_hdr));
|
||||
if (be32_to_cpu(dtb_hdr.magic) == DTB_MAGIC) {
|
||||
if (be32_to_cpu(dtb_hdr.magic) == FDT_MAGIC) {
|
||||
end += be32_to_cpu(dtb_hdr.total_size);
|
||||
|
||||
if ( end > addr + size )
|
||||
|
||||