* [edk2-devel] [PATCH 0/2] MdeModulePkg/NvmExpressDxe: fix format specifiers for UINT64 values @ 2024-02-16 21:26 Mike Maslenkin 2024-02-16 21:26 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/NvmExpressDxe: fix format used for Eui64 conversion Mike Maslenkin 2024-02-16 21:26 ` [edk2-devel] [PATCH 2/2] MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values Mike Maslenkin 0 siblings, 2 replies; 4+ messages in thread From: Mike Maslenkin @ 2024-02-16 21:26 UTC (permalink / raw) To: devel; +Cc: ray.ni, Mike Maslenkin This set contains a simple fixes for UINT64 values passed to functions producing strings. Patch 1/2 is a real fix for NVMe drive label creation logic. For example: Opal driver from SecurityPkg uses gEfiComponentNameProtocolGuid family for obtaining disk name. Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Cc: Ray Ni <ray.ni@intel.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115555): https://edk2.groups.io/g/devel/message/115555 Mute This Topic: https://groups.io/mt/104401875/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 4+ messages in thread
* [edk2-devel] [PATCH 1/2] MdeModulePkg/NvmExpressDxe: fix format used for Eui64 conversion 2024-02-16 21:26 [edk2-devel] [PATCH 0/2] MdeModulePkg/NvmExpressDxe: fix format specifiers for UINT64 values Mike Maslenkin @ 2024-02-16 21:26 ` Mike Maslenkin 2024-02-16 21:26 ` [edk2-devel] [PATCH 2/2] MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values Mike Maslenkin 1 sibling, 0 replies; 4+ messages in thread From: Mike Maslenkin @ 2024-02-16 21:26 UTC (permalink / raw) To: devel; +Cc: ray.ni, Mike Maslenkin Eui64 is a 64 bit value, so the "L" or "l" is required for format specifier, otherwise only lower 32 bit will be converted. Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Cc: Ray Ni <ray.ni@intel.com> --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c index dea14f1a446c..dfa3653d6a5e 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c @@ -300,7 +300,7 @@ EnumerateNvmeDevNamespace ( Sn[20] = 0; CopyMem (Mn, Private->ControllerData->Mn, sizeof (Private->ControllerData->Mn)); Mn[40] = 0; - UnicodeSPrintAsciiFormat (Device->ModelName, sizeof (Device->ModelName), "%a-%a-%x", Sn, Mn, NamespaceData->Eui64); + UnicodeSPrintAsciiFormat (Device->ModelName, sizeof (Device->ModelName), "%a-%a-%lx", Sn, Mn, NamespaceData->Eui64); AddUnicodeString2 ( "eng", -- 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115556): https://edk2.groups.io/g/devel/message/115556 Mute This Topic: https://groups.io/mt/104401876/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [edk2-devel] [PATCH 2/2] MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values. 2024-02-16 21:26 [edk2-devel] [PATCH 0/2] MdeModulePkg/NvmExpressDxe: fix format specifiers for UINT64 values Mike Maslenkin 2024-02-16 21:26 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/NvmExpressDxe: fix format used for Eui64 conversion Mike Maslenkin @ 2024-02-16 21:26 ` Mike Maslenkin 2024-02-19 20:28 ` Laszlo Ersek 1 sibling, 1 reply; 4+ messages in thread From: Mike Maslenkin @ 2024-02-16 21:26 UTC (permalink / raw) To: devel; +Cc: ray.ni, Mike Maslenkin Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> Cc: Ray Ni <ray.ni@intel.com> --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c index dfa3653d6a5e..069da12a9b1b 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c @@ -288,9 +288,9 @@ EnumerateNvmeDevNamespace ( // Dump NvmExpress Identify Namespace Data // DEBUG ((DEBUG_INFO, " == NVME IDENTIFY NAMESPACE [%d] DATA ==\n", NamespaceId)); - DEBUG ((DEBUG_INFO, " NSZE : 0x%x\n", NamespaceData->Nsze)); - DEBUG ((DEBUG_INFO, " NCAP : 0x%x\n", NamespaceData->Ncap)); - DEBUG ((DEBUG_INFO, " NUSE : 0x%x\n", NamespaceData->Nuse)); + DEBUG ((DEBUG_INFO, " NSZE : 0x%lx\n", NamespaceData->Nsze)); + DEBUG ((DEBUG_INFO, " NCAP : 0x%lx\n", NamespaceData->Ncap)); + DEBUG ((DEBUG_INFO, " NUSE : 0x%lx\n", NamespaceData->Nuse)); DEBUG ((DEBUG_INFO, " LBAF0.LBADS : 0x%x\n", (NamespaceData->LbaFormat[0].Lbads))); // -- 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115557): https://edk2.groups.io/g/devel/message/115557 Mute This Topic: https://groups.io/mt/104401877/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH 2/2] MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values. 2024-02-16 21:26 ` [edk2-devel] [PATCH 2/2] MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values Mike Maslenkin @ 2024-02-19 20:28 ` Laszlo Ersek 0 siblings, 0 replies; 4+ messages in thread From: Laszlo Ersek @ 2024-02-19 20:28 UTC (permalink / raw) To: devel, mike.maslenkin; +Cc: ray.ni On 2/16/24 22:26, Mike Maslenkin wrote: > Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com> > Cc: Ray Ni <ray.ni@intel.com> > --- > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > index dfa3653d6a5e..069da12a9b1b 100644 > --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > @@ -288,9 +288,9 @@ EnumerateNvmeDevNamespace ( > // Dump NvmExpress Identify Namespace Data > // > DEBUG ((DEBUG_INFO, " == NVME IDENTIFY NAMESPACE [%d] DATA ==\n", NamespaceId)); > - DEBUG ((DEBUG_INFO, " NSZE : 0x%x\n", NamespaceData->Nsze)); > - DEBUG ((DEBUG_INFO, " NCAP : 0x%x\n", NamespaceData->Ncap)); > - DEBUG ((DEBUG_INFO, " NUSE : 0x%x\n", NamespaceData->Nuse)); > + DEBUG ((DEBUG_INFO, " NSZE : 0x%lx\n", NamespaceData->Nsze)); > + DEBUG ((DEBUG_INFO, " NCAP : 0x%lx\n", NamespaceData->Ncap)); > + DEBUG ((DEBUG_INFO, " NUSE : 0x%lx\n", NamespaceData->Nuse)); > DEBUG ((DEBUG_INFO, " LBAF0.LBADS : 0x%x\n", (NamespaceData->LbaFormat[0].Lbads))); > > // series Reviewed-by: Laszlo Ersek <lersek@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115601): https://edk2.groups.io/g/devel/message/115601 Mute This Topic: https://groups.io/mt/104401877/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-19 20:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-02-16 21:26 [edk2-devel] [PATCH 0/2] MdeModulePkg/NvmExpressDxe: fix format specifiers for UINT64 values Mike Maslenkin 2024-02-16 21:26 ` [edk2-devel] [PATCH 1/2] MdeModulePkg/NvmExpressDxe: fix format used for Eui64 conversion Mike Maslenkin 2024-02-16 21:26 ` [edk2-devel] [PATCH 2/2] MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values Mike Maslenkin 2024-02-19 20:28 ` Laszlo Ersek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox