2 * QEMU PowerPC 4xx emulation shared definitions
4 * Copyright (c) 2007 Jocelyn Mayer
6 * 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:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
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
28 #include "hw/ppc/ppc.h"
29 #include "exec/memory.h"
30 #include "hw/sysbus.h"
34 MemoryRegion container
; /* used for clipping */
40 void ppc4xx_sdram_enable(CPUPPCState
*env
);
42 void ppc4xx_sdram_banks(MemoryRegion
*ram
, int nr_banks
,
43 Ppc4xxSdramBank ram_banks
[],
44 const ram_addr_t sdram_bank_sizes
[]);
46 void ppc4xx_sdram_init(CPUPPCState
*env
, qemu_irq irq
, int nbanks
,
47 Ppc4xxSdramBank
*ram_banks
);
49 #define TYPE_PPC4xx_PCI_HOST_BRIDGE "ppc4xx-pcihost"
54 #define TYPE_PPC4xx_DCR_DEVICE "ppc4xx-dcr-device"
55 OBJECT_DECLARE_SIMPLE_TYPE(Ppc4xxDcrDeviceState
, PPC4xx_DCR_DEVICE
);
56 struct Ppc4xxDcrDeviceState
{
57 SysBusDevice parent_obj
;
62 void ppc4xx_dcr_register(Ppc4xxDcrDeviceState
*dev
, int dcrn
, void *opaque
,
63 dcr_read_cb dcr_read
, dcr_write_cb dcr_write
);
64 bool ppc4xx_dcr_realize(Ppc4xxDcrDeviceState
*dev
, PowerPCCPU
*cpu
,
67 /* Memory Access Layer (MAL) */
68 #define TYPE_PPC4xx_MAL "ppc4xx-mal"
69 OBJECT_DECLARE_SIMPLE_TYPE(Ppc4xxMalState
, PPC4xx_MAL
);
70 struct Ppc4xxMalState
{
71 Ppc4xxDcrDeviceState parent_obj
;
92 /* Peripheral local bus arbitrer */
93 #define TYPE_PPC4xx_PLB "ppc4xx-plb"
94 OBJECT_DECLARE_SIMPLE_TYPE(Ppc4xxPlbState
, PPC4xx_PLB
);
95 struct Ppc4xxPlbState
{
96 Ppc4xxDcrDeviceState parent_obj
;
103 /* Peripheral controller */
104 #define TYPE_PPC4xx_EBC "ppc4xx-ebc"
105 OBJECT_DECLARE_SIMPLE_TYPE(Ppc4xxEbcState
, PPC4xx_EBC
);
106 struct Ppc4xxEbcState
{
107 Ppc4xxDcrDeviceState parent_obj
;
118 #endif /* PPC4XX_H */