From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by mx.groups.io with SMTP id smtpd.web10.131.1607363685327021794 for ; Mon, 07 Dec 2020 09:54:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=pVWoxn10; spf=pass (domain: nuviainc.com, ip: 209.85.210.196, mailfrom: rebecca@nuviainc.com) Received: by mail-pf1-f196.google.com with SMTP id 11so4570549pfu.4 for ; Mon, 07 Dec 2020 09:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X1slo98Qk4o1fzfoTn/jRHriRL/QxsOYfEVvwOetf1Q=; b=pVWoxn104CMjLkT6l7dIy0OE2o92yzHEZJGwP2MbVTO5J/iy4hLo6fcmczMc+zGGRo 3WfJxMXOB/L8QtYNlm9dhWVhrEdJiM63gPzGKGI0pOmIGGF2hBCa46O/0ssHKUwbo0yw BCK6+4tu54ZRASw5H3Mxciv/vHk1RZ0ttlvu8QTL+AfX6HGzxhsPBesM1wkpb5DMYZTt P+6KGYkk2dKVrmwvniqSKYk18QOU+C+U7NxB+X/carcFF+n3B3MX63CSMtBeGbP0WilF dP0YyU+BgnxkZBDrJWlg8jmRvUhTQi3wVAuWR91/QHFH7A/ByDAuliV0yX3tSDIjaIzo 9Rew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X1slo98Qk4o1fzfoTn/jRHriRL/QxsOYfEVvwOetf1Q=; b=b4rNWLNqXIoZ43X1S0I2tZcS3hvvF8H7Tqt6rZNTVbowRLlpR4jbPzKCHhau90tR+K wAlc1n5S4P48UjBmYz6m9GK4hfir0yFqBMqMN89b/p4xsusZ0vit+RTIBskZgH8cRA2K 4uvGrxQnXaOCZOcLyWfp6+rJCnNlZk4Ne7wCeQNpq+t3sLUDo34LPF5WXM6gFW+3weHr VYCfztYl1su3OLPM1Hwq4kjDvRHJ4IVXR26Nqkbz4kX9qA4gX3ml0Ns3v+p2BtBzkom4 fTXz6TuMA1LVYTIjhcuO6q95b3GbemwSBXAglFstpPwZU+eJAt8BBB0Kj9M8vGoFWc/3 awAw== X-Gm-Message-State: AOAM530mXdBYQ+6qxkj9t1tPvFu0ZbC7VZbPQhF4+d+xM+tdCnAXDRe5 VjU8SEbKsv41iKUuN2NaBlL/+iFaJ/9gGHG6nNCPg2s7GChRg2L7Hsl8KmCX40XCRpCqJGP0btw g+CNfxl++LnVxXxEFXLpL6Lyfuz4/R9PMSc9vHOpwldmclPCdK0fJeoEE4A/Fqb0A6FyXURrH X-Google-Smtp-Source: ABdhPJwsNU4jr3srqqAUyDrJlIpibVhdcmOn5npM7zJm6dPzZ5OqwNSuH8cpFewAAvWWVQpL3NCw+g== X-Received: by 2002:a63:e14c:: with SMTP id h12mr15007327pgk.181.1607363684462; Mon, 07 Dec 2020 09:54:44 -0800 (PST) Return-Path: Received: from cube.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id nm6sm2369pjb.25.2020.12.07.09.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 09:54:43 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Michael D Kinney , Liming Gao , Zhiguang Liu , Leif Lindholm , Ard Biesheuvel Subject: [PATCH v4 04/10] ArmPkg: Add helper to read the Memory Model Features Register 2 Date: Mon, 7 Dec 2020 10:54:21 -0700 Message-Id: <20201207175427.28712-5-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201207175427.28712-1-rebecca@nuviainc.com> References: <20201207175427.28712-1-rebecca@nuviainc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add helper function to read the MMFR2 register. We will need this to determine CCIDX support. Signed-off-by: Rebecca Cran --- ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 6 ++++++ ArmPkg/Library/ArmLib/AArch64/AArch64Support.S | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h index b2c8a8ea0b84..d6bcfc3b82ae 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h @@ -35,5 +35,11 @@ ArmCleanInvalidateDataCacheEntryBySetWay ( IN UINTN SetWayFormat ); +UINTN +EFIAPI +ArmReadIdMmfr2 ( + VOID + ); + #endif // __AARCH64_LIB_H__ diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S index 199374ff59e3..874bc2866ac3 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Support.S @@ -424,6 +424,9 @@ ASM_FUNC(ArmCallWFI) wfi ret +ASM_FUNC(ArmReadIdMmfr2) + mrs x0, ID_AA64MMFR2_EL1 // read EL1 MMFR2 + ret ASM_FUNC(ArmReadMpidr) mrs x0, mpidr_el1 // read EL1 MPIDR -- 2.26.2