summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c16
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h11
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c17
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h5
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h1
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c7
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h10
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf2
8 files changed, 24 insertions, 45 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 83c2ca3afe..b1c4d207f9 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -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
);
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
index a9e5da7def..8f86444a4c 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
@@ -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;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
index 63480f62a9..30bf43cb36 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
@@ -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 (
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
index 14454da28a..f6e323239a 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
@@ -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;
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
index 8a12d0fa3f..2066c38e7e 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h
@@ -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>
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
index 859a4dece3..000430ae78 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
@@ -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;
}
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
index 73efef8f62..c41a0727f1 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
@@ -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"
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
index 6c2c7f4315..b1da4b7786 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
@@ -74,6 +74,8 @@
# which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().
#
gEfiHiiKeyBoardLayoutGuid ## SOMETIME_CONSUMES ## Event
+ gUsbKeyboardLayoutPackageGuid
+ gUsbKeyboardLayoutKeyGuid
[Protocols]
gEfiUsbIoProtocolGuid ## TO_START