[edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: ACPI 6.3 update for MADT parser

2019-06-07 Thread Krzysztof Koch
, GIC architecture version 3 and version 4, issue E - Arm Server Base System Architecture 5.0 Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/477_acpiview_spe_v2 Notes: v2: - Add include sandwich in MadtParser.h [Zhichao] - Add

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: acpiview: ACPI 6.3 update for MADT parser

2019-05-30 Thread Krzysztof Koch
Hi Zhichao, Thanks for the review. My responses are added inline as [Krzysztof]. Kind regards, Krzysztof -Original Message- From: devel@edk2.groups.io On Behalf Of Gao, Zhichao via Groups.Io Sent: Thursday, May 30, 2019 9:55 To: devel@edk2.groups.io; Krzysztof Koch Cc: Sami Mujawar

[edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: ACPI 6.3 update for MADT parser

2019-05-30 Thread Krzysztof Koch
, GIC architecture version 3 and version 4, issue E - Arm Server Base System Architecture 5.0 Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/477_acpiview_spe_v2 Notes: v2: - Add include sandwich in MadtParser.h [Zhichao] - Add

[edk2-devel] [edk2-platforms PATCH v1 1/1 -resend] Platform/ARM/JunoPkg: Add support for PPTT dynamic generation

2019-06-12 Thread Krzysztof Koch
-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2-platforms/tree/392_dynamic_pptt_juno_v1 Notes: v1: - add support for dynamic generation of PPTT [Krzysztof] Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 443

Re: [edk2-devel] [PATCH v2 1/1] ShellPkg: acpiview: ACPI 6.3 update for MADT parser

2019-06-12 Thread Krzysztof Koch
Hi Zhichao, Please find my comments inline below. They are marked with [Krzysztof] Kind regards, Krzysztof -Original Message- From: Gao, Zhichao Sent: Monday, June 10, 2019 2:08 To: Krzysztof Koch ; devel@edk2.groups.io Cc: Sami Mujawar ; Carsey, Jaben ; Ni, Ray ; Matteo Carlini

[edk2-devel] [PATCH v1 1/2] MdePkg: Add Generic Initiator Affinity Structure definitions to SRAT

2019-06-12 Thread Krzysztof Koch
Add Generic Initiator Affinity Structure to the list of recognised System Resource Affinity Table (SRAT) structure types. Add definitions for Device Handle Types inside the Generic Initiator Affinity Structure. References: - ACPI 6.3 January 2019, Table 5-78 Signed-off-by: Krzysztof Koch

[edk2-devel] [PATCH v1 0/2] Update the SRAT Acpiview parser to ACPI 6.3

2019-06-12 Thread Krzysztof Koch
for the structure, it is possible to dump and validate the contents of the latest version of the SRAT table in acpiview. References: - ACPI 6.3 January 2019, Section 5.2.16.6 Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/582_acpiview_6_3_srat_v1 Krzysztof Koch (2): MdePkg: Add Generic

[edk2-devel] [PATCH v1 0/2] Update the SRAT Acpiview parser to ACPI 6.3

2019-06-12 Thread Krzysztof Koch
for the structure, it is possible to dump and validate the contents of the latest version of the SRAT table in acpiview. References: - ACPI 6.3 January 2019, Section 5.2.16.6 Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/582_acpiview_6_3_srat_v1 Krzysztof Koch (2): MdePkg: Add Generic

[edk2-devel] [PATCH v1 2/2] ShellPkg: acpiview: Update SRAT parser to ACPI 6.3

2019-06-12 Thread Krzysztof Koch
Add support for parsing revision 3 of System Resource Affinity Table (SRAT). Decode and dump the new Generic Initiator Affinity Structure. Validate the Device Handle Type field inside the Generic Initiator Affinity Structure. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https

[edk2-devel] [PATCH v1 2/2] ShellPkg: acpiview: Update SRAT parser to ACPI 6.3

2019-06-12 Thread Krzysztof Koch
Add support for parsing revision 3 of System Resource Affinity Table (SRAT). Decode and dump the new Generic Initiator Affinity Structure. Validate the Device Handle Type field inside the Generic Initiator Affinity Structure. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https

[edk2-devel] [PATCH v1 0/2] Update the SRAT Acpiview parser to ACPI 6.3

2019-06-12 Thread Krzysztof Koch
for the structure, it is possible to dump and validate the contents of the latest version of the SRAT table in acpiview. References: - ACPI 6.3 January 2019, Section 5.2.16.6 Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/582_acpiview_6_3_srat_v1 Krzysztof Koch (2): MdePkg: Add Generic

[edk2-devel] [PATCH v1 1/2] MdePkg: Add Generic Initiator Affinity Structure definitions to SRAT

2019-06-12 Thread Krzysztof Koch
Add Generic Initiator Affinity Structure to the list of recognised System Resource Affinity Table (SRAT) structure types. Add definitions for Device Handle Types inside the Generic Initiator Affinity Structure. References: - ACPI 6.3 January 2019, Table 5-78 Signed-off-by: Krzysztof Koch

Re: [edk2-devel] [PATCH v1 2/2] ShellPkg: acpiview: Update SRAT parser to ACPI 6.3

2019-06-20 Thread Krzysztof Koch
Hi, Is there any way I can help to get this patch merged upstream? Kind regards, Krzysztof -Original Message- From: devel@edk2.groups.io On Behalf Of Carsey, Jaben via Groups.Io Sent: Wednesday, June 12, 2019 21:58 To: devel@edk2.groups.io; Krzysztof Koch Cc: Ni, Ray ; Gao, Zhichao

Re: [edk2-devel] [PATCH v1 1/2] MdePkg: Add Generic Initiator Affinity Structure definitions to SRAT

2019-06-20 Thread Krzysztof Koch
Hi, Do you need any help from me to get this patch merged? Kind regards, Krzysztof -Original Message- From: Gao, Liming Sent: Thursday, June 13, 2019 13:05 To: devel@edk2.groups.io; Krzysztof Koch Cc: Carsey, Jaben ; Ni, Ray ; Gao, Zhichao ; Kinney, Michael D ; Sami Mujawar

[edk2-devel] [edk2-platforms PATCH v2 1/1] Platform/ARM: Juno: Add support for PPTT dynamic generation

2019-06-18 Thread Krzysztof Koch
-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2-platforms/tree/392_dynamic_pptt_juno_v2 Notes: v2: - use ARRAY_SIZE macro from Base.h to compute array size [Leif] v1: - add support for dynamic generation of PPTT [Krzysztof] Platform/ARM/JunoPkg

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: acpiview: Add GT Frame Number validation to GTDT parser

2019-05-15 Thread Krzysztof Koch
Hi Jaben and Ray, Is there anything I can do to help get this patch merged? Kind regards, Krzysztof Koch -Original Message- From: Sami Mujawar Sent: Thursday, May 9, 2019 14:37 To: devel@edk2.groups.io Cc: jaben.car...@intel.com; ray...@intel.com; Krzysztof Koch ; nd Subject: RE

Re: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-15 Thread Krzysztof Koch
Hi Liming and Michael, Is there any way I can help to get this patch merged? Kind regards, Krzysztof Koch -Original Message- From: Sami Mujawar Sent: Wednesday, May 8, 2019 9:06 To: Gao, Liming ; devel@edk2.groups.io; Krzysztof Koch Cc: nd Subject: RE: [edk2-devel] [PATCH v1 1/1

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT cache attributes validation

2019-05-15 Thread Krzysztof Koch
Hi Jaben and Ray, It's been a while since I posted this patch. Can I help you in any way to get this merged? Kind regards, Krzysztof Koch -Original Message- From: Sami Mujawar Sent: Thursday, May 9, 2019 14:37 To: devel@edk2.groups.io Cc: jaben.car...@intel.com; ray...@intel.com

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: Display VENDOR_ID in ASCII when parsing PPTT

2019-05-15 Thread Krzysztof Koch
Of Gao, Zhichao via Groups.Io Sent: Thursday, May 9, 2019 4:39 To: devel@edk2.groups.io; Krzysztof Koch ; Gao, Liming Cc: Carsey, Jaben ; Ni, Ray ; Sami Mujawar ; Girish Pathak ; Pierre Gondois ; Matteo Carlini ; Stephanie Hughes-Fitt ; nd Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg

[edk2-devel] [PATCH v1 1/1] DynamicTablesPkg: Add dynamic PPTT table generation support

2019-05-24 Thread Krzysztof Koch
input validation which includes cycle detection and MADT-PPTT cross-validation. A number of architectural compliance checks are also performed. Signed-off-by: Krzysztof Koch --- The changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/392_pptt_generator_v1 This patch is dependent

[edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-07 Thread Krzysztof Koch
p?id=1959) 9. Fix generic address structure definition to include all address space ID keywords. - ACPI 6.3 January 2019, Table 5-25 - Mantis ID 1965 (https://mantis.uefi.org/mantis/view.php?id=1965) 10. Make Acpi63.h the latest ACPI definition. Signed-off-by: Krzysztof Koch --- Resen

Re: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-07 Thread Krzysztof Koch
Hi everyone, My patch has finally reached the mailing list. The problem was the SMTP port number 587 that I was using. Sorry for the trouble. Kind regards, Krzysztof Koch -Original Message- From: devel@edk2.groups.io On Behalf Of Krzysztof Koch via Groups.Io Sent: Tuesday, May 7

[edk2-devel] [PATCH v1 1/1] ShellPkg: acpiview: Add GT Frame Number validation to GTDT parser

2019-05-08 Thread Krzysztof Koch
The ACPI 6.2 specification mandates that the Generic Timer (GT) Block Timer Structures must have a frame number in the range 0-7. Update the GTDT parser to warn if this condition is violated. Signed-off-by: Krzysztof Koch --- The changes can be seen at: https://github.com/KrzysztofKoch1

[edk2-devel] [PATCH v1 1/1] DynamicTablesPkg: Add frame number validation to GTDT generator

2019-05-08 Thread Krzysztof Koch
Added code to check if the Generic Timer Block Structure's frame number provided by the platform repository is within the allowed range (0-7). References: - ACPI 6.2 Errata A, Table 5-122, September 2017 Signed-off-by: Krzysztof Koch --- The changes can be seen at: https://github.com

[edk2-devel] [PATCH v1 0/3] Detect duplicate field values in ACPI tables

2019-05-16 Thread Krzysztof Koch
/KrzysztofKoch1/edk2/tree/479_find_duplicate_ids_v1 Krzysztof Koch (3): DynamicTablesPkg: Add code for finding duplicate values in arrays DynamicTablesPkg: Test for duplicate UIDs in MADT generator DynamicTablesPkg: Test for duplicate GT Block frame numbers DynamicTablesPkg/Include/Library

[edk2-devel] [PATCH v1 2/3] DynamicTablesPkg: Test for duplicate UIDs in MADT generator

2019-05-16 Thread Krzysztof Koch
Check for duplicate ACPI Processor UIDs when populating the GIC CPU (GICC) Interface structures inside the MADT table generator. Signed-off-by: Krzysztof Koch --- Notes: v1: - Detect duplicate ACPI Processor UIDs in GICCs [Krzysztof] DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm

[edk2-devel] [PATCH v1 1/1] DynamicTablesPkg: Add ACPI 6.3 SPE support to MADT generator

2019-05-16 Thread Krzysztof Koch
The Dynamic Tables Framework now supports generating Multiple APIC Description Table (MADT) revision 5 for ARM platforms while maintaining backward-compatibility with ACPI 6.2. The relevant change is the enablement of the Statistical Profiling Extension (SPE). Signed-off-by: Krzysztof Koch

[edk2-devel] [PATCH v1 1/1] ShellPkg: acpiview: ACPI 6.3 update for MADT parser

2019-05-16 Thread Krzysztof Koch
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1820 The ACPI 6.3 specification introduces a 'SPE overflow Interrupt' field as part of the GICC structure. Update the MADT parser to decode this field and validate the interrupt ID used. Signed-off-by: Krzysztof Koch --- Changes can be seen

[edk2-devel] [PATCH v1 1/5] ShellPkg: acpiview: Remove '/?' from valid command line flags

2019-06-28 Thread Krzysztof Koch
Acpiview currently allows displaying help info by specifying both -? and /? flags. This patch removes /? from valid command line flags that can be passed to the acpiview tool, as this flag is not used for such purpose in other UEFI shell commands. Signed-off-by: Krzysztof Koch --- Changes can

[edk2-devel] [PATCH v1 3/5] ShellPkg: acpiview: Allow disabling consistency checks (-q flag)

2019-06-28 Thread Krzysztof Koch
in the ACPI_PARSER arrays. 3. Table checksum computation. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/fa016236b0955d19db70bf83fe4e5048e3b858f4 Notes: v1: - make table consistency checks optional where applicable [Krzysztof] ShellPkg

[edk2-devel] [PATCH v1 2/5] ShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reporting

2019-06-28 Thread Krzysztof Koch
Move printing double newline character ('\n\n') from the beginning of ACPI table checksum validation message to the end of the raw binary data dump. This way acpiview table dump looks similar regardless of whether Table Checksum is validated or not. Signed-off-by: Krzysztof Koch --- Changes

[edk2-devel] [PATCH v1 0/5] Clean up acpiview input parameters

2019-06-28 Thread Krzysztof Koch
/612_acpiview_flags_fix_v1 Krzysztof Koch (5): ShellPkg: acpiview: Remove '/?' from valid command line flags ShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reporting ShellPkg: acpiview: Allow disabling consistency checks (-q flag) ShellPkg: acpiview: Remove '-v' flag from allowed command line

[edk2-devel] [PATCH v1 5/5] ShellPkg: acpiview: Make '-h' option not require a parameter

2019-06-28 Thread Krzysztof Koch
. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/c3e78ab9d47f51e4c6a786a8813d1fa01685f0c9 Notes: v1: - turn the '-h' acpiview input option into a flag [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c

[edk2-devel] [PATCH v1 4/5] ShellPkg: acpiview: Remove '-v' flag from allowed command line args

2019-06-28 Thread Krzysztof Koch
-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/6400c6323f78ac89e790e57c07e9cca2e979ef05 Notes: v1: - Remove the unused '-v' flag [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 3 --- ShellPkg

[edk2-devel] [PATCH v1 2/4] ShellPkg: acpiview: Make DBG2 output consistent with other tables

2019-06-28 Thread Krzysztof Koch
Print an extra newline character at the end DBG2 table parsing in order to make the output resemble the one for other ACPI table parsers. With this change, there is now a blank line between the DBG2 table dump and the 'Table Statistics' section. Signed-off-by: Krzysztof Koch --- Changes can

[edk2-devel] [PATCH v1 0/4] Fix a number of small issues in acpiview

2019-06-28 Thread Krzysztof Koch
The following patches introduce a number of unrelated changes which fix a number of minor issues in the Acpiview UEFI shell tool. Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/612_acpiview_fixes_v1 Krzysztof Koch (4): ShellPkg: acpiview: Improve PPTT table field

[edk2-devel] [PATCH v1 1/4] ShellPkg: acpiview: Improve PPTT table field validation

2019-06-28 Thread Krzysztof Koch
Add Cache Structure (Type 1) 'Number of sets' and 'Associativity' field validation in the acpiview Processor Properties Topology Table (PPTT) parser. Replace literal values with precompiler macros for existing Cache Structure validation functions. Signed-off-by: Krzysztof Koch --- Changes can

[edk2-devel] [PATCH v1 3/4] ShellPkg: acpiview: Remove redundant IORT node types enum

2019-06-28 Thread Krzysztof Koch
Replace the enum defining valid node types in the IORT table with macros from IoRemappingTable.h. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/79650cd6f2552e849afcd89aa016f35774376408 Notes: v1: - Remove redundant enum

[edk2-devel] [PATCH v1 4/4] ShellPkg: acpiview: Remove duplicate indentation in IORT parser

2019-06-28 Thread Krzysztof Koch
'Indent' and extra whitespace characters are used for indentation, which results in excess indentation. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/b44e007195f32246f33000934a6178d36f79e4b1 Notes: v1: - fix indentation issues

[edk2-devel] [PATCH v1 09/11] ShellPkg: acpiview: IORT: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/0b398f116f7aed99dbec4090b5c2c0ed93273ef7 Notes: v1: - improve the logic in the IORT parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 419

[edk2-devel] [PATCH v1 08/11] ShellPkg: acpiview: PPTT: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
this check, there is a possibility for the parser to enter an ifninite loop. 3. Test against buffer overruns. 4. Allow silencing ACPI table content validation errors which do not cause table parsing to fail. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com

[edk2-devel] [PATCH v1 07/11] ShellPkg: acpiview: MADT: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/ef11738efc94a9c3d7270d376a2cb273bbadbba2 Notes: v1: - improve the logic in the MADT parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 187

[edk2-devel] [PATCH v1 03/11] ShellPkg: acpiview: RSDP: Make printing table checksum optional

2019-07-12 Thread Krzysztof Koch
before it is used for further table parsing. 3. Remove redundant forward function declarations by repositioning blocks of code. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/73e6d7e117da244f8f4065620115a47f7f66d372 Notes: v1

[edk2-devel] [PATCH v1 00/11] Add security checks in the Acpiview table parsers

2019-07-12 Thread Krzysztof Koch
be seen at: https://github.com/KrzysztofKoch1/edk2/tree/612_enhance_parser_logic_v1 Krzysztof Koch (11): ShellPkg: acpiview: FADT: Validate global pointers before use ShellPkg: acpiview: SPCR: Remove redundant forward declaration ShellPkg: acpiview: RSDP: Make printing table checksum optional

[edk2-devel] [PATCH v1 04/11] ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call

2019-07-12 Thread Krzysztof Koch
buffer overruns. 3. Allow suppressing errors about invalid ACPI table poiners inside the XSDT table. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/27b4ae23c4f230225d6bcb27598b42edcf329512 Notes: v1: - Remove a redundant call

[edk2-devel] [PATCH v1 02/11] ShellPkg: acpiview: SPCR: Remove redundant forward declaration

2019-07-12 Thread Krzysztof Koch
Reposition blocks of code to remove redundant forward function declarations in order to reduce the code size. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/9be55a64f804c3d99e7c692208c8086d5b9ca553 Notes: v1: - remove redundant

[edk2-devel] [PATCH v1 01/11] ShellPkg: acpiview: FADT: Validate global pointers before use

2019-07-12 Thread Krzysztof Koch
not cause table parsing to fail. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/49cc41430775fb93205e302590a7d31f080c3952 Notes: v1: - improve the logic in the parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib

[edk2-devel] [PATCH v1 05/11] ShellPkg: acpiview: SLIT: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
. Check if the 'Number of System Localities' provided can be represented in a SLIT table. The table 'Length' field is a 32-bit value while the 'Number of System Localities' is a 64-bit value. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit

[edk2-devel] [PATCH v1 06/11] ShellPkg: acpiview: SRAT: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/d46d682d28654b1c6263be2f4fd961c35e80e5cb Notes: v1: - improve the logic in the SRAT parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c | 113

[edk2-devel] [PATCH v1 10/11] ShellPkg: acpiview: GTDT: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
. Remove redundant forward function declarations by repositioning blocks of code. 5. Convert a 'do-while' loop for parsing GTDT table body into a 'while' block for consistency with other table parsers. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1

[edk2-devel] [PATCH v1 11/11] ShellPkg: acpiview: DBG2: Add error-checking in the parsing logic

2019-07-12 Thread Krzysztof Koch
against buffer overrruns are simpler to implement. 5. Modify the signature of DumpGasStruct() function inside AcpiParser.c to facilitate protection against buffer overruns in the DBG2 parser. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit

Re: [edk2-devel] [PATCH v1 1/4] ShellPkg: acpiview: Improve PPTT table field validation

2019-07-01 Thread Krzysztof Koch
Hi Zhichao, Thank you for the review. You can see my responses in line with your comments marked with [Krzysztof] Kind regards, Krzysztof -Original Message- From: devel@edk2.groups.io On Behalf Of Gao, Zhichao via Groups.Io Sent: Monday, July 1, 2019 4:49 To: Krzysztof Koch ; devel

Re: [edk2-devel] [PATCH v1 05/11] ShellPkg: acpiview: SLIT: Validate System Locality count

2019-08-19 Thread Krzysztof Koch
Hi Zhichao, Please find my comments inline marked as [Krzysztof]. Kind regards, Krzysztof -Original Message- From: Gao, Zhichao Sent: Monday, August 19, 2019 2:19 To: devel@edk2.groups.io; Krzysztof Koch Cc: Carsey, Jaben ; Ni, Ray ; Sami Mujawar ; Matteo Carlini ; nd Subject

[edk2-devel] [PATCH v1 00/11] Test against invalid pointers in acpiview

2019-08-15 Thread Krzysztof Koch
for NULL whenever these pointers are dereferenced. Changes can be seet at: https://github.com/KrzysztofKoch1/edk2/tree/612_add_pointer_validation_v1 Krzysztof Koch (11): ShellPkg: acpiview: Set ItemPtr to NULL for unprocessed table fields ShellPkg: acpiview: RSDP: Validate global pointer before

[edk2-devel] [PATCH v1 04/11] ShellPkg: acpiview: SLIT: Validate global pointer before use

2019-08-15 Thread Krzysztof Koch
Check if SlitSystemLocalityCount pointer has been successfully updated before it is used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 16

[edk2-devel] [PATCH v1 06/11] ShellPkg: acpiview: SRAT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if SratRAType and SratRALength pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c

[edk2-devel] [PATCH v1 02/11] ShellPkg: acpiview: RSDP: Validate global pointer before use

2019-08-15 Thread Krzysztof Koch
Check if XsdtAddress pointer has been successfully updated before it is used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c | 12 1

[edk2-devel] [PATCH v1 03/11] ShellPkg: acpiview: FADT: Validate global pointer before use

2019-08-15 Thread Krzysztof Koch
Check if global pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c | 14 ++ 1

[edk2-devel] [PATCH v1 01/11] ShellPkg: acpiview: Set ItemPtr to NULL for unprocessed table fields

2019-08-15 Thread Krzysztof Koch
, this could result in a dangling pointer which could cause a problem later. Signed-off-by: Krzysztof Koch --- Notes: v1: - Set ItemPtr to NULL for unprocessed table fields [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 9 - 1 file changed, 8 insertions(+), 1

[edk2-devel] [PATCH v1 05/11] ShellPkg: acpiview: SLIT: Validate System Locality count

2019-08-15 Thread Krzysztof Koch
, then the matrix used to represent the localities is N*N bytes long. The ACPI table length must be big enough to fit the matrix. 3. Remove (now) redundant 64x64 bit multiplication. Signed-off-by: Krzysztof Koch --- Notes: v1: - Validate the 'Number of System Localities' Field [Krzysztof] - Remove

[edk2-devel] [PATCH v1 09/11] ShellPkg: acpiview: IORT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if global (in the scope of the IORT parser) pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort

[edk2-devel] [PATCH v1 08/11] ShellPkg: acpiview: PPTT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if the NumberOfPrivateResources, ProcessorTopologyStructureType and ProcessorTopologyStructureLength pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof

[edk2-devel] [PATCH v1 07/11] ShellPkg: acpiview: MADT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if the MadtInterruptControllerType and MadtInterruptControllerLength pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library

[edk2-devel] [PATCH v1 10/11] ShellPkg: acpiview: GTDT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if global (in the scope of the GTDT parser) pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt

[edk2-devel] [PATCH v1 11/11] ShellPkg: acpiview: DBG2: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if global (in the scope of the DBG2 parser) pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2

Re: [edk2-devel] [PATCH v1 00/11] Test against invalid pointers in acpiview

2019-08-16 Thread Krzysztof Koch
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2089 Hi Liming, Sure, no problem. Kind regards, Krzysztof -Original Message- From: Gao, Liming Sent: Friday, August 16, 2019 5:03 To: devel@edk2.groups.io; Krzysztof Koch Cc: Carsey, Jaben ; Ni, Ray ; Gao, Zhichao ; Sami Mujawar

[edk2-devel] [PATCH v2 03/11] ShellPkg: acpiview: FADT: Validate global pointer before use

2019-08-19 Thread Krzysztof Koch
Check if global pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/612_add_pointer_validation_v2 Notes: v1: - Test against NULL pointers

Re: [edk2-devel] [PATCH v1 03/11] ShellPkg: acpiview: FADT: Validate global pointer before use

2019-08-16 Thread Krzysztof Koch
Hi Zhichao, I think you're right. I will submit a v2 patch that minimizes the amount of pointer validation required for parsing the remaining tables. Kind regards, Krzysztof -Original Message- From: Gao, Zhichao Sent: Friday, August 16, 2019 8:35 To: Krzysztof Koch ; devel@edk2

Re: [edk2-devel] [PATCH v1 01/11] ShellPkg: acpiview: FADT: Validate global pointers before use

2019-07-17 Thread Krzysztof Koch
.groups.io On Behalf Of Carsey, Jaben via Groups.Io Sent: Friday, July 12, 2019 15:27 To: Krzysztof Koch ; devel@edk2.groups.io Cc: Ni, Ray ; Gao, Zhichao ; Sami Mujawar ; Matteo Carlini ; nd Subject: Re: [edk2-devel] [PATCH v1 01/11] ShellPkg: acpiview: FADT: Validate global pointers before use

[edk2-devel] [PATCH v1 7/8] ShellPkg: acpiview: GTDT: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 91 +++- 1 file changed, 33 insertions(+), 58 deletions(-) diff --git a/ShellPkg/Library

[edk2-devel] [PATCH v1 5/8] ShellPkg: acpiview: MADT: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof

[edk2-devel] [PATCH v1 1/8] ShellPkg: acpiview: RSDP: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof

[edk2-devel] [PATCH v1 4/8] ShellPkg: acpiview: SRAT: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof

[edk2-devel] [PATCH v1 0/8] Remove redundant forward declarations in acpiview

2019-07-18 Thread Krzysztof Koch
declarations, so this set of patches makes the code structure consistent across all acpiview parsers. Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/612_remove_forward_decl_v1 Krzysztof Koch (8): ShellPkg: acpiview: RSDP: Remove redundant forward declarations ShellPkg

[edk2-devel] [PATCH v1 3/8] ShellPkg: acpiview: SPCR: Remove redundant forward declaration

2019-07-18 Thread Krzysztof Koch
Reposition blocks of code to remove redundant forward function declarations in order to reduce the code size. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr

[edk2-devel] [PATCH v1 2/8] ShellPkg: acpiview: FADT: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof

[edk2-devel] [PATCH v1 6/8] ShellPkg: acpiview: IORT: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof

[edk2-devel] [PATCH v1 8/8] ShellPkg: acpiview: DBG2: Remove redundant forward declarations

2019-07-18 Thread Krzysztof Koch
Remove redundant forward function declarations by repositioning blocks of code. This way the code structure is consistent across ACPI table parsers and the code becomes more concise. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant forward function declarations [Krzysztof

[edk2-devel] [PATCH v1 1/6] ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct()

2019-07-18 Thread Krzysztof Koch
. Update all existing DumpGasStruct() calls in acpiview to add the length argument. Signed-off-by: Krzysztof Koch --- Notes: v1: - Modify DumpGasStruct() signature [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 26 +++- ShellPkg/Library

[edk2-devel] [PATCH v1 0/6] Acpiview table parsers code style enhancements and refactoring

2019-07-18 Thread Krzysztof Koch
/KrzysztofKoch1/edk2/tree/612_acpiview_code_style_enhance_v1 Krzysztof Koch (6): ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct() ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call ShellPkg: acpiview: RSDP: Make code consistent with other parsers ShellPkg: acpiview: SRAT

[edk2-devel] [PATCH v1 3/6] ShellPkg: acpiview: RSDP: Make code consistent with other parsers

2019-07-18 Thread Krzysztof Koch
. This effectively means that no more ACPI tables will be parsed because of this RSDP table content error. Signed-off-by: Krzysztof Koch --- Notes: v1: - minor code style enhancements [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c | 11 +-- 1 file

[edk2-devel] [PATCH v1 2/6] ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call

2019-07-18 Thread Krzysztof Koch
instead of a global static variable. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant ParseAcpi() call [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git

[edk2-devel] [PATCH v1 6/6] ShellPkg: acpiview: IORT: Refactor PMCG node mapping count validation

2019-07-18 Thread Krzysztof Koch
parsing and is limited to a single table field in scope, therefore, it is better to keep it away from the code responsible for traversing the table. Signed-off-by: Krzysztof Koch --- Notes: v1: - refactor PMCG node mapping count validation [Krzysztof] ShellPkg/Library

[edk2-devel] [PATCH v1 5/6] ShellPkg: acpiview: MADT: Split structure length validation

2019-07-18 Thread Krzysztof Koch
Controller Structures (for all interrupt models which can be represented in MADT). Check if the controller length specified is shorter than the byte size of the first two fields ('Type' and 'Length') present in every valid Interrupt Controller Structure. Signed-off-by: Krzysztof Koch --- Notes

[edk2-devel] [PATCH v1 4/6] ShellPkg: acpiview: SRAT: Minor code style enhancements

2019-07-18 Thread Krzysztof Koch
Minor changes to the SRAT parser code to conform with the EDKII coding style and to make it consistent with other ACPI table parsers. Signed-off-by: Krzysztof Koch --- Notes: v1: - minor code style enhancements [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat

Re: [edk2-devel] [PATCH v1 1/6] ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct()

2019-07-19 Thread Krzysztof Koch
Len); Replaced with > DumpGasStruct (DataPtr, 4, GAS_LENGTH); Is that ok? Kind regards, Krzysztof -Original Message- From: Gao, Zhichao Sent: Friday, July 19, 2019 9:09 To: Krzysztof Koch Subject: RE: [PATCH v1 1/6] ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct() HI Krz

[edk2-devel] [PATCH v2 2/6] ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call

2019-07-22 Thread Krzysztof Koch
instead of a global static variable. Signed-off-by: Krzysztof Koch --- Notes: v1: - remove redundant ParseAcpi() call [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Xsdt/XsdtParser.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git

[edk2-devel] [PATCH v2 1/6] ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct()

2019-07-22 Thread Krzysztof Koch
. Update all existing DumpGasStruct() calls in acpiview to add the length argument. Signed-off-by: Krzysztof Koch --- Notes: v2: - Pass GAS_LENGTH to DumpGasStruct() in DBG2 parser [Zhichao] v1: - Modify DumpGasStruct() signature [Krzysztof] ShellPkg/Library

[edk2-devel] [PATCH v2 3/6] ShellPkg: acpiview: RSDP: Make code consistent with other parsers

2019-07-22 Thread Krzysztof Koch
. This effectively means that no more ACPI tables will be parsed because of this RSDP table content error. Signed-off-by: Krzysztof Koch --- Notes: v1: - minor code style enhancements [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c | 11 +-- 1 file

[edk2-devel] [PATCH v2 0/6] Acpiview table parsers code style enhancements and refactoring

2019-07-22 Thread Krzysztof Koch
/KrzysztofKoch1/edk2/tree/612_acpiview_code_style_enhance_v2 Krzysztof Koch (6): ShellPkg: acpiview: Allow passing buffer length to DumpGasStruct() ShellPkg: acpiview: XSDT: Remove redundant ParseAcpi() call ShellPkg: acpiview: RSDP: Make code consistent with other parsers ShellPkg: acpiview: SRAT

[edk2-devel] [PATCH v2 6/6] ShellPkg: acpiview: IORT: Refactor PMCG node mapping count validation

2019-07-22 Thread Krzysztof Koch
parsing and is limited to a single table field in scope, therefore, it is better to keep it away from the code responsible for traversing the table. Signed-off-by: Krzysztof Koch --- Notes: v1: - refactor PMCG node mapping count validation [Krzysztof] ShellPkg/Library

[edk2-devel] [PATCH v2 4/6] ShellPkg: acpiview: SRAT: Minor code style enhancements

2019-07-22 Thread Krzysztof Koch
Minor changes to the SRAT parser code to conform with the EDKII coding style and to make it consistent with other ACPI table parsers. Signed-off-by: Krzysztof Koch --- Notes: v1: - minor code style enhancements [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat

[edk2-devel] [PATCH v2 5/6] ShellPkg: acpiview: MADT: Split structure length validation

2019-07-22 Thread Krzysztof Koch
Controller Structures (for all interrupt models which can be represented in MADT). Check if the controller length specified is shorter than the byte size of the first two fields ('Type' and 'Length') present in every valid Interrupt Controller Structure. Signed-off-by: Krzysztof Koch --- Notes

Re: [edk2-devel] [PATCH v2 0/6] Acpiview table parsers code style enhancements and refactoring

2019-07-22 Thread Krzysztof Koch
devel@edk2.groups.io On Behalf Of Krzysztof Koch via Groups.Io Sent: Monday, July 22, 2019 8:50 To: devel@edk2.groups.io Cc: jaben.car...@intel.com; ray...@intel.com; zhichao@intel.com; Sami Mujawar ; Matteo Carlini ; nd Subject: [edk2-devel] [PATCH v2 0/6] Acpiview table parsers

Re: [edk2-devel] [PATCH v2 0/6] Acpiview table parsers code style enhancements and refactoring

2019-07-26 Thread Krzysztof Koch
ot; series into smaller functional units as requested in the review comments. Kind regards, Krzysztof -Original Message- From: Sami Mujawar Sent: Tuesday, July 23, 2019 10:57 To: Krzysztof Koch ; devel@edk2.groups.io Cc: jaben.car...@intel.com; ray...@intel.com; zhichao@intel.com; nd S

Re: [edk2-devel] [PATCH v1 1/6] ShellPkg: acpiview: DBG2: Prevent buffer overruns

2019-08-05 Thread Krzysztof Koch
foHeaderParser would work as you assume that the remaining table buffer length should be passed to ParseAcpi() as an argument, not the length of the Debug Device Information Structure. What do you think? Kind regards, Krzysztof -Original Message- From: Gao, Zhichao Sent: Monday, Augus

[edk2-devel] [PATCH v1 2/6] ShellPkg: acpiview: GTDT: Prevent buffer overruns

2019-08-01 Thread Krzysztof Koch
ACPI structure's field. References: - ACPI 6.3, January 2019, Table 5-124 Signed-off-by: Krzysztof Koch --- Notes: v1: - Prevent buffer overruns in GTDT acpiview parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 147 ++-- 1

[edk2-devel] [PATCH v1 4/6] ShellPkg: acpiview: MADT: Prevent buffer overruns

2019-08-01 Thread Krzysztof Koch
Modify the parsing logic to prevent reading past the MADT table buffer length provided when parsing the Interrupt Controller Structure header. Signed-off-by: Krzysztof Koch --- Notes: v1: - Prevent buffer overruns in MADT acpiview parser [Krzysztof] ShellPkg/Library

[edk2-devel] [PATCH v1 1/6] ShellPkg: acpiview: DBG2: Prevent buffer overruns

2019-08-01 Thread Krzysztof Koch
(to get the length) a new ACPI_PARSER array is defined. References: - Microsoft Debug Port Table 2 (DBG2), December 10, 2015 Signed-off-by: Krzysztof Koch --- Notes: v1: - Prevent buffer overruns in DBG2 acpiview parser [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers

[edk2-devel] [PATCH v1 0/6] Prevent buffer overruns in acpiview table parsers

2019-08-01 Thread Krzysztof Koch
Krzysztof Koch (6): ShellPkg: acpiview: DBG2: Prevent buffer overruns ShellPkg: acpiview: GTDT: Prevent buffer overruns ShellPkg: acpiview: IORT: Prevent buffer overruns ShellPkg: acpiview: MADT: Prevent buffer overruns ShellPkg: acpiview: PPTT: Prevent buffer overruns ShellPkg: acpiview

  1   2   >