mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-29 07:33:29 +08:00
fdt: sandbox: correct use of ${fdtcontroladdr}
The sandbox uses a virtual address space that is neither the physical nor the virtual address space of the operating system. All address used on the command line live in this address space. So also the environment variable ${fdtcontroladdr} has to be in this address space. Commands like bootefi and booti receive the fdt address as parameter. Without the patch ${fdtcontroladdr} cannot be used as parameter value on the sandbox. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
c3772ca1e3
commit
f980c99985
@ -453,7 +453,8 @@ static int initr_env(void)
|
|||||||
else
|
else
|
||||||
set_default_env(NULL, 0);
|
set_default_env(NULL, 0);
|
||||||
#ifdef CONFIG_OF_CONTROL
|
#ifdef CONFIG_OF_CONTROL
|
||||||
env_set_addr("fdtcontroladdr", gd->fdt_blob);
|
env_set_hex("fdtcontroladdr",
|
||||||
|
(unsigned long)map_to_sysmem(gd->fdt_blob));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize from environment */
|
/* Initialize from environment */
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fdtdec.h>
|
#include <fdtdec.h>
|
||||||
#include <fdt_support.h>
|
#include <fdt_support.h>
|
||||||
|
#include <mapmem.h>
|
||||||
#include <linux/libfdt.h>
|
#include <linux/libfdt.h>
|
||||||
#include <serial.h>
|
#include <serial.h>
|
||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
@ -1253,8 +1254,9 @@ int fdtdec_setup(void)
|
|||||||
# if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
|
# if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
|
||||||
gd->fdt_blob = (void *)prior_stage_fdt_address;
|
gd->fdt_blob = (void *)prior_stage_fdt_address;
|
||||||
# else
|
# else
|
||||||
gd->fdt_blob = (void *)env_get_ulong("fdtcontroladdr", 16,
|
gd->fdt_blob = map_sysmem
|
||||||
(uintptr_t)gd->fdt_blob);
|
(env_get_ulong("fdtcontroladdr", 16,
|
||||||
|
(unsigned long)map_to_sysmem(gd->fdt_blob)), 0);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user