]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Access the device tree blob via copyin/copyout.
authorkientzle <kientzle@FreeBSD.org>
Thu, 17 May 2012 04:04:48 +0000 (04:04 +0000)
committerkientzle <kientzle@FreeBSD.org>
Thu, 17 May 2012 04:04:48 +0000 (04:04 +0000)
commit63ab347efe2621fc79f689a92c4bbda531593626
treee7d830bbca6fa6d1014454e4e6863576f04b2787
parentb796f78b0a7d50009f0d55592c47c9f1ec312bc0
Access the device tree blob via copyin/copyout.

The code previously assumed that copyin/copyout did no
address translation and that the device tree blob could
be manipulated in-place (with only a few adjustments for
the ELF loader offset).  This isn't possible on all platforms,
so the revised code uses copyout() to copy the device tree
blob into a heap-allocated buffer and then updates the
device tree with copyout().  This isn't ideal, since it
bloats the loader memory usage, but seems the only feasible
approach (short of rewriting all of the fdt manipulation
routines).
sys/boot/fdt/fdt_loader_cmd.c
sys/boot/uboot/common/metadata.c