Fix minor generation bug, reformat CLI parsing.
diff --git a/generator/sections/gen-section-cxl-protocol.c b/generator/sections/gen-section-cxl-protocol.c
index e0570b4..3ff6fbb 100644
--- a/generator/sections/gen-section-cxl-protocol.c
+++ b/generator/sections/gen-section-cxl-protocol.c
@@ -36,7 +36,7 @@
if (cxl_agent_type == 0)
{
for (int i=0; i<3; i++)
- *(bytes + 20 + i) = 0; //CXL agent address bytes 5-7.
+ *(bytes + 21 + i) = 0; //CXL agent address bytes 5-7.
}
*(bytes + 34) &= ~0b111; //Device ID byte 10 bits 0-2.
diff --git a/generator/sections/gen-section-pci-bus.c b/generator/sections/gen-section-pci-bus.c
index 406a27e..dc2381d 100644
--- a/generator/sections/gen-section-pci-bus.c
+++ b/generator/sections/gen-section-pci-bus.c
@@ -23,7 +23,7 @@
UINT32* reserved = (UINT32*)(bytes + 20);
*reserved = 0;
UINT64* bus_command = (UINT64*)(bytes + 40);
- *bus_command &= (0b1 << 56); //Bus command bytes bar bit 56.
+ *bus_command &= ((UINT64)0b1 << 56); //Bus command bytes bar bit 56.
//Fix values that could be above range.
UINT16* error_type = (UINT16*)(bytes + 16);