Skip to content

Commit

Permalink
arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot()
Browse files Browse the repository at this point in the history
Adapt exynos4210 and highbank accordingly.
The parameter itself is unused.

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Peter Maydell <[email protected]>
Acked-by: Igor Mitsyanko <[email protected]> (for exynos)
  • Loading branch information
afaerber committed Jun 10, 2012
1 parent 20e9337 commit 9543b0c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hw/arm-misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct arm_boot_info {
* perform any necessary CPU reset handling and set the PC for thei
* secondary CPUs to point at this boot blob.
*/
void (*write_secondary_boot)(CPUARMState *env,
void (*write_secondary_boot)(ARMCPU *cpu,
const struct arm_boot_info *info);
void (*secondary_cpu_reset_hook)(CPUARMState *env,
const struct arm_boot_info *info);
Expand Down
6 changes: 3 additions & 3 deletions hw/arm_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static uint32_t smpboot[] = {
0 /* bootreg: Boot register address is held here */
};

static void default_write_secondary(CPUARMState *env,
static void default_write_secondary(ARMCPU *cpu,
const struct arm_boot_info *info)
{
int n;
Expand Down Expand Up @@ -303,7 +303,7 @@ static void do_cpu_reset(void *opaque)

void arm_load_kernel(CPUARMState *env, struct arm_boot_info *info)
{
ARMCPU *cpu;
ARMCPU *cpu = arm_env_get_cpu(env);
int kernel_size;
int initrd_size;
int n;
Expand Down Expand Up @@ -402,7 +402,7 @@ void arm_load_kernel(CPUARMState *env, struct arm_boot_info *info)
rom_add_blob_fixed("bootloader", bootloader, sizeof(bootloader),
info->loader_start);
if (info->nb_cpus > 1) {
info->write_secondary_boot(env, info);
info->write_secondary_boot(cpu, info);
}
}
info->is_linux = is_linux;
Expand Down
2 changes: 1 addition & 1 deletion hw/exynos4210.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
static uint8_t chipid_and_omr[] = { 0x11, 0x02, 0x21, 0x43,
0x09, 0x00, 0x00, 0x00 };

void exynos4210_write_secondary(CPUARMState *env,
void exynos4210_write_secondary(ARMCPU *cpu,
const struct arm_boot_info *info)
{
int n;
Expand Down
2 changes: 1 addition & 1 deletion hw/exynos4210.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ typedef struct Exynos4210State {
MemoryRegion bootreg_mem;
} Exynos4210State;

void exynos4210_write_secondary(CPUARMState *env,
void exynos4210_write_secondary(ARMCPU *cpu,
const struct arm_boot_info *info);

Exynos4210State *exynos4210_init(MemoryRegion *system_mem,
Expand Down
2 changes: 1 addition & 1 deletion hw/highbank.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/* Board init. */

static void hb_write_secondary(CPUARMState *env, const struct arm_boot_info *info)
static void hb_write_secondary(ARMCPU *cpu, const struct arm_boot_info *info)
{
int n;
uint32_t smpboot[] = {
Expand Down

0 comments on commit 9543b0c

Please sign in to comment.