summaryrefslogtreecommitdiffstats
path: root/external/opal-prd/opal-prd.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-03-04 10:22:03 +0800
committerJeremy Kerr <jk@ozlabs.org>2015-03-04 16:01:23 +0800
commitf51aeaa4fa5074f747684643bf6ebff3e0884f67 (patch)
tree32c1de7db5b57ce9781ce0ab678377a00b7dfdca /external/opal-prd/opal-prd.c
parentdd57098db9df493881b37811d070835b679b9a2c (diff)
downloadblackbird-skiboot-f51aeaa4fa5074f747684643bf6ebff3e0884f67.tar.gz
blackbird-skiboot-f51aeaa4fa5074f747684643bf6ebff3e0884f67.zip
external/opal-prd: NULL-out FSP-only callbacks
The HBRT code will check for NULL callbacks, so don't provide them in the hinterface table. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'external/opal-prd/opal-prd.c')
-rw-r--r--external/opal-prd/opal-prd.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 5681f194..a209e829 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -58,7 +58,6 @@ struct opal_prd_ctx {
void *code_addr;
size_t code_size;
bool debug;
- bool allow_fsp_calls;
struct pnor pnor;
char *hbrt_file_name;
};
@@ -150,23 +149,6 @@ extern int call_enable_attns(void);
extern int call_enable_occ_actuation(bool i_occActivation);
extern void call_process_occ_reset(uint64_t i_chipId);
-/* Dummy calls for hservices */
-static inline int __fsp_only_assert(const char *name)
-{
- printf("error: %s is only implemented for FSP\n", name);
- if (!ctx->allow_fsp_calls)
- exit(EXIT_FAILURE);
- return 0;
-}
-#define fsp_stub(name) \
- int hservice_ ##name(void) { return __fsp_only_assert(#name); }
-
-fsp_stub(send_error_log);
-fsp_stub(lid_load);
-fsp_stub(lid_unload);
-fsp_stub(wakeup);
-fsp_stub(report_occ_failure);
-
void hservice_puts(const char *str)
{
printf("%s\n", str);
@@ -1095,8 +1077,7 @@ out_close:
static void usage(const char *progname)
{
printf("Usage:\n");
- printf("\t%s [--debug] [--file <hbrt-image>] [--pnor <device>]\n"
- "\t\t[--allow-fsp-calls]\n",
+ printf("\t%s [--debug] [--file <hbrt-image>] [--pnor <device>]\n",
progname);
printf("\t%s occ <enable|disable>\n", progname);
printf("\n");
@@ -1104,17 +1085,13 @@ static void usage(const char *progname)
"\t--debug verbose logging for debug information\n"
"\t--pnor DEVICE use PNOR MTD device\n"
"\t--file FILE use FILE for hostboot runtime code (instead of code\n"
-"\t exported by firmware)\n"
-"\t--allow-fsp-calls don't exit on FSP-only callbacks from HBRT code, but\n"
-"\t return success instead. Intended for workarounds\n"
-"\t during PRD testing only.\n");
+"\t exported by firmware)\n");
}
static struct option opal_diag_options[] = {
{"file", required_argument, NULL, 'f'},
{"pnor", required_argument, NULL, 'p'},
{"debug", no_argument, NULL, 'd'},
- {"allow-fsp-calls", no_argument, NULL, 'a'},
{"help", no_argument, NULL, 'h'},
{ 0 },
};
@@ -1167,9 +1144,6 @@ int main(int argc, char *argv[])
case 'p':
ctx->pnor.path = strndup(optarg, PATH_MAX);
break;
- case 'a':
- ctx->allow_fsp_calls = true;
- break;
case 'h':
usage(argv[0]);
return EXIT_SUCCESS;
OpenPOWER on IntegriCloud