aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-05-06 14:00:46 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-07 17:53:29 +1000
commit909432e62a5616725fe0be97f3e8c858ff758efd (patch)
tree96476ef43728afadaf0c62041be3ebacfee5dd1e /hw
parentc8cf30bb19c38a9d52c8435bfa6ea474481f6f50 (diff)
downloadskiboot-909432e62a5616725fe0be97f3e8c858ff758efd.zip
skiboot-909432e62a5616725fe0be97f3e8c858ff758efd.tar.gz
skiboot-909432e62a5616725fe0be97f3e8c858ff758efd.tar.bz2
Fix FSP resource/LID loading for preloading LIDs.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 7a9d1ae..8ae17e4 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -2263,6 +2263,7 @@ static void fsp_fetch_lid_complete(struct fsp_msg *msg)
if (rc !=0 && rc != 2) {
last->result = -EIO;
last = list_pop(&fsp_fetch_lid_queue, struct fsp_fetch_lid_item, link);
+ prerror("FSP LID %08x load ERROR %d\n", last->lid_no, rc);
list_add_tail(&fsp_fetched_lid, &last->link);
fsp_start_fetching_next_lid();
unlock(&fsp_fetch_lock);
@@ -2332,9 +2333,9 @@ static void fsp_fetch_lid_next_chunk(struct fsp_fetch_lid_item *last)
last->bsize = ((boff + chunk) + TCE_MASK) & ~TCE_MASK;
last->chunk_requested = chunk;
- prlog(PR_DEBUG, "FSP: Loading Chunk 0x%08x bytes balign=%llx"
+ prlog(PR_DEBUG, "FSP: LID %08x chunk 0x%08x bytes balign=%llx"
" boff=%llx bsize=%llx\n",
- chunk, balign, boff, last->bsize);
+ last->lid_no, chunk, balign, boff, last->bsize);
fsp_tce_map(PSI_DMA_FETCH, (void *)balign, last->bsize);
taddr = PSI_DMA_FETCH + boff;
@@ -2353,6 +2354,7 @@ static void fsp_fetch_lid_next_chunk(struct fsp_fetch_lid_item *last)
struct fsp_fetch_lid_item, link);
list_add_tail(&fsp_fetched_lid, &last->link);
}
+ last->result = OPAL_BUSY;
}
static void fsp_start_fetching_next_lid(void)
@@ -2366,7 +2368,9 @@ static void fsp_start_fetching_next_lid(void)
if (last == NULL)
return;
- fsp_fetch_lid_next_chunk(last);
+ /* If we're not already fetching */
+ if (last->result == OPAL_EMPTY)
+ fsp_fetch_lid_next_chunk(last);
}
int fsp_start_preload_resource(enum resource_id id, uint32_t idx,
@@ -2387,7 +2391,7 @@ int fsp_start_preload_resource(enum resource_id id, uint32_t idx,
resource->remaining = *size;
*size = 0;
resource->length = size;
- resource->result = OPAL_BUSY;
+ resource->result = OPAL_EMPTY;
for (i = 0; i < ARRAY_SIZE(fsp_lid_map); i++) {
if (id != fsp_lid_map[i].id)
@@ -2481,7 +2485,7 @@ int fsp_load_lid(uint32_t lid_no, char *buf, size_t *size)
resource->remaining = *size;
*size = 0;
resource->length = size;
- resource->result = OPAL_BUSY;
+ resource->result = OPAL_EMPTY;
if (lid_no == 0)
return OPAL_PARAMETER;