[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/19] aspeed: sbc: Correct default reset values
From: |
Cédric Le Goater |
Subject: |
[PULL 03/19] aspeed: sbc: Correct default reset values |
Date: |
Tue, 3 May 2022 08:58:32 +0200 |
From: Joel Stanley <joel@jms.id.au>
In order to correctly report secure boot running firmware, these values
must be set. They are taken from a running machine when secure boot is
enabled.
We don't yet have documentation from ASPEED on what they mean. Set the
raw values for now, and in the future improve the model with properties
to set these on a per-machine basis.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220310052159.183975-1-joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/misc/aspeed_sbc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c
index 40f2a8c6312f..bfa8b81d01c7 100644
--- a/hw/misc/aspeed_sbc.c
+++ b/hw/misc/aspeed_sbc.c
@@ -17,6 +17,7 @@
#define R_PROT (0x000 / 4)
#define R_STATUS (0x014 / 4)
+#define R_QSR (0x040 / 4)
static uint64_t aspeed_sbc_read(void *opaque, hwaddr addr, unsigned int size)
{
@@ -50,6 +51,7 @@ static void aspeed_sbc_write(void *opaque, hwaddr addr,
uint64_t data,
switch (addr) {
case R_STATUS:
+ case R_QSR:
qemu_log_mask(LOG_GUEST_ERROR,
"%s: write to read only register 0x%" HWADDR_PRIx "\n",
__func__, addr << 2);
@@ -77,8 +79,9 @@ static void aspeed_sbc_reset(DeviceState *dev)
memset(s->regs, 0, sizeof(s->regs));
- /* Set secure boot enabled, and boot from emmc/spi */
- s->regs[R_STATUS] = 1 << 6 | 1 << 5;
+ /* Set secure boot enabled with RSA4096_SHA256 and enable eMMC ABR */
+ s->regs[R_STATUS] = 0x000044C6;
+ s->regs[R_QSR] = 0x07C07C89;
}
static void aspeed_sbc_realize(DeviceState *dev, Error **errp)
--
2.35.1
- [PULL 00/19] aspeed queue, Cédric Le Goater, 2022/05/03
- [PULL 01/19] hw: aspeed_scu: Add AST2600 apb_freq and hpll calculation function, Cédric Le Goater, 2022/05/03
- [PULL 03/19] aspeed: sbc: Correct default reset values,
Cédric Le Goater <=
- [PULL 02/19] hw: aspeed_scu: Introduce clkin_25Mhz attribute, Cédric Le Goater, 2022/05/03
- [PULL 04/19] aspeed: Add eMMC Boot Controller stub, Cédric Le Goater, 2022/05/03
- [PULL 06/19] aspeed/smc: Add AST1030 support, Cédric Le Goater, 2022/05/03
- [PULL 05/19] aspeed/adc: Add AST1030 support, Cédric Le Goater, 2022/05/03
- [PULL 07/19] aspeed/wdt: Fix ast2500/ast2600 default reload value, Cédric Le Goater, 2022/05/03
- [PULL 08/19] aspeed/wdt: Add AST1030 support, Cédric Le Goater, 2022/05/03
- [PULL 11/19] aspeed/soc : Add AST1030 support, Cédric Le Goater, 2022/05/03
- [PULL 09/19] aspeed/timer: Add AST1030 support, Cédric Le Goater, 2022/05/03
- [PULL 12/19] aspeed: Add an AST1030 eval board, Cédric Le Goater, 2022/05/03
- [PULL 10/19] aspeed/scu: Add AST1030 support, Cédric Le Goater, 2022/05/03