Statistics
| Branch: | Revision:

root / hw / ppc405.h @ 8af7a3ab

History | View | Annotate | Download (2.8 kB)

1 04f20795 j_mayer
/*
2 04f20795 j_mayer
 * QEMU PowerPC 405 shared definitions
3 5fafdf24 ths
 *
4 04f20795 j_mayer
 * Copyright (c) 2007 Jocelyn Mayer
5 5fafdf24 ths
 *
6 04f20795 j_mayer
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 04f20795 j_mayer
 * of this software and associated documentation files (the "Software"), to deal
8 04f20795 j_mayer
 * in the Software without restriction, including without limitation the rights
9 04f20795 j_mayer
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 04f20795 j_mayer
 * copies of the Software, and to permit persons to whom the Software is
11 04f20795 j_mayer
 * furnished to do so, subject to the following conditions:
12 04f20795 j_mayer
 *
13 04f20795 j_mayer
 * The above copyright notice and this permission notice shall be included in
14 04f20795 j_mayer
 * all copies or substantial portions of the Software.
15 04f20795 j_mayer
 *
16 04f20795 j_mayer
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 04f20795 j_mayer
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 04f20795 j_mayer
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 04f20795 j_mayer
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 04f20795 j_mayer
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 04f20795 j_mayer
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 04f20795 j_mayer
 * THE SOFTWARE.
23 04f20795 j_mayer
 */
24 04f20795 j_mayer
25 04f20795 j_mayer
#if !defined(PPC_405_H)
26 04f20795 j_mayer
#define PPC_405_H
27 04f20795 j_mayer
28 008ff9d7 j_mayer
#include "ppc4xx.h"
29 008ff9d7 j_mayer
30 04f20795 j_mayer
/* Bootinfo as set-up by u-boot */
31 c227f099 Anthony Liguori
typedef struct ppc4xx_bd_info_t ppc4xx_bd_info_t;
32 c227f099 Anthony Liguori
struct ppc4xx_bd_info_t {
33 04f20795 j_mayer
    uint32_t bi_memstart;
34 04f20795 j_mayer
    uint32_t bi_memsize;
35 04f20795 j_mayer
    uint32_t bi_flashstart;
36 04f20795 j_mayer
    uint32_t bi_flashsize;
37 04f20795 j_mayer
    uint32_t bi_flashoffset; /* 0x10 */
38 04f20795 j_mayer
    uint32_t bi_sramstart;
39 04f20795 j_mayer
    uint32_t bi_sramsize;
40 04f20795 j_mayer
    uint32_t bi_bootflags;
41 04f20795 j_mayer
    uint32_t bi_ipaddr; /* 0x20 */
42 04f20795 j_mayer
    uint8_t  bi_enetaddr[6];
43 04f20795 j_mayer
    uint16_t bi_ethspeed;
44 04f20795 j_mayer
    uint32_t bi_intfreq;
45 04f20795 j_mayer
    uint32_t bi_busfreq; /* 0x30 */
46 04f20795 j_mayer
    uint32_t bi_baudrate;
47 04f20795 j_mayer
    uint8_t  bi_s_version[4];
48 04f20795 j_mayer
    uint8_t  bi_r_version[32];
49 04f20795 j_mayer
    uint32_t bi_procfreq;
50 04f20795 j_mayer
    uint32_t bi_plb_busfreq;
51 04f20795 j_mayer
    uint32_t bi_pci_busfreq;
52 04f20795 j_mayer
    uint8_t  bi_pci_enetaddr[6];
53 04f20795 j_mayer
    uint32_t bi_pci_enetaddr2[6];
54 04f20795 j_mayer
    uint32_t bi_opbfreq;
55 04f20795 j_mayer
    uint32_t bi_iic_fast[2];
56 04f20795 j_mayer
};
57 04f20795 j_mayer
58 04f20795 j_mayer
/* PowerPC 405 core */
59 c227f099 Anthony Liguori
ram_addr_t ppc405_set_bootinfo (CPUState *env, ppc4xx_bd_info_t *bd,
60 b8d3f5d1 j_mayer
                                uint32_t flags);
61 04f20795 j_mayer
62 c227f099 Anthony Liguori
CPUState *ppc405cr_init (target_phys_addr_t ram_bases[4],
63 c227f099 Anthony Liguori
                         target_phys_addr_t ram_sizes[4],
64 04f20795 j_mayer
                         uint32_t sysclk, qemu_irq **picp,
65 5c130f65 pbrook
                         int do_init);
66 c227f099 Anthony Liguori
CPUState *ppc405ep_init (target_phys_addr_t ram_bases[2],
67 c227f099 Anthony Liguori
                         target_phys_addr_t ram_sizes[2],
68 04f20795 j_mayer
                         uint32_t sysclk, qemu_irq **picp,
69 5c130f65 pbrook
                         int do_init);
70 04f20795 j_mayer
/* IBM STBxxx microcontrollers */
71 c227f099 Anthony Liguori
CPUState *ppc_stb025_init (target_phys_addr_t ram_bases[2],
72 c227f099 Anthony Liguori
                           target_phys_addr_t ram_sizes[2],
73 04f20795 j_mayer
                           uint32_t sysclk, qemu_irq **picp,
74 c227f099 Anthony Liguori
                           ram_addr_t *offsetp);
75 04f20795 j_mayer
76 04f20795 j_mayer
#endif /* !defined(PPC_405_H) */