From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mx.groups.io with SMTP id smtpd.web10.53272.1683789152070646019 for ; Thu, 11 May 2023 00:12:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=wAnnT5ox; spf=pass (domain: rivosinc.com, ip: 209.85.210.171, mailfrom: dhaval@rivosinc.com) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-64115e652eeso55778632b3a.0 for ; Thu, 11 May 2023 00:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1683789151; x=1686381151; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=t5D0OCrEi22WQq9mK8oSWt0C9+O4w9X3L5pLanDJcIw=; b=wAnnT5ox2rpDBc6+DAFQ7v39xhKLuBjty9YcoGNAXrDqNIgcTeykgpkRmiCpEszYMO xK4Xvnb/qfHFdi+0K/9HTxc5Gg3jquTrCabZz3DAbtS2bMEy6GvTDnijHD8n6Q8MDrul GB0wPKTi0LcjQxVokRazquoQR5bpzYk1F2t2vQ14yWriViXGogXrTfh2MTm89V86C7Sc rRP2GdaErfTo08kf9sil91KStauZKW0hdU7VMjKb2OZkDRsrPYSXDFxEsFitiPDZxPgL spNpZFGqMRRjo5HP5J4pE/aNHVd7RQsbyNDrRxClnMLZtmiaDu7Y1oeVSn+8UEn55GTk PLkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683789151; x=1686381151; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t5D0OCrEi22WQq9mK8oSWt0C9+O4w9X3L5pLanDJcIw=; b=ioaOXnvI34Ui1WEKEhvrozbJdPgtpU3Zwmr4RLyqPIrxkEvCHpYFVpQWx+g451oy+R xBGWMXXh2IRtsZRgJ9gMu7n6M6TD1ZKLhN7Ro4EuVEDO5DKY912rGexdUARwlCZzbnU6 3dS8P3pMscPAHqFe0v0xTr1XwfTc/lhrozB3mzDaFVYm20J/GhI2OuIw21OFwcMdC7mq tITfDt+6yVcbFK28JhucdBLYnxNxXT7iSOF+thArMYhicYhqvqk9qA7TEbW9++vR/uwt Xyxd20MZyyPx9n/FAQEwHjkQA1UgNb4nieCG9uQs0yxaA5wjiWfNKuec55jg4YnQ9NAT 2hXg== X-Gm-Message-State: AC+VfDx3rRVa+AjX8hehTnFk1SBfJh3xQPjHVWzCXIkaXzaMb/0yCyqG dyW5i3qsq1r8iOuPcvQTuAdSRTk7o+LABvlabKQ= X-Google-Smtp-Source: ACHHUZ6cMmBElcyd1+URwdtcCZU6qU8vXDyxRghkQK8dcoApCNP69QDjczy1mSRJkL5HWn6bW2j7DQ== X-Received: by 2002:a17:902:f804:b0:1a6:d9a6:a9b4 with SMTP id ix4-20020a170902f80400b001a6d9a6a9b4mr21154282plb.3.1683789151359; Thu, 11 May 2023 00:12:31 -0700 (PDT) Return-Path: Received: from dhaval.. ([42.106.13.180]) by smtp.gmail.com with ESMTPSA id w20-20020a1709029a9400b001a9884c02e3sm5111214plp.10.2023.05.11.00.12.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 00:12:31 -0700 (PDT) From: "Dhaval Sharma" To: devel@edk2.groups.io Subject: DRAFT: [PATCH v1 0/8] RiscV64 Support In UPL Date: Thu, 11 May 2023 12:42:18 +0530 Message-Id: <20230511071226.19726-1-dhaval@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patchset contains modifications required in UPL boot flow to enable RiscV64 support. Squashing earlier series of patches related to arch specific removal from UPL boot path to this release such that all chnages can be viewed in the entirety. 1. Add required infra to support RiscV64 2. New UPL proposal supports multiple Archs and accordingly ABI is also different. This is a proposal to accomodate these changes. This patch adds a hook to parse RiscV64 specific IN params and extract FDT from the same. 3. Take FDT received from BL and parse it to create required HOBs that are later consumed by UPL. 4. Add FirmwareContext structure which is specific to RV and used by RV CPU driver. 5. Add required modifications to extrace DxeFv from overall UPL FD. 6. Add required RV drivers to boot to UEFI Shell P.S. This patch is review only at this point as it is tested in a limited fashion for RV to get to early debug logs from FDT described serial device. It will require modifications to work on other Archs. Branch https://github.com/rivosinc/edk2/tree/upl-rv64-enable-compilation-v1 Dhaval Sharma (8): UefiPayloadPkg: Remove FP Init from UPL entry UefiPayloadPkg: Move INT prog outside common flow UefiPayloadPkg: Basic Infra To Enable RV64 UPL Support UefiPayloadPkg: Update input params as per latest UPL spec UefiPayloadPkg: Hook to parse IN params as per UPL spec UefiPayloadPkg: Add FirmwareContext for RV64 UefiPayloadPkg: Find DxeFV and create required FV HOB UefiPayloadPkg: Add RV64 driver to boot to UEFI Shell UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- UefiPayloadPkg/{UefiPayloadPkg.dsc => UefiPayloadPkgRV64.dsc} | 448 +++----------- UefiPayloadPkg/UefiPayloadPkgRV64.fdf | 325 ++++++++++ UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 12 +- UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c | 9 + UefiPayloadPkg/UefiPayloadEntry/Ia32/Ia32FdtParserLib.c | 33 ++ UefiPayloadPkg/UefiPayloadEntry/{X64 => RiscV64}/DxeLoadFunc.c | 62 +- UefiPayloadPkg/UefiPayloadEntry/RiscV64/Rv64FdtParserLib.c | 625 ++++++++++++++++++++ UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 29 +- UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c | 9 + UefiPayloadPkg/UefiPayloadEntry/X64/X64FdtParserLib.c | 33 ++ 11 files changed, 1166 insertions(+), 421 deletions(-) copy UefiPayloadPkg/{UefiPayloadPkg.dsc => UefiPayloadPkgRV64.dsc} (63%) create mode 100644 UefiPayloadPkg/UefiPayloadPkgRV64.fdf create mode 100644 UefiPayloadPkg/UefiPayloadEntry/Ia32/Ia32FdtParserLib.c copy UefiPayloadPkg/UefiPayloadEntry/{X64 => RiscV64}/DxeLoadFunc.c (51%) create mode 100644 UefiPayloadPkg/UefiPayloadEntry/RiscV64/Rv64FdtParserLib.c create mode 100644 UefiPayloadPkg/UefiPayloadEntry/X64/X64FdtParserLib.c -- 2.34.1