Fix several review comments.
diff --git a/generator/sections/gen-section-arm.c b/generator/sections/gen-section-arm.c
index bce04c5..040ad24 100644
--- a/generator/sections/gen-section-arm.c
+++ b/generator/sections/gen-section-arm.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER ARM processor sections.
+ * Functions for generating pseudo-random CPER ARM processor sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -14,7 +14,7 @@
void* generate_arm_error_info();
size_t generate_arm_context_info(void** location);
-//Generates a single psuedo-random ARM processor section, saving the resulting address to the given
+//Generates a single pseudo-random ARM processor section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_arm(void** location)
{
diff --git a/generator/sections/gen-section-ccix-per.c b/generator/sections/gen-section-ccix-per.c
index 074fd0d..72bc1e0 100644
--- a/generator/sections/gen-section-ccix-per.c
+++ b/generator/sections/gen-section-ccix-per.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CCIX PER error sections.
+ * Functions for generating pseudo-random CCIX PER error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random CCIX PER error section, saving the resulting address to the given
+//Generates a single pseudo-random CCIX PER error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_ccix_per(void** location)
{
diff --git a/generator/sections/gen-section-cxl-component.c b/generator/sections/gen-section-cxl-component.c
index d08dc90..2b8d18a 100644
--- a/generator/sections/gen-section-cxl-component.c
+++ b/generator/sections/gen-section-cxl-component.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CXL component error sections.
+ * Functions for generating pseudo-random CXL component error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random CXL component error section, saving the resulting address to the given
+//Generates a single pseudo-random CXL component error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_cxl_component(void** location)
{
diff --git a/generator/sections/gen-section-cxl-protocol.c b/generator/sections/gen-section-cxl-protocol.c
index 85457ce..e0570b4 100644
--- a/generator/sections/gen-section-cxl-protocol.c
+++ b/generator/sections/gen-section-cxl-protocol.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CXL protocol error sections.
+ * Functions for generating pseudo-random CXL protocol error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random CXL protocol error section, saving the resulting address to the given
+//Generates a single pseudo-random CXL protocol error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_cxl_protocol(void** location)
{
diff --git a/generator/sections/gen-section-dmar.c b/generator/sections/gen-section-dmar.c
index cb732cc..91da101 100644
--- a/generator/sections/gen-section-dmar.c
+++ b/generator/sections/gen-section-dmar.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER DMAr error sections.
+ * Functions for generating pseudo-random CPER DMAr error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random generic DMAr error section, saving the resulting address to the given
+//Generates a single pseudo-random generic DMAr error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_dmar_generic(void** location)
{
@@ -33,7 +33,7 @@
return size;
}
-//Generates a single psuedo-random VT-d DMAr error section, saving the resulting address to the given
+//Generates a single pseudo-random VT-d DMAr error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_dmar_vtd(void** location)
{
@@ -56,7 +56,7 @@
return size;
}
-//Generates a single psuedo-random IOMMU DMAr error section, saving the resulting address to the given
+//Generates a single pseudo-random IOMMU DMAr error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_dmar_iommu(void** location)
{
diff --git a/generator/sections/gen-section-firmware.c b/generator/sections/gen-section-firmware.c
index 5b39fa1..7b47e54 100644
--- a/generator/sections/gen-section-firmware.c
+++ b/generator/sections/gen-section-firmware.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER firmware error sections.
+ * Functions for generating pseudo-random CPER firmware error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random firmware error section, saving the resulting address to the given
+//Generates a single pseudo-random firmware error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_firmware(void** location)
{
diff --git a/generator/sections/gen-section-generic.c b/generator/sections/gen-section-generic.c
index abc9792..618f9b3 100644
--- a/generator/sections/gen-section-generic.c
+++ b/generator/sections/gen-section-generic.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER generic processor sections.
+ * Functions for generating pseudo-random CPER generic processor sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random generic processor section, saving the resulting address to the given
+//Generates a single pseudo-random generic processor section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_generic(void** location)
{
diff --git a/generator/sections/gen-section-ia32x64.c b/generator/sections/gen-section-ia32x64.c
index a4470a8..a78bfcb 100644
--- a/generator/sections/gen-section-ia32x64.c
+++ b/generator/sections/gen-section-ia32x64.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER IA32/x64 sections.
+ * Functions for generating pseudo-random CPER IA32/x64 sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -14,7 +14,7 @@
void* generate_ia32x64_error_structure();
size_t generate_ia32x64_context_structure(void** location);
-//Generates a single psuedo-random IA32/x64 section, saving the resulting address to the given
+//Generates a single pseudo-random IA32/x64 section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_ia32x64(void** location)
{
diff --git a/generator/sections/gen-section-memory.c b/generator/sections/gen-section-memory.c
index dfa713f..63621da 100644
--- a/generator/sections/gen-section-memory.c
+++ b/generator/sections/gen-section-memory.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER platform memory error sections.
+ * Functions for generating pseudo-random CPER platform memory error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random platform memory error section, saving the resulting address to the given
+//Generates a single pseudo-random platform memory error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_memory(void** location)
{
@@ -33,7 +33,7 @@
return size;
}
-//Generates a single psuedo-random memory 2 error section, saving the resulting address to the given
+//Generates a single pseudo-random memory 2 error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_memory2(void** location)
{
diff --git a/generator/sections/gen-section-pci-bus.c b/generator/sections/gen-section-pci-bus.c
index cbe5b81..406a27e 100644
--- a/generator/sections/gen-section-pci-bus.c
+++ b/generator/sections/gen-section-pci-bus.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER PCI/PCI-X bus error sections.
+ * Functions for generating pseudo-random CPER PCI/PCI-X bus error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random PCI/PCI-X bus error section, saving the resulting address to the given
+//Generates a single pseudo-random PCI/PCI-X bus error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_pci_bus(void** location)
{
@@ -23,7 +23,7 @@
UINT32* reserved = (UINT32*)(bytes + 20);
*reserved = 0;
UINT64* bus_command = (UINT64*)(bytes + 40);
- *bus_command &= 0x100000000000000; //Bus command bytes bar bit 56.
+ *bus_command &= (0b1 << 56); //Bus command bytes bar bit 56.
//Fix values that could be above range.
UINT16* error_type = (UINT16*)(bytes + 16);
diff --git a/generator/sections/gen-section-pci-dev.c b/generator/sections/gen-section-pci-dev.c
index f6a8bcc..7913b9a 100644
--- a/generator/sections/gen-section-pci-dev.c
+++ b/generator/sections/gen-section-pci-dev.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER PCI component error sections.
+ * Functions for generating pseudo-random CPER PCI component error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -9,7 +9,7 @@
#include "../gen-utils.h"
#include "gen-sections.h"
-//Generates a single psuedo-random PCI component error section, saving the resulting address to the given
+//Generates a single pseudo-random PCI component error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_pci_dev(void** location)
{
diff --git a/generator/sections/gen-section-pcie.c b/generator/sections/gen-section-pcie.c
index d7b34ec..cace516 100644
--- a/generator/sections/gen-section-pcie.c
+++ b/generator/sections/gen-section-pcie.c
@@ -1,5 +1,5 @@
/**
- * Functions for generating psuedo-random CPER PCIe error sections.
+ * Functions for generating pseudo-random CPER PCIe error sections.
*
* Author: Lawrence.Tang@arm.com
**/
@@ -11,7 +11,7 @@
#define PCIE_PORT_TYPES (int []){0, 1, 4, 5, 6, 7, 8, 9, 10}
-//Generates a single psuedo-random PCIe error section, saving the resulting address to the given
+//Generates a single pseudo-random PCIe error section, saving the resulting address to the given
//location. Returns the size of the newly created section.
size_t generate_section_pcie(void** location)
{