Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / hw / misc / aspeed_sbc.h
blob405e6782b97a0c2018fc52f5ea1bb1c389c3603a
1 /*
2 * ASPEED Secure Boot Controller
4 * Copyright (C) 2021-2022 IBM Corp.
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef ASPEED_SBC_H
10 #define ASPEED_SBC_H
12 #include "hw/sysbus.h"
14 #define TYPE_ASPEED_SBC "aspeed.sbc"
15 #define TYPE_ASPEED_AST2600_SBC TYPE_ASPEED_SBC "-ast2600"
16 OBJECT_DECLARE_TYPE(AspeedSBCState, AspeedSBCClass, ASPEED_SBC)
18 #define ASPEED_SBC_NR_REGS (0x93c >> 2)
20 #define QSR_AES BIT(27)
21 #define QSR_RSA1024 (0x0 << 12)
22 #define QSR_RSA2048 (0x1 << 12)
23 #define QSR_RSA3072 (0x2 << 12)
24 #define QSR_RSA4096 (0x3 << 12)
25 #define QSR_SHA224 (0x0 << 10)
26 #define QSR_SHA256 (0x1 << 10)
27 #define QSR_SHA384 (0x2 << 10)
28 #define QSR_SHA512 (0x3 << 10)
30 struct AspeedSBCState {
31 SysBusDevice parent;
33 bool emmc_abr;
34 uint32_t signing_settings;
36 MemoryRegion iomem;
38 uint32_t regs[ASPEED_SBC_NR_REGS];
41 struct AspeedSBCClass {
42 SysBusDeviceClass parent_class;
45 #endif /* ASPEED_SBC_H */