Message ID | 1385104608-19998-1-git-send-email-ivan.hu@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 22/11/13 07:16, Ivan Hu wrote: > Uefidump don't do anything when uefidump parser device path for End of Hardware > Device Path - End This Instance of a Device Path sub-type(sub-type 0x01). > It causes that the device path be showed without knowing the "End This Instance of a Device Path sub-type" is included. > For example, > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010302)\ACPI(0xa0341d0,0x0)\PCI(0x0,0x1f)\ACPI(0x50141d0,0x0)\UART(115200,8,1,1)\VENDOR(11d2f9be-0c9a-9000-27-3f-c1-4d-7f-01-04-00)\ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010100). > > According to the UEFI spec section 9.3.1 the "End This Instance of a Device Path sub-type", > Sub-Type 0x01 – End This Instance of a Device Path and start a new Device Path > It should be improved to show the device path end and new device path start. > > For example, > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010302) > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x1f)\ACPI(0x50141d0,0x0)\UART(115200,8,1,1)\VENDOR(11d2f9be-0c9a-9000-27-3f-c1-4d-7f-01-04-00) > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010100). > > Signed-off-by: Ivan Hu <ivan.hu@canonical.com> > --- > src/uefi/uefidump/uefidump.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c > index cd57422..50a08b4 100644 > --- a/src/uefi/uefidump/uefidump.c > +++ b/src/uefi/uefidump/uefidump.c > @@ -99,7 +99,9 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c > case FWTS_UEFI_END_DEV_PATH_TYPE: > switch (dev_path->subtype) { > case FWTS_UEFI_END_ENTIRE_DEV_PATH_SUBTYPE: > + break; > case FWTS_UEFI_END_THIS_DEV_PATH_SUBTYPE: > + path = uefidump_vprintf(path, "\n Device Path: "); > break; > default: > return uefidump_vprintf(path, "\\Unknown-End(0x%" PRIx8 ")", dev_path->subtype); > Well spotted. Thanks Ivan Acked-by: Colin Ian King <colin.king@canonical.com>
On 11/22/2013 03:16 PM, Ivan Hu wrote: > Uefidump don't do anything when uefidump parser device path for End of Hardware > Device Path - End This Instance of a Device Path sub-type(sub-type 0x01). > It causes that the device path be showed without knowing the "End This Instance of a Device Path sub-type" is included. > For example, > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010302)\ACPI(0xa0341d0,0x0)\PCI(0x0,0x1f)\ACPI(0x50141d0,0x0)\UART(115200,8,1,1)\VENDOR(11d2f9be-0c9a-9000-27-3f-c1-4d-7f-01-04-00)\ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010100). > > According to the UEFI spec section 9.3.1 the "End This Instance of a Device Path sub-type", > Sub-Type 0x01 – End This Instance of a Device Path and start a new Device Path > It should be improved to show the device path end and new device path start. > > For example, > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010302) > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x1f)\ACPI(0x50141d0,0x0)\UART(115200,8,1,1)\VENDOR(11d2f9be-0c9a-9000-27-3f-c1-4d-7f-01-04-00) > Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010100). > > Signed-off-by: Ivan Hu <ivan.hu@canonical.com> > --- > src/uefi/uefidump/uefidump.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c > index cd57422..50a08b4 100644 > --- a/src/uefi/uefidump/uefidump.c > +++ b/src/uefi/uefidump/uefidump.c > @@ -99,7 +99,9 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c > case FWTS_UEFI_END_DEV_PATH_TYPE: > switch (dev_path->subtype) { > case FWTS_UEFI_END_ENTIRE_DEV_PATH_SUBTYPE: > + break; > case FWTS_UEFI_END_THIS_DEV_PATH_SUBTYPE: > + path = uefidump_vprintf(path, "\n Device Path: "); > break; > default: > return uefidump_vprintf(path, "\\Unknown-End(0x%" PRIx8 ")", dev_path->subtype); > Acked-by: Alex Hung <alex.hung@canonical.com>
diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c index cd57422..50a08b4 100644 --- a/src/uefi/uefidump/uefidump.c +++ b/src/uefi/uefidump/uefidump.c @@ -99,7 +99,9 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c case FWTS_UEFI_END_DEV_PATH_TYPE: switch (dev_path->subtype) { case FWTS_UEFI_END_ENTIRE_DEV_PATH_SUBTYPE: + break; case FWTS_UEFI_END_THIS_DEV_PATH_SUBTYPE: + path = uefidump_vprintf(path, "\n Device Path: "); break; default: return uefidump_vprintf(path, "\\Unknown-End(0x%" PRIx8 ")", dev_path->subtype);
Uefidump don't do anything when uefidump parser device path for End of Hardware Device Path - End This Instance of a Device Path sub-type(sub-type 0x01). It causes that the device path be showed without knowing the "End This Instance of a Device Path sub-type" is included. For example, Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010302)\ACPI(0xa0341d0,0x0)\PCI(0x0,0x1f)\ACPI(0x50141d0,0x0)\UART(115200,8,1,1)\VENDOR(11d2f9be-0c9a-9000-27-3f-c1-4d-7f-01-04-00)\ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010100). According to the UEFI spec section 9.3.1 the "End This Instance of a Device Path sub-type", Sub-Type 0x01 – End This Instance of a Device Path and start a new Device Path It should be improved to show the device path end and new device path start. For example, Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010302) Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x1f)\ACPI(0x50141d0,0x0)\UART(115200,8,1,1)\VENDOR(11d2f9be-0c9a-9000-27-3f-c1-4d-7f-01-04-00) Device Path: \ACPI(0xa0341d0,0x0)\PCI(0x0,0x2)\ACPI_ADR(0x80010100). Signed-off-by: Ivan Hu <ivan.hu@canonical.com> --- src/uefi/uefidump/uefidump.c | 2 ++ 1 file changed, 2 insertions(+)