summaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp2_0/include
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-03-10 17:25:01 -0800
committerJulius Werner <jwerner@chromium.org>2021-04-05 22:59:09 +0000
commit8205ce6b34aa4e73657fe61509b14cde781b4d58 (patch)
tree1b8c508632848b7a9dfcf5733ba669a64028baaa /src/drivers/intel/fsp2_0/include
parent4676ec52c279d44eee44ceef40d0107b09bedce6 (diff)
fsp2_0: Replace fspld->get_destination() callback with CBFS allocator
The Intel FSP 2.0 driver contains a custom construct that basically serves the same purpose as the new CBFS allocator concept: a callback function to customize placement of a loaded CBFS file whose size is initially unknown. This patch removes the existing implementation and replaces it with a CBFS allocator. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I0b7b446a0d2af87ec337fb80ad54f2d404e69668 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52082 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/drivers/intel/fsp2_0/include')
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/util.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h
index 253b74a150..6583b649a1 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/util.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/util.h
@@ -4,6 +4,7 @@
#define _FSP2_0_UTIL_H_
#include <boot/coreboot_tables.h>
+#include <cbfs.h>
#include <commonlib/region.h>
#include <arch/cpu.h>
#include <fsp/api.h>
@@ -111,11 +112,8 @@ struct fsp_load_descriptor {
/* fsp_prog object will have region_device initialized to final
* load location in memory. */
struct prog fsp_prog;
- /* Fill in destination location given final load size. Return 0 on
- * success, < 0 on error. */
- int (*get_destination)(const struct fsp_load_descriptor *fspld,
- void **dest, size_t final_load_size,
- const struct region_device *source);
+ /* CBFS allocator to place loaded FSP. NULL to map flash directly. */
+ cbfs_allocator_t alloc;
/* Optional argument to be utilized by get_destination() callback. */
void *arg;
};