2019-06-04 21:16:15 +03:00
|
|
|
#ifndef HW_ARM_ALLWINNER_A10_H
|
|
|
|
#define HW_ARM_ALLWINNER_A10_H
|
2013-12-17 23:42:38 +04:00
|
|
|
|
|
|
|
#include "qemu/error-report.h"
|
|
|
|
#include "hw/char/serial.h"
|
2019-05-23 16:47:43 +03:00
|
|
|
#include "hw/arm/boot.h"
|
2013-12-17 23:42:38 +04:00
|
|
|
#include "hw/timer/allwinner-a10-pit.h"
|
|
|
|
#include "hw/intc/allwinner-a10-pic.h"
|
2014-01-31 02:02:07 +04:00
|
|
|
#include "hw/net/allwinner_emac.h"
|
2015-11-06 22:09:01 +03:00
|
|
|
#include "hw/ide/ahci.h"
|
2013-12-17 23:42:38 +04:00
|
|
|
|
2019-08-12 08:23:31 +03:00
|
|
|
#include "target/arm/cpu.h"
|
2013-12-17 23:42:38 +04:00
|
|
|
|
|
|
|
|
|
|
|
#define AW_A10_PIC_REG_BASE 0x01c20400
|
|
|
|
#define AW_A10_PIT_REG_BASE 0x01c20c00
|
|
|
|
#define AW_A10_UART0_REG_BASE 0x01c28000
|
2014-01-31 02:02:07 +04:00
|
|
|
#define AW_A10_EMAC_BASE 0x01c0b000
|
2015-11-06 22:09:01 +03:00
|
|
|
#define AW_A10_SATA_BASE 0x01c18000
|
2013-12-17 23:42:38 +04:00
|
|
|
|
|
|
|
#define AW_A10_SDRAM_BASE 0x40000000
|
|
|
|
|
|
|
|
#define TYPE_AW_A10 "allwinner-a10"
|
|
|
|
#define AW_A10(obj) OBJECT_CHECK(AwA10State, (obj), TYPE_AW_A10)
|
|
|
|
|
|
|
|
typedef struct AwA10State {
|
|
|
|
/*< private >*/
|
|
|
|
DeviceState parent_obj;
|
|
|
|
/*< public >*/
|
|
|
|
|
|
|
|
ARMCPU cpu;
|
|
|
|
qemu_irq irq[AW_A10_PIC_INT_NR];
|
|
|
|
AwA10PITState timer;
|
|
|
|
AwA10PICState intc;
|
2014-01-31 02:02:07 +04:00
|
|
|
AwEmacState emac;
|
2015-11-06 22:09:01 +03:00
|
|
|
AllwinnerAHCIState sata;
|
hw/arm/allwinner-a10: Add the 'A' SRAM and the SRAM controller
From the "A10 User Manual V1.20" p.29: "3.2. Memory Mapping" and:
7. System Control
7.1. Overview
A10 embeds a high-speed SRAM which has been split into five segments.
See detailed memory mapping in following table:
Area Address Size (Bytes)
A1 0x00000000-0x00003FFF 16K
A2 0x00004000-0x00007FFF 16K
A3 0x00008000-0x0000B3FF 13K
A4 0x0000B400-0x0000BFFF 3K
Since for emulation purpose we don't need the segmentations, we simply define
the 'A' area as a single 48KB SRAM.
We don't implement the following others areas:
- 'B': 'Secure RAM' (64K),
- 'C': Debug/ISP SRAM
- 'D': USB SRAM
(qemu) info mtree
address-space: memory
0000000000000000-ffffffffffffffff (prio 0, i/o): system
0000000000000000-000000000000bfff (prio 0, ram): sram A
0000000001c00000-0000000001c00fff (prio -1000, i/o): a10-sram-ctrl
0000000001c0b000-0000000001c0bfff (prio 0, i/o): aw_emac
0000000001c18000-0000000001c18fff (prio 0, i/o): ahci
0000000001c18080-0000000001c180ff (prio 0, i/o): allwinner-ahci
0000000001c20400-0000000001c207ff (prio 0, i/o): allwinner-a10-pic
0000000001c20c00-0000000001c20fff (prio 0, i/o): allwinner-A10-timer
0000000001c28000-0000000001c2801f (prio 0, i/o): serial
0000000040000000-0000000047ffffff (prio 0, ram): cubieboard.ram
Reported-by: Charlie Smurthwaite <charlie@atech.media>
Tested-by: Charlie Smurthwaite <charlie@atech.media>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20190104142921.878-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-01-07 18:23:47 +03:00
|
|
|
MemoryRegion sram_a;
|
2013-12-17 23:42:38 +04:00
|
|
|
} AwA10State;
|
|
|
|
|
|
|
|
#endif
|