public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set
       [not found] <16DE909798871558.18232@groups.io>
@ 2022-03-23 10:22 ` Mara Sophie Grosch
  2022-03-23 10:22   ` [PATCH v2 1/2] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Mara Sophie Grosch
                     ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Mara Sophie Grosch @ 2022-03-23 10:22 UTC (permalink / raw)
  To: devel; +Cc: hao.a.wu, Mara Sophie Grosch

Hi,

new patch series, including the fix for the same problem in PEI

Mara Sophie Grosch (2):
  MdeModulePkg/NvmExpressDxe: fix check for Cap.Css
  MdeModulePkg/NvmExpressPei: fix check for NVM command set

 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c    | 2 +-
 MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css
  2022-03-23 10:22 ` [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set Mara Sophie Grosch
@ 2022-03-23 10:22   ` Mara Sophie Grosch
  2022-03-23 10:22   ` [PATCH v2 2/2] MdeModulePkg/NvmExpressPei: fix check for NVM command set Mara Sophie Grosch
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Mara Sophie Grosch @ 2022-03-23 10:22 UTC (permalink / raw)
  To: devel; +Cc: hao.a.wu, Mara Sophie Grosch

Fix the check for NVMe command set being supported by the controller.

Was problematic with qemu (6.2.0, Debian 1:6.2+dfsg-3), which sets 0xC1
in that register, making the OVMF think the NVMe controller does not
support NVMe.

Uncovered by commit 9dd14fc91c174eae87fd122c7ac70073a363527f, which
changed the number of bits included in the Css register from 4 to 8.

Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
---
 MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
index d87212ffb2..b90c48731c 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c
@@ -761,7 +761,7 @@ NvmeControllerInit (
     return Status;
   }
 
-  if (Private->Cap.Css != 0x01) {
+  if ((Private->Cap.Css & BIT0) == 0) {
     DEBUG ((DEBUG_INFO, "NvmeControllerInit: the controller doesn't support NVMe command set\n"));
     return EFI_UNSUPPORTED;
   }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] MdeModulePkg/NvmExpressPei: fix check for NVM command set
  2022-03-23 10:22 ` [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set Mara Sophie Grosch
  2022-03-23 10:22   ` [PATCH v2 1/2] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Mara Sophie Grosch
@ 2022-03-23 10:22   ` Mara Sophie Grosch
  2022-03-23 10:31   ` [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks " Mara Sophie Grosch
  2022-03-24  0:05   ` Wu, Hao A
  3 siblings, 0 replies; 8+ messages in thread
From: Mara Sophie Grosch @ 2022-03-23 10:22 UTC (permalink / raw)
  To: devel; +Cc: hao.a.wu, Mara Sophie Grosch

Previous commit fixed that check in DXE, this one now for PEI.

Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
---
 MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
index ac956bdce4..bff5cfd0d5 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
@@ -571,7 +571,7 @@ NvmeControllerInit (
   // Read the controller Capabilities register and verify that the NVM command set is supported
   //
   NVME_GET_CAP (Private, &Private->Cap);
-  if (Private->Cap.Css != 0x01) {
+  if ((Private->Cap.Css & BIT0) == 0) {
     DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __FUNCTION__));
     return EFI_UNSUPPORTED;
   }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set
  2022-03-23 10:22 ` [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set Mara Sophie Grosch
  2022-03-23 10:22   ` [PATCH v2 1/2] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Mara Sophie Grosch
  2022-03-23 10:22   ` [PATCH v2 2/2] MdeModulePkg/NvmExpressPei: fix check for NVM command set Mara Sophie Grosch
@ 2022-03-23 10:31   ` Mara Sophie Grosch
  2022-03-24  0:05   ` Wu, Hao A
  3 siblings, 0 replies; 8+ messages in thread
From: Mara Sophie Grosch @ 2022-03-23 10:31 UTC (permalink / raw)
  To: Mara Sophie Grosch, devel

[-- Attachment #1: Type: text/plain, Size: 136 bytes --]

arghs, somehow broke those emails for group.io thread overview - not linked as single thread. I hope they are fine in email clients :/

[-- Attachment #2: Type: text/html, Size: 136 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set
  2022-03-23 10:22 ` [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set Mara Sophie Grosch
                     ` (2 preceding siblings ...)
  2022-03-23 10:31   ` [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks " Mara Sophie Grosch
@ 2022-03-24  0:05   ` Wu, Hao A
  2022-03-25  1:04     ` Wu, Hao A
  3 siblings, 1 reply; 8+ messages in thread
From: Wu, Hao A @ 2022-03-24  0:05 UTC (permalink / raw)
  To: devel@edk2.groups.io, littlefox@lf-net.org

Thanks for the patches. For the series:
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Will wait a day before merging them to see if comments from others.

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Mara
> Sophie Grosch via groups.io
> Sent: Wednesday, March 23, 2022 6:23 PM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Mara Sophie Grosch <littlefox@lf-
> net.org>
> Subject: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM
> command set
> 
> Hi,
> 
> new patch series, including the fix for the same problem in PEI
> 
> Mara Sophie Grosch (2):
>   MdeModulePkg/NvmExpressDxe: fix check for Cap.Css
>   MdeModulePkg/NvmExpressPei: fix check for NVM command set
> 
>  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c    | 2 +-
>  MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --
> 2.35.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#87898): https://edk2.groups.io/g/devel/message/87898
> Mute This Topic: https://groups.io/mt/89972393/1768737
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com]
> -=-=-=-=-=-=
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set
  2022-03-24  0:05   ` Wu, Hao A
@ 2022-03-25  1:04     ` Wu, Hao A
  2022-03-25  8:44       ` Mara Sophie Grosch
  0 siblings, 1 reply; 8+ messages in thread
From: Wu, Hao A @ 2022-03-25  1:04 UTC (permalink / raw)
  To: devel@edk2.groups.io, Wu, Hao A, littlefox@lf-net.org

Series pushed via:
PR - https://github.com/tianocore/edk2/pull/2682
Commits -
https://github.com/tianocore/edk2/commit/5d8d8b514832fcaa36c0b573b51442c2f53e2aaf
https://github.com/tianocore/edk2/commit/69218d5d2854acaa7a11c777244de4a297d2fbb9

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wu, Hao A
> Sent: Thursday, March 24, 2022 8:06 AM
> To: devel@edk2.groups.io; littlefox@lf-net.org
> Subject: Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM
> command set
> 
> Thanks for the patches. For the series:
> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
> 
> Will wait a day before merging them to see if comments from others.
> 
> Best Regards,
> Hao Wu
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Mara
> > Sophie Grosch via groups.io
> > Sent: Wednesday, March 23, 2022 6:23 PM
> > To: devel@edk2.groups.io
> > Cc: Wu, Hao A <hao.a.wu@intel.com>; Mara Sophie Grosch <littlefox@lf-
> > net.org>
> > Subject: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM
> > command set
> >
> > Hi,
> >
> > new patch series, including the fix for the same problem in PEI
> >
> > Mara Sophie Grosch (2):
> >   MdeModulePkg/NvmExpressDxe: fix check for Cap.Css
> >   MdeModulePkg/NvmExpressPei: fix check for NVM command set
> >
> >  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c    | 2 +-
> >  MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > --
> > 2.35.1
> >
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> > View/Reply Online (#87898):
> > https://edk2.groups.io/g/devel/message/87898
> > Mute This Topic: https://groups.io/mt/89972393/1768737
> > Group Owner: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com]
> > -=-=-=-=-=-=
> >
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set
  2022-03-25  1:04     ` Wu, Hao A
@ 2022-03-25  8:44       ` Mara Sophie Grosch
  2022-03-25  8:49         ` Wu, Hao A
  0 siblings, 1 reply; 8+ messages in thread
From: Mara Sophie Grosch @ 2022-03-25  8:44 UTC (permalink / raw)
  To: Wu, Hao A, devel

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

Hi,

thanks for merging, though I already had a pull request for it and you now used the bounce email address for the commit author ^^'
It's ok, just wanted to make sure you know that groups.io pitfall for the next :)

Best regards and many thanks for your time
Mara Sophie Grosch

[-- Attachment #2: Type: text/html, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set
  2022-03-25  8:44       ` Mara Sophie Grosch
@ 2022-03-25  8:49         ` Wu, Hao A
  0 siblings, 0 replies; 8+ messages in thread
From: Wu, Hao A @ 2022-03-25  8:49 UTC (permalink / raw)
  To: Mara Sophie Grosch, devel@edk2.groups.io

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

Oh Sorry, will double check to avoid such mistake.

Best Regards,
Hao Wu

From: littlefox via groups.io <littlefox=lf-net.org@groups.io>
Sent: Friday, March 25, 2022 4:45 PM
To: Wu; Wu, Hao A <hao.a.wu@intel.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set


Hi,

thanks for merging, though I already had a pull request for it and you now used the bounce email address for the commit author ^^'
It's ok, just wanted to make sure you know that groups.io pitfall for the next :)

Best regards and many thanks for your time
Mara Sophie Grosch

[-- Attachment #2: Type: text/html, Size: 2742 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-25  8:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <16DE909798871558.18232@groups.io>
2022-03-23 10:22 ` [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set Mara Sophie Grosch
2022-03-23 10:22   ` [PATCH v2 1/2] MdeModulePkg/NvmExpressDxe: fix check for Cap.Css Mara Sophie Grosch
2022-03-23 10:22   ` [PATCH v2 2/2] MdeModulePkg/NvmExpressPei: fix check for NVM command set Mara Sophie Grosch
2022-03-23 10:31   ` [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks " Mara Sophie Grosch
2022-03-24  0:05   ` Wu, Hao A
2022-03-25  1:04     ` Wu, Hao A
2022-03-25  8:44       ` Mara Sophie Grosch
2022-03-25  8:49         ` Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox