diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 02:51:45 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 02:51:45 +0000 |
commit | aa8f4f55ff80d0c1b1efcdae6d45db76849fc265 (patch) | |
tree | a452d7b58ca0098a4f49f15c39d196201ffa8f3e /MdeModulePkg/Universal/Console/ConPlatformDxe | |
parent | fbfa4a1da7e9b44360d74229cd00b7cd13b349e8 (diff) | |
download | edk2-platforms-aa8f4f55ff80d0c1b1efcdae6d45db76849fc265.tar.xz |
1. Retired HotPlugDevice protocol.
2. Check devicepath node to get hot plug information. Currently, USB and PCCard device are checked.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7562 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConPlatformDxe')
-rw-r--r-- | MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c | 45 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h | 1 |
2 files changed, 26 insertions, 20 deletions
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c index 0cb07a2971..f6483ed1fd 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c @@ -256,7 +256,7 @@ ConPlatformTextInDriverBindingStart ( return Status;
}
//
- // Check the device handle, if it is a hot plug device,
+ // Check the device path, if it is a hot plug device,
// do not put the device path into ConInDev, and install
// gEfiConsoleInDeviceGuid to the device handle directly.
// The policy is, make hot plug device plug in and play immediately.
@@ -373,7 +373,7 @@ ConPlatformTextOutDriverBindingStart ( return Status;
}
//
- // Check the device handle, if it is a hot plug device,
+ // Check the device path, if it is a hot plug device,
// do not put the device path into ConOutDev and ErrOutDev,
// and install gEfiConsoleOutDeviceGuid to the device handle directly.
// The policy is, make hot plug device plug in and play immediately.
@@ -953,24 +953,31 @@ IsHotPlugDevice ( IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
{
- //
- // Check device whether is hot plug device or not throught Device Path
- //
- if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) &&
- (DevicePathSubType (DevicePath) == MSG_USB_DP ||
- DevicePathSubType (DevicePath) == MSG_USB_CLASS_DP ||
- DevicePathSubType (DevicePath) == MSG_USB_WWID_DP)) {
- //
- // If Device is USB device
- //
- return TRUE;
- }
- if ((DevicePathType (DevicePath) == HARDWARE_DEVICE_PATH) &&
- (DevicePathSubType (DevicePath) == HW_PCCARD_DP)) {
- //
- // If Device is PCCard
+ EFI_DEVICE_PATH_PROTOCOL *CheckDevicePath;
+
+ CheckDevicePath = DevicePath;
+ while (!IsDevicePathEnd (CheckDevicePath)) {
//
- return TRUE;
+ // Check device whether is hot plug device or not throught Device Path
+ //
+ if ((DevicePathType (CheckDevicePath) == MESSAGING_DEVICE_PATH) &&
+ (DevicePathSubType (CheckDevicePath) == MSG_USB_DP ||
+ DevicePathSubType (CheckDevicePath) == MSG_USB_CLASS_DP ||
+ DevicePathSubType (CheckDevicePath) == MSG_USB_WWID_DP)) {
+ //
+ // If Device is USB device
+ //
+ return TRUE;
+ }
+ if ((DevicePathType (CheckDevicePath) == HARDWARE_DEVICE_PATH) &&
+ (DevicePathSubType (CheckDevicePath) == HW_PCCARD_DP)) {
+ //
+ // If Device is PCCard
+ //
+ return TRUE;
+ }
+
+ CheckDevicePath = NextDevicePathNode (CheckDevicePath);
}
return FALSE;
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h index d0fa03af5b..a47ad1ce30 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h @@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Protocol/SimpleTextOut.h>
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleTextIn.h>
-#include <Protocol/HotPlugDevice.h>
#include <Guid/GlobalVariable.h>
#include <Guid/ConsoleInDevice.h>
|