From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 77E9F740041 for ; Tue, 23 Jan 2024 22:52:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nfMVSjS367JnCnL/87lPul0rYjvsRsPB1F0HcxYPJVA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706050365; v=1; b=ZcQLrHoL6eISUIIrg0XYdMQN64g8OH4kgjPMtRJLG6KEEkRtt6HnejbJIBjJV210RRrOf32X Vd9+FUISLUC9d7sLBdqEBMM1JlifZpV3VWQPUEdD2O0S0hANjiB9ErzgJCwDr0RG4ictR1sJ9Ik lICCX2T0w0a7ezryw1uq1bOQ= X-Received: by 127.0.0.2 with SMTP id bxCXYY7687511xuKNJfPTRkb; Tue, 23 Jan 2024 14:52:45 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web10.8813.1706050362826635713 for ; Tue, 23 Jan 2024 14:52:44 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="8329085" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="8329085" X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 14:52:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="905400385" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="905400385" X-Received: from mdkinney-mobl.amr.corp.intel.com ([10.209.28.88]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 14:52:40 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Zhiguang Liu , Laszlo Ersek , Qing Huang Subject: [edk2-devel] [Patch 1/1] MdePkg/Library/BaseCpuLibNull: Add missing X86 specific services Date: Tue, 23 Jan 2024 14:52:36 -0800 Message-Id: <20240123225236.618-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: JJlGcAOSAXmjd4UuWVVpNqA7x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ZcQLrHoL; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io * Add InitializeFloatingPointUnits() to x86 specific file * Add GetCpuFamilyModel() to x86 specific file * Add GetCpuSteppingId() to x86 specific file * Move StandardSignatureIsAuthenticAMD() to x86 specific file. * Add CpuLib library class include to all C files. Cc: Liming Gao Cc: Zhiguang Liu Cc: Laszlo Ersek Cc: Qing Huang Signed-off-by: Michael D Kinney --- .../Library/BaseCpuLibNull/BaseCpuLibNull.c | 17 +---- .../Library/BaseCpuLibNull/BaseCpuLibNull.inf | 3 + .../BaseCpuLibNull/X86BaseCpuLibNull.c | 64 +++++++++++++++++++ 3 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c diff --git a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c index 3542cf6921f7..0080022b94ef 100644 --- a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c +++ b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.c @@ -6,6 +6,8 @@ **/ +#include + /** Places the CPU in a sleep state until an interrupt is received. @@ -35,18 +37,3 @@ CpuFlushTlb ( ) { } - -/** - Determine if the standard CPU signature is "AuthenticAMD". - - @retval TRUE The CPU signature matches. - @retval FALSE The CPU signature does not match. -**/ -BOOLEAN -EFIAPI -StandardSignatureIsAuthenticAMD ( - VOID - ) -{ - return FALSE; -} diff --git a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf index a9e8399038a6..9f20d6833f56 100644 --- a/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf +++ b/MdePkg/Library/BaseCpuLibNull/BaseCpuLibNull.inf @@ -22,5 +22,8 @@ [Defines] [Sources] BaseCpuLibNull.c +[Sources.IA32, Sources.X64] + X86BaseCpuLibNull.c + [Packages] MdePkg/MdePkg.dec diff --git a/MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c b/MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c new file mode 100644 index 000000000000..4469bcc767cf --- /dev/null +++ b/MdePkg/Library/BaseCpuLibNull/X86BaseCpuLibNull.c @@ -0,0 +1,64 @@ +/** @file + Null instance of CPU Library for IA32/X64 specific services. + + Copyright (c) 2024, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +/** + Initializes floating point units for requirement of UEFI specification. + This function initializes floating-point control word to 0x027F (all exceptions + masked,double-precision, round-to-nearest) and multimedia-extensions control word + (if supported) to 0x1F80 (all exceptions masked, round-to-nearest, flush to zero + for masked underflow). +**/ +VOID +EFIAPI +InitializeFloatingPointUnits ( + VOID + ) +{ +} + +/** + Determine if the standard CPU signature is "AuthenticAMD". + @retval TRUE The CPU signature matches. + @retval FALSE The CPU signature does not match. +**/ +BOOLEAN +EFIAPI +StandardSignatureIsAuthenticAMD ( + VOID + ) +{ + return FALSE; +} + +/** + Return the 32bit CPU family and model value. + @return CPUID[01h].EAX with Processor Type and Stepping ID cleared. +**/ +UINT32 +EFIAPI +GetCpuFamilyModel ( + VOID + ) +{ + return 0; +} + +/** + Return the CPU stepping ID. + @return CPU stepping ID value in CPUID[01h].EAX. +**/ +UINT8 +EFIAPI +GetCpuSteppingId ( + VOID + ) +{ + return 0; +} -- 2.40.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114236): https://edk2.groups.io/g/devel/message/114236 Mute This Topic: https://groups.io/mt/103921248/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-