Skip to content

FDT pointer value is incorrectly set. #3

@Synoia

Description

@Synoia

FDT address: void* ptr = (char*) 0x100;

per this thread: https://www.raspberrypi.org/forums/viewtopic.php?t=134018

The DTB start address is size dependent. The aim is to copy the DTB as high as possible. Once the kernel starts it will "unflatten" the DTB into allocated memory and then re-use the space.
1
ARM memory starts at 0 in the VPU physical address space. The GPU memory sits at the top. This is how it works:

Code: Select all
ARMMEM_END = MEM_SIZE - GPU_MEM

// Leave 64KB for GRUB
free_end = ALIGN_DOWN(ARMMEM_END - 0x10000, 0x1000)

// Leave space for initramfs, if there is one
free_end = ALIGN_DOWN(free_end - initramfs_size, 0x1000)

device_tree_address = ALIGN_DOWN(free_end - device_tree_size, 0x100)

Don't forget that the address of the DTB is passed in register r2 to the kernel/U-boot entry point, with r0 holding 0 and r1 being 3138 (the BCM2708 machine id).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions