blob: e042a05b3b5fe3c945e112ce0b743120d57dccf6 [file] [log] [blame]
j_mayer04f20792007-04-17 02:50:56 +00001/*
2 * QEMU PowerPC 405 shared definitions
ths5fafdf22007-09-16 21:08:06 +00003 *
j_mayer04f20792007-04-17 02:50:56 +00004 * Copyright (c) 2007 Jocelyn Mayer
ths5fafdf22007-09-16 21:08:06 +00005 *
j_mayer04f20792007-04-17 02:50:56 +00006 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25#if !defined(PPC_405_H)
26#define PPC_405_H
27
j_mayer008ff9d2007-10-07 14:21:26 +000028#include "ppc4xx.h"
29
j_mayer04f20792007-04-17 02:50:56 +000030/* Bootinfo as set-up by u-boot */
Anthony Liguoric227f092009-10-01 16:12:16 -050031typedef struct ppc4xx_bd_info_t ppc4xx_bd_info_t;
32struct ppc4xx_bd_info_t {
j_mayer04f20792007-04-17 02:50:56 +000033 uint32_t bi_memstart;
34 uint32_t bi_memsize;
35 uint32_t bi_flashstart;
36 uint32_t bi_flashsize;
37 uint32_t bi_flashoffset; /* 0x10 */
38 uint32_t bi_sramstart;
39 uint32_t bi_sramsize;
40 uint32_t bi_bootflags;
41 uint32_t bi_ipaddr; /* 0x20 */
42 uint8_t bi_enetaddr[6];
43 uint16_t bi_ethspeed;
44 uint32_t bi_intfreq;
45 uint32_t bi_busfreq; /* 0x30 */
46 uint32_t bi_baudrate;
47 uint8_t bi_s_version[4];
48 uint8_t bi_r_version[32];
49 uint32_t bi_procfreq;
50 uint32_t bi_plb_busfreq;
51 uint32_t bi_pci_busfreq;
52 uint8_t bi_pci_enetaddr[6];
53 uint32_t bi_pci_enetaddr2[6];
54 uint32_t bi_opbfreq;
55 uint32_t bi_iic_fast[2];
56};
57
58/* PowerPC 405 core */
Anthony Liguoric227f092009-10-01 16:12:16 -050059ram_addr_t ppc405_set_bootinfo (CPUState *env, ppc4xx_bd_info_t *bd,
j_mayerb8d3f5d2007-09-26 23:55:31 +000060 uint32_t flags);
j_mayer04f20792007-04-17 02:50:56 +000061
Anthony Liguoric227f092009-10-01 16:12:16 -050062CPUState *ppc405cr_init (target_phys_addr_t ram_bases[4],
63 target_phys_addr_t ram_sizes[4],
j_mayer04f20792007-04-17 02:50:56 +000064 uint32_t sysclk, qemu_irq **picp,
pbrook5c130f62009-04-10 14:29:45 +000065 int do_init);
Anthony Liguoric227f092009-10-01 16:12:16 -050066CPUState *ppc405ep_init (target_phys_addr_t ram_bases[2],
67 target_phys_addr_t ram_sizes[2],
j_mayer04f20792007-04-17 02:50:56 +000068 uint32_t sysclk, qemu_irq **picp,
pbrook5c130f62009-04-10 14:29:45 +000069 int do_init);
j_mayer04f20792007-04-17 02:50:56 +000070/* IBM STBxxx microcontrollers */
Anthony Liguoric227f092009-10-01 16:12:16 -050071CPUState *ppc_stb025_init (target_phys_addr_t ram_bases[2],
72 target_phys_addr_t ram_sizes[2],
j_mayer04f20792007-04-17 02:50:56 +000073 uint32_t sysclk, qemu_irq **picp,
Anthony Liguoric227f092009-10-01 16:12:16 -050074 ram_addr_t *offsetp);
j_mayer04f20792007-04-17 02:50:56 +000075
76#endif /* !defined(PPC_405_H) */