public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <ardb+tianocore@kernel.org>,
	<quic_llindhol@quicinc.com>, <kraxel@redhat.com>,
	<Matteo.Carlini@arm.com>, <Akanksha.Jain2@arm.com>,
	<Sibel.Allinson@arm.com>, <nd@arm.com>
Subject: [edk2-devel] [PATCH v2 30/45] ArmVirtPkg: ArmCcaRsiLib: Fix incorrect RSI version masks
Date: Fri, 12 Apr 2024 16:13:37 +0100	[thread overview]
Message-ID: <20240412151341.16488-2-sami.mujawar@arm.com> (raw)
In-Reply-To: <20240412151341.16488-1-sami.mujawar@arm.com>

The RsiInterfaceVersion fieldset contains an RSI interface
version and the width of this fieldset is 64 bits.

The bits 15:0 of this fieldset represent the RSI minor
revision number and the bits 30:16 represent the major
revision number. The remaining bits 63:31 are reserved
and should be zero.

The RSI version masks were incorrectly defined which
resulted in an incorrect RSI version being returned
by RsiGetVersion (). Therefore, fix the RSI version
masks to reflect the bit fields defined by the RMM
specification.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---
 ArmVirtPkg/Library/ArmCcaRsiLib/ArmCcaRsi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ArmVirtPkg/Library/ArmCcaRsiLib/ArmCcaRsi.h b/ArmVirtPkg/Library/ArmCcaRsiLib/ArmCcaRsi.h
index 70e84a20711f04c32a5850230cc907a6d231f50b..b1c359e2486c20ee19493b10ed3fcef1e20f2689 100644
--- a/ArmVirtPkg/Library/ArmCcaRsiLib/ArmCcaRsi.h
+++ b/ArmVirtPkg/Library/ArmCcaRsiLib/ArmCcaRsi.h
@@ -41,8 +41,8 @@
    See Section B4.4.3,  RMM Specification, version A-bet0.
    The width of the RsiInterfaceVersion fieldset is 64 bits.
 */
-#define RSI_VER_MINOR_MASK   0x00FFULL
-#define RSI_VER_MAJOR_MASK   0x7F00ULL
+#define RSI_VER_MINOR_MASK   0x0000FFFFULL
+#define RSI_VER_MAJOR_MASK   0x7FFF0000ULL
 #define RSI_VER_MAJOR_SHIFT  16
 
 #endif // ARM_CCA_RSI_H_
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117712): https://edk2.groups.io/g/devel/message/117712
Mute This Topic: https://groups.io/mt/105484263/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-04-12 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 15:13 [edk2-devel] [PATCH v2 00/45] Support for Arm CCA guest firmware Sami Mujawar
2024-04-12 15:13 ` Sami Mujawar [this message]
2024-04-12 15:13 ` [edk2-devel] [PATCH v2 41/45] ArmVirtPkg: RMM 1.0-eac4 - Add RSI Features support Sami Mujawar
2024-04-12 15:13 ` [edk2-devel] [PATCH v2 43/45] ArmVirtPkg: RMM 1.0-eac5 - Update RSI Version support Sami Mujawar
2024-04-12 15:13 ` [edk2-devel] [PATCH v2 44/45] ArmVirtPkg: ArmCcaLib: Cache current world value Sami Mujawar
2024-04-12 15:13 ` [edk2-devel] [PATCH v2 45/45] ArmVirtPkg: ArmCcaIoMmu: Provide an implementation for SetAttribute Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240412151341.16488-2-sami.mujawar@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox