Skip to content

Commit

Permalink
Add TPM Calls to Node Communication ABUS Exchange Procedure
Browse files Browse the repository at this point in the history
This commit adds the TPM calls to generate a random number and log
('extend') the nonces passed between the nodes via the ABUSes.  It
also cleans up some other TODOs and traces.

Change-Id: I1389af2d809351421f3c2b3b954b3eaf6b0506aa
RTC:184518
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60962
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
mabaiocchi authored and wghoffa committed Jun 21, 2018
1 parent 24f3312 commit 323f71e
Show file tree
Hide file tree
Showing 6 changed files with 507 additions and 94 deletions.
10 changes: 10 additions & 0 deletions src/include/usr/secureboot/secure_reasoncodes.H
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ namespace SECUREBOOT
MOD_NC_MAP_ATTN = 0x23,
MOD_NCDD_PERFORM_OP = 0x24,
MOD_NCDD_WRITE = 0x25,
MOD_NCEX_MAIN = 0x26,
MOD_NCEX_MASTER = 0x27,
MOD_NCEX_SLAVE = 0x28,
MOD_NCEX_GET_RANDOM = 0x29,
MOD_NCEX_RECV = 0x2A,
};

enum SECUREReasonCode
Expand Down Expand Up @@ -91,6 +96,11 @@ namespace SECUREBOOT
RC_NC_TOO_MANY_ATTNS_FOUND = SECURE_COMP_ID | 0x24,
RC_NCDD_INVALID_ARGS = SECURE_COMP_ID | 0x25,
RC_NCDD_DATA_NOT_SENT = SECURE_COMP_ID | 0x26,
RC_NCEX_MISMATCH_RECV_LINKS = SECURE_COMP_ID | 0x27,
RC_NCEX_NO_FUNCTIONAL_TPMS = SECURE_COMP_ID | 0x28,
RC_NCEX_INVALID_PHYS_PATH = SECURE_COMP_ID | 0x29,
RC_NCEX_INVALID_INSTANCE_COUNT = SECURE_COMP_ID | 0x2A,
RC_NCEX_WAITING_TIMEOUT = SECURE_COMP_ID | 0x2B,

// Reason codes 0xA0 - 0xEF reserved for trustedboot_reasoncodes.H
};
Expand Down
20 changes: 0 additions & 20 deletions src/usr/isteps/istep09/call_proc_smp_link_layer.C
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ void* call_proc_smp_link_layer( void *io_pArgs )
errlHndl_t l_errl = NULL;
IStepError l_StepError;

// @TODO RTC:184518
// Currently the x-bus mailbox exchange causes a
// security violation in step 9, so disabling
bool l_run_xbus_test = false;

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_proc_smp_link_layer entry" );

Expand Down Expand Up @@ -120,21 +115,6 @@ void* call_proc_smp_link_layer( void *io_pArgs )
TARGETING::get_huid(l_cpu_target) );
l_StepError.addErrorDetails(l_errl);
errlCommit(l_errl, HWPF_COMP_ID);
l_run_xbus_test = false;
}
}

// Test sending messages between procs via XBUS mailbox
if (l_run_xbus_test)
{
l_errl = SECUREBOOT::NODECOMM::nodeCommXbus2ProcTest();
if(l_errl)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,ERR_MRK
"call_proc_smp_link_layer> "
"nodeCommXbus2ProcTest Failed!");
l_StepError.addErrorDetails(l_errl);
errlCommit(l_errl, HWPF_COMP_ID);
}
}

Expand Down
12 changes: 9 additions & 3 deletions src/usr/secureboot/node_comm/node_comm.C
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ errlHndl_t nodeCommMapAttn(TARGETING::Target* i_pProc,

const size_t expSize = sizeof(fir_data);

TRACFCOMP(g_trac_nc,ENTER_MRK
TRACUCOMP(g_trac_nc,ENTER_MRK
"nodeCommMapAttn: tgt=0x%X, mode=%s, fir_addr=0x%.16llX",
get_huid(i_pProc),
(i_mode == NCDD_MODE_ABUS)
Expand Down Expand Up @@ -123,7 +123,7 @@ errlHndl_t nodeCommMapAttn(TARGETING::Target* i_pProc,

if (bit_count == 0)
{
TRACFCOMP(g_trac_nc,INFO_MRK"nodeCommMapAttn: no attentions found: "
TRACUCOMP(g_trac_nc,INFO_MRK"nodeCommMapAttn: no attentions found: "
"FIR data = 0x%.16llX, mask=0x%.16llX, data+mask=0x%.16llX",
fir_data, fir_mask, fir_data_with_mask);
break;
Expand Down Expand Up @@ -183,13 +183,19 @@ errlHndl_t nodeCommMapAttn(TARGETING::Target* i_pProc,
o_attn_found = true;
o_linkId = (bit / 2);
o_mboxId = (bit % 2);

TRACFCOMP(g_trac_nc,INFO_MRK"nodeCommMapAttn: tgt=0x%X: "
"o_attn_found=%d, o_linkId=%d, mboxId=%d, "
TRACE_ERR_FMT,
get_huid(i_pProc), o_attn_found, o_linkId, o_mboxId,
TRACE_ERR_ARGS(err));
break;
}
}

} while( 0 );

TRACFCOMP(g_trac_nc,EXIT_MRK"nodeCommMapAttn: tgt=0x%X: "
TRACUCOMP(g_trac_nc,EXIT_MRK"nodeCommMapAttn: tgt=0x%X: "
"o_attn_found=%d, o_linkId=%d, mboxId=%d, "
TRACE_ERR_FMT,
get_huid(i_pProc), o_attn_found, o_linkId, o_mboxId,
Expand Down

0 comments on commit 323f71e

Please sign in to comment.