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>
This commit is contained in:
Zheng Bao
2023-10-10 11:15:07 +08:00
committed by Felix Held
parent 80b853e626
commit 92a9d93144
3 changed files with 90 additions and 87 deletions

View File

@@ -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)