hw/misc: Implement ESP32-S3 AES

This commit is contained in:
harshal.patil
2025-01-30 21:54:06 +05:30
committed by Ivan Grokhotkov
parent 24deaa4323
commit 3629646ec5
3 changed files with 56 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
/*
* ESP32S3 AES emulation
*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co. Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 or
* (at your option) any later version.
*/
#include "qemu/osdep.h"
#include "hw/misc/esp32s3_aes.h"
static const TypeInfo esp32s3_aes_info = {
.name = TYPE_ESP32S3_AES,
.parent = TYPE_ESP_AES,
.instance_size = sizeof(ESP32S3AesState),
.class_size = sizeof(ESP32S3AesClass)
};
static void esp32s3_aes_register_types(void)
{
type_register_static(&esp32s3_aes_info);
}
type_init(esp32s3_aes_register_types)
+4
View File
@@ -184,6 +184,10 @@ if gcrypt.found()
'esp32c3_ds.c',
'esp32c3_xts_aes.c'
))
system_ss.add(when: [gcrypt, 'CONFIG_XTENSA_ESP32S3'], if_true: files(
'esp_aes.c',
'esp32s3_aes.c',
))
endif
system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c'))
+27
View File
@@ -0,0 +1,27 @@
/*
* ESP32-C3 AES emulation
*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co. Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 or
* (at your option) any later version.
*/
#pragma once
#include "hw/misc/esp_aes.h"
#define TYPE_ESP32S3_AES "misc.esp32s3.aes"
#define ESP32S3_AES(obj) OBJECT_CHECK(ESP32S3AesState, (obj), TYPE_ESP32S3_AES)
#define ESP32S3_AES_GET_CLASS(obj) OBJECT_GET_CLASS(ESP32S3AesClass, obj, TYPE_ESP32S3_AES)
#define ESP32S3_AES_CLASS(klass) OBJECT_CLASS_CHECK(ESP32S3AesClass, klass, TYPE_ESP32S3_AES)
typedef struct ESP32S3AesState {
ESPAesState parent;
} ESP32S3AesState;
typedef struct ESP32S3AesClass {
ESPAesClass parent_class;
} ESP32S3AesClass;