mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/riscv/sifive_u: Connect the Cadence GEM Ethernet device
Connect the Cadence GEM ethernet device. This also requires us to expose the plic interrupt lines. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
This commit is contained in:
parent
bde3ab9a9f
commit
5a7f76a3d4
4 changed files with 61 additions and 2 deletions
|
@ -19,6 +19,8 @@
|
|||
#ifndef HW_SIFIVE_U_H
|
||||
#define HW_SIFIVE_U_H
|
||||
|
||||
#include "hw/net/cadence_gem.h"
|
||||
|
||||
#define TYPE_RISCV_U_SOC "riscv.sifive.u.soc"
|
||||
#define RISCV_U_SOC(obj) \
|
||||
OBJECT_CHECK(SiFiveUSoCState, (obj), TYPE_RISCV_U_SOC)
|
||||
|
@ -30,6 +32,7 @@ typedef struct SiFiveUSoCState {
|
|||
/*< public >*/
|
||||
RISCVHartArrayState cpus;
|
||||
DeviceState *plic;
|
||||
CadenceGEMState gem;
|
||||
} SiFiveUSoCState;
|
||||
|
||||
typedef struct SiFiveUState {
|
||||
|
@ -49,12 +52,14 @@ enum {
|
|||
SIFIVE_U_PLIC,
|
||||
SIFIVE_U_UART0,
|
||||
SIFIVE_U_UART1,
|
||||
SIFIVE_U_DRAM
|
||||
SIFIVE_U_DRAM,
|
||||
SIFIVE_U_GEM
|
||||
};
|
||||
|
||||
enum {
|
||||
SIFIVE_U_UART0_IRQ = 3,
|
||||
SIFIVE_U_UART1_IRQ = 4
|
||||
SIFIVE_U_UART1_IRQ = 4,
|
||||
SIFIVE_U_GEM_IRQ = 0x35
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue