From patchwork Thu Mar 14 22:15:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Anastasio X-Patchwork-Id: 13592769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD9D9C54E5D for ; Thu, 14 Mar 2024 22:16:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.693513.1081703 (Exim 4.92) (envelope-from ) id 1rktMx-0000pe-4k; Thu, 14 Mar 2024 22:16:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 693513.1081703; Thu, 14 Mar 2024 22:16:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rktMx-0000pV-1L; Thu, 14 Mar 2024 22:16:11 +0000 Received: by outflank-mailman (input) for mailman id 693513; Thu, 14 Mar 2024 22:16:09 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rktMv-0000X2-2B for xen-devel@lists.xenproject.org; Thu, 14 Mar 2024 22:16:09 +0000 Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6fbee253-e250-11ee-a1ee-f123f15fe8a2; Thu, 14 Mar 2024 23:16:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 1B23E8285446; Thu, 14 Mar 2024 17:15:59 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5HM8izUN8lnN; Thu, 14 Mar 2024 17:15:58 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 5C43A828673E; Thu, 14 Mar 2024 17:15:58 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OKrLz0-b-UO0; Thu, 14 Mar 2024 17:15:58 -0500 (CDT) Received: from raptor-ewks-026.lan (5.edge.rptsys.com [23.155.224.38]) by mail.rptsys.com (Postfix) with ESMTPSA id D68AF828543D; Thu, 14 Mar 2024 17:15:57 -0500 (CDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6fbee253-e250-11ee-a1ee-f123f15fe8a2 DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com 5C43A828673E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1710454558; bh=sYFuyPzI+hrrFJYLQ4ibI3REmlE1nCAfT4TkBNcqNYs=; h=From:To:Date:Message-Id:MIME-Version; b=RzrlIuYuVGBybpl9EcDNGgjX4G+3zxrBCmEfVoQ+tXsIRSp6xvp1tTfgjU2Mphebl wOz25CGw3W98rVsls2QkzQofvLspPhBrHFzm7vYT6J1R6U04H25UnsfmeEqcwkPdFt R35HGpFCKaHBDAmduVRBT1P3SqR8dkBwcA4CP+tg= X-Virus-Scanned: amavisd-new at rptsys.com From: Shawn Anastasio To: xen-devel@lists.xenproject.org Cc: tpearson@raptorengineering.com, Jan Beulich , Shawn Anastasio , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v3 1/9] EFI: Introduce inline stub for efi_enabled on !X86 && !ARM Date: Thu, 14 Mar 2024 17:15:39 -0500 Message-Id: <39069a589f9c4dc0db9b01b7412c1a99bea55f37.1710443965.git.sanastasio@raptorengineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 On architectures with no EFI support, define an inline stub implementation of efi_enabled in efi.h that always returns false. Suggested-by: Jan Beulich Signed-off-by: Shawn Anastasio Acked-by: Julien Grall --- xen/include/xen/efi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/include/xen/efi.h b/xen/include/xen/efi.h index 942d2e9491..160804e294 100644 --- a/xen/include/xen/efi.h +++ b/xen/include/xen/efi.h @@ -31,7 +31,15 @@ union compat_pf_efi_info; struct xenpf_efi_runtime_call; struct compat_pf_efi_runtime_call; +#if defined(CONFIG_X86) || defined(CONFIG_ARM) bool efi_enabled(unsigned int feature); +#else +static inline bool efi_enabled(unsigned int feature) +{ + return false; +} +#endif + void efi_init_memory(void); bool efi_boot_mem_unused(unsigned long *start, unsigned long *end); bool efi_rs_using_pgtables(void);