Add dummy Aspeed AST2600 Display Port MCU (DPMCU)
PATCH 1/1 Add dummy Aspeed AST2600 Display Port MCU (DPMCU)
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
--- hw/arm/aspeed_ast2600.c | 8 ++++++++ include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 10 insertions(+)
hw/arm/aspeed_ast2600.c +8 -0
@@ -19,9 +19,11 @@#include "sysemu/sysemu.h" #define ASPEED_SOC_IOMEM_SIZE 0x00200000 +#define ASPEED_SOC_DPMCU_SIZE 0x00040000static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_SRAM ] =0x10000000 , + [ASPEED_DEV_DPMCU ] =0x18000000 ,/* 0x16000000 0x17FFFFFF : AHB BUS do LPC Bus bridge */ [ASPEED_DEV_IOMEM ] =0x1E600000 , [ASPEED_DEV_PWM ] =0x1E610000 ,
@@ -44,6 +46,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_SCU] = 0x1E6E2000, [ASPEED_DEV_XDMA] = 0x1E6E7000, [ASPEED_DEV_ADC] = 0x1E6E9000, + [ASPEED_DEV_DP] = 0x1E6EB000, [ASPEED_DEV_VIDEO] = 0x1E700000, [ASPEED_DEV_SDHCI] = 0x1E740000, [ASPEED_DEV_EMMC] = 0x1E750000,
@@ -104,6 +107,7 @@ static const int aspeed_soc_ast2600_irqmap[] = { [ASPEED_DEV_ETH3] = 32, [ASPEED_DEV_ETH4] = 33, [ASPEED_DEV_KCS] = 138, /* 138 -> 142 */ + [ASPEED_DEV_DP] = 62, };static qemu_irq aspeed_soc_get_irq (AspeedSoCState *s,int ctrl)
@@ -298,6 +302,10 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (get_system_memory (), sc->memmap[ASPEED_DEV_SRAM ], &s->sram); +/* DPMCU */ +create_unimplemented_device ("aspeed.dpmcu" , sc->memmap[ASPEED_DEV_DPMCU ], +ASPEED_SOC_DPMCU_SIZE ); +/* SCU */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->scu), errp)) {return ;
include/hw/arm/aspeed_soc.h +2 -0
@@ -139,6 +139,8 @@ enum {ASPEED_DEV_EMMC ,ASPEED_DEV_KCS ,ASPEED_DEV_HACE , +ASPEED_DEV_DPMCU , + ASPEED_DEV_DP, };#endif /* ASPEED_SOC_H */
Signature · 1 line
2.25.1
Quoted 9 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
Signed-off-by Troy Lee <[email protected]>--- hw/arm/aspeed_ast2600.c | 8 ++++++++ include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 10 insertions(+)
Quoted 3 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
The Aspeed SoCs have an "aspeed_soc.io" region for unimplemented devices but it's too small. Anyhow, it is better to have per logic unit. We should change that one day.
For my information, which FW image are you using ?
Quoted 1 line
Signed-off-by Troy Lee <[email protected]>
Thanks,
C.
Quoted 62 lines
--- hw/arm/aspeed_ast2600.c | 8 ++++++++ include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 10 insertions(+)hw/arm/aspeed_ast2600.c +8
-0@@ -19,9 +19,11 @@#include "sysemu/sysemu.h" #define ASPEED_SOC_IOMEM_SIZE 0x00200000 +#define ASPEED_SOC_DPMCU_SIZE 0x00040000static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_SRAM ] =0x10000000 , + [ASPEED_DEV_DPMCU ] =0x18000000 ,/* 0x16000000 0x17FFFFFF : AHB BUS do LPC Bus bridge */ [ASPEED_DEV_IOMEM ] =0x1E600000 , [ASPEED_DEV_PWM ] =0x1E610000 ,@@ -44,6 +46,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_SCU] = 0x1E6E2000, [ASPEED_DEV_XDMA] = 0x1E6E7000, [ASPEED_DEV_ADC] = 0x1E6E9000, + [ASPEED_DEV_DP] = 0x1E6EB000, [ASPEED_DEV_VIDEO] = 0x1E700000, [ASPEED_DEV_SDHCI] = 0x1E740000, [ASPEED_DEV_EMMC] = 0x1E750000,@@ -104,6 +107,7 @@ static const int aspeed_soc_ast2600_irqmap[] = { [ASPEED_DEV_ETH3] = 32, [ASPEED_DEV_ETH4] = 33, [ASPEED_DEV_KCS] = 138, /* 138 -> 142 */ + [ASPEED_DEV_DP] = 62, };static qemu_irq aspeed_soc_get_irq (AspeedSoCState *s,int ctrl)@@ -298,6 +302,10 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (get_system_memory (), sc->memmap[ASPEED_DEV_SRAM ], &s->sram); +/* DPMCU */ +create_unimplemented_device ("aspeed.dpmcu" , sc->memmap[ASPEED_DEV_DPMCU ], +ASPEED_SOC_DPMCU_SIZE ); +/* SCU */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->scu), errp)) {return ;include/hw/arm/aspeed_soc.h +2
-0@@ -139,6 +139,8 @@ enum {ASPEED_DEV_EMMC ,ASPEED_DEV_KCS ,ASPEED_DEV_HACE , +ASPEED_DEV_DPMCU , + ASPEED_DEV_DP, };#endif /* ASPEED_SOC_H */
Quoted 10 lines · Cédric Le Goater
Quoted 3 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
The Aspeed SoCs have an "aspeed_soc.io" region for unimplemented devices but it's too small. Anyhow, it is better to have per logic unit. We should change that one day.
Good idea!
Quoted 2 lines
For my information, which FW image are you using ?
We're using Aspeed's SDK image, I tested with ast2600-default machine. Prebuilt image can be download from:
https://github.com/AspeedTech-BMC/openbmc/releases/tag/v07.02
Without declaring the DPMCU memory, the image will hangs in u-boot. We're still working on I3C and SPI issue to be resolved to get into rootfs.
Thanks for your review.
Troy Lee
Quoted 71 lines
Quoted 1 line
Signed-off-by Troy Lee <[email protected]>Reviewed-by Cédric Le Goater <[email protected]>Thanks,
C.
Quoted 62 lines
--- hw/arm/aspeed_ast2600.c | 8 ++++++++ include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 10 insertions(+)hw/arm/aspeed_ast2600.c +8
-0@@ -19,9 +19,11 @@#include "sysemu/sysemu.h" #define ASPEED_SOC_IOMEM_SIZE 0x00200000 +#define ASPEED_SOC_DPMCU_SIZE 0x00040000static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_SRAM ] =0x10000000 , + [ASPEED_DEV_DPMCU ] =0x18000000 ,/* 0x16000000 0x17FFFFFF : AHB BUS do LPC Bus bridge */ [ASPEED_DEV_IOMEM ] =0x1E600000 , [ASPEED_DEV_PWM ] =0x1E610000 ,@@ -44,6 +46,7 @@ static const hwaddr aspeed_soc_ast2600_memmap[] = { [ASPEED_DEV_SCU] = 0x1E6E2000, [ASPEED_DEV_XDMA] = 0x1E6E7000, [ASPEED_DEV_ADC] = 0x1E6E9000, + [ASPEED_DEV_DP] = 0x1E6EB000, [ASPEED_DEV_VIDEO] = 0x1E700000, [ASPEED_DEV_SDHCI] = 0x1E740000, [ASPEED_DEV_EMMC] = 0x1E750000,@@ -104,6 +107,7 @@ static const int aspeed_soc_ast2600_irqmap[] = { [ASPEED_DEV_ETH3] = 32, [ASPEED_DEV_ETH4] = 33, [ASPEED_DEV_KCS] = 138, /* 138 -> 142 */ + [ASPEED_DEV_DP] = 62, };static qemu_irq aspeed_soc_get_irq (AspeedSoCState *s,int ctrl)@@ -298,6 +302,10 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (get_system_memory (), sc->memmap[ASPEED_DEV_SRAM ], &s->sram); +/* DPMCU */ +create_unimplemented_device ("aspeed.dpmcu" , sc->memmap[ASPEED_DEV_DPMCU ], +ASPEED_SOC_DPMCU_SIZE ); +/* SCU */ if (!sysbus_realize (SYS_BUS_DEVICE (&s->scu), errp)) {return ;include/hw/arm/aspeed_soc.h +2
-0@@ -139,6 +139,8 @@ enum {ASPEED_DEV_EMMC ,ASPEED_DEV_KCS ,ASPEED_DEV_HACE , +ASPEED_DEV_DPMCU , + ASPEED_DEV_DP, };#endif /* ASPEED_SOC_H */
Quoted 11 lines · Troy Lee
Quoted 10 lines · Cédric Le Goater
Quoted 3 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
The Aspeed SoCs have an "aspeed_soc.io" region for unimplemented devices but it's too small. Anyhow, it is better to have per logic unit. We should change that one day.
Quoted 8 lines
Good idea!
Quoted 2 lines
For my information, which FW image are you using ?
We're using Aspeed's SDK image, I tested with ast2600-default machine. Prebuilt image can be download from:
https://github.com/AspeedTech-BMC/openbmc/releases/tag/v07.02
Excellent ! Is there one I could try in particular ?
Once correctly supported, we should include one of these SDK images in :
tests/avocado/boot_linux_console.py
to complete our tests of the device models.
QEMU is not making much difference between the revision. You might need to improve that.
Quoted 1 line
Without declaring the DPMCU memory, the image will hangs in u-boot.
yeah. You can use -d guest_errors,unimp to catch accesses done on AHB windows not covered by the QEMU models. There are plenty of ways to move past U-Boot when models are not implemented yet. Don't waste too much time, just ask.
eMMC is only on these branches :
https://github.com/openbmc/qemu/
https://github.com/legoater/qemu/
Same for SBC and support is primitive.
Quoted 1 line
We're still working on I3C and SPI issue to be resolved to get into rootfs.
I3C has not much support in Linux and none in QEMU. You will have to add dummy models.
SPI as a non-SPI flash driver ? The SPI flash controller models should be quite well covered today. What's the issue ?
Thanks,
C.
Quoted 15 lines · Cédric Le Goater
Quoted 13 lines · Troy Lee
Quoted 10 lines · Cédric Le Goater
Quoted 3 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
The Aspeed SoCs have an "aspeed_soc.io" region for unimplemented devices but it's too small. Anyhow, it is better to have per logic unit. We should change that one day.
Good idea!
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
For my information, which FW image are you using ?
We're using Aspeed's SDK image, I tested with ast2600-default machine. Prebuilt image can be download from:
https://github.com/AspeedTech-BMC/openbmc/releases/tag/v07.02Excellent ! Is there one I could try in particular ?
You could use ast2600-default-obmc.tgz, but we will send another patch for HACE engine.
Quoted 7 lines
Once correctly supported, we should include one of these SDK images in :
tests/avocado/boot_linux_console.pyto complete our tests of the device models.
Sure, once the image successfully boots into rootfs, I'll add a test case for it.
Quoted 10 lines
QEMU is not making much difference between the revision. You might need to improve that.
Quoted 1 line
Without declaring the DPMCU memory, the image will hangs in u-boot.
yeah. You can use -d guest_errors,unimp to catch accesses done on AHB windows not covered by the QEMU models. There are plenty of ways to move past U-Boot when models are not implemented yet. Don't waste too much time, just ask.
Quoted 4 lines
eMMC is only on these branches :
https://github.com/openbmc/qemu/
https://github.com/legoater/qemu/
These two branches are very useful!
Quoted 6 lines
Same for SBC and support is primitive.
Quoted 1 line
We're still working on I3C and SPI issue to be resolved to get into rootfs.
I3C has not much support in Linux and none in QEMU. You will have to add dummy models.
Can I submit a dummy model that only responds to the RESET control register? Or it has to be well implemented like i2c/core.c and i2c/aspeed_i2c.c?
Quoted 2 lines
SPI as a non-SPI flash driver ? The SPI flash controller models should be quite well covered today. What's the issue ?
I need some more investigation, because we're using a different spi driver for fmc-spi.
Quoted 4 lines
Thanks,
C.
Thanks,
Troy Lee
Quoted 29 lines · Troy Lee
Quoted 15 lines · Cédric Le Goater
Quoted 13 lines · Troy Lee
Quoted 10 lines · Cédric Le Goater
Quoted 3 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
The Aspeed SoCs have an "aspeed_soc.io" region for unimplemented devices but it's too small. Anyhow, it is better to have per logic unit. We should change that one day.
Good idea!
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
For my information, which FW image are you using ?
We're using Aspeed's SDK image, I tested with ast2600-default machine. Prebuilt image can be download from:
https://github.com/AspeedTech-BMC/openbmc/releases/tag/v07.02Excellent ! Is there one I could try in particular ?
You could use ast2600-default-obmc.tgz, but we will send another patch for HACE engine.
Quoted 2 lines
Quoted 7 lines
Quoted 5 lines
Once correctly supported, we should include one of these SDK images in :
tests/avocado/boot_linux_console.pyto complete our tests of the device models.
Sure, once the image successfully boots into rootfs, I'll add a test case for it.
yeah. No hurries.
Quoted 10 lines
Quoted 10 lines
QEMU is not making much difference between the revision. You might need to improve that.
Quoted 1 line
Without declaring the DPMCU memory, the image will hangs in u-boot.
yeah. You can use -d guest_errors,unimp to catch accesses done on AHB windows not covered by the QEMU models. There are plenty of ways to move past U-Boot when models are not implemented yet. Don't waste too much time, just ask.
Quoted 5 lines
Quoted 4 lines
eMMC is only on these branches :
https://github.com/openbmc/qemu/
https://github.com/legoater/qemu/These two branches are very useful!
One day, we should try to upstream eMMC support.
Quoted 7 lines
Quoted 6 lines
Same for SBC and support is primitive.
Quoted 1 line
We're still working on I3C and SPI issue to be resolved to get into rootfs.
I3C has not much support in Linux and none in QEMU. You will have to add dummy models.
Can I submit a dummy model that only responds to the RESET control register?
yes.
Quoted 1 line
Or it has to be well implemented like
i2c/core.candi2c/aspeed_i2c.c?
No it can be dummy to start with.
Quoted 4 lines
Quoted 2 lines
SPI as a non-SPI flash driver ? The SPI flash controller models should be quite well covered today. What's the issue ?
I need some more investigation, because we're using a different spi driver for fmc-spi.
Is that the one written by Chin-Ting Kuo in 2020 ? If so, I did send some adjustment of the model for it, such as address lane disablement, but there might be more to it.
Thanks,
C.
Peter Maydell
AppliedQuoted 10 lines · Cédric Le Goater
Quoted 3 lines · Troy Lee
AST2600 Display Port MCU introduces 0x18000000~0x1803FFFF as it's memory and io address. If guest machine try to access DPMCU memory, it will cause a fatal error.
The Aspeed SoCs have an "aspeed_soc.io" region for unimplemented devices but it's too small. Anyhow, it is better to have per logic unit. We should change that one day.
Quoted 5 lines
For my information, which FW image are you using ?
Quoted 1 line
Signed-off-by Troy Lee <[email protected]>Reviewed-by Cédric Le Goater <[email protected]>
Applied to target-arm.next, thanks.
-- PMM