From nobody Mon Feb 9 20:34:55 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+111106+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+111106+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1699660792; cv=none; d=zohomail.com; s=zohoarc; b=J9ymmhHHegSYmhSXfjJfm4Pw+yQSAVX3KAltTU768W249zWzLNW++MfD6y7sHTItHmyUOK4XO10yR1BEeBZq2YcUN/x0dvkyg368L6M+kKZlcj84E++VDTGlAEyG+I/ooH1YOR3gd7JYOQIeQWTaCtWgKZ8V88ZsuwcpaGR05mU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699660792; 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=wNHYkuZOH4MQXugBGvT6kZIGVbUROZ5dwvjXtW9KmIg=; b=G6tEjG6Q7xUzhJp8dsRXKCPJ4CaR0tDzIOtVuV8yhesfbHsJQE1t0EiCmTOgXEz5Mgk1AkalXkIKr5iYtb72nktMw2CNBPOUPEMdwyd7pgTml/8cOpQYepAniFQc/9cUhI4Ln0J9snNDyGDA2XXdWAgsPpcIpuu9uHrDCmElsEE= 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+111106+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 1699660792165783.3847921198864; Fri, 10 Nov 2023 15:59:52 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=wNHYkuZOH4MQXugBGvT6kZIGVbUROZ5dwvjXtW9KmIg=; 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=1699660791; v=1; b=QwpzW8XiQCBoyi58tLeJc3JiWAd32ZZuC09XQM7uljM5/vl9H03cOPxzy1cKKS5BldJFzJ56 SydMXGEeBLWY4+DN+bUCBRL+5jFTNPHmrM9fCgp6IojgX22q5EJ0fQX8lCvDxBPrpUBamBJO9fs WlCg5JMbbKwbnWPIucd1LED4= X-Received: by 127.0.0.2 with SMTP id ebi0YY1788612xY8hT0WS87P; Fri, 10 Nov 2023 15:59:51 -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.42860.1699660791096531356 for ; Fri, 10 Nov 2023 15:59:51 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-443-B-B8InUaO722fOgvNfaxuw-1; Fri, 10 Nov 2023 18:59:47 -0500 X-MC-Unique: B-B8InUaO722fOgvNfaxuw-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 C576A80B633; Fri, 10 Nov 2023 23:59:46 +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 D492EC15881; Fri, 10 Nov 2023 23:59:45 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao Subject: [edk2-devel] [PATCH 35/37] OvmfPkg: remove gEfiLegacy8259ProtocolGuid Date: Sat, 11 Nov 2023 00:58:18 +0100 Message-Id: <20231110235820.644381-36-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: YLPTGe1woq3tfqiYmVsY0BQnx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699660793728100029 Content-Type: text/plain; charset="utf-8"; x-default="true" At this point, gEfiLegacy8259ProtocolGuid is unused; remove it. This shrinks the list of resources scheduled for removal to: - PCDs: - Pcd8259LegacyModeEdgeLevel - Pcd8259LegacyModeMask 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/Include/Protocol/Legacy8259.h | 290 -------------------- 2 files changed, 291 deletions(-) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 9d326e8143eb..2e9e699aa6ab 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -181,7 +181,6 @@ [Protocols] gXenBusProtocolGuid =3D {0x3d3ca290, 0xb9a5, 0x11e3, {= 0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}} gXenIoProtocolGuid =3D {0x6efac84f, 0x0ab0, 0x4747, {= 0x81, 0xbe, 0x85, 0x55, 0x62, 0x59, 0x04, 0x49}} 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}} 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}} gQemuAcpiTableNotifyProtocolGuid =3D {0x928939b2, 0x4235, 0x462f, {= 0x95, 0x80, 0xf6, 0xa2, 0xb2, 0xc2, 0x1a, 0x4f}} diff --git a/OvmfPkg/Include/Protocol/Legacy8259.h b/OvmfPkg/Include/Protoc= ol/Legacy8259.h deleted file mode 100644 index 233e817c0696..000000000000 --- a/OvmfPkg/Include/Protocol/Legacy8259.h +++ /dev/null @@ -1,290 +0,0 @@ -/** @file - This protocol abstracts the 8259 interrupt controller. This includes - PCI IRQ routing needed to program the PCI Interrupt Line register. - -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_8259_H_ -#define _EFI_LEGACY_8259_H_ - -#define EFI_LEGACY_8259_PROTOCOL_GUID \ - { \ - 0x38321dba, 0x4fe0, 0x4e17, {0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed,= 0xc1 } \ - } - -typedef struct _EFI_LEGACY_8259_PROTOCOL EFI_LEGACY_8259_PROTOCOL; - -typedef enum { - Efi8259Irq0, - Efi8259Irq1, - Efi8259Irq2, - Efi8259Irq3, - Efi8259Irq4, - Efi8259Irq5, - Efi8259Irq6, - Efi8259Irq7, - Efi8259Irq8, - Efi8259Irq9, - Efi8259Irq10, - Efi8259Irq11, - Efi8259Irq12, - Efi8259Irq13, - Efi8259Irq14, - Efi8259Irq15, - Efi8259IrqMax -} EFI_8259_IRQ; - -typedef enum { - Efi8259LegacyMode, - Efi8259ProtectedMode, - Efi8259MaxMode -} EFI_8259_MODE; - -/** - Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists f= or - the legacy mode mask and the protected mode mask. The base address for t= he 8259 - is different for legacy and protected mode, so two masks are required. - - @param This The protocol instance pointer. - @param MasterBase The base vector for the Master PIC in the = 8259 controller. - @param SlaveBase The base vector for the Slave PIC in the 8= 259 controller. - - @retval EFI_SUCCESS The new bases were programmed. - @retval EFI_DEVICE_ERROR A device error occurred programming the ve= ctor bases. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_SET_VECTOR_BASE)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN UINT8 MasterBase, - IN UINT8 SlaveBase - ); - -/** - Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists f= or - the legacy mode mask and the protected mode mask. The base address for t= he 8259 - is different for legacy and protected mode, so two masks are required. - - @param This The protocol instance pointer. - @param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15. - @param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15. - @param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15. - @param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15. - - @retval EFI_SUCCESS 8259 status returned. - @retval EFI_DEVICE_ERROR Error reading 8259. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_GET_MASK)( - IN EFI_LEGACY_8259_PROTOCOL *This, - OUT UINT16 *LegacyMask OPTIONAL, - OUT UINT16 *LegacyEdgeLevel OPTIONAL, - OUT UINT16 *ProtectedMask OPTIONAL, - OUT UINT16 *ProtectedEdgeLevel OPTIONAL - ); - -/** - Set the 8259 interrupt masks for Irq0 - Irq15. A different mask exists f= or - the legacy mode mask and the protected mode mask. The base address for t= he 8259 - is different for legacy and protected mode, so two masks are required. - Also set the edge/level masks. - - @param This The protocol instance pointer. - @param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15. - @param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15. - @param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15. - @param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15. - - @retval EFI_SUCCESS 8259 status returned. - @retval EFI_DEVICE_ERROR Error writing 8259. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_SET_MASK)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN UINT16 *LegacyMask OPTIONAL, - IN UINT16 *LegacyEdgeLevel OPTIONAL, - IN UINT16 *ProtectedMask OPTIONAL, - IN UINT16 *ProtectedEdgeLevel OPTIONAL - ); - -/** - Set the 8259 mode of operation. The base address for the 8259 is differe= nt for - legacy and protected mode. The legacy mode requires the master 8259 to h= ave a - master base of 0x08 and the slave base of 0x70. The protected mode base = locations - are not defined. Interrupts must be masked by the caller before this fun= ction - is called. The interrupt mask from the current mode is saved. The interr= upt - mask for the new mode is Mask, or if Mask does not exist the previously = saved - mask is used. - - @param This The protocol instance pointer. - @param Mode The mode of operation. i.e. the real mode = or protected mode. - @param Mask Optional interupt mask for the new mode. - @param EdgeLevel Optional trigger mask for the new mode. - - @retval EFI_SUCCESS 8259 programmed. - @retval EFI_DEVICE_ERROR Error writing to 8259. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_SET_MODE)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN EFI_8259_MODE Mode, - IN UINT16 *Mask OPTIONAL, - IN UINT16 *EdgeLevel OPTIONAL - ); - -/** - Convert from IRQ to processor interrupt vector number. - - @param This The protocol instance pointer. - @param Irq 8259 IRQ0 - IRQ15. - @param Vector The processor vector number that matches a= n Irq. - - @retval EFI_SUCCESS The Vector matching Irq is returned. - @retval EFI_INVALID_PARAMETER The Irq not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_GET_VECTOR)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN EFI_8259_IRQ Irq, - OUT UINT8 *Vector - ); - -/** - Enable Irq by unmasking interrupt in 8259 - - @param This The protocol instance pointer. - @param Irq 8259 IRQ0 - IRQ15. - @param LevelTriggered TRUE if level triggered. FALSE if edge tri= ggered. - - @retval EFI_SUCCESS The Irq was enabled on 8259. - @retval EFI_INVALID_PARAMETER The Irq is not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_ENABLE_IRQ)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN EFI_8259_IRQ Irq, - IN BOOLEAN LevelTriggered - ); - -/** - Disable Irq by masking interrupt in 8259 - - @param This The protocol instance pointer. - @param Irq 8259 IRQ0 - IRQ15. - - @retval EFI_SUCCESS The Irq was disabled on 8259. - @retval EFI_INVALID_PARAMETER The Irq is not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_DISABLE_IRQ)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN EFI_8259_IRQ Irq - ); - -/** - PciHandle represents a PCI config space of a PCI function. Vector - represents Interrupt Pin (from PCI config space) and it is the data - that is programmed into the Interrupt Line (from the PCI config space) - register. - - @param This The protocol instance pointer. - @param PciHandle The PCI function to return the vector for. - @param Vector The vector for the function it matches. - - @retval EFI_SUCCESS A valid Vector was returned. - @retval EFI_INVALID_PARAMETER PciHandle not valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_GET_INTERRUPT_LINE)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN EFI_HANDLE PciHandle, - OUT UINT8 *Vector - ); - -/** - Send an EOI to 8259 - - @param This The protocol instance pointer. - @param Irq 8259 IRQ0 - IRQ15. - - @retval EFI_SUCCESS EOI was successfully sent to 8259. - @retval EFI_INVALID_PARAMETER The Irq isnot valid. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_LEGACY_8259_END_OF_INTERRUPT)( - IN EFI_LEGACY_8259_PROTOCOL *This, - IN EFI_8259_IRQ Irq - ); - -/** - @par Protocol Description: - Abstracts the 8259 and APIC hardware control between EFI usage and - Compatibility16 usage. - - @param SetVectorBase - Sets the vector bases for master and slave PICs. - - @param GetMask - Gets IRQ and edge/level masks for 16-bit real mode and 32-bit protected = mode. - - @param SetMask - Sets the IRQ and edge\level masks for 16-bit real mode and 32-bit protec= ted mode. - - @param SetMode - Sets PIC mode to 16-bit real mode or 32-bit protected mode. - - @param GetVector - Gets the base vector assigned to an IRQ. - - @param EnableIrq - Enables an IRQ. - - @param DisableIrq - Disables an IRQ. - - @param GetInterruptLine - Gets an IRQ that is assigned to a PCI device. - - @param EndOfInterrupt - Issues the end of interrupt command. - -**/ -struct _EFI_LEGACY_8259_PROTOCOL { - EFI_LEGACY_8259_SET_VECTOR_BASE SetVectorBase; - EFI_LEGACY_8259_GET_MASK GetMask; - EFI_LEGACY_8259_SET_MASK SetMask; - EFI_LEGACY_8259_SET_MODE SetMode; - EFI_LEGACY_8259_GET_VECTOR GetVector; - EFI_LEGACY_8259_ENABLE_IRQ EnableIrq; - EFI_LEGACY_8259_DISABLE_IRQ DisableIrq; - EFI_LEGACY_8259_GET_INTERRUPT_LINE GetInterruptLine; - EFI_LEGACY_8259_END_OF_INTERRUPT EndOfInterrupt; -}; - -extern EFI_GUID gEfiLegacy8259ProtocolGuid; - -#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 (#111106): https://edk2.groups.io/g/devel/message/111106 Mute This Topic: https://groups.io/mt/102518677/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-