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

@@ -26,14 +26,6 @@ EFI_DRIVER_BINDING_PROTOCOL gSCSIBusDriverBinding = {
NULL
};
//
// The ScsiBusProtocol is just used to locate ScsiBusDev
// structure in the SCSIBusDriverBindingStop(). Then we can
// Close all opened protocols and release this structure.
//
EFI_GUID mScsiBusProtocolGuid = EFI_SCSI_BUS_PROTOCOL_GUID;
VOID *mWorkingBuffer;
/**
@@ -389,7 +381,7 @@ SCSIBusDriverBindingStart (
//
Status = gBS->InstallProtocolInterface (
&Controller,
&mScsiBusProtocolGuid,
&gEfiCallerIdGuid,
EFI_NATIVE_INTERFACE,
&ScsiBusDev->BusIdentify
);
@@ -403,7 +395,7 @@ SCSIBusDriverBindingStart (
//
Status = gBS->OpenProtocol (
Controller,
&mScsiBusProtocolGuid,
&gEfiCallerIdGuid,
(VOID **) &BusIdentify,
This->DriverBindingHandle,
Controller,
@@ -560,7 +552,7 @@ SCSIBusDriverBindingStop (
//
Status = gBS->OpenProtocol (
Controller,
&mScsiBusProtocolGuid,
&gEfiCallerIdGuid,
(VOID **) &Scsidentifier,
This->DriverBindingHandle,
Controller,
@@ -578,7 +570,7 @@ SCSIBusDriverBindingStop (
//
gBS->UninstallProtocolInterface (
Controller,
&mScsiBusProtocolGuid,
&gEfiCallerIdGuid,
&ScsiBusDev->BusIdentify
);

View File

@@ -75,11 +75,14 @@ typedef struct {
//
// SCSI Bus Controller device strcuture
//
#define EFI_SCSI_BUS_PROTOCOL_GUID \
{ \
0x5261213D, 0x3A3D, 0x441E, {0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17} \
}
//
// The ScsiBusProtocol is just used to locate ScsiBusDev
// structure in the SCSIBusDriverBindingStop(). Then we can
// Close all opened protocols and release this structure.
// ScsiBusProtocol is the private protocol.
// gEfiCallerIdGuid will be used as its protocol guid.
//
typedef struct _EFI_SCSI_BUS_PROTOCOL {
UINT64 Reserved;
} EFI_SCSI_BUS_PROTOCOL;

View File

@@ -15,11 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "UsbBus.h"
//
// USB_BUS_PROTOCOL is only used to locate USB_BUS
//
EFI_GUID mUsbBusProtocolGuid = EFI_USB_BUS_PROTOCOL_GUID;
EFI_USB_IO_PROTOCOL mUsbIoProtocol = {
UsbIoControlTransfer,
UsbIoBulkTransfer,
@@ -982,7 +977,7 @@ UsbBusBuildProtocol (
//
Status = gBS->InstallProtocolInterface (
&Controller,
&mUsbBusProtocolGuid,
&gEfiCallerIdGuid,
EFI_NATIVE_INTERFACE,
&UsbBus->BusId
);
@@ -1045,7 +1040,7 @@ FREE_ROOTHUB:
}
UNINSTALL_USBBUS:
gBS->UninstallProtocolInterface (Controller, &mUsbBusProtocolGuid, &UsbBus->BusId);
gBS->UninstallProtocolInterface (Controller, &gEfiCallerIdGuid, &UsbBus->BusId);
CLOSE_HC:
if (UsbBus->Usb2Hc != NULL) {
@@ -1277,7 +1272,7 @@ UsbBusControllerDriverStart (
//
Status = gBS->OpenProtocol (
Controller,
&mUsbBusProtocolGuid,
&gEfiCallerIdGuid,
(VOID **) &UsbBusId,
This->DriverBindingHandle,
Controller,
@@ -1298,7 +1293,7 @@ UsbBusControllerDriverStart (
//
Status = gBS->OpenProtocol (
Controller,
&mUsbBusProtocolGuid,
&gEfiCallerIdGuid,
(VOID **) &UsbBusId,
This->DriverBindingHandle,
Controller,
@@ -1417,7 +1412,7 @@ UsbBusControllerDriverStop (
//
Status = gBS->OpenProtocol (
Controller,
&mUsbBusProtocolGuid,
&gEfiCallerIdGuid,
(VOID **) &BusId,
This->DriverBindingHandle,
Controller,
@@ -1460,7 +1455,7 @@ UsbBusControllerDriverStop (
//
// Uninstall the bus identifier and close USB_HC/USB2_HC protocols
//
gBS->UninstallProtocolInterface (Controller, &mUsbBusProtocolGuid, &Bus->BusId);
gBS->UninstallProtocolInterface (Controller, &gEfiCallerIdGuid, &Bus->BusId);
if (Bus->Usb2Hc != NULL) {
gBS->CloseProtocol (

View File

@@ -138,9 +138,6 @@ typedef struct _USB_HUB_API USB_HUB_API;
#define USB_BIT(a) ((UINTN)(1 << (a)))
#define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))
#define EFI_USB_BUS_PROTOCOL_GUID \
{0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}
#define USB_INTERFACE_FROM_USBIO(a) \
CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)
@@ -149,6 +146,8 @@ typedef struct _USB_HUB_API USB_HUB_API;
//
// Used to locate USB_BUS
// UsbBusProtocol is the private protocol.
// gEfiCallerIdGuid will be used as its protocol guid.
//
typedef struct _EFI_USB_BUS_PROTOCOL {
UINT64 Reserved;

View File

@@ -24,6 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/DevicePath.h>
#include <Guid/HiiKeyBoardLayout.h>
#include <Guid/UsbKeyBoardLayout.h>
#include <Library/DebugLib.h>
#include <Library/ReportStatusCodeLib.h>

View File

@@ -14,9 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "KeyBoard.h"
EFI_GUID mUsbKeyboardLayoutPackageGuid = USB_KEYBOARD_LAYOUT_PACKAGE_GUID;
EFI_GUID mUsbKeyboardLayoutKeyGuid = USB_KEYBOARD_LAYOUT_KEY_GUID;
USB_KEYBOARD_LAYOUT_PACK_BIN mUsbKeyboardLayoutBin = {
sizeof (USB_KEYBOARD_LAYOUT_PACK_BIN), // Binary size
@@ -338,7 +335,7 @@ InstallDefaultKeyboardLayout (
// Install Keyboard Layout package to HII database
//
HiiHandle = HiiAddPackages (
&mUsbKeyboardLayoutPackageGuid,
&gUsbKeyboardLayoutPackageGuid,
UsbKeyboardDevice->ControllerHandle,
&mUsbKeyboardLayoutBin,
NULL
@@ -350,7 +347,7 @@ InstallDefaultKeyboardLayout (
//
// Set current keyboard layout
//
Status = HiiDatabase->SetKeyboardLayout (HiiDatabase, &mUsbKeyboardLayoutKeyGuid);
Status = HiiDatabase->SetKeyboardLayout (HiiDatabase, &gUsbKeyboardLayoutKeyGuid);
return Status;
}

View File

@@ -18,16 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "EfiKey.h"
#define USB_KEYBOARD_LAYOUT_PACKAGE_GUID \
{ \
0xc0f3b43, 0x44de, 0x4907, { 0xb4, 0x78, 0x22, 0x5f, 0x6f, 0x62, 0x89, 0xdc } \
}
#define USB_KEYBOARD_LAYOUT_KEY_GUID \
{ \
0x3a4d7a7c, 0x18a, 0x4b42, { 0x81, 0xb3, 0xdc, 0x10, 0xe3, 0xb5, 0x91, 0xbd } \
}
#define USB_KEYBOARD_KEY_COUNT 104
#define USB_KEYBOARD_LANGUAGE_STR_LEN 5 // RFC4646 Language Code: "en-US"

View File

@@ -74,6 +74,8 @@
# which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().
#
gEfiHiiKeyBoardLayoutGuid ## SOMETIME_CONSUMES ## Event
gUsbKeyboardLayoutPackageGuid
gUsbKeyboardLayoutKeyGuid
[Protocols]
gEfiUsbIoProtocolGuid ## TO_START