提交 a9480e5d 编写于 作者: A Andreas Färber

petalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPU

Needed for microblaze_load_kernel().
Signed-off-by: NAndreas Färber <afaerber@suse.de>
Acked-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
上级 b33ab1f7
...@@ -75,6 +75,7 @@ petalogix_ml605_init(ram_addr_t ram_size, ...@@ -75,6 +75,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
{ {
MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *address_space_mem = get_system_memory();
DeviceState *dev; DeviceState *dev;
MicroBlazeCPU *cpu;
CPUMBState *env; CPUMBState *env;
DriveInfo *dinfo; DriveInfo *dinfo;
int i; int i;
...@@ -87,7 +88,8 @@ petalogix_ml605_init(ram_addr_t ram_size, ...@@ -87,7 +88,8 @@ petalogix_ml605_init(ram_addr_t ram_size,
if (cpu_model == NULL) { if (cpu_model == NULL) {
cpu_model = "microblaze"; cpu_model = "microblaze";
} }
env = cpu_init(cpu_model); cpu = cpu_mb_init(cpu_model);
env = &cpu->env;
/* Attach emulated BRAM through the LMB. */ /* Attach emulated BRAM through the LMB. */
memory_region_init_ram(phys_lmb_bram, "petalogix_ml605.lmb_bram", memory_region_init_ram(phys_lmb_bram, "petalogix_ml605.lmb_bram",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册