Add ability for arch code to make changes before we boot
PATCH v2 1/1 Add ability for arch code to make changes before we boot
Added a arch_preboot_os() function that cpu specific code can implement to allow for various modifications to the state of the machine right before we boot. This can be useful to setup register state to a specific configuration.
---
* Just renamed arch_preboot to arch_preboot_os
common/cmd_bootm.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
common/cmd_bootm.c +10 -0
@@ -166,6 +166,13 @@ void __arch_lmb_reserve(struct lmb *lmb) }void arch_lmb_reserve (struct lmb *lmb) __attribute__((weak,alias ("__arch_lmb_reserve" ))); +/* Allow for arch specific config before we boot */ +void __arch_preboot_os (void ) +{ +/* please define platform specific arch_preboot_os() */ +} +void arch_preboot_os (void ) __attribute__((weak,alias ("__arch_preboot_os" ))); +#if defined(__ARM__)#define IH_INITRD_ARCH IH_ARCH_ARM#elif defined(__avr32__)
@@ -543,6 +550,7 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])break ;case BOOTM_STATE_OS_GO :disable_interrupts (); +arch_preboot_os ();boot_fn (BOOTM_STATE_OS_GO , argc, argv, &images);break ; }
@@ -673,6 +681,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])return 1 ; } +arch_preboot_os (); +boot_fn (0 , argc, argv, &images);show_boot_progress (-9 );
Signature · 1 line
1.6.0.6
Wolfgang Denk
AppliedPATCH v2 1/1 Add ability for arch code to make changes before we boot
Dear Kumar Gala,
Quoted 11 lines · In message <[email protected]> you…
Added a
arch_preboot_os()function that cpu specific code can implement to allow for various modifications to the state of the machine right before we boot. This can be useful to setup register state to a specific configuration.Signed-off-by Kumar Gala <[email protected]>---
* Just renamedarch_preboottoarch_preboot_oscommon/cmd_bootm.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In C we had to code our own bugs, in C++ we can inherit them.