diff options
Diffstat (limited to 'include/hw/misc/aspeed_acry.h')
| -rw-r--r-- | include/hw/misc/aspeed_acry.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/hw/misc/aspeed_acry.h b/include/hw/misc/aspeed_acry.h new file mode 100644 index 0000000000..5ca80deec4 --- /dev/null +++ b/include/hw/misc/aspeed_acry.h @@ -0,0 +1,39 @@ +/* + * ASPEED ACRY Engine + * + * Copyright (C) 2026 ASPEED Technology Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef ASPEED_ACRY_H +#define ASPEED_ACRY_H + +#include "hw/core/sysbus.h" +#include "system/memory.h" + +#define TYPE_ASPEED_ACRY "aspeed.acry" +OBJECT_DECLARE_SIMPLE_TYPE(AspeedACRYState, ASPEED_ACRY) + +#define ASPEED_ACRY_NR_REGS (0x400 >> 2) +/* Max size of the "data" (message) field within the SRAM buffer. */ +#define ASPEED_ACRY_DATA_MAX_LEN 0x800 +#define ASPEED_ACRY_MAX_BITS 4096 +/* Max exponent/modulus size for a 4096-bit RSA key, in bytes. */ +#define ASPEED_ACRY_MAX_BYTES (ASPEED_ACRY_MAX_BITS / 8) + +struct AspeedACRYState { + SysBusDevice parent_obj; + + MemoryRegion iomem; + qemu_irq irq; + + uint32_t regs[ASPEED_ACRY_NR_REGS]; + + MemoryRegion *dram_mr; + MemoryRegion *sram_mr; + AddressSpace dram_as; + AddressSpace sram_as; +}; + +#endif /* ASPEED_ACRY_H */ |
