root / hw / virtex_ml507.c @ 9c8255e1
History | View | Annotate | Download (8.7 kB)
1 | 2c50e26e | Edgar E. Iglesias | /*
|
---|---|---|---|
2 | 2c50e26e | Edgar E. Iglesias | * Model of Xilinx Virtex5 ML507 PPC-440 refdesign.
|
3 | 2c50e26e | Edgar E. Iglesias | *
|
4 | 2c50e26e | Edgar E. Iglesias | * Copyright (c) 2010 Edgar E. Iglesias.
|
5 | 2c50e26e | Edgar E. Iglesias | *
|
6 | 2c50e26e | Edgar E. Iglesias | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 | 2c50e26e | Edgar E. Iglesias | * of this software and associated documentation files (the "Software"), to deal
|
8 | 2c50e26e | Edgar E. Iglesias | * in the Software without restriction, including without limitation the rights
|
9 | 2c50e26e | Edgar E. Iglesias | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 | 2c50e26e | Edgar E. Iglesias | * copies of the Software, and to permit persons to whom the Software is
|
11 | 2c50e26e | Edgar E. Iglesias | * furnished to do so, subject to the following conditions:
|
12 | 2c50e26e | Edgar E. Iglesias | *
|
13 | 2c50e26e | Edgar E. Iglesias | * The above copyright notice and this permission notice shall be included in
|
14 | 2c50e26e | Edgar E. Iglesias | * all copies or substantial portions of the Software.
|
15 | 2c50e26e | Edgar E. Iglesias | *
|
16 | 2c50e26e | Edgar E. Iglesias | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 | 2c50e26e | Edgar E. Iglesias | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 | 2c50e26e | Edgar E. Iglesias | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
19 | 2c50e26e | Edgar E. Iglesias | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 | 2c50e26e | Edgar E. Iglesias | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 | 2c50e26e | Edgar E. Iglesias | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22 | 2c50e26e | Edgar E. Iglesias | * THE SOFTWARE.
|
23 | 2c50e26e | Edgar E. Iglesias | */
|
24 | 2c50e26e | Edgar E. Iglesias | |
25 | 2c50e26e | Edgar E. Iglesias | #include "sysbus.h" |
26 | 2c50e26e | Edgar E. Iglesias | #include "hw.h" |
27 | 2c50e26e | Edgar E. Iglesias | #include "pc.h" |
28 | 2c50e26e | Edgar E. Iglesias | #include "net.h" |
29 | 2c50e26e | Edgar E. Iglesias | #include "flash.h" |
30 | 2c50e26e | Edgar E. Iglesias | #include "sysemu.h" |
31 | 2c50e26e | Edgar E. Iglesias | #include "devices.h" |
32 | 2c50e26e | Edgar E. Iglesias | #include "boards.h" |
33 | 2c50e26e | Edgar E. Iglesias | #include "device_tree.h" |
34 | 2c50e26e | Edgar E. Iglesias | #include "loader.h" |
35 | 2c50e26e | Edgar E. Iglesias | #include "elf.h" |
36 | 2c50e26e | Edgar E. Iglesias | #include "qemu-log.h" |
37 | 2c50e26e | Edgar E. Iglesias | |
38 | 2c50e26e | Edgar E. Iglesias | #include "ppc.h" |
39 | 2c50e26e | Edgar E. Iglesias | #include "ppc4xx.h" |
40 | 2c50e26e | Edgar E. Iglesias | #include "ppc440.h" |
41 | 2c50e26e | Edgar E. Iglesias | #include "ppc405.h" |
42 | 2c50e26e | Edgar E. Iglesias | |
43 | 2c50e26e | Edgar E. Iglesias | #include "blockdev.h" |
44 | 2c50e26e | Edgar E. Iglesias | #include "xilinx.h" |
45 | 2c50e26e | Edgar E. Iglesias | |
46 | 2c50e26e | Edgar E. Iglesias | #define EPAPR_MAGIC (0x45504150) |
47 | 2c50e26e | Edgar E. Iglesias | #define FLASH_SIZE (16 * 1024 * 1024) |
48 | 2c50e26e | Edgar E. Iglesias | |
49 | 2c50e26e | Edgar E. Iglesias | static struct boot_info |
50 | 2c50e26e | Edgar E. Iglesias | { |
51 | 2c50e26e | Edgar E. Iglesias | uint32_t bootstrap_pc; |
52 | 2c50e26e | Edgar E. Iglesias | uint32_t cmdline; |
53 | 2c50e26e | Edgar E. Iglesias | uint32_t fdt; |
54 | 2c50e26e | Edgar E. Iglesias | uint32_t ima_size; |
55 | 2c50e26e | Edgar E. Iglesias | void *vfdt;
|
56 | 2c50e26e | Edgar E. Iglesias | } boot_info; |
57 | 2c50e26e | Edgar E. Iglesias | |
58 | 2c50e26e | Edgar E. Iglesias | /* Create reset TLB entries for BookE, spanning the 32bit addr space. */
|
59 | 2c50e26e | Edgar E. Iglesias | static void mmubooke_create_initial_mapping(CPUState *env, |
60 | 2c50e26e | Edgar E. Iglesias | target_ulong va, |
61 | 2c50e26e | Edgar E. Iglesias | target_phys_addr_t pa) |
62 | 2c50e26e | Edgar E. Iglesias | { |
63 | 1c53accc | Alexander Graf | ppcemb_tlb_t *tlb = &env->tlb.tlbe[0];
|
64 | 2c50e26e | Edgar E. Iglesias | |
65 | 2c50e26e | Edgar E. Iglesias | tlb->attr = 0;
|
66 | 2c50e26e | Edgar E. Iglesias | tlb->prot = PAGE_VALID | ((PAGE_READ | PAGE_WRITE | PAGE_EXEC) << 4);
|
67 | 2c50e26e | Edgar E. Iglesias | tlb->size = 1 << 31; /* up to 0x80000000 */ |
68 | 2c50e26e | Edgar E. Iglesias | tlb->EPN = va & TARGET_PAGE_MASK; |
69 | 2c50e26e | Edgar E. Iglesias | tlb->RPN = pa & TARGET_PAGE_MASK; |
70 | 2c50e26e | Edgar E. Iglesias | tlb->PID = 0;
|
71 | 2c50e26e | Edgar E. Iglesias | |
72 | 1c53accc | Alexander Graf | tlb = &env->tlb.tlbe[1];
|
73 | 2c50e26e | Edgar E. Iglesias | tlb->attr = 0;
|
74 | 2c50e26e | Edgar E. Iglesias | tlb->prot = PAGE_VALID | ((PAGE_READ | PAGE_WRITE | PAGE_EXEC) << 4);
|
75 | 2c50e26e | Edgar E. Iglesias | tlb->size = 1 << 31; /* up to 0xffffffff */ |
76 | 2c50e26e | Edgar E. Iglesias | tlb->EPN = 0x80000000 & TARGET_PAGE_MASK;
|
77 | 2c50e26e | Edgar E. Iglesias | tlb->RPN = 0x80000000 & TARGET_PAGE_MASK;
|
78 | 2c50e26e | Edgar E. Iglesias | tlb->PID = 0;
|
79 | 2c50e26e | Edgar E. Iglesias | } |
80 | 2c50e26e | Edgar E. Iglesias | |
81 | 2c50e26e | Edgar E. Iglesias | static CPUState *ppc440_init_xilinx(ram_addr_t *ram_size,
|
82 | 2c50e26e | Edgar E. Iglesias | int do_init,
|
83 | 2c50e26e | Edgar E. Iglesias | const char *cpu_model, |
84 | 2c50e26e | Edgar E. Iglesias | clk_setup_t *cpu_clk, clk_setup_t *tb_clk, |
85 | 2c50e26e | Edgar E. Iglesias | uint32_t sysclk) |
86 | 2c50e26e | Edgar E. Iglesias | { |
87 | 2c50e26e | Edgar E. Iglesias | CPUState *env; |
88 | 2c50e26e | Edgar E. Iglesias | qemu_irq *irqs; |
89 | 2c50e26e | Edgar E. Iglesias | |
90 | 2c50e26e | Edgar E. Iglesias | env = cpu_init(cpu_model); |
91 | 2c50e26e | Edgar E. Iglesias | if (!env) {
|
92 | 2c50e26e | Edgar E. Iglesias | fprintf(stderr, "Unable to initialize CPU!\n");
|
93 | 2c50e26e | Edgar E. Iglesias | exit(1);
|
94 | 2c50e26e | Edgar E. Iglesias | } |
95 | 2c50e26e | Edgar E. Iglesias | |
96 | 2c50e26e | Edgar E. Iglesias | cpu_clk->cb = NULL; /* We don't care about CPU clock frequency changes */ |
97 | 2c50e26e | Edgar E. Iglesias | cpu_clk->opaque = env; |
98 | 2c50e26e | Edgar E. Iglesias | /* Set time-base frequency to sysclk */
|
99 | 2c50e26e | Edgar E. Iglesias | tb_clk->cb = ppc_emb_timers_init(env, sysclk, PPC_INTERRUPT_DECR); |
100 | 2c50e26e | Edgar E. Iglesias | tb_clk->opaque = env; |
101 | 2c50e26e | Edgar E. Iglesias | |
102 | 2c50e26e | Edgar E. Iglesias | ppc_dcr_init(env, NULL, NULL); |
103 | 2c50e26e | Edgar E. Iglesias | |
104 | 2c50e26e | Edgar E. Iglesias | /* interrupt controller */
|
105 | 7267c094 | Anthony Liguori | irqs = g_malloc0(sizeof(qemu_irq) * PPCUIC_OUTPUT_NB);
|
106 | 2c50e26e | Edgar E. Iglesias | irqs[PPCUIC_OUTPUT_INT] = ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT_INT]; |
107 | 2c50e26e | Edgar E. Iglesias | irqs[PPCUIC_OUTPUT_CINT] = ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT_CINT]; |
108 | 49a2942d | Blue Swirl | ppcuic_init(env, irqs, 0x0C0, 0, 1); |
109 | 2c50e26e | Edgar E. Iglesias | return env;
|
110 | 2c50e26e | Edgar E. Iglesias | } |
111 | 2c50e26e | Edgar E. Iglesias | |
112 | 2c50e26e | Edgar E. Iglesias | static void main_cpu_reset(void *opaque) |
113 | 2c50e26e | Edgar E. Iglesias | { |
114 | 2c50e26e | Edgar E. Iglesias | CPUState *env = opaque; |
115 | 2c50e26e | Edgar E. Iglesias | struct boot_info *bi = env->load_info;
|
116 | 2c50e26e | Edgar E. Iglesias | |
117 | 2c50e26e | Edgar E. Iglesias | cpu_reset(env); |
118 | 2c50e26e | Edgar E. Iglesias | /* Linux Kernel Parameters (passing device tree):
|
119 | 2c50e26e | Edgar E. Iglesias | * r3: pointer to the fdt
|
120 | 2c50e26e | Edgar E. Iglesias | * r4: 0
|
121 | 2c50e26e | Edgar E. Iglesias | * r5: 0
|
122 | 2c50e26e | Edgar E. Iglesias | * r6: epapr magic
|
123 | 2c50e26e | Edgar E. Iglesias | * r7: size of IMA in bytes
|
124 | 2c50e26e | Edgar E. Iglesias | * r8: 0
|
125 | 2c50e26e | Edgar E. Iglesias | * r9: 0
|
126 | 2c50e26e | Edgar E. Iglesias | */
|
127 | 2c50e26e | Edgar E. Iglesias | env->gpr[1] = (16<<20) - 8; |
128 | 2c50e26e | Edgar E. Iglesias | /* Provide a device-tree. */
|
129 | 2c50e26e | Edgar E. Iglesias | env->gpr[3] = bi->fdt;
|
130 | 2c50e26e | Edgar E. Iglesias | env->nip = bi->bootstrap_pc; |
131 | 2c50e26e | Edgar E. Iglesias | |
132 | 2c50e26e | Edgar E. Iglesias | /* Create a mapping for the kernel. */
|
133 | 2c50e26e | Edgar E. Iglesias | mmubooke_create_initial_mapping(env, 0, 0); |
134 | 2c50e26e | Edgar E. Iglesias | env->gpr[6] = tswap32(EPAPR_MAGIC);
|
135 | 2c50e26e | Edgar E. Iglesias | env->gpr[7] = bi->ima_size;
|
136 | 2c50e26e | Edgar E. Iglesias | } |
137 | 2c50e26e | Edgar E. Iglesias | |
138 | 2c50e26e | Edgar E. Iglesias | #define BINARY_DEVICE_TREE_FILE "virtex-ml507.dtb" |
139 | 2c50e26e | Edgar E. Iglesias | static int xilinx_load_device_tree(target_phys_addr_t addr, |
140 | 2c50e26e | Edgar E. Iglesias | uint32_t ramsize, |
141 | 2c50e26e | Edgar E. Iglesias | target_phys_addr_t initrd_base, |
142 | 2c50e26e | Edgar E. Iglesias | target_phys_addr_t initrd_size, |
143 | 2c50e26e | Edgar E. Iglesias | const char *kernel_cmdline) |
144 | 2c50e26e | Edgar E. Iglesias | { |
145 | 2c50e26e | Edgar E. Iglesias | char *path;
|
146 | 2c50e26e | Edgar E. Iglesias | int fdt_size;
|
147 | 2c50e26e | Edgar E. Iglesias | #ifdef CONFIG_FDT
|
148 | 2c50e26e | Edgar E. Iglesias | void *fdt;
|
149 | 2c50e26e | Edgar E. Iglesias | int r;
|
150 | 2c50e26e | Edgar E. Iglesias | |
151 | 2c50e26e | Edgar E. Iglesias | /* Try the local "ppc.dtb" override. */
|
152 | 2c50e26e | Edgar E. Iglesias | fdt = load_device_tree("ppc.dtb", &fdt_size);
|
153 | 2c50e26e | Edgar E. Iglesias | if (!fdt) {
|
154 | 2c50e26e | Edgar E. Iglesias | path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE); |
155 | 2c50e26e | Edgar E. Iglesias | if (path) {
|
156 | 2c50e26e | Edgar E. Iglesias | fdt = load_device_tree(path, &fdt_size); |
157 | 7267c094 | Anthony Liguori | g_free(path); |
158 | 2c50e26e | Edgar E. Iglesias | } |
159 | 3b2e3dc9 | Edgar E. Iglesias | if (!fdt) {
|
160 | 2c50e26e | Edgar E. Iglesias | return 0; |
161 | 3b2e3dc9 | Edgar E. Iglesias | } |
162 | 2c50e26e | Edgar E. Iglesias | } |
163 | 2c50e26e | Edgar E. Iglesias | |
164 | 2c50e26e | Edgar E. Iglesias | r = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs", kernel_cmdline); |
165 | 2c50e26e | Edgar E. Iglesias | if (r < 0) |
166 | 2c50e26e | Edgar E. Iglesias | fprintf(stderr, "couldn't set /chosen/bootargs\n");
|
167 | 2c50e26e | Edgar E. Iglesias | cpu_physical_memory_write (addr, (void *)fdt, fdt_size);
|
168 | 2c50e26e | Edgar E. Iglesias | #else
|
169 | 2c50e26e | Edgar E. Iglesias | /* We lack libfdt so we cannot manipulate the fdt. Just pass on the blob
|
170 | 2c50e26e | Edgar E. Iglesias | to the kernel. */
|
171 | 2c50e26e | Edgar E. Iglesias | fdt_size = load_image_targphys("ppc.dtb", addr, 0x10000); |
172 | 2c50e26e | Edgar E. Iglesias | if (fdt_size < 0) { |
173 | 2c50e26e | Edgar E. Iglesias | path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE); |
174 | 2c50e26e | Edgar E. Iglesias | if (path) {
|
175 | 2c50e26e | Edgar E. Iglesias | fdt_size = load_image_targphys(path, addr, 0x10000);
|
176 | 7267c094 | Anthony Liguori | g_free(path); |
177 | 2c50e26e | Edgar E. Iglesias | } |
178 | 2c50e26e | Edgar E. Iglesias | } |
179 | 2c50e26e | Edgar E. Iglesias | |
180 | 2c50e26e | Edgar E. Iglesias | if (kernel_cmdline) {
|
181 | 2c50e26e | Edgar E. Iglesias | fprintf(stderr, |
182 | 2c50e26e | Edgar E. Iglesias | "Warning: missing libfdt, cannot pass cmdline to kernel!\n");
|
183 | 2c50e26e | Edgar E. Iglesias | } |
184 | 2c50e26e | Edgar E. Iglesias | #endif
|
185 | 2c50e26e | Edgar E. Iglesias | return fdt_size;
|
186 | 2c50e26e | Edgar E. Iglesias | } |
187 | 2c50e26e | Edgar E. Iglesias | |
188 | 2c50e26e | Edgar E. Iglesias | static void virtex_init(ram_addr_t ram_size, |
189 | 2c50e26e | Edgar E. Iglesias | const char *boot_device, |
190 | 2c50e26e | Edgar E. Iglesias | const char *kernel_filename, |
191 | 2c50e26e | Edgar E. Iglesias | const char *kernel_cmdline, |
192 | 2c50e26e | Edgar E. Iglesias | const char *initrd_filename, const char *cpu_model) |
193 | 2c50e26e | Edgar E. Iglesias | { |
194 | 2c50e26e | Edgar E. Iglesias | DeviceState *dev; |
195 | 2c50e26e | Edgar E. Iglesias | CPUState *env; |
196 | 2c50e26e | Edgar E. Iglesias | target_phys_addr_t ram_base = 0;
|
197 | 2c50e26e | Edgar E. Iglesias | DriveInfo *dinfo; |
198 | 2c50e26e | Edgar E. Iglesias | ram_addr_t phys_ram; |
199 | 01e0451a | Anthony Liguori | ram_addr_t phys_flash; |
200 | 2c50e26e | Edgar E. Iglesias | qemu_irq irq[32], *cpu_irq;
|
201 | 2c50e26e | Edgar E. Iglesias | clk_setup_t clk_setup[7];
|
202 | 2c50e26e | Edgar E. Iglesias | int kernel_size;
|
203 | 2c50e26e | Edgar E. Iglesias | int i;
|
204 | 2c50e26e | Edgar E. Iglesias | |
205 | 2c50e26e | Edgar E. Iglesias | /* init CPUs */
|
206 | 2c50e26e | Edgar E. Iglesias | if (cpu_model == NULL) { |
207 | 2c50e26e | Edgar E. Iglesias | cpu_model = "440-Xilinx";
|
208 | 2c50e26e | Edgar E. Iglesias | } |
209 | 2c50e26e | Edgar E. Iglesias | |
210 | 2c50e26e | Edgar E. Iglesias | memset(clk_setup, 0, sizeof(clk_setup)); |
211 | 2c50e26e | Edgar E. Iglesias | env = ppc440_init_xilinx(&ram_size, 1, cpu_model, &clk_setup[0], |
212 | 2c50e26e | Edgar E. Iglesias | &clk_setup[1], 400000000); |
213 | 2c50e26e | Edgar E. Iglesias | qemu_register_reset(main_cpu_reset, env); |
214 | 2c50e26e | Edgar E. Iglesias | |
215 | 2c50e26e | Edgar E. Iglesias | phys_ram = qemu_ram_alloc(NULL, "ram", ram_size); |
216 | 2c50e26e | Edgar E. Iglesias | cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM); |
217 | 2c50e26e | Edgar E. Iglesias | |
218 | 01e0451a | Anthony Liguori | phys_flash = qemu_ram_alloc(NULL, "virtex.flash", FLASH_SIZE); |
219 | 2c50e26e | Edgar E. Iglesias | dinfo = drive_get(IF_PFLASH, 0, 0); |
220 | 2c50e26e | Edgar E. Iglesias | pflash_cfi01_register(0xfc000000, phys_flash,
|
221 | 2c50e26e | Edgar E. Iglesias | dinfo ? dinfo->bdrv : NULL, (64 * 1024), |
222 | 2c50e26e | Edgar E. Iglesias | FLASH_SIZE >> 16,
|
223 | 01e0451a | Anthony Liguori | 1, 0x89, 0x18, 0x0000, 0x0, 1); |
224 | 2c50e26e | Edgar E. Iglesias | |
225 | 2c50e26e | Edgar E. Iglesias | cpu_irq = (qemu_irq *) &env->irq_inputs[PPC40x_INPUT_INT]; |
226 | 2c50e26e | Edgar E. Iglesias | dev = xilinx_intc_create(0x81800000, cpu_irq[0], 0); |
227 | 2c50e26e | Edgar E. Iglesias | for (i = 0; i < 32; i++) { |
228 | 2c50e26e | Edgar E. Iglesias | irq[i] = qdev_get_gpio_in(dev, i); |
229 | 2c50e26e | Edgar E. Iglesias | } |
230 | 2c50e26e | Edgar E. Iglesias | |
231 | 2c50e26e | Edgar E. Iglesias | serial_mm_init(0x83e01003ULL, 2, irq[9], 115200, serial_hds[0], 1, 0); |
232 | 2c50e26e | Edgar E. Iglesias | |
233 | 2c50e26e | Edgar E. Iglesias | /* 2 timers at irq 2 @ 62 Mhz. */
|
234 | 2c50e26e | Edgar E. Iglesias | xilinx_timer_create(0x83c00000, irq[3], 2, 62 * 1000000); |
235 | 2c50e26e | Edgar E. Iglesias | |
236 | 2c50e26e | Edgar E. Iglesias | if (kernel_filename) {
|
237 | 2c50e26e | Edgar E. Iglesias | uint64_t entry, low, high; |
238 | 2c50e26e | Edgar E. Iglesias | target_phys_addr_t boot_offset; |
239 | 2c50e26e | Edgar E. Iglesias | |
240 | 2c50e26e | Edgar E. Iglesias | /* Boots a kernel elf binary. */
|
241 | 2c50e26e | Edgar E. Iglesias | kernel_size = load_elf(kernel_filename, NULL, NULL, |
242 | 2c50e26e | Edgar E. Iglesias | &entry, &low, &high, 1, ELF_MACHINE, 0); |
243 | 2c50e26e | Edgar E. Iglesias | boot_info.bootstrap_pc = entry & 0x00ffffff;
|
244 | 2c50e26e | Edgar E. Iglesias | |
245 | 2c50e26e | Edgar E. Iglesias | if (kernel_size < 0) { |
246 | 2c50e26e | Edgar E. Iglesias | boot_offset = 0x1200000;
|
247 | 2c50e26e | Edgar E. Iglesias | /* If we failed loading ELF's try a raw image. */
|
248 | 2c50e26e | Edgar E. Iglesias | kernel_size = load_image_targphys(kernel_filename, |
249 | 2c50e26e | Edgar E. Iglesias | boot_offset, |
250 | 2c50e26e | Edgar E. Iglesias | ram_size); |
251 | 2c50e26e | Edgar E. Iglesias | boot_info.bootstrap_pc = boot_offset; |
252 | 2c50e26e | Edgar E. Iglesias | high = boot_info.bootstrap_pc + kernel_size + 8192;
|
253 | 2c50e26e | Edgar E. Iglesias | } |
254 | 2c50e26e | Edgar E. Iglesias | |
255 | 2c50e26e | Edgar E. Iglesias | boot_info.ima_size = kernel_size; |
256 | 2c50e26e | Edgar E. Iglesias | |
257 | 2c50e26e | Edgar E. Iglesias | /* Provide a device-tree. */
|
258 | 2c50e26e | Edgar E. Iglesias | boot_info.fdt = high + (8192 * 2); |
259 | 2c50e26e | Edgar E. Iglesias | boot_info.fdt &= ~8191;
|
260 | 2c50e26e | Edgar E. Iglesias | xilinx_load_device_tree(boot_info.fdt, ram_size, 0, 0, kernel_cmdline); |
261 | 2c50e26e | Edgar E. Iglesias | } |
262 | 2c50e26e | Edgar E. Iglesias | env->load_info = &boot_info; |
263 | 2c50e26e | Edgar E. Iglesias | } |
264 | 2c50e26e | Edgar E. Iglesias | |
265 | 2c50e26e | Edgar E. Iglesias | static QEMUMachine virtex_machine = {
|
266 | 2c50e26e | Edgar E. Iglesias | .name = "virtex-ml507",
|
267 | 2c50e26e | Edgar E. Iglesias | .desc = "Xilinx Virtex ML507 reference design",
|
268 | 2c50e26e | Edgar E. Iglesias | .init = virtex_init, |
269 | 2c50e26e | Edgar E. Iglesias | }; |
270 | 2c50e26e | Edgar E. Iglesias | |
271 | 2c50e26e | Edgar E. Iglesias | static void virtex_machine_init(void) |
272 | 2c50e26e | Edgar E. Iglesias | { |
273 | 2c50e26e | Edgar E. Iglesias | qemu_register_machine(&virtex_machine); |
274 | 2c50e26e | Edgar E. Iglesias | } |
275 | 2c50e26e | Edgar E. Iglesias | |
276 | 2c50e26e | Edgar E. Iglesias | machine_init(virtex_machine_init); |