From nobody Tue Feb 10 01:50:27 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+95081+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+95081+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1665571566; cv=none; d=zohomail.com; s=zohoarc; b=aGSlEuWhrkfZoaUT581VVHws6yWeq/4j5K6Xd0YARS13WIo8CHsFt+qmSM6FtBwb9yYRr2lxcfb016Ne/qmcXnQZaV+awpTlxBQc4ZfFvqN1g6dF6noeRBbxxWHMB8IRm3ib6Pc4xgHr/9kfOcouCk477mEqUd7T9gWaJ8rtnMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665571566; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=igHiMWo03i9+kg1m1Hz7j02ds35leKQgBANP2ikgBrk=; b=l9NNANoybBqIjQKKE9jp3SNYCsacFJ52v6yJKKqHsuPJSWJVqeB3UtpwnMHU61e88yfbhWIYbN3ih3w7o1wj0kYZcYE9ZdlYlZGW78qI3g3tIR6pEb0qLUIZi/6AbtDO7G2Bom3BcohCqWL/NiPDNDfs4JIbAsroWDu14kBVaug= 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+95081+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 166557156647461.197232001409475; Wed, 12 Oct 2022 03:46:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id syzLYY1788612x3eQPBxpixw; Wed, 12 Oct 2022 03:46:05 -0700 X-Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web10.18668.1665571564564817967 for ; Wed, 12 Oct 2022 03:46:04 -0700 X-Received: by mail-pg1-f169.google.com with SMTP id e129so15190731pgc.9 for ; Wed, 12 Oct 2022 03:46:04 -0700 (PDT) X-Gm-Message-State: Et2U8xTHKYcPmfRLQ528TdOmx1787277AA= X-Google-Smtp-Source: AMsMyM78+AkpUsvsYpCzhoHKva7Oe8fhuTWhEH3+TNhyEQr3xX2DWbMVSZfs1/g/Zz6u7ZHyMm2enw== X-Received: by 2002:a63:8041:0:b0:463:11c:3a82 with SMTP id j62-20020a638041000000b00463011c3a82mr11301720pgd.357.1665571563816; Wed, 12 Oct 2022 03:46:03 -0700 (PDT) X-Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id z4-20020aa79e44000000b0054223a0185asm10812221pfq.161.2022.10.12.03.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 03:46:03 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V2 17/33] UefiCpuPkg/CpuDxe: Refactor to allow other architectures Date: Wed, 12 Oct 2022 16:14:40 +0530 Message-Id: <20221012104456.1393376-18-sunilvl@ventanamicro.com> In-Reply-To: <20221012104456.1393376-1-sunilvl@ventanamicro.com> References: <20221012104456.1393376-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,sunilvl@ventanamicro.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665571565; bh=33ot3SR1xxQ+qnQ/qLsP+0x/CCQ87Fu8YWBXfnyGC5E=; h=Cc:Date:From:Reply-To:Subject:To; b=ExJkSYXUI2E9muBIfm5KZLNoz7xX8mKI3HwP8aVs/4d4VGR1+iA1IVtH8lxuQdsy2lM yKs7oN0jo6UD721ZCvGNts7MzEzIA/YJ8qef7QNifrazXSXXc/8aCUDIJV6nkV5lV6S8P YysNFc+72e0k90pFV49E98rPjpeRmLjcyV4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665571568615100007 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4076 Currently, CpuDxe supports only X86 architecture. To add support for other architectures like RISC-V, this need to be refactored. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Signed-off-by: Sunil V L --- UefiCpuPkg/CpuDxe/CpuDxe.inf | 28 ++++++++++--------- UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuDxe.h | 0 UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuGdt.h | 0 UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuMp.h | 0 .../CpuDxe/{ =3D> Ia32_X64}/CpuPageTable.h | 0 UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuDxe.c | 0 UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuGdt.c | 0 UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuMp.c | 0 .../CpuDxe/{ =3D> Ia32_X64}/CpuPageTable.c | 0 9 files changed, 15 insertions(+), 13 deletions(-) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuDxe.h (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuGdt.h (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuMp.h (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuPageTable.h (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuDxe.c (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuGdt.c (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuMp.c (100%) rename UefiCpuPkg/CpuDxe/{ =3D> Ia32_X64}/CpuPageTable.c (100%) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.inf b/UefiCpuPkg/CpuDxe/CpuDxe.inf index 235241899222..069a7f2933bd 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.inf +++ b/UefiCpuPkg/CpuDxe/CpuDxe.inf @@ -29,28 +29,30 @@ [LibraryClasses] DebugLib DxeServicesTableLib MemoryAllocationLib - MtrrLib UefiBootServicesTableLib UefiDriverEntryPoint - LocalApicLib - UefiCpuLib UefiLib CpuExceptionHandlerLib HobLib ReportStatusCodeLib - MpInitLib TimerLib PeCoffGetEntryPointLib =20 -[Sources] - CpuDxe.c - CpuDxe.h - CpuGdt.c - CpuGdt.h - CpuMp.c - CpuMp.h - CpuPageTable.h - CpuPageTable.c +[LibraryClasses.IA32, LibraryClasses.X64] + LocalApicLib + MpInitLib + MtrrLib + UefiCpuLib + +[Sources.IA32, Sources.X64] + Ia32_X64/CpuDxe.c + Ia32_X64/CpuDxe.h + Ia32_X64/CpuGdt.c + Ia32_X64/CpuGdt.h + Ia32_X64/CpuMp.c + Ia32_X64/CpuMp.h + Ia32_X64/CpuPageTable.h + Ia32_X64/CpuPageTable.c =20 [Sources.IA32] Ia32/CpuAsm.nasm diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/Ia32_X64/CpuDxe= .h similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuDxe.h rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuDxe.h diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.h b/UefiCpuPkg/CpuDxe/Ia32_X64/CpuGdt= .h similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuGdt.h rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuGdt.h diff --git a/UefiCpuPkg/CpuDxe/CpuMp.h b/UefiCpuPkg/CpuDxe/Ia32_X64/CpuMp.h similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuMp.h rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuMp.h diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.h b/UefiCpuPkg/CpuDxe/Ia32_X64/= CpuPageTable.h similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuPageTable.h rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuPageTable.h diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/Ia32_X64/CpuDxe= .c similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuDxe.c rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuDxe.c diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/Ia32_X64/CpuGdt= .c similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuGdt.c rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuGdt.c diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/Ia32_X64/CpuMp.c similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuMp.c rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuMp.c diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/Ia32_X64/= CpuPageTable.c similarity index 100% rename from UefiCpuPkg/CpuDxe/CpuPageTable.c rename to UefiCpuPkg/CpuDxe/Ia32_X64/CpuPageTable.c --=20 2.25.1 -=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 (#95081): https://edk2.groups.io/g/devel/message/95081 Mute This Topic: https://groups.io/mt/94278082/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-