From patchwork Fri Apr 29 21:38:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Duran, Leo" X-Patchwork-Id: 66976 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1018096qge; Fri, 29 Apr 2016 14:39:55 -0700 (PDT) X-Received: by 10.107.150.208 with SMTP id y199mr27137665iod.23.1461965995692; Fri, 29 Apr 2016 14:39:55 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y7si605928igl.65.2016.04.29.14.39.55; Fri, 29 Apr 2016 14:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2580661600; Fri, 29 Apr 2016 21:39:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 15A90615F6; Fri, 29 Apr 2016 21:39:08 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0E73161602; Fri, 29 Apr 2016 21:38:59 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0065.outbound.protection.outlook.com [207.46.100.65]) by lists.linaro.org (Postfix) with ESMTPS id 00F86615F7 for ; Fri, 29 Apr 2016 21:38:55 +0000 (UTC) Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by SN1PR12MB0528.namprd12.prod.outlook.com (10.162.105.17) with Microsoft SMTP Server (TLS) id 15.1.477.8; Fri, 29 Apr 2016 21:38:53 +0000 From: Leo Duran To: Date: Fri, 29 Apr 2016 16:38:36 -0500 Message-ID: <1461965918-28324-3-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461965918-28324-1-git-send-email-leo.duran@amd.com> References: <1461965918-28324-1-git-send-email-leo.duran@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY1PR08CA0003.namprd08.prod.outlook.com (10.163.94.141) To SN1PR12MB0528.namprd12.prod.outlook.com (10.162.105.17) X-MS-Office365-Filtering-Correlation-Id: 585d2385-3a9b-4675-f751-08d37076a938 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0528; 2:sW92a0ujB7Lu4ECHNPgselehfnc2SaQYbhv4u8V/hWFe04BRUJrybqHQX1RDhBzsiO9MoYIAEHvTK2lQASCViguKwXfS3G92fm87sr+oeYTXgGt5kWMNLBzqK4goidJqF/xNOVHo+fkW4xSphrP9GhSCSOxw+tRrLpDPl39xHBLg4mmV3B73+GbFfETuTUkU; 3:DNycH69s8U1Yt5rWUrm7+JToSR3wnCqomBLakB3mNfBSVbhC2MtaUj4cZ15evc1lAVYTK+JuPZhEkO6Xg+lJJjebpoXvGA2SLZlBwM39ogx4o8jj+j5YL0G0dlg8zrmD X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0528; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0528; 25:29n/J3YUK3t/1CnrYlS3M+CmRH9QLTKOTgncN+OpZy2yLmMkdgZWtDQJyM9lhMngWPvaVrN8jefeuIGNLLHAnvrJL5IAUZeyfIGIiDwANJMqnhRx6OnnXYdFyO75ofKKIyNGeLI3gD05g+eIfa99qHQuuR1uuPCIKT5n3fdF5PMWYJzOSSsKDUOuaQg2bTqaPFrJsJYm0O0RPDKnSjiMy3r7otrMQv7aHEvY1Aat36s2rkLapxesE915hEFY8SjCAP9MYUbXXv1626VRtYSuR9Nt3PkmYXQCDjUYDNveFeyKhOn2dXew24A7tc6dw1MZKnBi/gwdwb5cw1T99uEG404JJtRtxzO8f4OtkAJ8Pd/fV4xMq391bgiq1bKLOO5v3/AIzkbNhafu+hW51LcOM3Dci4hwwEELhvT3jqzLKmdgr3nhiiQ5lETDEkz8c0ckT15mLmObnfVUAsVwc7EmQoSdDxg1uboNek18MkZGnYLI+RnbED0N26ISEGGW4UrIjZCyW23l76ZH+igRuCIDxGYw6lAdfmpZoQBWuK22hauqoMOgtQxe5qICryB6N2OOBgLqA7g38nB8J33ZzXBihFbPeBqITk70Iz5ItUUffJPa5Cst0I29mc64w4Yai5CsLB5HM2G5nj/sQOPIKXJGIIKL60PiG5J9XLh7xrdoLlLD3XOD2R76HrgIe32FYN7XG6OdWDynj83kAGVH+WzXmhQ5Qeb/f17SiQR133EV0LRgnKzdGV5HH12ES6X85/Fx X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0528; 20:4NZQ/t59skdgpush+FlbBpymn1udcUTR8935aK8B1XpilSI7PEFmPUGt/ptxgVIwadVFiooWcbMmsrR/agqX6uAR7VuYv0uSbEtVnNcQwUuzg033NO0Eu5fdpOm/EM/OVMwZAvPmU0WA0MX+D6v+T0hYknxdloRE1RqPUTRVr3c6+8ZwQ8VqU9lsvYuiRTt+fPZAu01tx3bHpfK8v2zVecCgxZXABSNrBRkhGcKbrtiB10OoTCwvVRjIAxvWQjKB32BPg4LoyBb4aWsZ4nVV0plKyBLJAr0Zrjj5o14OfsX+/igAH/3KbiQ+cvRggNC8i2RWSMtYOyhieBHrr+wOLZOtfoGKXbq9FvTXJX2BClIbWKI/t2ADQgymxkPVu9tyA+ropY5OlubALUXDfx2eNCTqNK8fEnUiYgdcVoBRuZvWxdvgzQS8kVOtUUPtujFSCDLsMf6MNFZUZMUGqvoQZjyFoJ7EVwvck5xzCszFAug9Nqr0qJkNDMJHQE5/e7sk; 4:Pg7InUCYvGnjQ8VeQ0mk21zHFZKeGqLyssocd7nVQPB+lAwyrWl6VRwvg2C9M3tr1E6KSqI8cxVPmmq4QzBs3bSGOHZEXa3vlxwen6ODcLsT0qsgiWU511nsBgPTq1jQEknWh6epL/fdHjoa/ZGyHwkhNyzcTz7ny+ECjX6DRThiTvNlkH66DY1IKjqmDwnwoV9SjoVK/3c97dmhW3vfT9EqwHzUidv9ku0RzvDlLxOHgqSuxGaUBk3b8xtQZOBSWZc/gwhGb9ItT/S2vdCOdEKhA01que6SBzuTGwBQ9ihxyLc16ndrLhUEhCkqXaM3W1fb08G1lRqonEck6OHljUP/2xufo6X5J4jTy0K8ul8HmtLJWlLBzpkOszAh1IW1ozOS813CNp6RwmqEgT9N1VbZ7lA24SpifTK4+1W+liw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:SN1PR12MB0528; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0528; X-Forefront-PRVS: 0927AA37C7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(2950100001)(42186005)(53416004)(36756003)(76176999)(66066001)(16799955002)(48376002)(50226002)(47776003)(189998001)(19580405001)(15975445007)(15188155005)(2351001)(15395725005)(110136002)(81166005)(5008740100001)(77096005)(1096002)(5003940100001)(86362001)(3846002)(586003)(551544002)(50986999)(33646002)(229853001)(2906002)(92566002)(6116002)(19580395003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0528; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0528; 23:fYO7KUZ9PWBZS7z+VTnMOrxQMd7KMVETU0kFPDzCS?= =?us-ascii?Q?75GJp7FN2hxK3t4fGw+F3FBOy941YpFTqMqVJ9RG00AR70wnbNCWDBubYCRq?= =?us-ascii?Q?PBv01YTIdx26OHoX9/D3Vo0EOInBFLyNDyflxqoLZGpetB/pRKrRBJrBhCKM?= =?us-ascii?Q?yRieoLBhXyWpWSlij/3EITemoJQx6RxJRcT/t0CMIzoiX7qECvD4gMpjnGYq?= =?us-ascii?Q?nV+FQc90H6oTeevq5rqz/XL5PT3lTcopEXwf/nIg0PaxhdN1OKeZBTBAIEcd?= =?us-ascii?Q?N0XX8KXJX3KE0Zpxx0hNCWFqdoo03bh36R5lIkIJ8WaAUsLI4xmvpcP0QXP2?= =?us-ascii?Q?MA+EY9ZyHNiIF03fojU6ttF5aethWii3MV1YI/B9m/tQ3e5zQdHMxHCGXFzp?= =?us-ascii?Q?3yDl6lNaqq53UzqYjmUGxUFnrj640+Qte4ipUKjI7uYD3i4mX9oriq/Ln2kT?= =?us-ascii?Q?7aS4gHexNYat5Tm/y1K3kVw3sj/VQacYM2LOvCoz2lUcRIj4sW9U+voYf19Z?= =?us-ascii?Q?2jjlAw97eZcrKtpKMUPOw++2tkD9F0reDBKC6urtf9MRpBEHdiluYoEA6k/q?= =?us-ascii?Q?JEeBgJpq8y8PtMp6Cjv3NXjXKa6dfGcE5ddZpCYP63S0uBQLxyrxE/SgOq0U?= =?us-ascii?Q?93R2wPCZ1PpVfc2ixK/GLNkaJsjp828l+fHzItBDLDYK9pJHtQSUoGF48I0/?= =?us-ascii?Q?Wt5atGz0V78q82QgDGxzuurQ/3X+VKkU7bso6GLw1Td9VG6OK3JgOmMrLmxs?= =?us-ascii?Q?ihaXXatB/tNSUBCWyfXwHD+hA/1L45PH0m3til85wGqUVkje6l2AltmZP0YI?= =?us-ascii?Q?/MRbHi3Egdq9yos5AY2264+iIHDH6ms18q75v2wRlsxAuKM6pDRbxRiY2aOS?= =?us-ascii?Q?hw3Ztf0kaz5XIVyaXUETqQQ91oWVPvmbHUc3xIzFeNO3SScaXfLTWsjPuh9P?= =?us-ascii?Q?j8Pxzh0cwv0ba3ZbyAIOxbgPkPmxHSl9LZKS7GGYQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0528; 5:dqp/32wqLAHyO5Ch/H1UdAqK5HNq01tJXIugOy7K67cA31GoruadZlQvrHyyAHprs3SQBFo5XpySFiuH5ffvCmK0YXNwfUsZe5fWQ+UXnvHdjTzQaJACwrwnJKXNLOaGE2grrRuXqmRH5bxiJtfvcA==; 24:HH/Xh2ooEKCOtBaP+7wpdg7+4aNGjevqiNIbOKI46uI0qrnkFC3cxch2tsbCO4OJc0agdGwcbhP8xFzZF6M4jr6yEhNG6IOjKxBb8CAUodo=; 7:0jLAP3CZ5Go3fPGPQIsKVga7jAlcV9Rtvvs/Q0qmIUIZA0/pmhzwilUQcZs+lv1inoJNzt2BRzsg5KlVdOe9ciQeNHYSkVfIvGV2zv+yU7FuoloD8nsIqYWixNNHEYAolkmv+9C07xL4GCMdwatqvnNK1PWbKOa+oUNKs7WseBg=; 20:ChfIZbSEf6wKoBvGeEOJryot/F38/Szq0SQCONTTcnFSsMtdBaGcBo284zXHbGCR+3ernEpJ3AwDQ4BDPElVDG/R7PqsFT+bIC9AxVENn+xCQ86L3VSX44FVX731Kni3e1Nqhsln1ZvtGOqxuPjgJyBNZZ702Fx87bH7hzZFlI6pligYRJ4SRFlkOwx6kQGB38we9w8J2zSkFHGuJS76zVY7Cbjpkwtk7JVIcfTn62847Sbd/mBIr71OmhlIQdbj X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2016 21:38:53.3000 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0528 Cc: Leo Duran Subject: [Linaro-uefi] [PATCH 2/4] Override to invoke BdsLibConnectAll() no longer necesasary X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran --- Platforms/AMD/Styx/HuskyBoard/HuskyBoard.dsc | 2 +- .../AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 2 +- .../Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 377 --------------------- .../Library/PlatformIntelBdsLib/IntelBdsPlatform.h | 35 -- .../PlatformIntelBdsLib/PlatformIntelBdsLib.inf | 62 ---- 5 files changed, 2 insertions(+), 476 deletions(-) delete mode 100644 Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c delete mode 100644 Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h delete mode 100644 Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf diff --git a/Platforms/AMD/Styx/HuskyBoard/HuskyBoard.dsc b/Platforms/AMD/Styx/HuskyBoard/HuskyBoard.dsc index 6a20166..ce72a79 100644 --- a/Platforms/AMD/Styx/HuskyBoard/HuskyBoard.dsc +++ b/Platforms/AMD/Styx/HuskyBoard/HuskyBoard.dsc @@ -134,7 +134,7 @@ DEFINE TRANS_CODE = $(EL3_TO_EL2) CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf - PlatformBdsLib|OpenPlatformPkg/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf + PlatformBdsLib|ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf # diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc index e4ece5e..6bb40a0 100644 --- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc +++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc @@ -136,7 +136,7 @@ DEFINE TRANS_CODE = $(EL3_TO_EL2) CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf - PlatformBdsLib|OpenPlatformPkg/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf + PlatformBdsLib|ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf # diff --git a/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c deleted file mode 100644 index 8b518ce..0000000 --- a/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c +++ /dev/null @@ -1,377 +0,0 @@ -/** @file - -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.
-Copyright (c) 2014, ARM Ltd. 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include "IntelBdsPlatform.h" - -/// -/// Predefined platform default time out value -/// -UINT16 gPlatformBootTimeOutDefault; - -EFI_STATUS -EFIAPI -PlatformIntelBdsConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - gPlatformBootTimeOutDefault = (UINT16)PcdGet16 (PcdPlatformBootTimeOut); - return EFI_SUCCESS; -} - -// -// BDS Platform Functions -// -/** - Platform Bds init. Include the platform firmware vendor, revision - and so crc check. - -**/ -VOID -EFIAPI -PlatformBdsInit ( - VOID - ) -{ -} - -STATIC -EFI_STATUS -GetConsoleDevicePathFromVariable ( - IN CHAR16* ConsoleVarName, - IN CHAR16* DefaultConsolePaths, - OUT EFI_DEVICE_PATH** DevicePaths - ) -{ - EFI_STATUS Status; - UINTN Size; - EFI_DEVICE_PATH_PROTOCOL* DevicePathInstances; - EFI_DEVICE_PATH_PROTOCOL* DevicePathInstance; - CHAR16* DevicePathStr; - CHAR16* NextDevicePathStr; - EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *EfiDevicePathFromTextProtocol; - - Status = GetGlobalEnvironmentVariable (ConsoleVarName, NULL, NULL, (VOID**)&DevicePathInstances); - if (EFI_ERROR(Status)) { - // In case no default console device path has been defined we assume a driver handles the console (eg: SimpleTextInOutSerial) - if ((DefaultConsolePaths == NULL) || (DefaultConsolePaths[0] == L'\0')) { - *DevicePaths = NULL; - return EFI_SUCCESS; - } - - Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol); - ASSERT_EFI_ERROR(Status); - - DevicePathInstances = NULL; - - // Extract the Device Path instances from the multi-device path string - while ((DefaultConsolePaths != NULL) && (DefaultConsolePaths[0] != L'\0')) { - NextDevicePathStr = StrStr (DefaultConsolePaths, L";"); - if (NextDevicePathStr == NULL) { - DevicePathStr = DefaultConsolePaths; - DefaultConsolePaths = NULL; - } else { - DevicePathStr = (CHAR16*)AllocateCopyPool ((NextDevicePathStr - DefaultConsolePaths + 1) * sizeof(CHAR16), DefaultConsolePaths); - *(DevicePathStr + (NextDevicePathStr - DefaultConsolePaths)) = L'\0'; - DefaultConsolePaths = NextDevicePathStr; - if (DefaultConsolePaths[0] == L';') { - DefaultConsolePaths++; - } - } - - DevicePathInstance = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath (DevicePathStr); - ASSERT(DevicePathInstance != NULL); - DevicePathInstances = AppendDevicePathInstance (DevicePathInstances, DevicePathInstance); - - if (NextDevicePathStr != NULL) { - FreePool (DevicePathStr); - } - FreePool (DevicePathInstance); - } - - // Set the environment variable with this device path multi-instances - Size = GetDevicePathSize (DevicePathInstances); - if (Size > 0) { - gRT->SetVariable ( - ConsoleVarName, - &gEfiGlobalVariableGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, - Size, - DevicePathInstances - ); - } else { - Status = EFI_INVALID_PARAMETER; - } - } - - if (!EFI_ERROR(Status)) { - *DevicePaths = DevicePathInstances; - } - return Status; -} - -STATIC -EFI_STATUS -InitializeConsolePipe ( - IN EFI_DEVICE_PATH *ConsoleDevicePaths, - IN EFI_GUID *Protocol, - OUT EFI_HANDLE *Handle, - OUT VOID* *Interface - ) -{ - EFI_STATUS Status; - UINTN Size; - UINTN NoHandles; - EFI_HANDLE *Buffer; - EFI_DEVICE_PATH_PROTOCOL* DevicePath; - - // Connect all the Device Path Consoles - while (ConsoleDevicePaths != NULL) { - DevicePath = GetNextDevicePathInstance (&ConsoleDevicePaths, &Size); - - Status = BdsConnectDevicePath (DevicePath, Handle, NULL); - DEBUG_CODE_BEGIN(); - if (EFI_ERROR(Status)) { - // We convert back to the text representation of the device Path - EFI_DEVICE_PATH_TO_TEXT_PROTOCOL* DevicePathToTextProtocol; - CHAR16* DevicePathTxt; - EFI_STATUS Status; - - Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **)&DevicePathToTextProtocol); - if (!EFI_ERROR(Status)) { - DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText (DevicePath, TRUE, TRUE); - - DEBUG((EFI_D_ERROR,"Fail to start the console with the Device Path '%s'. (Error '%r')\n", DevicePathTxt, Status)); - - FreePool (DevicePathTxt); - } - } - DEBUG_CODE_END(); - - // If the console splitter driver is not supported by the platform then use the first Device Path - // instance for the console interface. - if (!EFI_ERROR(Status) && (*Interface == NULL)) { - Status = gBS->HandleProtocol (*Handle, Protocol, Interface); - } - } - - // No Device Path has been defined for this console interface. We take the first protocol implementation - if (*Interface == NULL) { - Status = gBS->LocateHandleBuffer (ByProtocol, Protocol, NULL, &NoHandles, &Buffer); - if (EFI_ERROR (Status)) { - BdsConnectAllDrivers (); - Status = gBS->LocateHandleBuffer (ByProtocol, Protocol, NULL, &NoHandles, &Buffer); - } - - if (!EFI_ERROR(Status)) { - *Handle = Buffer[0]; - Status = gBS->HandleProtocol (*Handle, Protocol, Interface); - ASSERT_EFI_ERROR (Status); - FreePool (Buffer); - } - } else { - Status = EFI_SUCCESS; - } - - return Status; -} - -/** - Connect the predefined platform default console device. Always try to find - and enable the vga device if have. - - @param PlatformConsole Predefined platform default console device array. - - @retval EFI_SUCCESS Success connect at least one ConIn and ConOut - device, there must have one ConOut device is - active vga device. - @return Return the status of BdsLibConnectAllDefaultConsoles () - -**/ -EFI_STATUS -PlatformBdsConnectConsole ( - VOID - ) -{ - EFI_STATUS Status; - EFI_DEVICE_PATH* ConOutDevicePaths; - EFI_DEVICE_PATH* ConInDevicePaths; - EFI_DEVICE_PATH* ConErrDevicePaths; - - // By getting the Console Device Paths from the environment variables before initializing the console pipe, we - // create the 3 environment variables (ConIn, ConOut, ConErr) that allows to initialize all the console interface - // of newly installed console drivers - Status = GetConsoleDevicePathFromVariable (L"ConOut", (CHAR16*)PcdGetPtr(PcdDefaultConOutPaths), &ConOutDevicePaths); - ASSERT_EFI_ERROR (Status); - Status = GetConsoleDevicePathFromVariable (L"ConIn", (CHAR16*)PcdGetPtr(PcdDefaultConInPaths), &ConInDevicePaths); - ASSERT_EFI_ERROR (Status); - Status = GetConsoleDevicePathFromVariable (L"ErrOut", (CHAR16*)PcdGetPtr(PcdDefaultConOutPaths), &ConErrDevicePaths); - ASSERT_EFI_ERROR (Status); - - // Initialize the Consoles - Status = InitializeConsolePipe (ConOutDevicePaths, &gEfiSimpleTextOutProtocolGuid, &gST->ConsoleOutHandle, (VOID **)&gST->ConOut); - ASSERT_EFI_ERROR (Status); - Status = InitializeConsolePipe (ConInDevicePaths, &gEfiSimpleTextInProtocolGuid, &gST->ConsoleInHandle, (VOID **)&gST->ConIn); - ASSERT_EFI_ERROR (Status); - Status = InitializeConsolePipe (ConErrDevicePaths, &gEfiSimpleTextOutProtocolGuid, &gST->StandardErrorHandle, (VOID **)&gST->StdErr); - if (EFI_ERROR(Status)) { - // In case of error, we reuse the console output for the error output - gST->StandardErrorHandle = gST->ConsoleOutHandle; - gST->StdErr = gST->ConOut; - } - - return Status; -} - -/** - Connect with predefined platform connect sequence, - the OEM/IBV can customize with their own connect sequence. -**/ -VOID -PlatformBdsConnectSequence ( - VOID - ) -{ -} - -/** - Load the predefined driver option, OEM/IBV can customize this - to load their own drivers - - @param BdsDriverLists - The header of the driver option link list. - -**/ -VOID -PlatformBdsGetDriverOption ( - IN OUT LIST_ENTRY *BdsDriverLists - ) -{ -} - -/** - Perform the platform diagnostic, such like test memory. OEM/IBV also - can customize this function to support specific platform diagnostic. - - @param MemoryTestLevel The memory test intensive level - @param QuietBoot Indicate if need to enable the quiet boot - @param BaseMemoryTest A pointer to BdsMemoryTest() - -**/ -VOID -PlatformBdsDiagnostics ( - IN EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel, - IN BOOLEAN QuietBoot, - IN BASEM_MEMORY_TEST BaseMemoryTest - ) -{ -} - -/** - The function will execute with as the platform policy, current policy - is driven by boot mode. IBV/OEM can customize this code for their specific - policy action. - - @param DriverOptionList The header of the driver option link list - @param BootOptionList The header of the boot option link list - @param ProcessCapsules A pointer to ProcessCapsules() - @param BaseMemoryTest A pointer to BaseMemoryTest() - -**/ -VOID -EFIAPI -PlatformBdsPolicyBehavior ( - IN LIST_ENTRY *DriverOptionList, - IN LIST_ENTRY *BootOptionList, - IN PROCESS_CAPSULES ProcessCapsules, - IN BASEM_MEMORY_TEST BaseMemoryTest - ) -{ - EFI_STATUS Status; - - Status = PlatformBdsConnectConsole (); - ASSERT_EFI_ERROR (Status); - BdsLibConnectAll (); -} - -/** - Hook point after a boot attempt succeeds. We don't expect a boot option to - return, so the UEFI 2.0 specification defines that you will default to an - interactive mode and stop processing the BootOrder list in this case. This - is also a platform implementation and can be customized by IBV/OEM. - - @param Option Pointer to Boot Option that succeeded to boot. - -**/ -VOID -EFIAPI -PlatformBdsBootSuccess ( - IN BDS_COMMON_OPTION *Option - ) -{ -} - -/** - Hook point after a boot attempt fails. - - @param Option Pointer to Boot Option that failed to boot. - @param Status Status returned from failed boot. - @param ExitData Exit data returned from failed boot. - @param ExitDataSize Exit data size returned from failed boot. - -**/ -VOID -EFIAPI -PlatformBdsBootFail ( - IN BDS_COMMON_OPTION *Option, - IN EFI_STATUS Status, - IN CHAR16 *ExitData, - IN UINTN ExitDataSize - ) -{ -} - -/** - This function locks platform flash that is not allowed to be updated during normal boot path. - The flash layout is platform specific. -**/ -VOID -EFIAPI -PlatformBdsLockNonUpdatableFlash ( - VOID - ) -{ - return; -} - - -/** - Lock the ConsoleIn device in system table. All key - presses will be ignored until the Password is typed in. The only way to - disable the password is to type it in to a ConIn device. - - @param Password Password used to lock ConIn device. - - @retval EFI_SUCCESS lock the Console In Spliter virtual handle successfully. - @retval EFI_UNSUPPORTED Password not found - -**/ -EFI_STATUS -EFIAPI -LockKeyboards ( - IN CHAR16 *Password - ) -{ - return EFI_UNSUPPORTED; -} diff --git a/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h deleted file mode 100644 index a244ac9..0000000 --- a/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h +++ /dev/null @@ -1,35 +0,0 @@ -/** @file - Head file for BDS Platform specific code - -Copyright (c) 2004 - 2008, 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef _INTEL_BDS_PLATFORM_H_ -#define _INTEL_BDS_PLATFORM_H_ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#endif // _INTEL_BDS_PLATFORM_H diff --git a/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf deleted file mode 100644 index de9f1c2..0000000 --- a/Platforms/AMD/Styx/Override/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ /dev/null @@ -1,62 +0,0 @@ -## @file -# Implementation for PlatformBdsLib library class interfaces. -# using ARM Platform framework. -# -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
-# Copyright (c) 2014, ARM Ltd. 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 -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -## - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = PlatformIntelBdsLib - FILE_GUID = 67780d14-60eb-4894-ab7c-eed6af427f9f - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER - CONSTRUCTOR = PlatformIntelBdsConstructor - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = ARM AARCH64 -# - -[Sources] - IntelBdsPlatform.c - IntelBdsPlatform.h - -[Packages] - ArmPkg/ArmPkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec - -[LibraryClasses] - BaseLib - BaseMemoryLib - BdsLib - DebugLib - DevicePathLib - MemoryAllocationLib - UefiBootServicesTableLib - PcdLib - GenericBdsLib - -[Pcd] - gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths - gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut - -[Protocols] - gEfiDevicePathFromTextProtocolGuid - gEfiDevicePathToTextProtocolGuid