Clean up the private GUID definition in module Level.

0. Remove the unused private GUID from module source files.
1. Use gEfiCallerIdGuid replace of the private module GUID.
2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver.
3. Move two EBC protocols for debug purpose from EBC driver to MdeModulePkg Include directory. 

Signed-off-by: lgao4
Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12373 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2011-09-18 12:21:01 +00:00
parent b36d134faf
commit c8ad2d7a29
58 changed files with 755 additions and 434 deletions

View File

@@ -1,7 +1,7 @@
/** @file
This file is for Challenge-Handshake Authentication Protocol (CHAP) Configuration.
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -15,8 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "IScsiImpl.h"
#include "Md5.h"
EFI_GUID mIScsiCHAPAuthInfoGuid = ISCSI_CHAP_AUTH_INFO_GUID;
/**
Initator caculates its own expected hash value.

View File

@@ -1,7 +1,7 @@
/** @file
The header file of CHAP configuration.
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -15,13 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _ISCSI_CHAP_H_
#define _ISCSI_CHAP_H_
#define ISCSI_CHAP_AUTH_INFO_GUID \
{ \
0x786ec0ac, 0x65ae, 0x4d1b, {0xb1, 0x37, 0xd, 0x11, 0xa, 0x48, 0x37, 0x97} \
}
extern EFI_GUID mIScsiCHAPAuthInfoGuid;
#define ISCSI_AUTH_METHOD_CHAP "CHAP"
#define ISCSI_KEY_CHAP_ALGORITHM "CHAP_A"

View File

@@ -14,7 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "IScsiImpl.h"
EFI_GUID mVendorGuid = ISCSI_CONFIG_GUID;
CHAR16 mVendorStorageName[] = L"ISCSI_CONFIG_IFR_NVDATA";
BOOLEAN mIScsiDeviceListUpdated = FALSE;
UINTN mNumberOfIScsiDevices = 0;
@@ -35,10 +34,7 @@ HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = {
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
//
// {49D7B73E-143D-4716-977B-C45F1CB038CC}
//
{ 0x49d7b73e, 0x143d, 0x4716, { 0x97, 0x7b, 0xc4, 0x5f, 0x1c, 0xb0, 0x38, 0xcc } }
IP4_ISCSI_CONFIG_GUID
},
{
END_DEVICE_PATH_TYPE,
@@ -224,7 +220,7 @@ IScsiUpdateDeviceList (
DataSize = 0;
Status = gRT->GetVariable (
L"iSCSIDeviceList",
&mVendorGuid,
&gIp4IScsiConfigGuid,
NULL,
&DataSize,
NULL
@@ -234,7 +230,7 @@ IScsiUpdateDeviceList (
gRT->GetVariable (
L"iSCSIDeviceList",
&mVendorGuid,
&gIp4IScsiConfigGuid,
NULL,
&DataSize,
DeviceList
@@ -282,7 +278,7 @@ IScsiUpdateDeviceList (
CurMacInfo = &DeviceList->MacInfo[Index];
IScsiMacAddrToStr (&CurMacInfo->Mac, CurMacInfo->Len, CurMacInfo->VlanId, MacString);
gRT->SetVariable (MacString, &gEfiIScsiInitiatorNameProtocolGuid, 0, 0, NULL);
gRT->SetVariable (MacString, &mIScsiCHAPAuthInfoGuid, 0, 0, NULL);
gRT->SetVariable (MacString, &gIScsiCHAPAuthInfoGuid, 0, 0, NULL);
}
FreePool (DeviceList);
@@ -308,7 +304,7 @@ IScsiUpdateDeviceList (
gRT->SetVariable (
L"iSCSIDeviceList",
&mVendorGuid,
&gIp4IScsiConfigGuid,
ISCSI_CONFIG_VAR_ATTR,
DeviceListSize,
DeviceList
@@ -488,7 +484,7 @@ IScsiFormExtractConfig (
}
*Progress = Request;
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &mVendorGuid, mVendorStorageName)) {
if ((Request != NULL) && !HiiIsConfigHdrMatch (Request, &gIp4IScsiConfigGuid, mVendorStorageName)) {
return EFI_NOT_FOUND;
}
@@ -532,7 +528,7 @@ IScsiFormExtractConfig (
// Allocate and fill a buffer large enough to hold the <ConfigHdr> template
// followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator
//
ConfigRequestHdr = HiiConstructConfigHdr (&mVendorGuid, mVendorStorageName, Private->DriverHandle);
ConfigRequestHdr = HiiConstructConfigHdr (&gIp4IScsiConfigGuid, mVendorStorageName, Private->DriverHandle);
Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16);
ConfigRequest = AllocateZeroPool (Size);
ASSERT (ConfigRequest != NULL);
@@ -618,7 +614,7 @@ IScsiFormRouteConfig (
// Check routing data in <ConfigHdr>.
// Note: if only one Storage is used, then this checking could be skipped.
//
if (!HiiIsConfigHdrMatch (Configuration, &mVendorGuid, mVendorStorageName)) {
if (!HiiIsConfigHdrMatch (Configuration, &gIp4IScsiConfigGuid, mVendorStorageName)) {
*Progress = Configuration;
return EFI_NOT_FOUND;
}
@@ -687,7 +683,7 @@ IScsiFormCallback (
//
IfrNvData = AllocateZeroPool (sizeof (ISCSI_CONFIG_IFR_NVDATA));
ASSERT (IfrNvData != NULL);
if (!HiiGetBrowserData (&mVendorGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData)) {
if (!HiiGetBrowserData (&gIp4IScsiConfigGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData)) {
FreePool (IfrNvData);
return EFI_NOT_FOUND;
}
@@ -884,7 +880,7 @@ IScsiFormCallback (
BufferSize = sizeof (Private->Current->AuthConfigData);
gRT->SetVariable (
Private->Current->MacString,
&mIScsiCHAPAuthInfoGuid,
&gIScsiCHAPAuthInfoGuid,
ISCSI_CONFIG_VAR_ATTR,
BufferSize,
&Private->Current->AuthConfigData
@@ -916,7 +912,7 @@ IScsiFormCallback (
//
// Pass changed uncommitted data back to Form Browser
//
HiiSetBrowserData (&mVendorGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData, NULL);
HiiSetBrowserData (&gIp4IScsiConfigGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData, NULL);
}
FreePool (IfrNvData);
@@ -1027,7 +1023,7 @@ IScsiConfigUpdateForm (
BufferSize = sizeof (ConfigFormEntry->AuthConfigData);
Status = gRT->GetVariable (
ConfigFormEntry->MacString,
&mIScsiCHAPAuthInfoGuid,
&gIScsiCHAPAuthInfoGuid,
NULL,
&BufferSize,
&ConfigFormEntry->AuthConfigData
@@ -1102,7 +1098,7 @@ IScsiConfigUpdateForm (
HiiUpdateForm (
mCallbackInfo->RegisteredHandle,
&mVendorGuid,
&gIp4IScsiConfigGuid,
FORMID_MAIN_FORM,
StartOpCodeHandle, // Label DEVICE_ENTRY_LABEL
EndOpCodeHandle // LABEL_END
@@ -1173,7 +1169,7 @@ IScsiConfigFormInit (
// Publish our HII data
//
CallbackInfo->RegisteredHandle = HiiAddPackages (
&mVendorGuid,
&gIp4IScsiConfigGuid,
CallbackInfo->DriverHandle,
IScsiDxeStrings,
IScsiConfigDxeBin,

View File

@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define EFI_NETWORK_DEVICE_CLASS 0x04
formset
guid = ISCSI_CONFIG_GUID,
guid = IP4_ISCSI_CONFIG_GUID,
title = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_TITLE),
help = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_HELP),
class = EFI_NETWORK_DEVICE_CLASS,
@@ -25,7 +25,7 @@ formset
varstore ISCSI_CONFIG_IFR_NVDATA,
name = ISCSI_CONFIG_IFR_NVDATA,
guid = ISCSI_CONFIG_GUID;
guid = IP4_ISCSI_CONFIG_GUID;
form formid = FORMID_MAIN_FORM,
title = STRING_TOKEN(STR_ISCSI_MAIN_FORM_TITLE);

View File

@@ -15,10 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _ISCSI_NVDATASTRUC_H_
#define _ISCSI_NVDATASTRUC_H_
#define ISCSI_CONFIG_GUID \
{ \
0x6456ed61, 0x3579, 0x41c9, { 0x8a, 0x26, 0x0a, 0x0b, 0xd6, 0x2b, 0x78, 0xfc } \
}
#include <Guid/Ip4IScsiConfigHii.h>
#define VAR_EQ_TEST_NAME 0x100

View File

@@ -1,7 +1,7 @@
/** @file
The entry point of IScsi driver.
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -23,9 +23,6 @@ EFI_DRIVER_BINDING_PROTOCOL gIScsiDriverBinding = {
NULL
};
EFI_GUID gIScsiPrivateGuid = ISCSI_PRIVATE_GUID;
/**
Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
@@ -63,7 +60,7 @@ IScsiDriverBindingSupported (
Status = gBS->OpenProtocol (
ControllerHandle,
&gIScsiPrivateGuid,
&gEfiCallerIdGuid,
NULL,
This->DriverBindingHandle,
ControllerHandle,
@@ -179,7 +176,7 @@ IScsiDriverBindingStart (
//
Status = gBS->InstallProtocolInterface (
&ControllerHandle,
&gIScsiPrivateGuid,
&gEfiCallerIdGuid,
EFI_NATIVE_INTERFACE,
&Private->IScsiIdentifier
);
@@ -332,7 +329,7 @@ IScsiDriverBindingStop (
Status = gBS->OpenProtocol (
IScsiController,
&gIScsiPrivateGuid,
&gEfiCallerIdGuid,
(VOID **)&IScsiIdentifier,
This->DriverBindingHandle,
ControllerHandle,
@@ -370,7 +367,7 @@ IScsiDriverBindingStop (
//
gBS->UninstallProtocolInterface (
IScsiController,
&gIScsiPrivateGuid,
&gEfiCallerIdGuid,
&Private->IScsiIdentifier
);

View File

@@ -1,7 +1,7 @@
/** @file
The header file of IScsiDriver.c.
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -27,13 +27,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/DriverBinding.h>
#include <Protocol/ScsiPassThruExt.h>
#define ISCSI_PRIVATE_GUID \
{ 0xfa3cde4c, 0x87c2, 0x427d, {0xae, 0xde, 0x7d, 0xd0, 0x96, 0xc8, 0x8c, 0x58} }
#define ISCSI_INITIATOR_NAME_VAR_NAME L"I_NAME"
extern EFI_GUID gIScsiPrivateGuid;
typedef struct _ISCSI_PRIVATE_PROTOCOL {
UINT32 Reserved;
} ISCSI_PRIVATE_PROTOCOL;

View File

@@ -1,7 +1,7 @@
## @file
# Component description file for IScsi module.
#
# Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -98,4 +98,6 @@
gEfiIfrTianoGuid ## CONSUMES ## GUID
gEfiAcpiTableGuid ## CONSUMES ## GUID
gEfiAcpi10TableGuid ## CONSUMES ## GUID
gEfiAcpi20TableGuid ## CONSUMES ## GUID
gEfiAcpi20TableGuid ## CONSUMES ## GUID
gIp4IScsiConfigGuid ## PRODUCES ## GUID
gIScsiCHAPAuthInfoGuid

View File

@@ -1,7 +1,7 @@
/** @file
Implementation for iSCSI Boot Firmware Table publication.
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -150,7 +150,7 @@ IScsiFillInitiatorSection (
//
// Get the identifier from the handle.
//
Status = gBS->HandleProtocol (Handle, &gIScsiPrivateGuid, (VOID **) &IScsiIdentifier);
Status = gBS->HandleProtocol (Handle, &gEfiCallerIdGuid, (VOID **) &IScsiIdentifier);
if (EFI_ERROR (Status)) {
ASSERT (FALSE);
return ;
@@ -288,7 +288,7 @@ IScsiFillNICAndTargetSections (
SectionOffset = &Control->NIC0Offset;
for (Index = 0; Index < HandleCount; Index++) {
Status = gBS->HandleProtocol (Handles[Index], &gIScsiPrivateGuid, (VOID **)&IScsiIdentifier);
Status = gBS->HandleProtocol (Handles[Index], &gEfiCallerIdGuid, (VOID **)&IScsiIdentifier);
if (EFI_ERROR (Status)) {
ASSERT (FALSE);
return ;
@@ -484,7 +484,7 @@ IScsiPublishIbft (
//
Status = gBS->LocateHandleBuffer (
ByProtocol,
&gIScsiPrivateGuid,
&gEfiCallerIdGuid,
NULL,
&HandleCount,
&HandleBuffer

View File

@@ -1,7 +1,7 @@
/** @file
Miscellaneous routines for iSCSI driver.
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -684,7 +684,7 @@ IScsiGetConfigData (
BufferSize = sizeof (Session->AuthData.AuthConfig);
Status = gRT->GetVariable (
MacString,
&mIScsiCHAPAuthInfoGuid,
&gIScsiCHAPAuthInfoGuid,
NULL,
&BufferSize,
&Session->AuthData.AuthConfig