NetworkPkg:Add scriptable configuration to iSCSI driver by leveraging x-UEFI.

v2:
Add error handling if can not create Attempts in driver entry point.
Since we support to define a macro be a PCD value, we enhance our code
by modifying the structure in IFR_NVDATA. This effect code logic mainly
in Creating Keywords,Convert IFR NvData To AttemptConfigData ByKeyword and
reverse function.
Fix typo errors and sync based on the latest code.

Enable iSCSI keywords configuration based on x-UEFI
name space. we introduce new PCD to control the attempt
numbers which will be created in non activated state, besides
the Attempt name is changed to READ_ONLY attribute in UI.
We can invoke KEYWORD HANDLER Protocol to configure
the related keywords.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin jiaxin.wu@intel.com
This commit is contained in:
Zhang Lubo
2017-02-17 14:43:41 +08:00
committed by Jiaxin Wu
parent 1d8cebf910
commit 8d1f5e0416
11 changed files with 2438 additions and 271 deletions

View File

@@ -243,6 +243,44 @@ IScsiRemoveNic (
IN EFI_HANDLE Controller
);
/**
Create and initialize the Attempts.
@param[in] AttemptNum The number of Attempts will be created.
@retval EFI_SUCCESS The Attempts have been created successfully.
@retval Others Failed to create the Attempt.
**/
EFI_STATUS
IScsiCreateAttempts (
IN UINTN AttemptNum
);
/**
Create the iSCSI configuration Keywords for each attempt.
@param[in] KeywordNum The number Sets of Keywords will be created.
@retval EFI_SUCCESS The operation is completed.
@retval Others Failed to create the Keywords.
**/
EFI_STATUS
IScsiCreateKeywords (
IN UINTN KeywordNum
);
/**
Free the attempt configure data variable.
**/
VOID
IScsiCleanAttemptVariable (
IN VOID
);
/**
Get the recorded NIC information from a global structure by the Index.