~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to hw/an5206.c

  • Committer: Blue Swirl
  • Date: 2009-08-31 15:14:40 UTC
  • Revision ID: git-v1:528e93a9787ccfc59582a44035f5f342caf5b84f
Fix breakage due to __thread

Thread-local storage is not supported on all hosts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 */
8
8
 
9
9
#include "hw.h"
 
10
#include "pc.h"
10
11
#include "mcf.h"
11
12
#include "sysemu.h"
12
13
#include "boards.h"
16
17
#define AN5206_RAMBAR_ADDR 0x20000000
17
18
 
18
19
/* Stub functions for hardware that doesn't exist.  */
19
 
void pic_info(void)
20
 
{
21
 
}
22
 
 
23
 
void irq_info(void)
24
 
{
25
 
}
26
 
 
27
 
void DMA_run (void)
 
20
void pic_info(Monitor *mon)
 
21
{
 
22
}
 
23
 
 
24
void irq_info(Monitor *mon)
28
25
{
29
26
}
30
27
 
31
28
/* Board init.  */
32
29
 
33
 
static void an5206_init(ram_addr_t ram_size, int vga_ram_size,
34
 
                     const char *boot_device, DisplayState *ds,
 
30
static void an5206_init(ram_addr_t ram_size,
 
31
                     const char *boot_device,
35
32
                     const char *kernel_filename, const char *kernel_cmdline,
36
33
                     const char *initrd_filename, const char *cpu_model)
37
34
{
44
41
        cpu_model = "m5206";
45
42
    env = cpu_init(cpu_model);
46
43
    if (!env) {
47
 
        cpu_abort(env, "Unable to find m68k CPU definition\n");
 
44
        hw_error("Unable to find m68k CPU definition\n");
48
45
    }
49
46
 
50
47
    /* Initialize CPU registers.  */
72
69
    kernel_size = load_elf(kernel_filename, 0, &elf_entry, NULL, NULL);
73
70
    entry = elf_entry;
74
71
    if (kernel_size < 0) {
75
 
        kernel_size = load_uboot(kernel_filename, &entry, NULL);
 
72
        kernel_size = load_uimage(kernel_filename, &entry, NULL, NULL);
76
73
    }
77
74
    if (kernel_size < 0) {
78
 
        kernel_size = load_image(kernel_filename,
79
 
                                 phys_ram_base + KERNEL_LOAD_ADDR);
 
75
        kernel_size = load_image_targphys(kernel_filename, KERNEL_LOAD_ADDR,
 
76
                                          ram_size - KERNEL_LOAD_ADDR);
80
77
        entry = KERNEL_LOAD_ADDR;
81
78
    }
82
79
    if (kernel_size < 0) {
87
84
    env->pc = entry;
88
85
}
89
86
 
90
 
QEMUMachine an5206_machine = {
91
 
    "an5206",
92
 
    "Arnewsh 5206",
93
 
    an5206_init,
94
 
    512,
 
87
static QEMUMachine an5206_machine = {
 
88
    .name = "an5206",
 
89
    .desc = "Arnewsh 5206",
 
90
    .init = an5206_init,
95
91
};
 
92
 
 
93
static void an5206_machine_init(void)
 
94
{
 
95
    qemu_register_machine(&an5206_machine);
 
96
}
 
97
 
 
98
machine_init(an5206_machine_init);