From nobody Mon Feb 9 20:46:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+111094+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111094+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1699660776; cv=none; d=zohomail.com; s=zohoarc; b=H/F1li8LeW0YhtfyCkELZINxKueRc6Iu4hqiOzImbfb79J046g9Ja7leebKPXAPDuP8e0qql1C5ahb133L4eHpSFsot1YYHRPeI/R+D7pXVh0kQYTPr2fs9PwyY3v/8nm22E+yohsBusq96B6S2hkIsbISw/XeJXs6CiWFltQmw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699660776; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=K61Le4JwT+Fp1c1j3+iH7VGDZ77EAisegC+tAyyTjkw=; b=dDb6VXPclFEOuFVqr3/B9LZyRWH0yDR00boTz5ab6SEhtGLqOCi9sOwZk9MbPu/JYia5TSFr/66PtMJnIPSqvgl7R+OFRsXwX/b7kn1NDMKKnX8DqizRWwzEg555VmjMHW4/CxDESK+KgpB75ElkKbjo6yrWnjVTS53AMIZFd7w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111094+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1699660776377650.350457987213; Fri, 10 Nov 2023 15:59:36 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=K61Le4JwT+Fp1c1j3+iH7VGDZ77EAisegC+tAyyTjkw=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1699660776; v=1; b=Ono3APAD9jyCpmRmlYqI1w/wq2KcQvZMacs/Gguvr5SM/wc1Tc9ibbvIqfvy34gXPqESvE5R mqFHzW6ZP6E83D/553PD1QDgzx8MopIfseNKmtzzhL8I30pciuKR5NzySti16XGL1BGtP49l/T7 0iChG3YpZsIr7+lGDfE+s97k= X-Received: by 127.0.0.2 with SMTP id 0V9EYY1788612x3fnsolpsKw; Fri, 10 Nov 2023 15:59:36 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.42844.1699660775174557462 for ; Fri, 10 Nov 2023 15:59:35 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-351-Ix6cNC7IPQ-cpA2AdstOPw-1; Fri, 10 Nov 2023 18:59:33 -0500 X-MC-Unique: Ix6cNC7IPQ-cpA2AdstOPw-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFD771C0518D; Fri, 10 Nov 2023 23:59:32 +0000 (UTC) X-Received: from lacos-laptop-9.usersys.redhat.com (unknown [10.39.192.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id D442BC1596F; Fri, 10 Nov 2023 23:59:31 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao Subject: [edk2-devel] [PATCH 24/37] OvmfPkg: remove gEfiLegacyBiosPlatformProtocolGuid Date: Sat, 11 Nov 2023 00:58:07 +0100 Message-Id: <20231110235820.644381-25-lersek@redhat.com> In-Reply-To: <20231110235820.644381-1-lersek@redhat.com> References: <20231110235820.644381-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: D48DQMZnVOO1lTJazUWvnthrx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699660777643100031 Content-Type: text/plain; charset="utf-8"; x-default="true" At this point, gEfiLegacyBiosPlatformProtocolGuid is unused; remove it. This shrinks the list of resources scheduled for removal to: - GUIDs (protocols or otherwise): - SYSTEM_ROM_FILE_GUID (1547B4F3-3E8A-4FEF-81C8-328ED647AB1A) - gEfiLegacy8259ProtocolGuid - gEfiLegacyBiosProtocolGuid - gEfiLegacyInterruptProtocolGuid - headers: - FrameworkDxe.h - Protocol/Legacy8259.h - Protocol/LegacyBios.h - Protocol/LegacyInterrupt.h Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Jiewen Yao Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4588 Signed-off-by: Laszlo Ersek --- OvmfPkg/OvmfPkg.dec | 1 - OvmfPkg/Csm/Include/Protocol/LegacyBiosPlatform.h | 753 ------------------= -- 2 files changed, 754 deletions(-) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 94ad22d9501b..d257007c236a 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -184,7 +184,6 @@ [Protocols] gIoMmuAbsentProtocolGuid =3D {0xf8775d50, 0x8abd, 0x4adf, {= 0x92, 0xac, 0x85, 0x3e, 0x51, 0xf6, 0xc8, 0xdc}} gEfiLegacy8259ProtocolGuid =3D {0x38321dba, 0x4fe0, 0x4e17, {= 0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed, 0xc1}} gEfiLegacyBiosProtocolGuid =3D {0xdb9a1e3d, 0x45cb, 0x4abb, {= 0x85, 0x3b, 0xe5, 0x38, 0x7f, 0xdb, 0x2e, 0x2d}} - gEfiLegacyBiosPlatformProtocolGuid =3D {0x783658a3, 0x4172, 0x4421, {= 0xa2, 0x99, 0xe0, 0x09, 0x07, 0x9c, 0x0c, 0xb4}} gEfiLegacyInterruptProtocolGuid =3D {0x31ce593d, 0x108a, 0x485d, {= 0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe}} gOvmfLoadedX86LinuxKernelProtocolGuid =3D {0xa3edc05d, 0xb618, 0x4ff6, {= 0x95, 0x52, 0x76, 0xd7, 0x88, 0x63, 0x43, 0xc8}} gOvmfSevMemoryAcceptanceProtocolGuid =3D {0xc5a010fe, 0x38a7, 0x4531, {= 0x8a, 0x4a, 0x05, 0x00, 0xd2, 0xfd, 0x16, 0x49}} diff --git a/OvmfPkg/Csm/Include/Protocol/LegacyBiosPlatform.h b/OvmfPkg/Cs= m/Include/Protocol/LegacyBiosPlatform.h deleted file mode 100644 index 941b1c833159..000000000000 --- a/OvmfPkg/Csm/Include/Protocol/LegacyBiosPlatform.h +++ /dev/null @@ -1,753 +0,0 @@ -/** @file - The EFI Legacy BIOS Platform Protocol is used to mate a Legacy16 - implementation with this EFI code. The EFI driver that produces - the Legacy BIOS protocol is generic and consumes this protocol. - A driver that matches the Legacy16 produces this protocol - -Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - - @par Revision Reference: - This protocol is defined in Framework for EFI Compatibility Support Modu= le spec - Version 0.97. - -**/ - -#ifndef _EFI_LEGACY_BIOS_PLATFORM_H_ -#define _EFI_LEGACY_BIOS_PLATFORM_H_ - -/// -/// Legacy BIOS Platform depends on HDD_INFO and EFI_COMPATIBILITY16_TABLE= that -/// are defined with the Legacy BIOS Protocol -/// -#include - -#define EFI_LEGACY_BIOS_PLATFORM_PROTOCOL_GUID \ - { \ - 0x783658a3, 0x4172, 0x4421, {0xa2, 0x99, 0xe0, 0x9, 0x7, 0x9c, 0xc, 0x= b4 } \ - } - -typedef struct _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL EFI_LEGACY_BIOS_PLATFORM= _PROTOCOL; - -/** - This enum specifies the Mode param values for GetPlatformInfo() -**/ -typedef enum { - /// - /// This mode is invoked twice. The first invocation has LegacySegment a= nd - /// LegacyOffset set to 0. The mode returns the MP table address in EFI = memory, along with its size. - /// The second invocation has LegacySegment and LegacyOffset set to the = location - /// in the 0xF0000 or 0xE0000 block to which the MP table is to be copie= d. The second - /// invocation allows any MP table address fixes to occur in the EFI mem= ory copy of the - /// MP table. The caller, not EfiGetPlatformBinaryMpTable, copies the mo= dified MP - /// table to the allocated region in 0xF0000 or 0xE0000 block after the = second invocation. - /// - /// The function parameters associated with this mode are: - /// - /// Table Pointer to the MP table. - /// - /// TableSize Size in bytes of the MP table. - /// - /// Location Location to place table. 0x00. Either 0xE0000 or 0xF0000 = 64 KB blocks. - /// Bit 0 =3D 1 0xF0000 64 KB block. - /// Bit 1 =3D 1 0xE0000 64 KB block. - /// Multiple bits can be set. - /// - /// Alignment Bit-mapped address alignment granularity. - /// The first nonzero bit from the right is the address granularity. - /// - // LegacySegment Segment in which EfiCompatibility code will place th= e MP table. - /// - /// LegacyOffset Offset in which EfiCompatibility code will place the = MP table. - /// - /// The return values associated with this mode are: - /// - /// EFI_SUCCESS The MP table was returned. - /// - /// EFI_UNSUPPORTED The MP table is not supported on this platform. - /// - EfiGetPlatformBinaryMpTable =3D 0, - /// - /// This mode returns a block of data. The content and usage is IBV or O= EM defined. - /// OEMs or IBVs normally use this function for nonstandard Compatibilit= y16 runtime soft - /// INTs. It is the responsibility of this routine to coalesce multiple = OEM 16 bit functions, if - /// they exist, into one coherent package that is understandable by the = Compatibility16 code. - /// This function is invoked twice. The first invocation has LegacySegme= nt and - /// LegacyOffset set to 0. The function returns the table address in EFI= memory, as well as its size. - /// The second invocation has LegacySegment and LegacyOffset set to the = location - /// in the 0xF0000 or 0xE0000 block to which the data (table) is to be c= opied. The second - /// invocation allows any data (table) address fixes to occur in the EFI= memory copy of - /// the table. The caller, not GetOemIntData(), copies the modified data= (table) to the - /// allocated region in 0xF0000 or 0xE0000 block after the second invoca= tion. - /// - /// The function parameters associated with this mode are: - /// - /// Table Pointer to OEM legacy 16 bit code or data. - /// - /// TableSize Size of data. - /// - /// Location Location to place table. 0x00. Either 0xE0000 or 0xF0000 = 64 KB blocks. - /// Bit 0 =3D 1 0xF0000 64 KB block. - /// Bit 1 =3D 1 0xE0000 64 KB block. - /// Multiple bits can be set. - /// - /// Alignment Bit mapped address alignment granularity. - /// The first nonzero bit from the right is the address granularity. - /// - /// LegacySegment Segment in which EfiCompatibility code will place th= e table or data. - /// - /// LegacyOffset Offset in which EfiCompatibility code will place the = table or data. - /// - /// The return values associated with this mode are: - /// - /// EFI_SUCCESS The data was returned successfully. - /// - /// EFI_UNSUPPORTED Oem INT is not supported on this platform. - /// - EfiGetPlatformBinaryOemIntData =3D 1, - /// - /// This mode returns a block of data. The content and usage is IBV defi= ned. OEMs or - /// IBVs normally use this mode for nonstandard Compatibility16 runtime = 16 bit routines. It - /// is the responsibility of this routine to coalesce multiple OEM 16 bi= t functions, if they - /// exist, into one coherent package that is understandable by the Compa= tibility16 code. - /// - /// Example usage: A legacy mobile BIOS that has a pre-existing runtime - /// interface to return the battery status to calling applications. - /// - /// This mode is invoked twice. The first invocation has LegacySegment a= nd - /// LegacyOffset set to 0. The mode returns the table address in EFI mem= ory and its size. - /// The second invocation has LegacySegment and LegacyOffset set to the = location - /// in the 0xF0000 or 0xE0000 block to which the table is to be copied. = The second - /// invocation allows any table address fixes to occur in the EFI memory= copy of the table. - /// The caller, not EfiGetPlatformBinaryOem16Data, copies the modified t= able to - /// the allocated region in 0xF0000 or 0xE0000 block after the second in= vocation. - /// - /// The function parameters associated with this mode are: - /// - /// Table Pointer to OEM legacy 16 bit code or data. - /// - /// TableSize Size of data. - /// - /// Location Location to place the table. 0x00. Either 0xE0000 or 0xF0= 000 64 KB blocks. - /// Bit 0 =3D 1 0xF0000 64 KB block. - /// Bit 1 =3D 1 0xE0000 64 KB block. - /// Multiple bits can be set. - /// - /// Alignment Bit mapped address alignment granularity. - /// The first nonzero bit from the right is the address granularity. - /// - /// LegacySegment Segment in which EfiCompatibility code will place th= e table or data. - /// - /// LegacyOffset Offset in which EfiCompatibility code will place the = table or data. - /// - /// The return values associated with this mode are: - /// - /// EFI_SUCCESS The data was returned successfully. - /// - /// EFI_UNSUPPORTED Oem16 is not supported on this platform. - /// - EfiGetPlatformBinaryOem16Data =3D 2, - /// - /// This mode returns a block of data. The content and usage are IBV def= ined. OEMs or - /// IBVs normally use this mode for nonstandard Compatibility16 runtime = 32 bit routines. It - /// is the responsibility of this routine to coalesce multiple OEM 32 bi= t functions, if they - /// exist, into one coherent package that is understandable by the Compa= tibility16 code. - /// - /// Example usage: A legacy mobile BIOS that has a pre existing runtime - /// interface to return the battery status to calling applications. - /// - /// This mode is invoked twice. The first invocation has LegacySegment a= nd - /// LegacyOffset set to 0. The mode returns the table address in EFI mem= ory and its size. - /// - /// The second invocation has LegacySegment and LegacyOffset set to the = location - /// in the 0xF0000 or 0xE0000 block to which the table is to be copied. = The second - /// invocation allows any table address fix ups to occur in the EFI memo= ry copy of the table. - /// The caller, not EfiGetPlatformBinaryOem32Data, copies the modified t= able to - /// the allocated region in 0xF0000 or 0xE0000 block after the second in= vocation.. - /// - /// Note: There are two generic mechanisms by which this mode can be use= d. - /// Mechanism 1: This mode returns the data and the Legacy BIOS Protocol= copies - /// the data into the F0000 or E0000 block in the Compatibility16 code. = The - /// EFI_COMPATIBILITY16_TABLE entries Oem32Segment and Oem32Offset can - /// be viewed as two UINT16 entries. - /// Mechanism 2: This mode directly fills in the EFI_COMPATIBILITY16_TAB= LE with - /// a pointer to the INT15 E820 region containing the 32 bit code. It re= turns - /// EFI_UNSUPPORTED. The EFI_COMPATIBILITY16_TABLE entries, - /// Oem32Segment and Oem32Offset, can be viewed as two UINT16 entries or - /// as a single UINT32 entry as determined by the IBV. - /// - /// The function parameters associated with this mode are: - /// - /// TableSize Size of data. - /// - /// Location Location to place the table. 0x00 or 0xE0000 or 0xF0000 6= 4 KB blocks. - /// Bit 0 =3D 1 0xF0000 64 KB block. - /// Bit 1 =3D 1 0xE0000 64 KB block. - /// Multiple bits can be set. - /// - /// Alignment Bit mapped address alignment granularity. - /// The first nonzero bit from the right is the address granularit= y. - /// - /// LegacySegment Segment in which EfiCompatibility code will place th= e table or data. - /// - /// LegacyOffset Offset in which EfiCompatibility code will place the = table or data. - /// - /// The return values associated with this mode are: - /// EFI_SUCCESS The data was returned successfully. - /// EFI_UNSUPPORTED Oem32 is not supported on this platform. - /// - EfiGetPlatformBinaryOem32Data =3D 3, - /// - /// This mode returns a TPM binary image for the onboard TPM device. - /// - /// The function parameters associated with this mode are: - /// - /// Table TPM binary image for the onboard TPM device. - /// - /// TableSize Size of BinaryImage in bytes. - /// - /// Location Location to place the table. 0x00. Either 0xE0000 or 0xF0= 000 64 KB blocks. - /// Bit 0 =3D 1 0xF0000 64 KB block. - /// Bit 1 =3D 1 0xE0000 64 KB block. - /// Multiple bits can be set. - /// - /// Alignment Bit mapped address alignment granularity. - /// The first nonzero bit from the right is the address granularity. - /// - /// LegacySegment Segment in which EfiCompatibility code will place th= e table or data. - /// - /// LegacyOffset Offset in which EfiCompatibility code will place the = table or data. - /// - /// The return values associated with this mode are: - /// - /// EFI_SUCCESS BinaryImage is valid. - /// - /// EFI_UNSUPPORTED Mode is not supported on this platform. - /// - /// EFI_NOT_FOUND No BinaryImage was found. - /// - EfiGetPlatformBinaryTpmBinary =3D 4, - /// - /// The mode finds the Compatibility16 Rom Image. - /// - /// The function parameters associated with this mode are: - /// - /// System ROM image for the platform. - /// - /// TableSize Size of Table in bytes. - /// - /// Location Ignored. - /// - /// Alignment Ignored. - /// - /// LegacySegment Ignored. - /// - /// LegacyOffset Ignored. - /// - /// The return values associated with this mode are: - /// - /// EFI_SUCCESS ROM image found. - /// - /// EFI_NOT_FOUND ROM not found. - /// - EfiGetPlatformBinarySystemRom =3D 5, - /// - /// This mode returns the Base address of PciExpress memory mapped confi= guration - /// address space. - /// - /// The function parameters associated with this mode are: - /// - /// Table System ROM image for the platform. - /// - /// TableSize Size of Table in bytes. - /// - /// Location Ignored. - /// - /// Alignment Ignored. - /// - /// LegacySegment Ignored. - /// - /// LegacyOffset Ignored. - /// - /// The return values associated with this mode are: - /// - /// EFI_SUCCESS Address is valid. - /// - /// EFI_UNSUPPORTED System does not PciExpress. - /// - EfiGetPlatformPciExpressBase =3D 6, - /// - EfiGetPlatformPmmSize =3D 7, - /// - EfiGetPlatformEndOpromShadowAddr =3D 8, - /// -} EFI_GET_PLATFORM_INFO_MODE; - -/** - This enum specifies the Mode param values for GetPlatformHandle(). -**/ -typedef enum { - /// - /// This mode returns the Compatibility16 policy for the device that sho= uld be the VGA - /// controller used during a Compatibility16 boot. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0x00. - /// - /// HandleBuffer Buffer of all VGA handles found. - /// - /// HandleCount Number of VGA handles found. - /// - /// AdditionalData NULL. - /// - EfiGetPlatformVgaHandle =3D 0, - /// - /// This mode returns the Compatibility16 policy for the device that sho= uld be the IDE - /// controller used during a Compatibility16 boot. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0x00. - /// - /// HandleBuffer Buffer of all IDE handles found. - /// - /// HandleCount Number of IDE handles found. - /// - /// AdditionalData Pointer to HddInfo. - /// Information about all onboard IDE controllers. - /// - EfiGetPlatformIdeHandle =3D 1, - /// - /// This mode returns the Compatibility16 policy for the device that sho= uld be the ISA bus - /// controller used during a Compatibility16 boot. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0x00. - /// - /// HandleBuffer Buffer of all ISA bus handles found. - /// - /// HandleCount Number of ISA bus handles found. - /// - /// AdditionalData NULL. - /// - EfiGetPlatformIsaBusHandle =3D 2, - /// - /// This mode returns the Compatibility16 policy for the device that sho= uld be the USB - /// device used during a Compatibility16 boot. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0x00. - /// - /// HandleBuffer Buffer of all USB handles found. - /// - /// HandleCount Number of USB bus handles found. - /// - /// AdditionalData NULL. - /// - EfiGetPlatformUsbHandle =3D 3 -} EFI_GET_PLATFORM_HANDLE_MODE; - -/** - This enum specifies the Mode param values for PlatformHooks(). - Note: Any OEM defined hooks start with 0x8000. -**/ -typedef enum { - /// - /// This mode allows any preprocessing before scanning OpROMs. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0. - /// - /// DeviceHandle Handle of device OpROM is associated with. - /// - /// ShadowAddress Address where OpROM is shadowed. - /// - /// Compatibility16Table NULL. - /// - /// AdditionalData NULL. - /// - EfiPlatformHookPrepareToScanRom =3D 0, - /// - /// This mode shadows legacy OpROMS that may not have a physical device = associated with - /// them. It returns EFI_SUCCESS if the ROM was shadowed. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0. - /// - /// DeviceHandle 0. - /// - /// ShadowAddress First free OpROM area, after other OpROMs have bee= n dispatched.. - /// - /// Compatibility16Table Pointer to the Compatibility16 Table. - /// - /// AdditionalData NULL. - /// - EfiPlatformHookShadowServiceRoms =3D 1, - /// - /// This mode allows platform to perform any required operation after an= OpROM has - /// completed its initialization. - /// - /// The function parameters associated with this mode are: - /// - /// Type 0. - /// - /// DeviceHandle Handle of device OpROM is associated with. - /// - /// ShadowAddress Address where OpROM is shadowed. - /// - /// Compatibility16Table NULL. - /// - /// AdditionalData NULL. - /// - EfiPlatformHookAfterRomInit =3D 2 -} EFI_GET_PLATFORM_HOOK_MODE; - -/// -/// This IRQ has not been assigned to PCI. -/// -#define PCI_UNUSED 0x00 -/// -/// This IRQ has been assigned to PCI. -/// -#define PCI_USED 0xFF -/// -/// This IRQ has been used by an SIO legacy device and cannot be used by P= CI. -/// -#define LEGACY_USED 0xFE - -#pragma pack(1) - -typedef struct { - /// - /// IRQ for this entry. - /// - UINT8 Irq; - /// - /// Status of this IRQ. - /// - /// PCI_UNUSED 0x00. This IRQ has not been assigned to PCI. - /// - /// PCI_USED 0xFF. This IRQ has been assigned to PCI. - /// - /// LEGACY_USED 0xFE. This IRQ has been used by an SIO legacy - /// device and cannot be used by PCI. - /// - UINT8 Used; -} EFI_LEGACY_IRQ_PRIORITY_TABLE_ENTRY; - -// -// Define PIR table structures -// -#define EFI_LEGACY_PIRQ_TABLE_SIGNATURE SIGNATURE_32 ('$', 'P', 'I', 'R') - -typedef struct { - /// - /// $PIR. - /// - UINT32 Signature; - /// - /// 0x00. - /// - UINT8 MinorVersion; - /// - /// 0x01 for table version 1.0. - /// - UINT8 MajorVersion; - /// - /// 0x20 + RoutingTableEntries * 0x10. - /// - UINT16 TableSize; - /// - /// PCI interrupt router bus. - /// - UINT8 Bus; - /// - /// PCI interrupt router device/function. - /// - UINT8 DevFun; - /// - /// If nonzero, bit map of IRQs reserved for PCI. - /// - UINT16 PciOnlyIrq; - /// - /// Vendor ID of a compatible PCI interrupt router. - /// - UINT16 CompatibleVid; - /// - /// Device ID of a compatible PCI interrupt router. - /// - UINT16 CompatibleDid; - /// - /// If nonzero, a value passed directly to the IRQ miniport's Initialize= function. - /// - UINT32 Miniport; - /// - /// Reserved for future usage. - /// - UINT8 Reserved[11]; - /// - /// This byte plus the sum of all other bytes in the LocalPirqTable equa= l 0x00. - /// - UINT8 Checksum; -} EFI_LEGACY_PIRQ_TABLE_HEADER; - -typedef struct { - /// - /// If nonzero, a value assigned by the IBV. - /// - UINT8 Pirq; - /// - /// If nonzero, the IRQs that can be assigned to this device. - /// - UINT16 IrqMask; -} EFI_LEGACY_PIRQ_ENTRY; - -typedef struct { - /// - /// PCI bus of the entry. - /// - UINT8 Bus; - /// - /// PCI device of this entry. - /// - UINT8 Device; - /// - /// An IBV value and IRQ mask for PIRQ pins A through D. - /// - EFI_LEGACY_PIRQ_ENTRY PirqEntry[4]; - /// - /// If nonzero, the slot number assigned by the board manufacturer. - /// - UINT8 Slot; - /// - /// Reserved for future use. - /// - UINT8 Reserved; -} EFI_LEGACY_IRQ_ROUTING_ENTRY; - -#pragma pack() - -/** - Finds the binary data or other platform information. - - @param This The protocol instance pointer. - @param Mode Specifies what data to return. See See EFI= _GET_PLATFORM_INFO_MODE enum. - @param Table Mode specific. See EFI_GET_PLATFORM_INFO_= MODE enum. - @param TableSize Mode specific. See EFI_GET_PLATFORM_INFO= _MODE enum. - @param Location Mode specific. See EFI_GET_PLATFORM_INFO= _MODE enum. - @param Alignment Mode specific. See EFI_GET_PLATFORM_INFO_= MODE enum. - @param LegacySegment Mode specific. See EFI_GET_PLATFORM_INFO_= MODE enum. - @param LegacyOffset Mode specific. See EFI_GET_PLATFORM_INFO_= MODE enum. - - @retval EFI_SUCCESS Data returned successfully. - @retval EFI_UNSUPPORTED Mode is not supported on the platform. - @retval EFI_NOT_FOUND Binary image or table not found. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - IN EFI_GET_PLATFORM_INFO_MODE Mode, - OUT VOID **Table, - OUT UINTN *TableSize, - OUT UINTN *Location, - OUT UINTN *Alignment, - IN UINT16 LegacySegment, - IN UINT16 LegacyOffset - ); - -/** - Returns a buffer of handles for the requested subfunction. - - @param This The protocol instance pointer. - @param Mode Specifies what handle to return. See EFI_G= ET_PLATFORM_HANDLE_MODE enum. - @param Type Mode specific. See EFI_GET_PLATFORM_HANDLE= _MODE enum. - @param HandleBuffer Mode specific. See EFI_GET_PLATFORM_HANDLE= _MODE enum. - @param HandleCount Mode specific. See EFI_GET_PLATFORM_HANDLE= _MODE enum. - @param AdditionalData Mode specific. See EFI_GET_PLATFORM_HANDLE= _MODE enum. - - @retval EFI_SUCCESS Handle is valid. - @retval EFI_UNSUPPORTED Mode is not supported on the platform. - @retval EFI_NOT_FOUND Handle is not known. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - IN EFI_GET_PLATFORM_HANDLE_MODE Mode, - IN UINT16 Type, - OUT EFI_HANDLE **HandleBuffer, - OUT UINTN *HandleCount, - IN VOID **AdditionalData OPTIONAL - ); - -/** - Load and initialize the Legacy BIOS SMM handler. - - @param This The protocol instance pointer. - @param EfiToLegacy16BootTable A pointer to Legacy16 boot table. - - @retval EFI_SUCCESS SMM code loaded. - @retval EFI_DEVICE_ERROR SMM code failed to load - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_SMM_INIT)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - IN VOID *EfiToLegacy16BootTable - ); - -/** - Allows platform to perform any required action after a LegacyBios operat= ion. - Invokes the specific sub function specified by Mode. - - @param This The protocol instance pointer. - @param Mode Specifies what handle to return. See EFI_G= ET_PLATFORM_HOOK_MODE enum. - @param Type Mode specific. See EFI_GET_PLATFORM_HOOK_= MODE enum. - @param DeviceHandle Mode specific. See EFI_GET_PLATFORM_HOOK_= MODE enum. - @param ShadowAddress Mode specific. See EFI_GET_PLATFORM_HOOK_= MODE enum. - @param Compatibility16Table Mode specific. See EFI_GET_PLATFORM_HOOK_= MODE enum. - @param AdditionalData Mode specific. See EFI_GET_PLATFORM_HOOK_= MODE enum. - - @retval EFI_SUCCESS The operation performed successfully. Mode= specific. - @retval EFI_UNSUPPORTED Mode is not supported on the platform. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_HOOKS)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - IN EFI_GET_PLATFORM_HOOK_MODE Mode, - IN UINT16 Type, - IN EFI_HANDLE DeviceHandle OPTIONAL, - IN OUT UINTN *ShadowAddress OPTIONAL, - IN EFI_COMPATIBILITY16_TABLE *Compatibility16Table OPTIONAL, - OUT VOID **AdditionalData OPTIONAL - ); - -/** - Returns information associated with PCI IRQ routing. - This function returns the following information associated with PCI IRQ = routing: - * An IRQ routing table and number of entries in the table. - * The $PIR table and its size. - * A list of PCI IRQs and the priority order to assign them. - - @param This The protocol instance pointer. - @param RoutingTable The pointer to PCI IRQ Routing table. - This location is the $PIR table minus th= e header. - @param RoutingTableEntries The number of entries in table. - @param LocalPirqTable $PIR table. - @param PirqTableSize $PIR table size. - @param LocalIrqPriorityTable A list of interrupts in priority order t= o assign. - @param IrqPriorityTableEntries The number of entries in the priority ta= ble. - - @retval EFI_SUCCESS Data was successfully returned. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_GET_ROUTING_TABLE)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - OUT VOID **RoutingTable, - OUT UINTN *RoutingTableEntries, - OUT VOID **LocalPirqTable OPTIONAL, - OUT UINTN *PirqTableSize OPTIONAL, - OUT VOID **LocalIrqPriorityTable OPTIONAL, - OUT UINTN *IrqPriorityTableEntries OPTIONAL - ); - -/** - Translates the given PIRQ accounting for bridge. - This function translates the given PIRQ back through all buses, if requi= red, - and returns the true PIRQ and associated IRQ. - - @param This The protocol instance pointer. - @param PciBus The PCI bus number for this device. - @param PciDevice The PCI device number for this device. - @param PciFunction The PCI function number for this device. - @param Pirq Input is PIRQ reported by device, and outp= ut is true PIRQ. - @param PciIrq The IRQ already assigned to the PIRQ, or t= he IRQ to be - assigned to the PIRQ. - - @retval EFI_SUCCESS The PIRQ was translated. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_TRANSLATE_PIRQ)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - IN UINTN PciBus, - IN UINTN PciDevice, - IN UINTN PciFunction, - IN OUT UINT8 *Pirq, - OUT UINT8 *PciIrq - ); - -/** - Attempt to legacy boot the BootOption. If the EFI contexted has been - compromised this function will not return. - - @param This The protocol instance pointer. - @param BbsDevicePath The EFI Device Path from BootXXXX variabl= e. - @param BbsTable The Internal BBS table. - @param LoadOptionSize The size of LoadOption in size. - @param LoadOption The LoadOption from BootXXXX variable - @param EfiToLegacy16BootTable A pointer to BootTable structure - - @retval EFI_SUCCESS Ready to boot. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_BIOS_PLATFORM_PREPARE_TO_BOOT)( - IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, - IN BBS_BBS_DEVICE_PATH *BbsDevicePath, - IN VOID *BbsTable, - IN UINT32 LoadOptionsSize, - IN VOID *LoadOptions, - IN VOID *EfiToLegacy16BootTable - ); - -/** - This protocol abstracts the platform portion of the traditional BIOS. -**/ -struct _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL { - /// - /// Gets binary data or other platform information. - /// - EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO GetPlatformInfo; - /// - /// Returns a buffer of all handles matching the requested subfunction. - /// - EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE GetPlatformHandle; - /// - /// Loads and initializes the traditional BIOS SMM handler. - EFI_LEGACY_BIOS_PLATFORM_SMM_INIT SmmInit; - /// - /// Allows platform to perform any required actions after a LegacyBios = operation. - /// - EFI_LEGACY_BIOS_PLATFORM_HOOKS PlatformHooks; - /// - /// Gets $PIR table. - EFI_LEGACY_BIOS_PLATFORM_GET_ROUTING_TABLE GetRoutingTable; - /// - /// Translates the given PIRQ to the final value after traversing any P= CI bridges. - /// - EFI_LEGACY_BIOS_PLATFORM_TRANSLATE_PIRQ TranslatePirq; - /// - /// Final platform function before the system attempts to boot to a tra= ditional OS. - /// - EFI_LEGACY_BIOS_PLATFORM_PREPARE_TO_BOOT PrepareToBoot; -}; - -extern EFI_GUID gEfiLegacyBiosPlatformProtocolGuid; - -#endif -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111094): https://edk2.groups.io/g/devel/message/111094 Mute This Topic: https://groups.io/mt/102518663/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076= /xyzzy [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-