mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
riscv/sifive_u: Add a serial property to the sifive_u SoC
At present the board serial number is hard-coded to 1, and passed to OTP model during initialization. Firmware (FSBL, U-Boot) uses the serial number to generate a unique MAC address for the on-chip ethernet controller. When multiple QEMU 'sifive_u' instances are created and connected to the same subnet, they all have the same MAC address hence it creates a unusable network. A new "serial" property is introduced to the sifive_u SoC to specify the board serial number. When not given, the default serial number 1 is used. Suggested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
523e346467
commit
fda5b000fa
2 changed files with 9 additions and 1 deletions
|
@ -42,6 +42,8 @@ typedef struct SiFiveUSoCState {
|
|||
SiFiveUPRCIState prci;
|
||||
SiFiveUOTPState otp;
|
||||
CadenceGEMState gem;
|
||||
|
||||
uint32_t serial;
|
||||
} SiFiveUSoCState;
|
||||
|
||||
#define TYPE_RISCV_U_MACHINE MACHINE_TYPE_NAME("sifive_u")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue