From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.web11.52930.1683788947688178512 for ; Thu, 11 May 2023 00:09:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=v0aMgQFf; spf=pass (domain: rivosinc.com, ip: 209.85.210.180, mailfrom: dhaval@rivosinc.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6436e004954so8493937b3a.0 for ; Thu, 11 May 2023 00:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1683788947; x=1686380947; 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=v0aMgQFfXCBXM1vY43kY5KesGCY5SEDVm05wHTHL7sj7JQiE7SitynlclHMKj+wsYm r5oy7qsCr1BFdVILHhe+Ve0CKnuZQHkeDOy7iHE6HH5dRxrDxAozFDJGkn19qEI3axt6 7hqaJYdPoDEgESIqjGTk/yBafXksSmVoZHqe1kOswBEC4Lip/XTZuFU/aRnPl9up2ihi 6/7s4BfNR/dFqs0K+RPralCIrKhkT0ryDzCzVlBZEfq7AeobXX7PTw/hmFdqoj4UJlMn dt+Y1COJQ+57lLXWWmEvLMrgCoj1fI5fCm4G24wj1TX5ryx/9EQvqzIw+UmpoYLrnj03 jBig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683788947; x=1686380947; 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=cLospOGvfYCl4M4gsY4VziYUTdPXLULbSEDWui8wKfZebatWgVc7S/0wJf+LUBYuZa wEv8413JdAfToNC31P0SkGmMeSk4NYF/LHeLYdAiDmGErF7MsabwBpXP+5vE91D/nAEw 9zLLKp1oWOp7plN4PdY8sGOf7a8MroylNc5J/kINYyOFrWBI6uZrg8d8qEJGydLas/57 5G0yW9DAwCainziHjReU6MyypYkAk9yLyGIaV/VpHNMrtFMJcOxxf3OyTuifEPaSPIe1 CX9r0ZqVkasTvUJsyfYjlgR1Ty6x9AEp7ziJmzimpop7lkMG1qKO9/WvYKe11q2VWzy5 XUDA== X-Gm-Message-State: AC+VfDzyVUK++vaVpP8sREiHnD9ISUw+aG4gKrtmCudQyLFMKrBhIcWM wtqpFYfYJkckS1ueCMEcFibSpDZq5hqqLMCmMVA= X-Google-Smtp-Source: ACHHUZ4XEyV84lkNPMmTYoumR0zLFnxAtZU5eyda4/BtVILTyVWUuleDPgPYc2a5JfVzjbwG9mz75w== X-Received: by 2002:a05:6a00:1741:b0:649:93a7:571b with SMTP id j1-20020a056a00174100b0064993a7571bmr1290167pfc.13.1683788946647; Thu, 11 May 2023 00:09:06 -0700 (PDT) Return-Path: Received: from dhaval.. ([2401:4900:16aa:6ec2:1788:6326:c9bd:29bc]) by smtp.gmail.com with ESMTPSA id k13-20020aa792cd000000b0063f1430dd57sm4592947pfa.49.2023.05.11.00.09.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 00:09:06 -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:38:47 +0530 Message-Id: <20230511070855.19329-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