From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.7422.1684931339636052825 for ; Wed, 24 May 2023 05:29:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=NudT7mrI; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684931342; x=1716467342; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FIE1VIKWBVcMyUM4L/NFIYzJNG0CLqVHI/HFLaEZhfs=; b=NudT7mrIjUUV5+BZWnzFpmcEFBRdVvzalilXE6Xmj9WElMfUASI0bdDH CdvcZJlPYh3Qsbh98ZznOze9Iz9y94WrOYGsjMmb9DOgOL1VTFPeb5hi/ 5VxyGQbcSxGWyDNVirjefULB+Amwc9aRGiNzz04jdLOyf9pFgLOCpysJp JHFodwVz8/ZrQcy0v3lLJ1zM/KDtLh3GgKRA4SIMX42SYx1ue1Y8UF3Es bKiQ9PETfF8aJSfQIBGDgGP7Et8hYAnYkqEfeoJFDGJMem4ukFmxbAaUM Tcp64kRoyqXLnBEiir1WbRY9DWLexEs77KyAJ9J0MESCuiMDX/e7krpH0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="419259506" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="419259506" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 05:29:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="704328071" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="704328071" Received: from shwdeopenlab706.ccr.corp.intel.com ([10.239.55.95]) by orsmga002.jf.intel.com with ESMTP; 24 May 2023 05:28:59 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Nate DeSimone , Zhiguang Liu , Michael D Kinney Subject: [PATCH 1/6] SimicsOpenBoardPkg: Remove un-used PlatformBootManagerLib Date: Wed, 24 May 2023 20:28:47 +0800 Message-Id: <20230524122852.2047-2-ray.ni@intel.com> X-Mailer: git-send-email 2.39.1.windows.1 In-Reply-To: <20230524122852.2047-1-ray.ni@intel.com> References: <20230524122852.2047-1-ray.ni@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Signed-off-by: Ray Ni Cc: Nate DeSimone Cc: Zhiguang Liu Cc: Michael D Kinney --- .../PlatformBootManagerLib/BdsPlatform.c | 1532 ----------------- .../PlatformBootManagerLib/BdsPlatform.h | 172 -- .../PlatformBootManagerLib.inf | 72 - .../PlatformBootManagerLib/PlatformData.c | 35 - 4 files changed, 1811 deletions(-) delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootM= anagerLib/BdsPlatform.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootM= anagerLib/BdsPlatform.h delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootM= anagerLib/PlatformBootManagerLib.inf delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootM= anagerLib/PlatformData.c diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerL= ib/BdsPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootMa= nagerLib/BdsPlatform.c deleted file mode 100644 index 2f9c6aaa85..0000000000 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsP= latform.c +++ /dev/null @@ -1,1532 +0,0 @@ -/** @file=0D - Platform BDS customizations.=0D -=0D - Copyright (c) 2004 - 2019 Intel Corporation. All rights reserved.
=0D -=0D - SPDX-License-Identifier: BSD-2-Clause-Patent=0D -**/=0D -=0D -#include "BdsPlatform.h"=0D -#include =0D -#include =0D -=0D -#define LEGACY_8259_MASK_REGISTER_MASTER 0x21=0D -#define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1=0D -#define LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER 0x4D0=0D -#define LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE 0x4D1=0D -=0D -//=0D -// Global data=0D -//=0D -=0D -VOID *mEfiDevPathNotifyReg;=0D -EFI_EVENT mEfiDevPathEvent;=0D -VOID *mEmuVariableEventReg;=0D -EFI_EVENT mEmuVariableEvent;=0D -BOOLEAN mDetectVgaOnly;=0D -UINT16 mHostBridgeDevId;=0D -=0D -//=0D -// Table of host IRQs matching PCI IRQs A-D=0D -// (for configuring PCI Interrupt Line register)=0D -//=0D -CONST UINT8 PciHostIrqs[] =3D {=0D - 0x0a, 0x0a, 0x0b, 0x0b=0D -};=0D -=0D -//=0D -// Type definitions=0D -//=0D -=0D -typedef=0D -EFI_STATUS=0D -(EFIAPI *PROTOCOL_INSTANCE_CALLBACK)(=0D - IN EFI_HANDLE Handle,=0D - IN VOID *Instance,=0D - IN VOID *Context=0D - );=0D -=0D -/**=0D - @param[in] Handle - Handle of PCI device instance=0D - @param[in] PciIo - PCI IO protocol instance=0D - @param[in] Pci - PCI Header register block=0D -**/=0D -typedef=0D -EFI_STATUS=0D -(EFIAPI *VISIT_PCI_INSTANCE_CALLBACK)(=0D - IN EFI_HANDLE Handle,=0D - IN EFI_PCI_IO_PROTOCOL *PciIo,=0D - IN PCI_TYPE00 *Pci=0D - );=0D -=0D -=0D -//=0D -// Function prototypes=0D -//=0D -=0D -EFI_STATUS=0D -VisitAllInstancesOfProtocol (=0D - IN EFI_GUID *Id,=0D - IN PROTOCOL_INSTANCE_CALLBACK CallBackFunction,=0D - IN VOID *Context=0D - );=0D -=0D -EFI_STATUS=0D -VisitAllPciInstancesOfProtocol (=0D - IN VISIT_PCI_INSTANCE_CALLBACK CallBackFunction=0D - );=0D -=0D -VOID=0D -InstallDevicePathCallback (=0D - VOID=0D - );=0D -=0D -VOID=0D -PlatformRegisterFvBootOption (=0D - EFI_GUID *FileGuid,=0D - CHAR16 *Description,=0D - UINT32 Attributes=0D - )=0D -{=0D - EFI_STATUS Status;=0D - INTN OptionIndex;=0D - EFI_BOOT_MANAGER_LOAD_OPTION NewOption;=0D - EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;=0D - UINTN BootOptionCount;=0D - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileNode;=0D - EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;=0D - EFI_DEVICE_PATH_PROTOCOL *DevicePath;=0D -=0D - Status =3D gBS->HandleProtocol (=0D - gImageHandle,=0D - &gEfiLoadedImageProtocolGuid,=0D - (VOID **) &LoadedImage=0D - );=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - EfiInitializeFwVolDevicepathNode (&FileNode, FileGuid);=0D - DevicePath =3D DevicePathFromHandle (LoadedImage->DeviceHandle);=0D - ASSERT (DevicePath !=3D NULL);=0D - DevicePath =3D AppendDevicePathNode (=0D - DevicePath,=0D - (EFI_DEVICE_PATH_PROTOCOL *) &FileNode=0D - );=0D - ASSERT (DevicePath !=3D NULL);=0D -=0D - Status =3D EfiBootManagerInitializeLoadOption (=0D - &NewOption,=0D - LoadOptionNumberUnassigned,=0D - LoadOptionTypeBoot,=0D - Attributes,=0D - Description,=0D - DevicePath,=0D - NULL,=0D - 0=0D - );=0D - ASSERT_EFI_ERROR (Status);=0D - FreePool (DevicePath);=0D -=0D - BootOptions =3D EfiBootManagerGetLoadOptions (=0D - &BootOptionCount, LoadOptionTypeBoot=0D - );=0D -=0D - OptionIndex =3D EfiBootManagerFindLoadOption (=0D - &NewOption, BootOptions, BootOptionCount=0D - );=0D -=0D - if (OptionIndex =3D=3D -1) {=0D - Status =3D EfiBootManagerAddLoadOptionVariable (&NewOption, MAX_UINTN)= ;=0D - ASSERT_EFI_ERROR (Status);=0D - }=0D - EfiBootManagerFreeLoadOption (&NewOption);=0D - EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);=0D -}=0D -=0D -/**=0D - Remove all MemoryMapped(...)/FvFile(...) and Fv(...)/FvFile(...) boot op= tions=0D - whose device paths do not resolve exactly to an FvFile in the system.=0D -=0D - This removes any boot options that point to binaries built into the firm= ware=0D - and have become stale due to any of the following:=0D - - DXEFV's base address or size changed (historical),=0D - - DXEFV's FvNameGuid changed,=0D - - the FILE_GUID of the pointed-to binary changed,=0D - - the referenced binary is no longer built into the firmware.=0D -=0D - EfiBootManagerFindLoadOption() used in PlatformRegisterFvBootOption() on= ly=0D - avoids exact duplicates.=0D -**/=0D -VOID=0D -RemoveStaleFvFileOptions (=0D - VOID=0D - )=0D -{=0D - EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions;=0D - UINTN BootOptionCount;=0D - UINTN Index;=0D -=0D - BootOptions =3D EfiBootManagerGetLoadOptions (&BootOptionCount,=0D - LoadOptionTypeBoot);=0D -=0D - for (Index =3D 0; Index < BootOptionCount; ++Index) {=0D - EFI_DEVICE_PATH_PROTOCOL *Node1, *Node2, *SearchNode;=0D - EFI_STATUS Status;=0D - EFI_HANDLE FvHandle;=0D -=0D - //=0D - // If the device path starts with neither MemoryMapped(...) nor Fv(...= ),=0D - // then keep the boot option.=0D - //=0D - Node1 =3D BootOptions[Index].FilePath;=0D - if (!(DevicePathType (Node1) =3D=3D HARDWARE_DEVICE_PATH &&=0D - DevicePathSubType (Node1) =3D=3D HW_MEMMAP_DP) &&=0D - !(DevicePathType (Node1) =3D=3D MEDIA_DEVICE_PATH &&=0D - DevicePathSubType (Node1) =3D=3D MEDIA_PIWG_FW_VOL_DP)) {=0D - continue;=0D - }=0D -=0D - //=0D - // If the second device path node is not FvFile(...), then keep the bo= ot=0D - // option.=0D - //=0D - Node2 =3D NextDevicePathNode (Node1);=0D - if (DevicePathType (Node2) !=3D MEDIA_DEVICE_PATH ||=0D - DevicePathSubType (Node2) !=3D MEDIA_PIWG_FW_FILE_DP) {=0D - continue;=0D - }=0D -=0D - //=0D - // Locate the Firmware Volume2 protocol instance that is denoted by th= e=0D - // boot option. If this lookup fails (i.e., the boot option references= a=0D - // firmware volume that doesn't exist), then we'll proceed to delete t= he=0D - // boot option.=0D - //=0D - SearchNode =3D Node1;=0D - Status =3D gBS->LocateDevicePath (&gEfiFirmwareVolume2ProtocolGuid,=0D - &SearchNode, &FvHandle);=0D -=0D - if (!EFI_ERROR (Status)) {=0D - //=0D - // The firmware volume was found; now let's see if it contains the F= vFile=0D - // identified by GUID.=0D - //=0D - EFI_FIRMWARE_VOLUME2_PROTOCOL *FvProtocol;=0D - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFileNode;=0D - UINTN BufferSize;=0D - EFI_FV_FILETYPE FoundType;=0D - EFI_FV_FILE_ATTRIBUTES FileAttributes;=0D - UINT32 AuthenticationStatus;=0D -=0D - Status =3D gBS->HandleProtocol (FvHandle, &gEfiFirmwareVolume2Protoc= olGuid,=0D - (VOID **)&FvProtocol);=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - FvFileNode =3D (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)Node2;=0D - //=0D - // Buffer=3D=3DNULL means we request metadata only: BufferSize, Foun= dType,=0D - // FileAttributes.=0D - //=0D - Status =3D FvProtocol->ReadFile (=0D - FvProtocol,=0D - &FvFileNode->FvFileName, // NameGuid=0D - NULL, // Buffer=0D - &BufferSize,=0D - &FoundType,=0D - &FileAttributes,=0D - &AuthenticationStatus=0D - );=0D - if (!EFI_ERROR (Status)) {=0D - //=0D - // The FvFile was found. Keep the boot option.=0D - //=0D - continue;=0D - }=0D - }=0D -=0D - //=0D - // Delete the boot option.=0D - //=0D - Status =3D EfiBootManagerDeleteLoadOptionVariable (=0D - BootOptions[Index].OptionNumber, LoadOptionTypeBoot);=0D - DEBUG_CODE (=0D - CHAR16 *DevicePathString;=0D -=0D - DevicePathString =3D ConvertDevicePathToText(BootOptions[Index].File= Path,=0D - FALSE, FALSE);=0D - DEBUG ((=0D - EFI_ERROR (Status) ? EFI_D_WARN : EFI_D_VERBOSE,=0D - "%a: removing stale Boot#%04x %s: %r\n",=0D - __FUNCTION__,=0D - (UINT32)BootOptions[Index].OptionNumber,=0D - DevicePathString =3D=3D NULL ? L"" : DevicePathString= ,=0D - Status=0D - ));=0D - if (DevicePathString !=3D NULL) {=0D - FreePool (DevicePathString);=0D - }=0D - );=0D - }=0D -=0D - EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);=0D -}=0D -=0D -VOID=0D -PlatformRegisterOptionsAndKeys (=0D - VOID=0D - )=0D -{=0D - EFI_STATUS Status;=0D - EFI_INPUT_KEY Enter;=0D - EFI_INPUT_KEY F2;=0D - EFI_INPUT_KEY Esc;=0D - EFI_BOOT_MANAGER_LOAD_OPTION BootOption;=0D -=0D - //=0D - // Register ENTER as CONTINUE key=0D - //=0D - Enter.ScanCode =3D SCAN_NULL;=0D - Enter.UnicodeChar =3D CHAR_CARRIAGE_RETURN;=0D - Status =3D EfiBootManagerRegisterContinueKeyOption (0, &Enter, NULL);=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - //=0D - // Map F2 to Boot Manager Menu=0D - //=0D - F2.ScanCode =3D SCAN_F2;=0D - F2.UnicodeChar =3D CHAR_NULL;=0D - Esc.ScanCode =3D SCAN_ESC;=0D - Esc.UnicodeChar =3D CHAR_NULL;=0D - Status =3D EfiBootManagerGetBootManagerMenu (&BootOption);=0D - ASSERT_EFI_ERROR (Status);=0D - Status =3D EfiBootManagerAddKeyOptionVariable (=0D - NULL, (UINT16) BootOption.OptionNumber, 0, &F2, NULL=0D - );=0D - ASSERT (Status =3D=3D EFI_SUCCESS || Status =3D=3D EFI_ALREADY_STARTED);= =0D - Status =3D EfiBootManagerAddKeyOptionVariable (=0D - NULL, (UINT16) BootOption.OptionNumber, 0, &Esc, NULL=0D - );=0D - ASSERT (Status =3D=3D EFI_SUCCESS || Status =3D=3D EFI_ALREADY_STARTED);= =0D -}=0D -=0D -EFI_STATUS=0D -EFIAPI=0D -ConnectRootBridge (=0D - IN EFI_HANDLE RootBridgeHandle,=0D - IN VOID *Instance,=0D - IN VOID *Context=0D - );=0D -=0D -//=0D -// BDS Platform Functions=0D -//=0D -/**=0D - Do the platform init, can be customized by OEM/IBV=0D -=0D - Possible things that can be done in PlatformBootManagerBeforeConsole:=0D -=0D - > Update console variable: 1. include hot-plug devices;=0D - > 2. Clear ConIn and add SOL for AMT=0D - > Register new Driver#### or Boot####=0D - > Register new Key####: e.g.: F12=0D - > Signal ReadyToLock event=0D - > Authentication action: 1. connect Auth devices;=0D - > 2. Identify auto logon user.=0D -**/=0D -VOID=0D -EFIAPI=0D -PlatformBootManagerBeforeConsole (=0D - VOID=0D - )=0D -{=0D - EFI_BOOT_MANAGER_LOAD_OPTION *NvBootOptions;=0D - UINTN NvBootOptionCount;=0D - UINTN Index;=0D - EFI_STATUS Status;=0D -=0D - DEBUG ((DEBUG_INFO, "PlatformBootManagerBeforeConsole\n"));=0D -=0D - NvBootOptions =3D EfiBootManagerGetLoadOptions (&NvBootOptionCount, Load= OptionTypeBoot);=0D - for (Index =3D 0; Index < NvBootOptionCount; Index++) {=0D - Status =3D EfiBootManagerDeleteLoadOptionVariable (NvBootOptions[Index= ].OptionNumber, LoadOptionTypeBoot);=0D - if (EFI_ERROR (Status)) {=0D - DEBUG ((=0D - DEBUG_ERROR,=0D - "%a: removing Boot#%04x %r\n",=0D - __FUNCTION__,=0D - (UINT32) NvBootOptions[Index].OptionNumber,=0D - Status=0D - ));=0D - }=0D - }=0D -=0D - InstallDevicePathCallback ();=0D -=0D - VisitAllInstancesOfProtocol (&gEfiPciRootBridgeIoProtocolGuid,=0D - ConnectRootBridge, NULL);=0D - //=0D - // Enable LPC=0D - //=0D - PciOr16(POWER_MGMT_REGISTER_ICH10(0x04),=0D - BIT0 | BIT1 | BIT2);=0D - //=0D - // We can't signal End-of-Dxe earlier than this. Namely, End-of-Dxe trig= gers=0D - // the preparation of S3 system information. That logic has a hard depen= dency=0D - // on the presence of the FACS ACPI table. Since our ACPI tables are onl= y=0D - // installed after PCI enumeration completes, we must not trigger the S3= save=0D - // earlier, hence we can't signal End-of-Dxe earlier.=0D - //=0D - EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);=0D -=0D - PlatformInitializeConsole (gPlatformConsole);=0D -=0D - PlatformRegisterOptionsAndKeys ();=0D -}=0D -=0D -=0D -EFI_STATUS=0D -EFIAPI=0D -ConnectRootBridge (=0D - IN EFI_HANDLE RootBridgeHandle,=0D - IN VOID *Instance,=0D - IN VOID *Context=0D - )=0D -{=0D - EFI_STATUS Status;=0D -=0D - //=0D - // Make the PCI bus driver connect the root bridge, non-recursively. Thi= s=0D - // will produce a number of child handles with PciIo on them.=0D - //=0D - Status =3D gBS->ConnectController (=0D - RootBridgeHandle, // ControllerHandle=0D - NULL, // DriverImageHandle=0D - NULL, // RemainingDevicePath -- produce all= =0D - // children=0D - FALSE // Recursive=0D - );=0D - return Status;=0D -}=0D -=0D -=0D -/**=0D - Add IsaKeyboard to ConIn; add IsaSerial to ConOut, ConIn, ErrOut.=0D -=0D - @param[in] DeviceHandle Handle of the LPC Bridge device.=0D -=0D - @retval EFI_SUCCESS Console devices on the LPC bridge have been added t= o=0D - ConOut, ConIn, and ErrOut.=0D -=0D - @return Error codes, due to EFI_DEVICE_PATH_PROTOCOL missin= g=0D - from DeviceHandle.=0D -**/=0D -EFI_STATUS=0D -PrepareLpcBridgeDevicePath (=0D - IN EFI_HANDLE DeviceHandle=0D - )=0D -{=0D - EFI_STATUS Status;=0D - EFI_DEVICE_PATH_PROTOCOL *DevicePath;=0D - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;=0D - CHAR16 *DevPathStr;=0D -=0D - DevicePath =3D NULL;=0D - Status =3D gBS->HandleProtocol (=0D - DeviceHandle,=0D - &gEfiDevicePathProtocolGuid,=0D - (VOID*)&DevicePath=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D - TempDevicePath =3D DevicePath;=0D -=0D - //=0D - // Register Keyboard=0D - //=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gPnpPs2KeyboardDeviceNode);=0D -=0D - EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);=0D -=0D - //=0D - // Register COM1=0D - //=0D - DevicePath =3D TempDevicePath;=0D - gPnp16550ComPortDeviceNode.UID =3D 0;=0D -=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gPnp16550ComPortDeviceNode);=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gUartDeviceNode);=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gTerminalTypeDeviceNode);=0D -=0D - //=0D - // Print Device Path=0D - //=0D - DevPathStr =3D ConvertDevicePathToText (DevicePath, FALSE, FALSE);=0D - if (DevPathStr !=3D NULL) {=0D - DEBUG((=0D - EFI_D_INFO,=0D - "BdsPlatform.c+%d: COM%d DevPath: %s\n",=0D - __LINE__,=0D - gPnp16550ComPortDeviceNode.UID + 1,=0D - DevPathStr=0D - ));=0D - FreePool(DevPathStr);=0D - }=0D -=0D - EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);=0D - EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);=0D - EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);=0D -=0D - //=0D - // Register COM2=0D - //=0D - DevicePath =3D TempDevicePath;=0D - gPnp16550ComPortDeviceNode.UID =3D 1;=0D -=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gPnp16550ComPortDeviceNode);=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gUartDeviceNode);=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gTerminalTypeDeviceNode);=0D -=0D - //=0D - // Print Device Path=0D - //=0D - DevPathStr =3D ConvertDevicePathToText (DevicePath, FALSE, FALSE);=0D - if (DevPathStr !=3D NULL) {=0D - DEBUG((=0D - EFI_D_INFO,=0D - "BdsPlatform.c+%d: COM%d DevPath: %s\n",=0D - __LINE__,=0D - gPnp16550ComPortDeviceNode.UID + 1,=0D - DevPathStr=0D - ));=0D - FreePool(DevPathStr);=0D - }=0D -=0D - EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);=0D - EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);=0D - EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -EFI_STATUS=0D -GetGopDevicePath (=0D - IN EFI_DEVICE_PATH_PROTOCOL *PciDevicePath,=0D - OUT EFI_DEVICE_PATH_PROTOCOL **GopDevicePath=0D - )=0D -{=0D - UINTN Index;=0D - EFI_STATUS Status;=0D - EFI_HANDLE PciDeviceHandle;=0D - EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;=0D - EFI_DEVICE_PATH_PROTOCOL *TempPciDevicePath;=0D - UINTN GopHandleCount;=0D - EFI_HANDLE *GopHandleBuffer;=0D -=0D - if (PciDevicePath =3D=3D NULL || GopDevicePath =3D=3D NULL) {=0D - return EFI_INVALID_PARAMETER;=0D - }=0D -=0D - //=0D - // Initialize the GopDevicePath to be PciDevicePath=0D - //=0D - *GopDevicePath =3D PciDevicePath;=0D - TempPciDevicePath =3D PciDevicePath;=0D -=0D - Status =3D gBS->LocateDevicePath (=0D - &gEfiDevicePathProtocolGuid,=0D - &TempPciDevicePath,=0D - &PciDeviceHandle=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - //=0D - // Try to connect this handle, so that GOP driver could start on this=0D - // device and create child handles with GraphicsOutput Protocol installe= d=0D - // on them, then we get device paths of these child handles and select=0D - // them as possible console device.=0D - //=0D - gBS->ConnectController (PciDeviceHandle, NULL, NULL, FALSE);=0D -=0D - Status =3D gBS->LocateHandleBuffer (=0D - ByProtocol,=0D - &gEfiGraphicsOutputProtocolGuid,=0D - NULL,=0D - &GopHandleCount,=0D - &GopHandleBuffer=0D - );=0D - if (!EFI_ERROR (Status)) {=0D - //=0D - // Add all the child handles as possible Console Device=0D - //=0D - for (Index =3D 0; Index < GopHandleCount; Index++) {=0D - Status =3D gBS->HandleProtocol (GopHandleBuffer[Index], &gEfiDeviceP= athProtocolGuid, (VOID*)&TempDevicePath);=0D - if (EFI_ERROR (Status)) {=0D - continue;=0D - }=0D - if (CompareMem (=0D - PciDevicePath,=0D - TempDevicePath,=0D - GetDevicePathSize (PciDevicePath) - END_DEVICE_PATH_LENGTH=0D - ) =3D=3D 0) {=0D - //=0D - // In current implementation, we only enable one of the child hand= les=0D - // as console device, i.e. sotre one of the child handle's device= =0D - // path to variable "ConOut"=0D - // In future, we could select all child handles to be console devi= ce=0D - //=0D -=0D - *GopDevicePath =3D TempDevicePath;=0D -=0D - //=0D - // Delete the PCI device's path that added by=0D - // GetPlugInPciVgaDevicePath(). Add the integrity GOP device path.= =0D - //=0D - EfiBootManagerUpdateConsoleVariable (ConOutDev, NULL, PciDevicePat= h);=0D - EfiBootManagerUpdateConsoleVariable (ConOutDev, TempDevicePath, NU= LL);=0D - }=0D - }=0D - gBS->FreePool (GopHandleBuffer);=0D - }=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -/**=0D - Add PCI display to ConOut.=0D -=0D - @param[in] DeviceHandle Handle of the PCI display device.=0D -=0D - @retval EFI_SUCCESS The PCI display device has been added to ConOut.=0D -=0D - @return Error codes, due to EFI_DEVICE_PATH_PROTOCOL missin= g=0D - from DeviceHandle.=0D -**/=0D -EFI_STATUS=0D -PreparePciDisplayDevicePath (=0D - IN EFI_HANDLE DeviceHandle=0D - )=0D -{=0D - EFI_STATUS Status;=0D - EFI_DEVICE_PATH_PROTOCOL *DevicePath;=0D - EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;=0D -=0D - DevicePath =3D NULL;=0D - GopDevicePath =3D NULL;=0D - Status =3D gBS->HandleProtocol (=0D - DeviceHandle,=0D - &gEfiDevicePathProtocolGuid,=0D - (VOID*)&DevicePath=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - GetGopDevicePath (DevicePath, &GopDevicePath);=0D - DevicePath =3D GopDevicePath;=0D -=0D - EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -/**=0D - Add PCI Serial to ConOut, ConIn, ErrOut.=0D -=0D - @param[in] DeviceHandle Handle of the PCI serial device.=0D -=0D - @retval EFI_SUCCESS The PCI serial device has been added to ConOut, Con= In,=0D - ErrOut.=0D -=0D - @return Error codes, due to EFI_DEVICE_PATH_PROTOCOL missin= g=0D - from DeviceHandle.=0D -**/=0D -EFI_STATUS=0D -PreparePciSerialDevicePath (=0D - IN EFI_HANDLE DeviceHandle=0D - )=0D -{=0D - EFI_STATUS Status;=0D - EFI_DEVICE_PATH_PROTOCOL *DevicePath;=0D -=0D - DevicePath =3D NULL;=0D - Status =3D gBS->HandleProtocol (=0D - DeviceHandle,=0D - &gEfiDevicePathProtocolGuid,=0D - (VOID*)&DevicePath=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gUartDeviceNode);=0D - DevicePath =3D AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOC= OL *)&gTerminalTypeDeviceNode);=0D -=0D - EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);=0D - EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);=0D - EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -EFI_STATUS=0D -VisitAllInstancesOfProtocol (=0D - IN EFI_GUID *Id,=0D - IN PROTOCOL_INSTANCE_CALLBACK CallBackFunction,=0D - IN VOID *Context=0D - )=0D -{=0D - EFI_STATUS Status;=0D - UINTN HandleCount;=0D - EFI_HANDLE *HandleBuffer;=0D - UINTN Index;=0D - VOID *Instance;=0D -=0D - //=0D - // Start to check all the PciIo to find all possible device=0D - //=0D - HandleCount =3D 0;=0D - HandleBuffer =3D NULL;=0D - Status =3D gBS->LocateHandleBuffer (=0D - ByProtocol,=0D - Id,=0D - NULL,=0D - &HandleCount,=0D - &HandleBuffer=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - for (Index =3D 0; Index < HandleCount; Index++) {=0D - Status =3D gBS->HandleProtocol (HandleBuffer[Index], Id, &Instance);=0D - if (EFI_ERROR (Status)) {=0D - continue;=0D - }=0D -=0D - Status =3D (*CallBackFunction) (=0D - HandleBuffer[Index],=0D - Instance,=0D - Context=0D - );=0D - }=0D -=0D - gBS->FreePool (HandleBuffer);=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -=0D -EFI_STATUS=0D -EFIAPI=0D -VisitingAPciInstance (=0D - IN EFI_HANDLE Handle,=0D - IN VOID *Instance,=0D - IN VOID *Context=0D - )=0D -{=0D - EFI_STATUS Status;=0D - EFI_PCI_IO_PROTOCOL *PciIo;=0D - PCI_TYPE00 Pci;=0D -=0D - PciIo =3D (EFI_PCI_IO_PROTOCOL*) Instance;=0D -=0D - //=0D - // Check for all PCI device=0D - //=0D - Status =3D PciIo->Pci.Read (=0D - PciIo,=0D - EfiPciIoWidthUint32,=0D - 0,=0D - sizeof (Pci) / sizeof (UINT32),=0D - &Pci=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - return (*(VISIT_PCI_INSTANCE_CALLBACK)(UINTN) Context) (=0D - Handle,=0D - PciIo,=0D - &Pci=0D - );=0D -=0D -}=0D -=0D -=0D -=0D -EFI_STATUS=0D -VisitAllPciInstances (=0D - IN VISIT_PCI_INSTANCE_CALLBACK CallBackFunction=0D - )=0D -{=0D - return VisitAllInstancesOfProtocol (=0D - &gEfiPciIoProtocolGuid,=0D - VisitingAPciInstance,=0D - (VOID*)(UINTN) CallBackFunction=0D - );=0D -}=0D -=0D -=0D -/**=0D - Do platform specific PCI Device check and add them to=0D - ConOut, ConIn, ErrOut.=0D -=0D - @param[in] Handle - Handle of PCI device instance=0D - @param[in] PciIo - PCI IO protocol instance=0D - @param[in] Pci - PCI Header register block=0D -=0D - @retval EFI_SUCCESS - PCI Device check and Console variable update=0D - successfully.=0D - @retval EFI_STATUS - PCI Device check or Console variable update fail.=0D -=0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -DetectAndPreparePlatformPciDevicePath (=0D - IN EFI_HANDLE Handle,=0D - IN EFI_PCI_IO_PROTOCOL *PciIo,=0D - IN PCI_TYPE00 *Pci=0D - )=0D -{=0D - EFI_STATUS Status;=0D -=0D - Status =3D PciIo->Attributes (=0D - PciIo,=0D - EfiPciIoAttributeOperationEnable,=0D - EFI_PCI_DEVICE_ENABLE,=0D - NULL=0D - );=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - if (!mDetectVgaOnly) {=0D - //=0D - // Here we decide whether it is LPC Bridge=0D - //=0D - if ((IS_PCI_LPC (Pci)) ||=0D - ((IS_PCI_ISA_PDECODE (Pci)) &&=0D - (Pci->Hdr.VendorId =3D=3D 0x8086) &&=0D - (Pci->Hdr.DeviceId =3D=3D 0x7000)=0D - )=0D - ) {=0D - //=0D - // Add IsaKeyboard to ConIn,=0D - // add IsaSerial to ConOut, ConIn, ErrOut=0D - //=0D - DEBUG ((EFI_D_INFO, "Found LPC Bridge device\n"));=0D - PrepareLpcBridgeDevicePath (Handle);=0D - return EFI_SUCCESS;=0D - }=0D - //=0D - // Here we decide which Serial device to enable in PCI bus=0D - //=0D - if (IS_PCI_16550SERIAL (Pci)) {=0D - //=0D - // Add them to ConOut, ConIn, ErrOut.=0D - //=0D - DEBUG ((EFI_D_INFO, "Found PCI 16550 SERIAL device\n"));=0D - PreparePciSerialDevicePath (Handle);=0D - return EFI_SUCCESS;=0D - }=0D - }=0D -=0D - //=0D - // Here we decide which display device to enable in PCI bus=0D - //=0D - if (IS_PCI_DISPLAY (Pci)) {=0D - //=0D - // Add them to ConOut.=0D - //=0D - DEBUG ((EFI_D_INFO, "Found PCI display device\n"));=0D - PreparePciDisplayDevicePath (Handle);=0D - return EFI_SUCCESS;=0D - }=0D -=0D - return Status;=0D -}=0D -=0D -=0D -/**=0D - Do platform specific PCI Device check and add them to ConOut, ConIn, Err= Out=0D -=0D - @param[in] DetectVgaOnly - Only detect VGA device if it's TRUE.=0D -=0D - @retval EFI_SUCCESS - PCI Device check and Console variable update succe= ssfully.=0D - @retval EFI_STATUS - PCI Device check or Console variable update fail.=0D -=0D -**/=0D -EFI_STATUS=0D -DetectAndPreparePlatformPciDevicePaths (=0D - BOOLEAN DetectVgaOnly=0D - )=0D -{=0D - mDetectVgaOnly =3D DetectVgaOnly;=0D - return VisitAllPciInstances (DetectAndPreparePlatformPciDevicePath);=0D -}=0D -=0D -/**=0D - Connect the predefined platform default console device.=0D -=0D - Always try to find and enable PCI display devices.=0D -=0D - @param[in] PlatformConsole Predefined platform default console device a= rray.=0D -**/=0D -VOID=0D -PlatformInitializeConsole (=0D - IN PLATFORM_CONSOLE_CONNECT_ENTRY *PlatformConsole=0D - )=0D -{=0D - UINTN Index;=0D - EFI_DEVICE_PATH_PROTOCOL *VarConout;=0D - EFI_DEVICE_PATH_PROTOCOL *VarConin;=0D -=0D - //=0D - // Connect RootBridge=0D - //=0D - GetEfiGlobalVariable2 (EFI_CON_OUT_VARIABLE_NAME, (VOID **) &VarConout, = NULL);=0D - GetEfiGlobalVariable2 (EFI_CON_IN_VARIABLE_NAME, (VOID **) &VarConin, NU= LL);=0D -=0D - if (VarConout =3D=3D NULL || VarConin =3D=3D NULL) {=0D - //=0D - // Do platform specific PCI Device check and add them to ConOut, ConIn= , ErrOut=0D - //=0D - DetectAndPreparePlatformPciDevicePaths (FALSE);=0D - DetectAndPreparePlatformPciDevicePaths(TRUE);=0D - //=0D - // Have chance to connect the platform default console,=0D - // the platform default console is the minimue device group=0D - // the platform should support=0D - //=0D - for (Index =3D 0; PlatformConsole[Index].DevicePath !=3D NULL; ++Index= ) {=0D - //=0D - // Update the console variable with the connect type=0D - //=0D - if ((PlatformConsole[Index].ConnectType & CONSOLE_IN) =3D=3D CONSOLE= _IN) {=0D - EfiBootManagerUpdateConsoleVariable (ConIn, PlatformConsole[Index]= .DevicePath, NULL);=0D - }=0D - if ((PlatformConsole[Index].ConnectType & CONSOLE_OUT) =3D=3D CONSOL= E_OUT) {=0D - EfiBootManagerUpdateConsoleVariable (ConOut, PlatformConsole[Index= ].DevicePath, NULL);=0D - }=0D - if ((PlatformConsole[Index].ConnectType & STD_ERROR) =3D=3D STD_ERRO= R) {=0D - EfiBootManagerUpdateConsoleVariable (ErrOut, PlatformConsole[Index= ].DevicePath, NULL);=0D - }=0D - }=0D - } else {=0D - //=0D - // Only detect VGA device and add them to ConOut=0D - //=0D - DetectAndPreparePlatformPciDevicePaths (TRUE);=0D - }=0D -}=0D -=0D -=0D -/**=0D - Configure PCI Interrupt Line register for applicable devices=0D - Ported from SeaBIOS, src/fw/pciinit.c, *_pci_slot_get_irq()=0D -=0D - @param[in] Handle - Handle of PCI device instance=0D - @param[in] PciIo - PCI IO protocol instance=0D - @param[in] PciHdr - PCI Header register block=0D -=0D - @retval EFI_SUCCESS - PCI Interrupt Line register configured successfull= y.=0D -=0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -SetPciIntLine (=0D - IN EFI_HANDLE Handle,=0D - IN EFI_PCI_IO_PROTOCOL *PciIo,=0D - IN PCI_TYPE00 *PciHdr=0D - )=0D -{=0D - EFI_DEVICE_PATH_PROTOCOL *DevPathNode;=0D - EFI_DEVICE_PATH_PROTOCOL *DevPath;=0D - UINTN RootSlot;=0D - UINTN Idx;=0D - UINT8 IrqLine;=0D - EFI_STATUS Status;=0D - UINT32 RootBusNumber;=0D -=0D - Status =3D EFI_SUCCESS;=0D -=0D - if (PciHdr->Device.InterruptPin !=3D 0) {=0D -=0D - DevPathNode =3D DevicePathFromHandle (Handle);=0D - ASSERT (DevPathNode !=3D NULL);=0D - DevPath =3D DevPathNode;=0D -=0D - RootBusNumber =3D 0;=0D - if (DevicePathType (DevPathNode) =3D=3D ACPI_DEVICE_PATH &&=0D - DevicePathSubType (DevPathNode) =3D=3D ACPI_DP &&=0D - ((ACPI_HID_DEVICE_PATH *)DevPathNode)->HID =3D=3D EISA_PNP_ID(0x0A= 03)) {=0D - RootBusNumber =3D ((ACPI_HID_DEVICE_PATH *)DevPathNode)->UID;=0D - }=0D -=0D - //=0D - // Compute index into PciHostIrqs[] table by walking=0D - // the device path and adding up all device numbers=0D - //=0D - Status =3D EFI_NOT_FOUND;=0D - RootSlot =3D 0;=0D - Idx =3D PciHdr->Device.InterruptPin - 1;=0D - while (!IsDevicePathEnd (DevPathNode)) {=0D - if (DevicePathType (DevPathNode) =3D=3D HARDWARE_DEVICE_PATH &&=0D - DevicePathSubType (DevPathNode) =3D=3D HW_PCI_DP) {=0D -=0D - Idx +=3D ((PCI_DEVICE_PATH *)DevPathNode)->Device;=0D -=0D - //=0D - // Unlike SeaBIOS, which starts climbing from the leaf device=0D - // up toward the root, we traverse the device path starting at=0D - // the root moving toward the leaf node.=0D - // The slot number of the top-level parent bridge is needed=0D - // with more than 24 slots on the root bus.=0D - //=0D - if (Status !=3D EFI_SUCCESS) {=0D - Status =3D EFI_SUCCESS;=0D - RootSlot =3D ((PCI_DEVICE_PATH *)DevPathNode)->Device;=0D - }=0D - }=0D -=0D - DevPathNode =3D NextDevicePathNode (DevPathNode);=0D - }=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D - if (RootBusNumber =3D=3D 0 && RootSlot =3D=3D 0) {=0D - return Status; //bugbug: workaround; need SIMICS change B0/D0/F0 PCI= _IntPin reg(0x3D) =3D 0X0=0D -// DEBUG((=0D -// EFI_D_ERROR,=0D -// "%a: PCI host bridge (00:00.0) should have no interrupts!\n",=0D -// __FUNCTION__=0D -// ));=0D -// ASSERT (FALSE);=0D - }=0D -=0D - //=0D - // Final PciHostIrqs[] index calculation depends on the platform=0D - // and should match SeaBIOS src/fw/pciinit.c *_pci_slot_get_irq()=0D - //=0D - switch (mHostBridgeDevId) {=0D - case INTEL_82441_DEVICE_ID:=0D - Idx -=3D 1;=0D - break;=0D - case INTEL_ICH10_DEVICE_ID:=0D - //=0D - // SeaBIOS contains the following comment:=0D - // "Slots 0-24 rotate slot:pin mapping similar to piix above, but= =0D - // with a different starting index.=0D - //=0D - // Slots 25-31 all use LNKA mapping (or LNKE, but A:D =3D E:H)"=0D - //=0D - if (RootSlot > 24) {=0D - //=0D - // in this case, subtract back out RootSlot from Idx=0D - // (SeaBIOS never adds it to begin with, but that would make our= =0D - // device path traversal loop above too awkward)=0D - //=0D - Idx -=3D RootSlot;=0D - }=0D - break;=0D - default:=0D - ASSERT (FALSE); // should never get here=0D - }=0D - Idx %=3D ARRAY_SIZE (PciHostIrqs);=0D - IrqLine =3D PciHostIrqs[Idx];=0D -=0D - DEBUG_CODE_BEGIN ();=0D - {=0D - CHAR16 *DevPathString;=0D - STATIC CHAR16 Fallback[] =3D L"";=0D - UINTN Segment, Bus, Device, Function;=0D -=0D - DevPathString =3D ConvertDevicePathToText (DevPath, FALSE, FALSE);=0D - if (DevPathString =3D=3D NULL) {=0D - DevPathString =3D Fallback;=0D - }=0D - Status =3D PciIo->GetLocation (PciIo, &Segment, &Bus, &Device, &Func= tion);=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - DEBUG ((EFI_D_VERBOSE, "%a: [%02x:%02x.%x] %s -> 0x%02x\n", __FUNCTI= ON__,=0D - (UINT32)Bus, (UINT32)Device, (UINT32)Function, DevPathString,=0D - IrqLine));=0D -=0D - if (DevPathString !=3D Fallback) {=0D - FreePool (DevPathString);=0D - }=0D - }=0D - DEBUG_CODE_END ();=0D -=0D - //=0D - // Set PCI Interrupt Line register for this device to PciHostIrqs[Idx]= =0D - //=0D - Status =3D PciIo->Pci.Write (=0D - PciIo,=0D - EfiPciIoWidthUint8,=0D - PCI_INT_LINE_OFFSET,=0D - 1,=0D - &IrqLine=0D - );=0D - }=0D -=0D - return Status;=0D -}=0D -=0D -/**=0D -Write to mask and edge/level triggered registers of master and slave 8259 = PICs.=0D -=0D -@param[in] Mask low byte for master PIC mask register,=0D -high byte for slave PIC mask register.=0D -@param[in] EdgeLevel low byte for master PIC edge/level triggered regist= er,=0D -high byte for slave PIC edge/level triggered register.=0D -=0D -**/=0D -VOID=0D -Interrupt8259WriteMask(=0D - IN UINT16 Mask,=0D - IN UINT16 EdgeLevel=0D -)=0D -{=0D - IoWrite8(LEGACY_8259_MASK_REGISTER_MASTER, (UINT8)Mask);=0D - IoWrite8(LEGACY_8259_MASK_REGISTER_SLAVE, (UINT8)(Mask >> 8));=0D - IoWrite8(LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER, (UINT8)EdgeLe= vel);=0D - IoWrite8(LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE, (UINT8)(EdgeLe= vel >> 8));=0D -}=0D -=0D -VOID=0D -PciAcpiInitialization (=0D - )=0D -{=0D - UINTN Pmba;=0D -=0D - //=0D - // Query Host Bridge DID to determine platform type=0D - //=0D - mHostBridgeDevId =3D PcdGet16 (PcdSimicsX58HostBridgePciDevId);=0D - switch (mHostBridgeDevId) {=0D - case INTEL_82441_DEVICE_ID:=0D - Pmba =3D POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA);=0D - //=0D - // 00:01.0 ISA Bridge (PIIX4) LNK routing targets=0D - //=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x60), 0x0b); // A=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x61), 0x0b); // B=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x62), 0x0a); // C=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 1, 0, 0x63), 0x0a); // D=0D - break;=0D - case INTEL_ICH10_DEVICE_ID:=0D - Pmba =3D POWER_MGMT_REGISTER_ICH10 (ICH10_PMBASE);=0D - //=0D - // 00:1f.0 LPC Bridge LNK routing targets=0D - //=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x60), 0x0a); // A=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x61), 0x0a); // B=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x62), 0x0b); // C=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x63), 0x0b); // D=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x68), 0x0a); // E=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x69), 0x0a); // F=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6a), 0x0b); // G=0D - PciWrite8 (PCI_LIB_ADDRESS (0, 0x1f, 0, 0x6b), 0x0b); // H=0D - break;=0D - default:=0D - DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",= =0D - __FUNCTION__, mHostBridgeDevId));=0D - ASSERT (FALSE);=0D - return;=0D - }=0D -=0D - //=0D - // Initialize PCI_INTERRUPT_LINE for applicable present PCI devices=0D - //=0D - VisitAllPciInstances (SetPciIntLine);=0D -=0D - //=0D - // Set ACPI SCI_EN bit in PMCNTRL=0D - //=0D - IoOr16 ((PciRead32 (Pmba) & ~BIT0) + 4, BIT0);=0D - //=0D - // Set all 8259 interrupts to edge triggered and disabled=0D - //=0D - Interrupt8259WriteMask(0xFFFF, 0x0000);=0D -}=0D -=0D -EFI_STATUS=0D -EFIAPI=0D -ConnectRecursivelyIfPciMassStorage (=0D - IN EFI_HANDLE Handle,=0D - IN EFI_PCI_IO_PROTOCOL *Instance,=0D - IN PCI_TYPE00 *PciHeader=0D - )=0D -{=0D - EFI_STATUS Status;=0D - EFI_DEVICE_PATH_PROTOCOL *DevicePath;=0D - CHAR16 *DevPathStr;=0D -=0D - //=0D - // Recognize PCI Mass Storage=0D - //=0D - if (IS_CLASS1 (PciHeader, PCI_CLASS_MASS_STORAGE)) {=0D - DevicePath =3D NULL;=0D - Status =3D gBS->HandleProtocol (=0D - Handle,=0D - &gEfiDevicePathProtocolGuid,=0D - (VOID*)&DevicePath=0D - );=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - //=0D - // Print Device Path=0D - //=0D - DevPathStr =3D ConvertDevicePathToText (DevicePath, FALSE, FALSE);=0D - if (DevPathStr !=3D NULL) {=0D - DEBUG((=0D - EFI_D_INFO,=0D - "Found Mass Storage device: %s\n",=0D - DevPathStr=0D - ));=0D - FreePool(DevPathStr);=0D - }=0D -=0D - Status =3D gBS->ConnectController (Handle, NULL, NULL, TRUE);=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - }=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -=0D -/**=0D - This notification function is invoked when the=0D - EMU Variable FVB has been changed.=0D -=0D - @param Event The event that occurred=0D - @param Context For EFI compatibility. Not used.=0D -=0D -**/=0D -VOID=0D -EFIAPI=0D -EmuVariablesUpdatedCallback (=0D - IN EFI_EVENT Event,=0D - IN VOID *Context=0D - )=0D -{=0D - DEBUG ((EFI_D_INFO, "EmuVariablesUpdatedCallback\n"));=0D - UpdateNvVarsOnFileSystem ();=0D -}=0D -=0D -=0D -EFI_STATUS=0D -EFIAPI=0D -VisitingFileSystemInstance (=0D - IN EFI_HANDLE Handle,=0D - IN VOID *Instance,=0D - IN VOID *Context=0D - )=0D -{=0D - EFI_STATUS Status;=0D - STATIC BOOLEAN ConnectedToFileSystem =3D FALSE;=0D -=0D - if (ConnectedToFileSystem) {=0D - return EFI_ALREADY_STARTED;=0D - }=0D -=0D - Status =3D ConnectNvVarsToFileSystem (Handle);=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - ConnectedToFileSystem =3D TRUE;=0D - mEmuVariableEvent =3D=0D - EfiCreateProtocolNotifyEvent (=0D - &gEfiDevicePathProtocolGuid,=0D - TPL_CALLBACK,=0D - EmuVariablesUpdatedCallback,=0D - NULL,=0D - &mEmuVariableEventReg=0D - );=0D - PcdSet64 (PcdEmuVariableEvent, (UINT64)(UINTN) mEmuVariableEvent);=0D -=0D - return EFI_SUCCESS;=0D -}=0D -=0D -=0D -VOID=0D -PlatformBdsRestoreNvVarsFromHardDisk (=0D - )=0D -{=0D - VisitAllPciInstances (ConnectRecursivelyIfPciMassStorage);=0D - VisitAllInstancesOfProtocol (=0D - &gEfiSimpleFileSystemProtocolGuid,=0D - VisitingFileSystemInstance,=0D - NULL=0D - );=0D -=0D -}=0D -=0D -/**=0D - Connect with predefined platform connect sequence.=0D -=0D - The OEM/IBV can customize with their own connect sequence.=0D -**/=0D -VOID=0D -PlatformBdsConnectSequence (=0D - VOID=0D - )=0D -{=0D - UINTN Index;=0D -=0D - DEBUG ((EFI_D_INFO, "PlatformBdsConnectSequence\n"));=0D -=0D - Index =3D 0;=0D -=0D - //=0D - // Here we can get the customized platform connect sequence=0D - // Notes: we can connect with new variable which record the=0D - // last time boots connect device path sequence=0D - //=0D - while (gPlatformConnectSequence[Index] !=3D NULL) {=0D - //=0D - // Build the platform boot option=0D - //=0D - EfiBootManagerConnectDevicePath (gPlatformConnectSequence[Index], NULL= );=0D - Index++;=0D - }=0D -=0D - //=0D - // Just use the simple policy to connect all devices=0D - //=0D - DEBUG ((EFI_D_INFO, "EfiBootManagerConnectAll\n"));=0D - EfiBootManagerConnectAll ();=0D -=0D - PciAcpiInitialization ();=0D -}=0D -=0D -/**=0D - Do the platform specific action after the console is ready=0D -=0D - Possible things that can be done in PlatformBootManagerAfterConsole:=0D -=0D - > Console post action:=0D - > Dynamically switch output mode from 100x31 to 80x25 for certain sena= rino=0D - > Signal console ready platform customized event=0D - > Run diagnostics like memory testing=0D - > Connect certain devices=0D - > Dispatch aditional option roms=0D - > Special boot: e.g.: USB boot, enter UI=0D -**/=0D -VOID=0D -EFIAPI=0D -PlatformBootManagerAfterConsole (=0D - VOID=0D - )=0D -{=0D - EFI_BOOT_MODE BootMode;=0D - EFI_HANDLE Handle;=0D - EFI_STATUS Status;=0D -=0D - DEBUG ((EFI_D_INFO, "PlatformBootManagerAfterConsole\n"));=0D -=0D - //=0D - // Prevent further changes to LockBoxes or SMRAM.=0D - //=0D - Handle =3D NULL;=0D - Status =3D gBS->InstallProtocolInterface(&Handle,=0D - &gEfiDxeSmmReadyToLockProtocolGuid, EFI_NATIVE_INTERFACE,=0D - NULL);=0D - ASSERT_EFI_ERROR(Status);=0D -=0D - if (PcdGetBool (PcdOvmfFlashVariablesEnable)) {=0D - DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior: not restoring NvVars "= =0D - "from disk since flash variables appear to be supported.\n"));=0D - } else {=0D - //=0D - // Try to restore variables from the hard disk early so=0D - // they can be used for the other BDS connect operations.=0D - //=0D - PlatformBdsRestoreNvVarsFromHardDisk ();=0D - }=0D -=0D - //=0D - // Get current Boot Mode=0D - //=0D - BootMode =3D GetBootModeHob ();=0D - DEBUG ((EFI_D_ERROR, "Boot Mode:%x\n", BootMode));=0D -=0D - //=0D - // Go the different platform policy with different boot mode=0D - // Notes: this part code can be change with the table policy=0D - //=0D - ASSERT (BootMode =3D=3D BOOT_WITH_FULL_CONFIGURATION);=0D -=0D - // Perform some platform specific connect sequence=0D - //=0D - PlatformBdsConnectSequence ();=0D - //=0D - // Logo show=0D - //=0D - EnableBootLogo(PcdGetPtr(PcdLogoFile));=0D -=0D - EfiBootManagerRefreshAllBootOption ();=0D -=0D - //=0D - // Register UEFI Shell=0D - //=0D - PlatformRegisterFvBootOption (=0D - PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE=0D - );=0D -=0D - RemoveStaleFvFileOptions ();=0D -}=0D -=0D -/**=0D - This notification function is invoked when an instance of the=0D - EFI_DEVICE_PATH_PROTOCOL is produced.=0D -=0D - @param Event The event that occurred=0D - @param Context For EFI compatibility. Not used.=0D -=0D -**/=0D -VOID=0D -EFIAPI=0D -NotifyDevPath (=0D - IN EFI_EVENT Event,=0D - IN VOID *Context=0D - )=0D -{=0D - EFI_HANDLE Handle;=0D - EFI_STATUS Status;=0D - UINTN BufferSize;=0D - EFI_DEVICE_PATH_PROTOCOL *DevPathNode;=0D - ATAPI_DEVICE_PATH *Atapi;=0D -=0D - //=0D - // Examine all new handles=0D - //=0D - for (;;) {=0D - //=0D - // Get the next handle=0D - //=0D - BufferSize =3D sizeof (Handle);=0D - Status =3D gBS->LocateHandle (=0D - ByRegisterNotify,=0D - NULL,=0D - mEfiDevPathNotifyReg,=0D - &BufferSize,=0D - &Handle=0D - );=0D -=0D - //=0D - // If not found, we're done=0D - //=0D - if (EFI_NOT_FOUND =3D=3D Status) {=0D - break;=0D - }=0D -=0D - if (EFI_ERROR (Status)) {=0D - continue;=0D - }=0D -=0D - //=0D - // Get the DevicePath protocol on that handle=0D - //=0D - Status =3D gBS->HandleProtocol (Handle, &gEfiDevicePathProtocolGuid, (= VOID **)&DevPathNode);=0D - ASSERT_EFI_ERROR (Status);=0D -=0D - while (!IsDevicePathEnd (DevPathNode)) {=0D - //=0D - // Find the handler to dump this device path node=0D - //=0D - if (=0D - (DevicePathType(DevPathNode) =3D=3D MESSAGING_DEVICE_PATH) &&=0D - (DevicePathSubType(DevPathNode) =3D=3D MSG_ATAPI_DP)=0D - ) {=0D - Atapi =3D (ATAPI_DEVICE_PATH*) DevPathNode;=0D - PciOr16 (=0D - PCI_LIB_ADDRESS (=0D - 0,=0D - 1,=0D - 1,=0D - (Atapi->PrimarySecondary =3D=3D 1) ? 0x42: 0x40=0D - ),=0D - BIT15=0D - );=0D - }=0D -=0D - //=0D - // Next device path node=0D - //=0D - DevPathNode =3D NextDevicePathNode (DevPathNode);=0D - }=0D - }=0D -=0D - return;=0D -}=0D -=0D -=0D -VOID=0D -InstallDevicePathCallback (=0D - VOID=0D - )=0D -{=0D - DEBUG ((EFI_D_INFO, "Registered NotifyDevPath Event\n"));=0D - mEfiDevPathEvent =3D EfiCreateProtocolNotifyEvent (=0D - &gEfiDevicePathProtocolGuid,=0D - TPL_CALLBACK,=0D - NotifyDevPath,=0D - NULL,=0D - &mEfiDevPathNotifyReg=0D - );=0D -}=0D -=0D -/**=0D - This function is called each second during the boot manager waits the=0D - timeout.=0D -=0D - @param TimeoutRemain The remaining timeout.=0D -**/=0D -VOID=0D -EFIAPI=0D -PlatformBootManagerWaitCallback (=0D - UINT16 TimeoutRemain=0D - )=0D -{=0D - EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;=0D - EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;=0D - UINT16 Timeout;=0D -=0D - Timeout =3D PcdGet16 (PcdPlatformBootTimeOut);=0D -=0D - Black.Raw =3D 0x00000000;=0D - White.Raw =3D 0x00FFFFFF;=0D -=0D - BootLogoUpdateProgress (=0D - White.Pixel,=0D - Black.Pixel,=0D - L"Start boot option",=0D - White.Pixel,=0D - (Timeout - TimeoutRemain) * 100 / Timeout,=0D - 0=0D - );=0D -}=0D -=0D -/**=0D - The function is called when no boot option could be launched,=0D - including platform recovery options and options pointing to applications= =0D - built into firmware volumes.=0D -=0D - If this function returns, BDS attempts to enter an infinite loop.=0D -**/=0D -VOID=0D -EFIAPI=0D -PlatformBootManagerUnableToBoot (=0D - VOID=0D - )=0D -{=0D - // BUGBUG- will do it if need=0D -}=0D diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerL= ib/BdsPlatform.h b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootMa= nagerLib/BdsPlatform.h deleted file mode 100644 index 01ba20d2da..0000000000 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsP= latform.h +++ /dev/null @@ -1,172 +0,0 @@ -/** @file=0D - Platform BDS customizations include file.=0D -=0D - Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved.
=0D -=0D - SPDX-License-Identifier: BSD-2-Clause-Patent=0D -**/=0D -=0D -#ifndef _PLATFORM_SPECIFIC_BDS_PLATFORM_H_=0D -#define _PLATFORM_SPECIFIC_BDS_PLATFORM_H_=0D -=0D -=0D -#include =0D -=0D -#include =0D -#include =0D -#include =0D -#include =0D -=0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -=0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -=0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -#include =0D -=0D -#include =0D -=0D -extern EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence[];=0D -extern ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode;=0D -extern ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode;=0D -extern UART_DEVICE_PATH gUartDeviceNode;=0D -extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;=0D -=0D -#define PCI_DEVICE_PATH_NODE(Func, Dev) \=0D - { \=0D - { \=0D - HARDWARE_DEVICE_PATH, \=0D - HW_PCI_DP, \=0D - { \=0D - (UINT8) (sizeof (PCI_DEVICE_PATH)), \=0D - (UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \=0D - } \=0D - }, \=0D - (Func), \=0D - (Dev) \=0D - }=0D -=0D -#define PNPID_DEVICE_PATH_NODE(PnpId) \=0D - { \=0D - { \=0D - ACPI_DEVICE_PATH, \=0D - ACPI_DP, \=0D - { \=0D - (UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \=0D - (UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \=0D - }, \=0D - }, \=0D - EISA_PNP_ID((PnpId)), \=0D - 0 \=0D - }=0D -=0D -#define gPciIsaBridge \=0D - PCI_DEVICE_PATH_NODE(0, 0x1f)=0D -=0D -#define gP2PBridge \=0D - PCI_DEVICE_PATH_NODE(0, 0x1e)=0D -=0D -#define gPnpPs2Keyboard \=0D - PNPID_DEVICE_PATH_NODE(0x0303)=0D -=0D -#define gPnp16550ComPort \=0D - PNPID_DEVICE_PATH_NODE(0x0501)=0D -=0D -#define gUart \=0D - { \=0D - { \=0D - MESSAGING_DEVICE_PATH, \=0D - MSG_UART_DP, \=0D - { \=0D - (UINT8) (sizeof (UART_DEVICE_PATH)), \=0D - (UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \=0D - } \=0D - }, \=0D - 0, \=0D - 115200, \=0D - 8, \=0D - 1, \=0D - 1 \=0D - }=0D -=0D -#define gPcAnsiTerminal \=0D - { \=0D - { \=0D - MESSAGING_DEVICE_PATH, \=0D - MSG_VENDOR_DP, \=0D - { \=0D - (UINT8) (sizeof (VENDOR_DEVICE_PATH)), \=0D - (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \=0D - } \=0D - }, \=0D - DEVICE_PATH_MESSAGING_PC_ANSI \=0D - }=0D -=0D -#define PCI_CLASS_SCC 0x07=0D -#define PCI_SUBCLASS_SERIAL 0x00=0D -#define PCI_IF_16550 0x02=0D -#define IS_PCI_16550SERIAL(_p) IS_CLASS3 (_p, PCI_CLASS_SCC, PCI= _SUBCLASS_SERIAL, PCI_IF_16550)=0D -#define IS_PCI_ISA_PDECODE(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI= _CLASS_BRIDGE_ISA_PDECODE, 0)=0D -=0D -typedef struct {=0D - EFI_DEVICE_PATH_PROTOCOL *DevicePath;=0D - UINTN ConnectType;=0D -} PLATFORM_CONSOLE_CONNECT_ENTRY;=0D -=0D -#define CONSOLE_OUT BIT0=0D -#define CONSOLE_IN BIT1=0D -#define STD_ERROR BIT2=0D -extern PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[];=0D -=0D -//=0D -// Platform BDS Functions=0D -//=0D -=0D -VOID=0D -PlatformInitializeConsole (=0D - IN PLATFORM_CONSOLE_CONNECT_ENTRY *PlatformConsole=0D - );=0D -=0D -/**=0D - Use SystemTable ConOut to stop video based Simple Text Out consoles from= going=0D - to the video device. Put up LogoFile on every video device that is a con= sole.=0D -=0D - @param[in] LogoFile The file name of logo to display on the center of= the screen.=0D -=0D - @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and = logo displayed.=0D - @retval EFI_UNSUPPORTED Logo not found.=0D -=0D -**/=0D -EFI_STATUS=0D -EFIAPI=0D -EnableBootLogo(=0D - IN EFI_GUID *LogoFile=0D -);=0D -=0D -#endif // _PLATFORM_SPECIFIC_BDS_PLATFORM_H_=0D diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerL= ib/PlatformBootManagerLib.inf b/Platform/Intel/SimicsOpenBoardPkg/Library/P= latformBootManagerLib/PlatformBootManagerLib.inf deleted file mode 100644 index 3fb76c3564..0000000000 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/Plat= formBootManagerLib.inf +++ /dev/null @@ -1,72 +0,0 @@ -## @file=0D -# Platform BDS customizations library.=0D -#=0D -# Copyright (c) 2007 - 2019 Intel Corporation. All rights reserved.
=0D -#=0D -# SPDX-License-Identifier: BSD-2-Clause-Patent=0D -#=0D -##=0D -=0D -[Defines]=0D - INF_VERSION =3D 0x00010005=0D - BASE_NAME =3D PlatformBootManagerLib=0D - FILE_GUID =3D 8AE4756F-0C71-4C06-84D4-4C71F204D514= =0D - MODULE_TYPE =3D DXE_DRIVER=0D - VERSION_STRING =3D 1.0=0D - LIBRARY_CLASS =3D PlatformBootManagerLib|DXE_DRIVER=0D -=0D -#=0D -# The following information is for reference only and not required by the = build tools.=0D -#=0D -# VALID_ARCHITECTURES =3D IA32 X64 EBC=0D -#=0D -=0D -[Sources]=0D - BdsPlatform.c=0D - PlatformData.c=0D - BdsPlatform.h=0D -=0D -[Packages]=0D - MdePkg/MdePkg.dec=0D - MdeModulePkg/MdeModulePkg.dec=0D - SimicsOpenBoardPkg/OpenBoardPkg.dec=0D - OvmfPkg/OvmfPkg.dec=0D - SimicsIch10Pkg/Ich10Pkg.dec=0D -=0D -[LibraryClasses]=0D - BaseLib=0D - MemoryAllocationLib=0D - UefiBootServicesTableLib=0D - BaseMemoryLib=0D - DebugLib=0D - PcdLib=0D - UefiBootManagerLib=0D - BootLogoLib=0D - DevicePathLib=0D - PciLib=0D - NvVarsFileLib=0D - DxeLoadLinuxLib=0D - UefiLib=0D - LogoLib=0D -=0D -[Pcd]=0D - gSimicsOpenBoardPkgTokenSpaceGuid.PcdEmuVariableEvent=0D - gSimicsOpenBoardPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable=0D - gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsX58HostBridgePciDevId=0D - gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut=0D - gSimicsOpenBoardPkgTokenSpaceGuid.PcdShellFile=0D - gSimicsOpenBoardPkgTokenSpaceGuid.PcdLogoFile=0D -=0D -[Pcd.IA32, Pcd.X64]=0D - gEfiMdePkgTokenSpaceGuid.PcdFSBClock=0D -=0D -[Protocols]=0D - gEfiDecompressProtocolGuid=0D - gEfiPciRootBridgeIoProtocolGuid=0D - gEfiS3SaveStateProtocolGuid # PROTOCOL SOMETIMES_CONSU= MED=0D - gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL SOMETIMES_PRODU= CED=0D - gEfiLoadedImageProtocolGuid # PROTOCOL SOMETIMES_PRODU= CED=0D - gEfiFirmwareVolume2ProtocolGuid # PROTOCOL SOMETIMES_CONSU= MED=0D -=0D -[Guids]=0D - gEfiEndOfDxeEventGroupGuid=0D diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerL= ib/PlatformData.c b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootM= anagerLib/PlatformData.c deleted file mode 100644 index 768843a8bf..0000000000 --- a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/Plat= formData.c +++ /dev/null @@ -1,35 +0,0 @@ -/** @file=0D - Defined the platform specific device path which will be used by=0D - platform Bbd to perform the platform policy connect.=0D -=0D - Copyright (c) 2004 - 2019 Intel Corporation. All rights reserved.
=0D -=0D - SPDX-License-Identifier: BSD-2-Clause-Patent=0D -**/=0D -=0D -#include "BdsPlatform.h"=0D -=0D -ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode =3D gPnpPs2Keyboard;= =0D -ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode =3D gPnp16550ComPort= ;=0D -UART_DEVICE_PATH gUartDeviceNode =3D gUart;=0D -VENDOR_DEVICE_PATH gTerminalTypeDeviceNode =3D gPcAnsiTerminal;= =0D -=0D -//=0D -// Platform specific keyboard device path=0D -//=0D -=0D -//=0D -// Predefined platform default console device path=0D -//=0D -PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[] =3D {=0D - {=0D - NULL,=0D - 0=0D - }=0D -};=0D -=0D -//=0D -// Predefined platform connect sequence=0D -//=0D -EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence[] =3D { NULL };=0D -=0D --=20 2.39.1.windows.1