From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Steven Price <steven.price@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"devel@acpica.org" <devel@acpica.org>
Cc: Linuxarm <linuxarm@huawei.com>,
"Guohanjun \(Hanjun Guo\)" <guohanjun@huawei.com>,
Sami Mujawar <Sami.Mujawar@arm.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
wanghuiqiang <wanghuiqiang@huawei.com>
Subject: RE: [RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node
Date: Wed, 28 Oct 2020 18:24:53 +0000 [thread overview]
Message-ID: <36e3a0e58e334e6aa3c051000d742543@huawei.com> (raw)
In-Reply-To: <f389e864-3d7a-3c96-8f51-c04f92759df1@arm.com>
Hi Steve,
> -----Original Message-----
> From: Steven Price [mailto:steven.price@arm.com]
> Sent: 28 October 2020 16:44
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>;
> linux-arm-kernel@lists.infradead.org; linux-acpi@vger.kernel.org;
> iommu@lists.linux-foundation.org; devel@acpica.org
> Cc: lorenzo.pieralisi@arm.com; joro@8bytes.org; Jonathan Cameron
> <jonathan.cameron@huawei.com>; Linuxarm <linuxarm@huawei.com>;
> Guohanjun (Hanjun Guo) <guohanjun@huawei.com>; robin.murphy@arm.com;
> wanghuiqiang <wanghuiqiang@huawei.com>; Sami Mujawar
> <Sami.Mujawar@arm.com>
> Subject: Re: [RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node
>
> On 27/10/2020 11:26, Shameer Kolothum wrote:
> > The series adds support to IORT RMR nodes specified in IORT
> > Revision E -ARM DEN 0049E[0]. RMR nodes are used to describe memory
> > ranges that are used by endpoints and require a unity mapping
> > in SMMU.
>
> Hi Shameer,
>
> I've also been taking a look at RMR, and Sami is helping me get set up
> so that I can do some testing. We're hoping to be able to test an EFI
> framebuffer or splash screen - which has the added complication of the
> unity mapping becoming redundant if a native display driver takes over
> the display controller.
>
> I've looked through your series and the code looks correct to me.
Thanks for taking a look and the details.
> Hopefully I'll be able to give it some testing soon.
Cool. Please update once you get a chance run the tests.
Thanks,
Shameer
> Thanks,
>
> Steve
>
> > We have faced issues with 3408iMR RAID controller cards which
> > fail to boot when SMMU is enabled. This is because these controllers
> > make use of host memory for various caching related purposes and when
> > SMMU is enabled the iMR firmware fails to access these memory regions
> > as there is no mapping for them. IORT RMR provides a way for UEFI to
> > describe and report these memory regions so that the kernel can make
> > a unity mapping for these in SMMU.
> >
> > RFC because, Patch #1 is to update the actbl2.h and should be done
> > through acpica update. I have send out a pull request[1] for that.
> >
> > Tests:
> >
> > With a UEFI, that reports the RMR for the dev,
> > ....
> > [16F0h 5872 1] Type : 06
> > [16F1h 5873 2] Length : 007C
> > [16F3h 5875 1] Revision : 00
> > [1038h 0056 2] Reserved : 00000000
> > [1038h 0056 2] Identifier : 00000000
> > [16F8h 5880 4] Mapping Count : 00000001
> > [16FCh 5884 4] Mapping Offset : 00000040
> >
> > [1700h 5888 4] Number of RMR Descriptors : 00000002
> > [1704h 5892 4] RMR Descriptor Offset : 00000018
> >
> > [1708h 5896 8] Base Address of RMR : 0000E6400000
> > [1710h 5904 8] Length of RMR : 000000100000
> > [1718h 5912 4] Reserved : 00000000
> >
> > [171Ch 5916 8] Base Address of RMR : 0000000027B00000
> > [1724h 5924 8] Length of RMR : 0000000000C00000
> > [172Ch 5932 4] Reserved : 00000000
> >
> > [1730h 5936 4] Input base : 00000000
> > [1734h 5940 4] ID Count : 00000001
> > [1738h 5944 4] Output Base : 00000003
> > [173Ch 5948 4] Output Reference : 00000064
> > [1740h 5952 4] Flags (decoded below) : 00000001
> > Single Mapping : 1
> > ...
> >
> > Without the series the RAID controller initilization fails as
> > below,
> >
> > ...
> > [ 12.631117] megaraid_sas 0000:03:00.0: FW supports sync
> cache : Yes
> > [ 12.637360] megaraid_sas 0000:03:00.0: megasas_disable_intr_fusion is
> called outbound_intr_mask:0x40000009
> > [ 18.776377] megaraid_sas 0000:03:00.0: Init cmd return status FAILED
> for SCSI host 0
> > [ 23.019383] megaraid_sas 0000:03:00.0: Waiting for FW to come to
> ready state
> > [ 106.684281] megaraid_sas 0000:03:00.0: FW in FAULT state, Fault
> code:0x10000 subcode:0x0 func:megasas_transition_to_ready
> > [ 106.695186] megaraid_sas 0000:03:00.0: System Register set:
> > [ 106.889787] megaraid_sas 0000:03:00.0: Failed to transition controller to
> ready for scsi0.
> > [ 106.910475] megaraid_sas 0000:03:00.0: Failed from megasas_init_fw
> 6407
> > estuary:/$
> >
> > With the series, now the kernel has direct mapping for the dev as
> > below,
> >
> > estuary:/$ cat /sys/kernel/iommu_groups/0/reserved_regions
> > 0x0000000008000000 0x00000000080fffff msi
> > 0x0000000027b00000 0x00000000286fffff direct
> > 0x00000000e6400000 0x00000000e64fffff direct
> > estuary:/$
> >
> > ....
> > [ 12.254318] megaraid_sas 0000:03:00.0: megasas_disable_intr_fusion is
> called outbound_intr_mask:0x40000009
> > [ 12.739089] megaraid_sas 0000:03:00.0: FW provided supportMaxExtLDs:
> 0 max_lds: 32
> > [ 12.746628] megaraid_sas 0000:03:00.0: controller type :
> iMR(0MB)
> > [ 12.752694] megaraid_sas 0000:03:00.0: Online Controller Reset(OCR) :
> Enabled
> > [ 12.759798] megaraid_sas 0000:03:00.0: Secure JBOD support : Yes
> > [ 12.765778] megaraid_sas 0000:03:00.0: NVMe passthru support : Yes
> > [ 12.771931] megaraid_sas 0000:03:00.0: FW provided TM
> TaskAbort/Reset timeou: 6 secs/60 secs
> > [ 12.780503] megaraid_sas 0000:03:00.0: JBOD sequence map
> support : Yes
> > [ 12.787000] megaraid_sas 0000:03:00.0: PCI Lane Margining
> support : No
> > [ 12.819179] megaraid_sas 0000:03:00.0: NVME page size :
> (4096)
> > [ 12.825672] megaraid_sas 0000:03:00.0: megasas_enable_intr_fusion is
> called outbound_intr_mask:0x40000000
> > [ 12.835199] megaraid_sas 0000:03:00.0: INIT adapter done
> > [ 12.873932] megaraid_sas 0000:03:00.0: pci id :
> (0x1000)/(0x0017)/(0x19e5)/(0xd213)
> > [ 12.881644] megaraid_sas 0000:03:00.0: unevenspan support : no
> > [ 12.887451] megaraid_sas 0000:03:00.0: firmware crash dump : no
> > [ 12.893344] megaraid_sas 0000:03:00.0: JBOD sequence map :
> enabled
> >
> > RAID controller init is now success and can detect the drives
> > attached as well.
> >
> > Thanks,
> > Shameer
> >
> > [0]. https://developer.arm.com/documentation/den0049/latest/
> > [1]. https://github.com/acpica/acpica/pull/638
> >
> > Shameer Kolothum (4):
> > ACPICA: IORT: Update for revision E
> > ACPI/IORT: Add support for RMR node parsing
> > ACPI/IORT: Add RMR memory regions reservation helper
> > iommu/dma: Reserve any RMR regions associated with a dev
> >
> > drivers/acpi/arm64/iort.c | 175
> +++++++++++++++++++++++++++++++++++++-
> > drivers/iommu/dma-iommu.c | 12 ++-
> > include/acpi/actbl2.h | 25 ++++--
> > include/linux/acpi_iort.h | 4 +
> > 4 files changed, 205 insertions(+), 11 deletions(-)
> >
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-10-28 18:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 11:26 [RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node Shameer Kolothum
2020-10-27 11:26 ` [RFC PATCH 1/4] ACPICA: IORT: Update for revision E Shameer Kolothum
[not found] ` <BYAPR11MB3256AFF743B4FCC400F4181C87160@BYAPR11MB3256.namprd11.prod.outlook.com>
[not found] ` <610c14ef56d64fe087ca52aede07d811@huawei.com>
[not found] ` <MWHPR11MB1599988D7C857E3AFFA4A48AF0170@MWHPR11MB1599.namprd11.prod.outlook.com>
2020-10-28 18:40 ` [Devel] " Shameerali Kolothum Thodi
2020-10-27 11:26 ` [RFC PATCH 2/4] ACPI/IORT: Add support for RMR node parsing Shameer Kolothum
2020-10-28 18:43 ` [Devel] " David E. Box
2020-11-09 12:29 ` [Devel] " Sami Mujawar
2020-11-19 12:07 ` Shameerali Kolothum Thodi
2020-10-27 11:26 ` [RFC PATCH 3/4] ACPI/IORT: Add RMR memory regions reservation helper Shameer Kolothum
2020-11-05 18:03 ` Robin Murphy
2020-11-06 8:30 ` Shameerali Kolothum Thodi
2020-11-06 13:06 ` Robin Murphy
2020-11-06 16:00 ` Shameerali Kolothum Thodi
2020-10-27 11:26 ` [RFC PATCH 4/4] iommu/dma: Reserve any RMR regions associated with a dev Shameer Kolothum
2020-10-28 16:43 ` [RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node Steven Price
2020-10-28 18:24 ` Shameerali Kolothum Thodi [this message]
2020-11-06 15:22 ` Steven Price
2020-11-06 16:17 ` Shameerali Kolothum Thodi
2020-11-06 16:26 ` Steven Price
2020-11-06 17:09 ` Robin Murphy
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-all 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=36e3a0e58e334e6aa3c051000d742543@huawei.com \
--to=shameerali.kolothum.thodi@huawei.com \
--cc=Sami.Mujawar@arm.com \
--cc=devel@acpica.org \
--cc=guohanjun@huawei.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.com \
--cc=wanghuiqiang@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).