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.web10.18162.1686762117530865975 for ; Wed, 14 Jun 2023 10:01:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=fDtrTTem; spf=pass (domain: ventanamicro.com, ip: 209.85.210.180, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-652699e72f7so5307669b3a.3 for ; Wed, 14 Jun 2023 10:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1686762117; x=1689354117; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=h9UEj3VJ/HNNpMqvJgVUYqtPI4twsYaErdoNTdS1gHU=; b=fDtrTTem8kDZl8i2tNhRRkFsy38cDMCMTj/kbCO9wEo7Rk3GDw3q4HPM428E+4HoWI 0AoHf4ekdywCHjSJkjfcZLLVMtNRqb9+XdfscSPs9b7EBG833wkNj8TVtHKhZ2xkAHDl N1lSa45Uc4zlDThhl31XEtmiNQxPlLsqLTN1kg6ngWvDGpyq+FrtA3lpuGyKhNKh1pll e4cjNE5ot+urbj5fK7w6GdAPbJZyCukNnLPJtioYD05g84h8AQLE/nA9IhhEikP8HLMH ANYANcRpyvu7WPKZUhuj3xlZvOkQGnSHBC6doMX/DelJ4kpMw67QerKVzDZ+HG4mg5YR NZAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686762117; x=1689354117; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h9UEj3VJ/HNNpMqvJgVUYqtPI4twsYaErdoNTdS1gHU=; b=aPWknRL46Vr8A5f+SrCnXd/P6K4B0PG/eCRNZb3SGRShza5jqbXngE12s0hRRhmU6C YiJTfenkCW4uy/thJJM5v0DyCO1oPxE6c4Cf3b2KnKVsMR2av/dhYEbe9zyctcdMKpqv DKStRoMUZJWFZl9NVzX8W975WsVdkjY/JEedqnyMOs4z2d4xfc6J1CvvJVxWcwpJu8YP p1BFnJEnM8n/X9/ie+e05Zpvsqi9k+rk1/zmZp2jQ8edjDBLahauA6+xnYG14HXddMHH ifYl1xUaoDqj1xsXcTqKfGAKUZUedq0doMwFduGaL/ZBDfYjTp1on/wOytdgjUUInnfW 1b1A== X-Gm-Message-State: AC+VfDzTiDL8y/eXshsqwUZ4Xrk8q8ooxEgWN6MEp4BWZ2Arouwk8ZEO 7Ly9mf/LFzJioIa1z27dFbP96Q0VMyiQqE7vkvc= X-Google-Smtp-Source: ACHHUZ5renS7QxSaAdjf8iO953GtmIKFm7yBNTaoJGScGLhYbohi/kH377oqeLtehEUHn1NIA5G2rg== X-Received: by 2002:a05:6a20:3d0f:b0:103:b0f9:7110 with SMTP id y15-20020a056a203d0f00b00103b0f97110mr2207091pzi.11.1686762116699; Wed, 14 Jun 2023 10:01:56 -0700 (PDT) Return-Path: Received: from kerodi.Dlink ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id s7-20020a170902988700b001b3ef11d8fdsm1850424plp.201.2023.06.14.10.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 10:01:56 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Andrei Warkentin , Heinrich Schuchardt , Dann Frazier Subject: [PATCH 0/4] OvmfPkg/RiscVVirt: Separate code and variable storage Date: Wed, 14 Jun 2023 22:31:47 +0530 Message-Id: <20230614170151.1204982-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Recent updates to RISC-V qemu virt platform merged today (07/14), have enabled both pflash devices for the S-mode payload like EDK2. These updates also aligned the design similar to other architectures where pflash0 is for read-only code and pflash1 for variable store. Previously only pflash1 was available for S-mode use. Current EDK2 will not work with this latest qemu changes since it always assumed to boot from pflash1. So, separate the code and variable store and use pflash0 to keep the code. Add 'readme' about build and test as per these changes. The changes are available in the branch : https://github.com/vlsunil/edk2/tree/separate_code_vars CI tests passed (#4553). Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Andrei Warkentin Cc: Heinrich Schuchardt Cc: Dann Frazier Sunil V L (4): OvmfPkg/RiscVVirt: Fix couple of issues in VarStore OvmfPkg/RiscVVirt: Add VirtNorFlashDeviceTreeLib library OvmfPkg/RiscVVirt: Add support for separate code and variable store OvmfPkg/RiscVVirt: Add a readme for build and test OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 2 +- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 9 +- .../VirtNorFlashDeviceTreeLib.inf | 40 +++++ .../VirtNorFlashDeviceTreeLib.c | 137 ++++++++++++++++++ OvmfPkg/RiscVVirt/README.md | 41 ++++++ OvmfPkg/RiscVVirt/RiscVVirt.fdf.inc | 12 +- OvmfPkg/RiscVVirt/VarStore.fdf.inc | 25 ++-- 7 files changed, 245 insertions(+), 21 deletions(-) create mode 100644 OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.inf create mode 100644 OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashDeviceTreeLib.c create mode 100644 OvmfPkg/RiscVVirt/README.md -- 2.34.1