xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter A.G. Crosthwaite <peter.crosthwaite@petalogix.com>
This commit is contained in:
parent
95d42bb5d7
commit
17c2f0bf37
@ -50,7 +50,7 @@ static void zynq_init(ram_addr_t ram_size, const char *boot_device,
|
|||||||
const char *kernel_filename, const char *kernel_cmdline,
|
const char *kernel_filename, const char *kernel_cmdline,
|
||||||
const char *initrd_filename, const char *cpu_model)
|
const char *initrd_filename, const char *cpu_model)
|
||||||
{
|
{
|
||||||
CPUARMState *env = NULL;
|
ARMCPU *cpu;
|
||||||
MemoryRegion *address_space_mem = get_system_memory();
|
MemoryRegion *address_space_mem = get_system_memory();
|
||||||
MemoryRegion *ext_ram = g_new(MemoryRegion, 1);
|
MemoryRegion *ext_ram = g_new(MemoryRegion, 1);
|
||||||
MemoryRegion *ocm_ram = g_new(MemoryRegion, 1);
|
MemoryRegion *ocm_ram = g_new(MemoryRegion, 1);
|
||||||
@ -66,12 +66,12 @@ static void zynq_init(ram_addr_t ram_size, const char *boot_device,
|
|||||||
cpu_model = "cortex-a9";
|
cpu_model = "cortex-a9";
|
||||||
}
|
}
|
||||||
|
|
||||||
env = cpu_init(cpu_model);
|
cpu = cpu_arm_init(cpu_model);
|
||||||
if (!env) {
|
if (!cpu) {
|
||||||
fprintf(stderr, "Unable to find CPU definition\n");
|
fprintf(stderr, "Unable to find CPU definition\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
irqp = arm_pic_init_cpu(env);
|
irqp = arm_pic_init_cpu(&cpu->env);
|
||||||
cpu_irq = irqp[ARM_PIC_CPU_IRQ];
|
cpu_irq = irqp[ARM_PIC_CPU_IRQ];
|
||||||
|
|
||||||
/* max 2GB ram */
|
/* max 2GB ram */
|
||||||
|
Loading…
Reference in New Issue
Block a user