From fa9bebd8f9da3cae3cc44862912ce7399c881d98 Mon Sep 17 00:00:00 2001 From: niruiyu Date: Tue, 5 Mar 2013 01:58:39 +0000 Subject: [PATCH] Enhance the ConPlatform driver to take care of the optional Controller device path node when comparing the GOP device path. Signed-off-by: Ruiyu Ni Reviewed-by: Kinney Michael D git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14161 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Console/ConPlatformDxe/ConPlatform.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c index ab65e7e16f..795123d106 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c @@ -2,7 +2,7 @@ Console Platform DXE Driver, install Console Device Guids and update Console Environment Variables. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
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 @@ -792,7 +792,9 @@ IsGopSibling ( EFI_DEVICE_PATH_PROTOCOL *NodeRight; for (NodeLeft = Left; !IsDevicePathEndType (NodeLeft); NodeLeft = NextDevicePathNode (NodeLeft)) { - if (DevicePathType (NodeLeft) == ACPI_DEVICE_PATH && DevicePathSubType (NodeLeft) == ACPI_ADR_DP) { + if ((DevicePathType (NodeLeft) == ACPI_DEVICE_PATH && DevicePathSubType (NodeLeft) == ACPI_ADR_DP) || + (DevicePathType (NodeLeft) == HARDWARE_DEVICE_PATH && DevicePathSubType (NodeLeft) == HW_CONTROLLER_DP && + DevicePathType (NextDevicePathNode (NodeLeft)) == ACPI_DEVICE_PATH && DevicePathSubType (NextDevicePathNode (NodeLeft)) == ACPI_ADR_DP)) { break; } } @@ -802,7 +804,9 @@ IsGopSibling ( } for (NodeRight = Right; !IsDevicePathEndType (NodeRight); NodeRight = NextDevicePathNode (NodeRight)) { - if (DevicePathType (NodeRight) == ACPI_DEVICE_PATH && DevicePathSubType (NodeRight) == ACPI_ADR_DP) { + if ((DevicePathType (NodeRight) == ACPI_DEVICE_PATH && DevicePathSubType (NodeRight) == ACPI_ADR_DP) || + (DevicePathType (NodeRight) == HARDWARE_DEVICE_PATH && DevicePathSubType (NodeRight) == HW_CONTROLLER_DP && + DevicePathType (NextDevicePathNode (NodeRight)) == ACPI_DEVICE_PATH && DevicePathSubType (NextDevicePathNode (NodeRight)) == ACPI_ADR_DP)) { break; } } -- 2.39.5