diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-24 14:17:19 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-24 18:20:33 +1100 |
commit | c7897727e60c6ee3fa7e6aebe82f41538729c212 (patch) | |
tree | da16959472ad2a5512aeffe0c0e2fdfcb21f720c /core | |
parent | c4730fb25a6ffd24aa2f9d505510dd45bc6f318c (diff) | |
download | skiboot-c7897727e60c6ee3fa7e6aebe82f41538729c212.zip skiboot-c7897727e60c6ee3fa7e6aebe82f41538729c212.tar.gz skiboot-c7897727e60c6ee3fa7e6aebe82f41538729c212.tar.bz2 |
Asynchronous LID/Resource loading for FSP systems
This moves away from using fsp_sync_msg in fsp_fetch_data and instead
using the platform hooks for start_preload_resource() to actually queue
up a load and having the plumbing for checking if a resource is loaded yet.
This gets rid of the "pollers called with locks held" warning we got
heaps of previously. You can now boot some FSP systems without getting
this warning at all.
This also sets the stage for starting load of LIDs much earlier to when
they're needed, improving boot time.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/flash.c | 2 | ||||
-rw-r--r-- | core/hostservices.c | 2 | ||||
-rw-r--r-- | core/platform.c | 3 | ||||
-rw-r--r-- | core/vpd.c | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/core/flash.c b/core/flash.c index 270e6fc..8d51c01 100644 --- a/core/flash.c +++ b/core/flash.c @@ -522,7 +522,7 @@ end: * load a resource from FLASH * buf and len shouldn't account for ECC even if partition is ECCed. */ -int flash_start_preload_resource(enum resource_id id, uint32_t subid, +int flash_load_resource(enum resource_id id, uint32_t subid, void *buf, size_t *len) { int i, rc, part_num, part_size, part_start, size; diff --git a/core/hostservices.c b/core/hostservices.c index 22d34e4..a2289c9 100644 --- a/core/hostservices.c +++ b/core/hostservices.c @@ -415,7 +415,7 @@ static int __hservice_lid_load(uint32_t lid, void **buf, size_t *len) */ *buf = malloc(HBRT_LOAD_LID_SIZE); *len = HBRT_LOAD_LID_SIZE; - rc = fsp_fetch_data(0, FSP_DATASET_NONSP_LID, lid, 0, *buf, len); + rc = fsp_load_lid(lid, *buf, len); if (rc != 0) /* Take advantage of realloc corner case here. */ *len = 0; diff --git a/core/platform.c b/core/platform.c index 5369092..f93b141 100644 --- a/core/platform.c +++ b/core/platform.c @@ -104,8 +104,7 @@ int wait_for_resource_loaded(enum resource_id id, uint32_t idx) while(r == OPAL_BUSY) { opal_run_pollers(); - time_wait_nopoll(msecs_to_tb(5)); - cpu_relax(); + time_wait_ms_nopoll(5); r = resource_loaded(id, idx); } @@ -155,7 +155,7 @@ static void *vpd_lid_load(const uint8_t *lx, uint8_t lxrn, size_t *size) *size = VPD_LID_MAX_SIZE; /* Load it from the FSP */ - rc = fsp_fetch_data(0, FSP_DATASET_NONSP_LID, lid_no, 0, data, size); + rc = fsp_load_lid(lid_no, data, size); if (rc) { prerror("VPD: Error %d loading VPD LID\n", rc); goto fail; |