diff options
author | Alexander Graf <graf@amazon.com> | 2023-06-14 22:56:25 +0000 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-04 14:45:34 +0100 |
commit | c960b389554bd04e645e321e1cee1d3b4590cc83 (patch) | |
tree | b11d3e2c869c91335244440f1735a722c29bfbf1 /include/qemu | |
parent | 11fa056e792a99c83de34af8d4266fef90e498cb (diff) | |
download | qemu-c960b389554bd04e645e321e1cee1d3b4590cc83.zip qemu-c960b389554bd04e645e321e1cee1d3b4590cc83.tar.gz qemu-c960b389554bd04e645e321e1cee1d3b4590cc83.tar.bz2 |
hw/vmapple/aes: Introduce aes engine
VMApple contains an "aes" engine device that it uses to encrypt and
decrypt its nvram. It has trivial hard coded keys it uses for that
purpose.
Add device emulation for this device model.
Signed-off-by: Alexander Graf <graf@amazon.com>
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20241223221645.29911-10-phil@philjordan.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/cutils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 34a9b9b..36c68ce 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -302,4 +302,19 @@ GString *qemu_hexdump_line(GString *str, const void *buf, size_t len, void qemu_hexdump(FILE *fp, const char *prefix, const void *bufptr, size_t size); +/** + * qemu_hexdump_to_buffer: + * @buffer: output string buffer + * @buffer_size: amount of available space in buffer. Must be at least + * data_size*2+1. + * @data: input bytes + * @data_size: number of bytes in data + * + * Converts the @data_size bytes in @data into hex digit pairs, writing them to + * @buffer. Finally, a nul terminating character is written; @buffer therefore + * needs space for (data_size*2+1) chars. + */ +void qemu_hexdump_to_buffer(char *restrict buffer, size_t buffer_size, + const uint8_t *restrict data, size_t data_size); + #endif |