diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch new file mode 100644 index 0000000000..6f45788183 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-0.13.0/qemu-ppc-hack.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | Quick fixes to get the ppc system model to boot a 603e based | ||
2 | kernel. | ||
3 | |||
4 | Index: qemu-0.13.0/hw/m48t59.c | ||
5 | =================================================================== | ||
6 | --- qemu-0.13.0.orig/hw/m48t59.c 2010-10-16 04:56:09.000000000 +0800 | ||
7 | +++ qemu-0.13.0/hw/m48t59.c 2011-01-17 16:40:09.000000000 +0800 | ||
8 | @@ -50,6 +50,7 @@ | ||
9 | */ | ||
10 | |||
11 | struct M48t59State { | ||
12 | + SysBusDevice busdev; | ||
13 | /* Model parameters */ | ||
14 | uint32_t type; // 2 = m48t02, 8 = m48t08, 59 = m48t59 | ||
15 | /* Hardware parameters */ | ||
16 | @@ -74,11 +75,6 @@ | ||
17 | M48t59State state; | ||
18 | } M48t59ISAState; | ||
19 | |||
20 | -typedef struct M48t59SysBusState { | ||
21 | - SysBusDevice busdev; | ||
22 | - M48t59State state; | ||
23 | -} M48t59SysBusState; | ||
24 | - | ||
25 | /* Fake timer functions */ | ||
26 | |||
27 | /* Alarm management */ | ||
28 | @@ -629,8 +625,7 @@ | ||
29 | |||
30 | static void m48t59_reset_sysbus(DeviceState *d) | ||
31 | { | ||
32 | - M48t59SysBusState *sys = container_of(d, M48t59SysBusState, busdev.qdev); | ||
33 | - M48t59State *NVRAM = &sys->state; | ||
34 | + M48t59State *NVRAM = container_of(d, M48t59State, busdev.qdev); | ||
35 | |||
36 | m48t59_reset_common(NVRAM); | ||
37 | } | ||
38 | @@ -641,7 +636,7 @@ | ||
39 | { | ||
40 | DeviceState *dev; | ||
41 | SysBusDevice *s; | ||
42 | - M48t59SysBusState *d; | ||
43 | + M48t59State *d; | ||
44 | |||
45 | dev = qdev_create(NULL, "m48t59"); | ||
46 | qdev_prop_set_uint32(dev, "type", type); | ||
47 | @@ -658,9 +653,9 @@ | ||
48 | sysbus_mmio_map(s, 0, mem_base); | ||
49 | } | ||
50 | |||
51 | - d = FROM_SYSBUS(M48t59SysBusState, s); | ||
52 | + d = FROM_SYSBUS(M48t59State, s); | ||
53 | |||
54 | - return &d->state; | ||
55 | + return d; | ||
56 | } | ||
57 | |||
58 | M48t59State *m48t59_init_isa(uint32_t io_base, uint16_t size, int type) | ||
59 | @@ -710,8 +705,7 @@ | ||
60 | |||
61 | static int m48t59_init1(SysBusDevice *dev) | ||
62 | { | ||
63 | - M48t59SysBusState *d = FROM_SYSBUS(M48t59SysBusState, dev); | ||
64 | - M48t59State *s = &d->state; | ||
65 | + M48t59State *s = FROM_SYSBUS(M48t59State, dev); | ||
66 | int mem_index; | ||
67 | |||
68 | sysbus_init_irq(dev, &s->IRQ); | ||
69 | @@ -740,12 +734,12 @@ | ||
70 | static SysBusDeviceInfo m48t59_info = { | ||
71 | .init = m48t59_init1, | ||
72 | .qdev.name = "m48t59", | ||
73 | - .qdev.size = sizeof(M48t59SysBusState), | ||
74 | + .qdev.size = sizeof(M48t59State), | ||
75 | .qdev.reset = m48t59_reset_sysbus, | ||
76 | .qdev.props = (Property[]) { | ||
77 | - DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1), | ||
78 | - DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1), | ||
79 | - DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0), | ||
80 | + DEFINE_PROP_UINT32("size", M48t59State, size, -1), | ||
81 | + DEFINE_PROP_UINT32("type", M48t59State, type, -1), | ||
82 | + DEFINE_PROP_HEX32( "io_base", M48t59State, io_base, 0), | ||
83 | DEFINE_PROP_END_OF_LIST(), | ||
84 | } | ||
85 | }; | ||
86 | Index: qemu-0.13.0/hw/ppc_prep.c | ||
87 | =================================================================== | ||
88 | --- qemu-0.13.0.orig/hw/ppc_prep.c 2010-10-16 04:56:09.000000000 +0800 | ||
89 | +++ qemu-0.13.0/hw/ppc_prep.c 2011-01-15 18:29:25.000000000 +0800 | ||
90 | @@ -74,7 +74,7 @@ | ||
91 | /* Constants for devices init */ | ||
92 | static const int ide_iobase[2] = { 0x1f0, 0x170 }; | ||
93 | static const int ide_iobase2[2] = { 0x3f6, 0x376 }; | ||
94 | -static const int ide_irq[2] = { 13, 13 }; | ||
95 | +static const int ide_irq[2] = { 13, 14 }; | ||
96 | |||
97 | #define NE2000_NB_MAX 6 | ||
98 | |||
99 | @@ -631,9 +631,6 @@ | ||
100 | if (filename) { | ||
101 | qemu_free(filename); | ||
102 | } | ||
103 | - if (env->nip < 0xFFF80000 && bios_size < 0x00100000) { | ||
104 | - hw_error("PowerPC 601 / 620 / 970 need a 1MB BIOS\n"); | ||
105 | - } | ||
106 | |||
107 | if (linux_boot) { | ||
108 | kernel_base = KERNEL_LOAD_ADDR; | ||