summaryrefslogtreecommitdiff
path: root/util/amdfwtool/amdfwtool.h
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2023-10-10 11:15:07 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-03-04 14:50:53 +0000
commit92a9d9314421369bdff572b4d34fd1258585ffe3 (patch)
tree8b1d8c3e97cee5fdf4fb29ee8b653e06129435b4 /util/amdfwtool/amdfwtool.h
parent80b853e626919c7add6cd767ee5a5ce2af599616 (diff)
amdfwtool: Move the functions to handle_file.c
Change-Id: I4cfec13cbc2a86dc352758541cce915a838e0d0f Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78305 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/amdfwtool/amdfwtool.h')
-rw-r--r--util/amdfwtool/amdfwtool.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h
index 2044696e9f..91f1473189 100644
--- a/util/amdfwtool/amdfwtool.h
+++ b/util/amdfwtool/amdfwtool.h
@@ -435,9 +435,16 @@ void process_signed_psp_firmwares(const char *signed_rom,
amd_fw_entry *fw_table,
uint64_t signed_start_addr,
enum platform soc_id);
+
+#define EFS_FILE_SUFFIX ".efs"
+#define TMP_FILE_SUFFIX ".tmp"
+#define BODY_FILE_SUFFIX ".body"
+
void write_or_fail(int fd, void *ptr, size_t size);
ssize_t read_from_file_to_buf(int fd, void *buf, size_t buf_size);
ssize_t write_from_buf_to_file(int fd, const void *buf, size_t buf_size);
+ssize_t write_body(char *output, void *body_offset, ssize_t body_size);
+ssize_t copy_blob(void *dest, const char *src_file, size_t room);
#define OK 0
#define LINE_EOF (1)