diff -Nru xilinx-bootgen-2022.1/authentication-versal.cpp xilinx-bootgen-2022.2/authentication-versal.cpp --- xilinx-bootgen-2022.1/authentication-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/authentication-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -245,7 +245,6 @@ } /******************************************************************************/ - uint32_t VersalAuthenticationContext::GetCertificateSize(void) { return certSize; @@ -902,7 +901,7 @@ size_t hashSecLen = (*section)->Length; //If !bootloader AND !headers - if ((*section)->firstChunkSize != 0 && !(*section)->isBootloader && (*section)->isPartitionData) + if ((*section)->firstChunkSize != 0 && !((*section)->isBootloader && !bi.options.IsVersalNetSeries()) && (*section)->isPartitionData) { hashSecLen = (*section)->firstChunkSize + hashLength; } @@ -917,7 +916,7 @@ memcpy(partitionAc + acSection->Length - signatureLength, (*section)->Data, hashSecLen); /* Calculate the final hash */ - Versalcrypto_hash(shaHash, partitionAc, hashSecLen + (acSection->Length - signatureLength), !(*section)->isBootloader); + Versalcrypto_hash(shaHash, partitionAc, hashSecLen + (acSection->Length - signatureLength), !((*section)->isBootloader && !bi.options.IsVersalNetSeries())); LOG_TRACE("Hash of %s (LE):", acSection->Name.c_str()); LOG_DUMP_BYTES(shaHash, hashLength); /* Create the PKCS padding for the hash */ diff -Nru xilinx-bootgen-2022.1/bif.l xilinx-bootgen-2022.2/bif.l --- xilinx-bootgen-2022.1/bif.l 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bif.l 2022-09-26 06:24:42.000000000 +0000 @@ -58,6 +58,7 @@ early_handoff return tok::EARLY_HANDOFF; delay_handoff return tok::DELAY_HANDOFF; delay_load return tok::DELAY_LOAD; +delay_auth return tok::DELAY_AUTH; hivec return tok::HIVEC; blocks return tok::BLOCKS; authblocks return tok::AUTHBLOCKS; @@ -67,6 +68,8 @@ image return tok::IMAGE; metaheader return tok::METAHEADER; section return tok::BIF_SECTION; +lockstep return tok::LOCKSTEP; +include return tok::INCLUDE; offset yylval->number = tok::OFFSET; return tok::OFFSET; reserve_legacy yylval->number = tok::RESERVE_LEGACY; return tok::RESERVE_LEGACY; @@ -135,15 +138,18 @@ plm yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; non-plm yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; -partition_type return tok::PARTITION_TYPE; -type return tok::PARTITION_TYPE; - cdo yylval->number = PartitionType::CONFIG_DATA_OBJ;return tok::PTYPEVALUE; - raw yylval->number = PartitionType::RAW; return tok::PTYPEVALUE; - cfi yylval->number = PartitionType::CFI; return tok::PTYPEVALUE; - cfi-gsc yylval->number = PartitionType::CFI_GSC; return tok::PTYPEVALUE; - slr-boot yylval->number = PartitionType::SLR_BOOT; return tok::PTYPEVALUE; - slr-config yylval->number = PartitionType::SLR_CONFIG; return tok::PTYPEVALUE; - slr-slave yylval->number = PartitionType::SLR_SLAVE; return tok::PTYPEVALUE; +partition_type return tok::PARTITION_TYPE; +type return tok::PARTITION_TYPE; + cdo yylval->number = PartitionType::CONFIG_DATA_OBJ; return tok::PTYPEVALUE; + raw yylval->number = PartitionType::RAW; return tok::PTYPEVALUE; + cfi yylval->number = PartitionType::CFI; return tok::PTYPEVALUE; + cfi-gsc yylval->number = PartitionType::CFI_GSC; return tok::PTYPEVALUE; + slr-boot yylval->number = PartitionType::SLR_BOOT; return tok::PTYPEVALUE; + slr-config yylval->number = PartitionType::SLR_CONFIG; return tok::PTYPEVALUE; + slr-slave yylval->number = PartitionType::SLR_SLAVE; return tok::PTYPEVALUE; + slr-slave-boot yylval->number = PartitionType::SLR_SLAVE_BOOT; return tok::PTYPEVALUE; + slr-slave-config yylval->number = PartitionType::SLR_SLAVE_CONFIG; return tok::PTYPEVALUE; + elf yylval->number = PartitionType::ELF; return tok::PTYPEVALUE; keysrc_encryption yylval->number = tok::KEYSRC_ENCRYPTION; return tok::KEYSRC_ENCRYPTION; keysrc yylval->number = tok::KEYSRC_ENCRYPTION; return tok::KEYSRC_ENCRYPTION; @@ -189,7 +195,9 @@ opt_key yylval->number = OptKey::OptKeyinSecHdr; return tok::OPT_KEY; puf4kmode yylval->number = PufMode::PUF4K; return tok::PUF4KMODE; shutter yylval->number = tok::SHUTTER; return tok::SHUTTER; + puf_ro_swap yylval->number = tok::PUFROSWAP; return tok::PUFROSWAP; dpacm_enable yylval->number = DpaCM::DpaCMEnable; return tok::DPA_CM; + dice_enable yylval->number = tok::DICE; return tok::DICE; smap_width yylval->number = tok::SMAP_WIDTH; return tok::SMAP_WIDTH; bypass_idcode_check yylval->number = tok::BYPASS_IDCODE_CHECK; return tok::BYPASS_IDCODE_CHECK; a_hwrot yylval->number = tok::A_HWROT; return tok::A_HWROT; @@ -222,20 +230,27 @@ core return tok::DEST_CPU; a53-0 yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; a72-0 yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; + a78-0 yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; a5x-0 yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; a53-1 yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; a72-1 yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; + a78-1 yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; a5x-1 yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; a53-2 yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; + a78-2 yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; a5x-2 yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; a53-3 yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; + a78-3 yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; a5x-3 yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; r5-0 yylval->number = DestinationCPU::R5_0; return tok::DEST_CPU_TYPE; + r52-0 yylval->number = DestinationCPU::R5_0; return tok::DEST_CPU_TYPE; r5-1 yylval->number = DestinationCPU::R5_1; return tok::DEST_CPU_TYPE; + r52-1 yylval->number = DestinationCPU::R5_1; return tok::DEST_CPU_TYPE; r5-lockstep yylval->number = DestinationCPU::R5_lockstep; return tok::DEST_CPU_TYPE; pmu yylval->number = DestinationCPU::PMU; return tok::DEST_CPU_TYPE; psm yylval->number = DestinationCPU::PMU; return tok::DEST_CPU_TYPE; aie yylval->number = DestinationCPU::AIE; return tok::DEST_CPU_TYPE; + cluster yylval->number = tok::CLUSTER_NUM; return tok::CLUSTER_NUM; destination_device return tok::DEST_DEVICE; ps yylval->number = DestinationDevice::DEST_DEV_PS; return tok::DEST_DEVICE_TYPE; diff -Nru xilinx-bootgen-2022.1/bif.tab.cpp xilinx-bootgen-2022.2/bif.tab.cpp --- xilinx-bootgen-2022.1/bif.tab.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bif.tab.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -448,238 +448,244 @@ case 5: /* Line 670 of lalr1.cc */ #line 202 "../s/bif.y" - { currentBifOptions = new BifOptions(options.GetArchType(),(yysemantic_stack_[(1) - (1)].string)); } + { options.includeBifOptionsList.push_back((yysemantic_stack_[(3) - (3)].string)); } break; case 6: /* Line 670 of lalr1.cc */ -#line 204 "../s/bif.y" - { options.bifOptions = currentBifOptions; - options.bifOptionsList.push_back(currentBifOptions); } +#line 203 "../s/bif.y" + { currentBifOptions = new BifOptions(options.GetArchType(),(yysemantic_stack_[(1) - (1)].string)); } break; - case 15: + case 7: /* Line 670 of lalr1.cc */ -#line 218 "../s/bif.y" - { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); } +#line 205 "../s/bif.y" + { options.bifOptions = currentBifOptions; + options.bifOptionsList.push_back(currentBifOptions); } break; - case 21: + case 16: /* Line 670 of lalr1.cc */ -#line 229 "../s/bif.y" - { currentBifOptions->SetMetaHeaderEncryptType((yysemantic_stack_[(3) - (3)].encrvalue_t)); } +#line 219 "../s/bif.y" + { currentPartitionBifOptions = new PartitionBifOptions(); + currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); } break; case 22: /* Line 670 of lalr1.cc */ #line 230 "../s/bif.y" - { currentBifOptions->SetMetaHeaderEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t)); } + { currentBifOptions->SetMetaHeaderEncryptType((yysemantic_stack_[(3) - (3)].encrvalue_t)); } break; case 23: /* Line 670 of lalr1.cc */ #line 231 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.encrKeyFile = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->SetMetaHeaderEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t), options.IsVersalNetSeries()); } break; case 24: /* Line 670 of lalr1.cc */ #line 232 "../s/bif.y" - { currentBifOptions->SetMetaHeaderAuthType((yysemantic_stack_[(3) - (3)].authvalue_t)); } + { currentBifOptions->metaHdrAttributes.encrKeyFile = (yysemantic_stack_[(3) - (3)].string); } break; case 25: /* Line 670 of lalr1.cc */ #line 233 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.ppk = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->SetMetaHeaderAuthType((yysemantic_stack_[(3) - (3)].authvalue_t)); } break; case 26: /* Line 670 of lalr1.cc */ #line 234 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.psk = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->metaHdrAttributes.ppk = (yysemantic_stack_[(3) - (3)].string); } break; case 27: /* Line 670 of lalr1.cc */ #line 235 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.spk = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->metaHdrAttributes.psk = (yysemantic_stack_[(3) - (3)].string); } break; case 28: /* Line 670 of lalr1.cc */ #line 236 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.ssk = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->metaHdrAttributes.spk = (yysemantic_stack_[(3) - (3)].string); } break; case 29: /* Line 670 of lalr1.cc */ #line 237 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.spkSignature = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->metaHdrAttributes.ssk = (yysemantic_stack_[(3) - (3)].string); } break; case 30: /* Line 670 of lalr1.cc */ #line 238 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.presign = (yysemantic_stack_[(3) - (3)].string); } + { currentBifOptions->metaHdrAttributes.spkSignature = (yysemantic_stack_[(3) - (3)].string); } break; case 31: /* Line 670 of lalr1.cc */ #line 239 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.revokeId = (yysemantic_stack_[(3) - (3)].number); } + { currentBifOptions->metaHdrAttributes.presign = (yysemantic_stack_[(3) - (3)].string); } break; case 32: /* Line 670 of lalr1.cc */ #line 240 "../s/bif.y" - { currentBifOptions->metaHdrAttributes.checksum = (yysemantic_stack_[(3) - (3)].checksumvalue_t); } + { currentBifOptions->metaHdrAttributes.revokeId = (yysemantic_stack_[(3) - (3)].number); } break; case 33: /* Line 670 of lalr1.cc */ #line 241 "../s/bif.y" + { currentBifOptions->metaHdrAttributes.checksum = (yysemantic_stack_[(3) - (3)].checksumvalue_t); } + break; + + case 34: +/* Line 670 of lalr1.cc */ +#line 242 "../s/bif.y" { currentBifOptions->metaHdrAttributes.dpaCM = DpaCM::DpaCMEnable; } break; - case 35: + case 36: /* Line 670 of lalr1.cc */ -#line 243 "../s/bif.y" +#line 244 "../s/bif.y" { currentBifOptions->metaHdrAttributes.pufHdLoc = PufHdLoc::PUFinBH; currentBifOptions->SetPufHdinBHFlag();} break; - case 38: + case 39: /* Line 670 of lalr1.cc */ -#line 251 "../s/bif.y" +#line 252 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(1) - (1)].number)); currentBifOptions->metaHdrAttributes.encrBlocks = currentPartitionBifOptions->GetEncryptionBlocks(); } break; - case 39: + case 40: /* Line 670 of lalr1.cc */ -#line 253 "../s/bif.y" +#line 254 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(4) - (1)].number), (yysemantic_stack_[(4) - (3)].number)); currentBifOptions->metaHdrAttributes.encrBlocks = currentPartitionBifOptions->GetEncryptionBlocks(); } break; - case 40: + case 41: /* Line 670 of lalr1.cc */ -#line 255 "../s/bif.y" +#line 256 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(4) - (1)].number), 0); currentBifOptions->metaHdrAttributes.defEncrBlockSize = (yysemantic_stack_[(4) - (1)].number); } break; - case 41: -/* Line 670 of lalr1.cc */ -#line 259 "../s/bif.y" - { currentBifOptions->SetPdiId((yysemantic_stack_[(3) - (3)].number)); } - break; - case 42: /* Line 670 of lalr1.cc */ #line 260 "../s/bif.y" - { currentBifOptions->SetParentId((yysemantic_stack_[(3) - (3)].number)); } + { currentBifOptions->SetPdiId((yysemantic_stack_[(3) - (3)].number)); } break; case 43: /* Line 670 of lalr1.cc */ #line 261 "../s/bif.y" - { currentBifOptions->SetIdCode((yysemantic_stack_[(3) - (3)].number)); } + { currentBifOptions->SetParentId((yysemantic_stack_[(3) - (3)].number)); } break; case 44: /* Line 670 of lalr1.cc */ #line 262 "../s/bif.y" - { currentBifOptions->SetExtendedIdCode((yysemantic_stack_[(3) - (3)].number)); } + { currentBifOptions->SetIdCode((yysemantic_stack_[(3) - (3)].number)); } break; case 45: /* Line 670 of lalr1.cc */ #line 263 "../s/bif.y" - { currentBifOptions->AddFiles((yysemantic_stack_[(3) - (1)].number), (yysemantic_stack_[(3) - (3)].string)); } + { currentBifOptions->SetExtendedIdCode((yysemantic_stack_[(3) - (3)].number)); } break; case 46: /* Line 670 of lalr1.cc */ #line 264 "../s/bif.y" - { currentBifOptions->SetEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t)); } + { currentBifOptions->AddFiles((yysemantic_stack_[(3) - (1)].number), (yysemantic_stack_[(3) - (3)].string)); } break; case 47: /* Line 670 of lalr1.cc */ #line 265 "../s/bif.y" - { currentBifOptions->SetPdiType((yysemantic_stack_[(3) - (3)].ptype_t)); } + { currentBifOptions->SetEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t)); } break; - case 50: + case 48: /* Line 670 of lalr1.cc */ -#line 272 "../s/bif.y" - { currentImageBifOptions = new ImageBifOptions(); } +#line 266 "../s/bif.y" + { currentBifOptions->SetPdiType((yysemantic_stack_[(3) - (3)].ptype_t)); } break; case 51: /* Line 670 of lalr1.cc */ #line 273 "../s/bif.y" - { currentBifOptions->imageBifOptionList.push_back(currentImageBifOptions); } + { currentImageBifOptions = new ImageBifOptions(); } break; - case 59: + case 52: /* Line 670 of lalr1.cc */ -#line 287 "../s/bif.y" - { currentImageBifOptions->SetImageId((yysemantic_stack_[(3) - (3)].number)); } +#line 274 "../s/bif.y" + { currentBifOptions->imageBifOptionList.push_back(currentImageBifOptions); } break; case 60: /* Line 670 of lalr1.cc */ #line 288 "../s/bif.y" - { currentImageBifOptions->SetImageName((yysemantic_stack_[(3) - (3)].string)); } + { currentImageBifOptions->SetImageId((yysemantic_stack_[(3) - (3)].number)); } break; case 61: /* Line 670 of lalr1.cc */ #line 289 "../s/bif.y" - { currentImageBifOptions->SetDelayHandoff(true); } + { currentImageBifOptions->SetImageName((yysemantic_stack_[(3) - (3)].string)); } break; case 62: /* Line 670 of lalr1.cc */ #line 290 "../s/bif.y" - { currentImageBifOptions->SetDelayLoad(true); } + { currentImageBifOptions->SetDelayHandoff(true); } break; case 63: /* Line 670 of lalr1.cc */ #line 291 "../s/bif.y" - { currentImageBifOptions->SetMemCopyAddress((yysemantic_stack_[(3) - (3)].number)); } + { currentImageBifOptions->SetDelayLoad(true); } break; case 64: /* Line 670 of lalr1.cc */ #line 292 "../s/bif.y" - { currentImageBifOptions->SetImageType((yysemantic_stack_[(3) - (3)].ptype_t)); } + { currentImageBifOptions->SetMemCopyAddress((yysemantic_stack_[(3) - (3)].number)); } break; case 65: /* Line 670 of lalr1.cc */ #line 293 "../s/bif.y" - { currentImageBifOptions->SetUniqueId((yysemantic_stack_[(3) - (3)].number)); } + { currentImageBifOptions->SetImageType((yysemantic_stack_[(3) - (3)].ptype_t)); } break; case 66: /* Line 670 of lalr1.cc */ #line 294 "../s/bif.y" - { currentImageBifOptions->SetParentUniqueId((yysemantic_stack_[(3) - (3)].number)); } + { currentImageBifOptions->SetUniqueId((yysemantic_stack_[(3) - (3)].number)); } break; case 67: /* Line 670 of lalr1.cc */ #line 295 "../s/bif.y" + { currentImageBifOptions->SetParentUniqueId((yysemantic_stack_[(3) - (3)].number)); } + break; + + case 68: +/* Line 670 of lalr1.cc */ +#line 296 "../s/bif.y" { currentImageBifOptions->SetFunctionId((yysemantic_stack_[(3) - (3)].number)); } break; - case 73: + case 74: /* Line 670 of lalr1.cc */ #line 308 "../s/bif.y" { if(options.GetArchType() == Arch::VERSAL) @@ -687,14 +693,14 @@ currentBifOptions->SetEncryptionKeySource((yysemantic_stack_[(4) - (4)].encrkeysrc_t)); options.SetEncryptedKeySource((yysemantic_stack_[(4) - (4)].encrkeysrc_t)); } break; - case 74: + case 75: /* Line 670 of lalr1.cc */ #line 311 "../s/bif.y" { if(options.GetArchType() == Arch::ZYNQ) LOG_ERROR("BIF attribute error !!!\n\t\t[fsbl_config] not supported in ZYNQ architecture"); } break; - case 78: + case 79: /* Line 670 of lalr1.cc */ #line 316 "../s/bif.y" { if(options.GetArchType() == Arch::ZYNQ) @@ -704,98 +710,98 @@ currentBifOptions->SetBootDevice((yysemantic_stack_[(4) - (4)].bootdevice_t)); } break; - case 79: + case 80: /* Line 670 of lalr1.cc */ #line 321 "../s/bif.y" { LOG_ERROR("This usage of boot_device is no more supported.\n\t Please see 'bootgen -arch versal -bif_help boot_device'"); } break; - case 86: + case 87: /* Line 670 of lalr1.cc */ #line 332 "../s/bif.y" { currentBifOptions->SetBootDevice((yysemantic_stack_[(1) - (1)].bootdevice_t)); } break; - case 87: + case 88: /* Line 670 of lalr1.cc */ #line 333 "../s/bif.y" { currentBifOptions->SetBootDeviceAddress((yysemantic_stack_[(3) - (3)].number)); } break; - case 93: + case 94: /* Line 670 of lalr1.cc */ #line 345 "../s/bif.y" { currentBifOptions->SetAuthJtagRevokeID((yysemantic_stack_[(3) - (3)].number)); } break; - case 94: + case 95: /* Line 670 of lalr1.cc */ #line 346 "../s/bif.y" { currentBifOptions->SetAuthJtagDeviceDna((yysemantic_stack_[(3) - (3)].string)); } break; - case 95: + case 96: /* Line 670 of lalr1.cc */ #line 347 "../s/bif.y" { currentBifOptions->SetAuthJtagTimeOut((yysemantic_stack_[(3) - (3)].number)); } break; - case 96: + case 97: /* Line 670 of lalr1.cc */ #line 350 "../s/bif.y" { currentBifOptions->SetCore((yysemantic_stack_[(1) - (1)].core_t)); LOG_WARNING("[fsbl_config] a53_x64 | a53_x32 | r5_single | r5_dual is no more supported. Use 'destination_cpu' attribute for bootloader partition"); } break; - case 97: + case 98: /* Line 670 of lalr1.cc */ #line 353 "../s/bif.y" { currentBifOptions->SetBhRsa((yysemantic_stack_[(1) - (1)].bhrsa_t)); } break; - case 98: + case 99: /* Line 670 of lalr1.cc */ #line 355 "../s/bif.y" { LOG_ERROR("Authentication using SHA2 is no more supported."); } break; - case 99: + case 100: /* Line 670 of lalr1.cc */ #line 357 "../s/bif.y" { LOG_ERROR("[fsbl_config] bi_integrity_sha3 is no more supported. Use 'checksum' attribute of bootloader partition"); } break; - case 100: + case 101: /* Line 670 of lalr1.cc */ #line 359 "../s/bif.y" { currentBifOptions->SetPufHdLoc((yysemantic_stack_[(1) - (1)].pufhdloc_t)); } break; - case 101: + case 102: /* Line 670 of lalr1.cc */ #line 361 "../s/bif.y" { currentBifOptions->SetAuthOnly((yysemantic_stack_[(1) - (1)].authonly_t)); } break; - case 102: + case 103: /* Line 670 of lalr1.cc */ #line 363 "../s/bif.y" { currentBifOptions->SetOptKey((yysemantic_stack_[(1) - (1)].optkey_t)); } break; - case 103: + case 104: /* Line 670 of lalr1.cc */ #line 365 "../s/bif.y" { currentBifOptions->SetPufMode(PufMode::PUF4K); } break; - case 104: + case 105: /* Line 670 of lalr1.cc */ #line 367 "../s/bif.y" { currentBifOptions->SetShutterValue((yysemantic_stack_[(3) - (3)].number)); } break; - case 105: + case 106: /* Line 670 of lalr1.cc */ #line 369 "../s/bif.y" { if(options.GetArchType() != Arch::VERSAL) @@ -806,7 +812,7 @@ } break; - case 106: + case 107: /* Line 670 of lalr1.cc */ #line 375 "../s/bif.y" { if(((yysemantic_stack_[(3) - (3)].number) != 8) && ((yysemantic_stack_[(3) - (3)].number) !=16) && ((yysemantic_stack_[(3) - (3)].number) != 32) && ((yysemantic_stack_[(3) - (3)].number) != 0)) @@ -815,569 +821,607 @@ } break; - case 107: + case 108: /* Line 670 of lalr1.cc */ #line 379 "../s/bif.y" { currentBifOptions->SetBypassIdcodeFlag(true); } break; - case 108: + case 109: /* Line 670 of lalr1.cc */ #line 380 "../s/bif.y" { currentBifOptions->SetAHwRoTFlag(true); } break; - case 109: + case 110: /* Line 670 of lalr1.cc */ #line 381 "../s/bif.y" { currentBifOptions->SetSHwRoTFlag(true); } break; - case 110: + case 111: /* Line 670 of lalr1.cc */ -#line 384 "../s/bif.y" - { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); } +#line 382 "../s/bif.y" + { if(options.GetArchType() == Arch::VERSAL && options.IsVersalNetSeries()) + currentBifOptions->SetPufRingOscilltorSwapConfigValue((yysemantic_stack_[(3) - (3)].number)); + else + LOG_ERROR("BIF attribute error !!!\n\t 'puf_ro_swap' is supported only in VersalNet architecture"); + } break; - case 111: + case 112: /* Line 670 of lalr1.cc */ #line 387 "../s/bif.y" + { if(options.GetArchType() == Arch::VERSAL && options.IsVersalNetSeries()) + currentBifOptions->SetDiceEnable(); + else + LOG_ERROR("BIF attribute error !!!\n\t 'dice_enable' is supported only in VersalNet architecture"); + } + break; + + case 113: +/* Line 670 of lalr1.cc */ +#line 394 "../s/bif.y" + { currentPartitionBifOptions = new PartitionBifOptions(); + currentPartitionBifOptions->SetArchType(options.GetArchType(),options.IsVersalNetSeries()); } + break; + + case 114: +/* Line 670 of lalr1.cc */ +#line 397 "../s/bif.y" { currentPartitionBifOptions->filename = (yysemantic_stack_[(5) - (5)].string); currentPartitionBifOptions->filelist.push_back((yysemantic_stack_[(5) - (5)].string)); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); } break; - case 112: + case 115: /* Line 670 of lalr1.cc */ -#line 391 "../s/bif.y" +#line 401 "../s/bif.y" { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); + currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); currentPartitionBifOptions->filename = (yysemantic_stack_[(1) - (1)].string); currentPartitionBifOptions->filelist.push_back((yysemantic_stack_[(1) - (1)].string)); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); } break; - case 113: + case 116: /* Line 670 of lalr1.cc */ -#line 397 "../s/bif.y" +#line 407 "../s/bif.y" { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); } + currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); } break; - case 121: + case 124: /* Line 670 of lalr1.cc */ -#line 411 "../s/bif.y" +#line 421 "../s/bif.y" { currentPartitionBifOptions->filename = (yysemantic_stack_[(3) - (3)].string); currentPartitionBifOptions->filelist.push_back((yysemantic_stack_[(3) - (3)].string)); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); } break; - case 122: + case 125: /* Line 670 of lalr1.cc */ -#line 414 "../s/bif.y" +#line 424 "../s/bif.y" { currentPartitionBifOptions->partitionId = (yysemantic_stack_[(3) - (3)].number); } break; - case 124: + case 127: /* Line 670 of lalr1.cc */ -#line 416 "../s/bif.y" +#line 426 "../s/bif.y" { currentPartitionBifOptions->fileType = (yysemantic_stack_[(3) - (3)].number); } break; - case 125: + case 128: /* Line 670 of lalr1.cc */ -#line 417 "../s/bif.y" +#line 427 "../s/bif.y" { currentPartitionBifOptions->bifSection = (yysemantic_stack_[(3) - (3)].string); - currentPartitionBifOptions->filename = currentPartitionBifOptions->GetOutputFileFromBifSection(options.GetOutputFileNames().front(), (yysemantic_stack_[(3) - (3)].string)); + currentPartitionBifOptions->filename = currentPartitionBifOptions->GetOutputFileFromBifSection(options.GetOutputFileNames().front(), (yysemantic_stack_[(3) - (3)].string), currentImageBifOptions->GetImageType()); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); } break; - case 139: + case 142: /* Line 670 of lalr1.cc */ -#line 445 "../s/bif.y" +#line 455 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[bootvectors] only supported in ZYNQMP architecture"); currentBifOptions->SetBootVectorArray((yysemantic_stack_[(1) - (1)].number)); } break; - case 140: + case 143: /* Line 670 of lalr1.cc */ -#line 450 "../s/bif.y" +#line 460 "../s/bif.y" { currentPartitionBifOptions->SetAuthBlockAttr((yysemantic_stack_[(1) - (1)].number)); } break; - case 141: + case 144: /* Line 670 of lalr1.cc */ -#line 452 "../s/bif.y" +#line 462 "../s/bif.y" { currentPartitionBifOptions->bootloader = true;} break; - case 142: + case 145: /* Line 670 of lalr1.cc */ -#line 453 "../s/bif.y" +#line 463 "../s/bif.y" { currentPartitionBifOptions->boot = true;} break; - case 143: + case 146: /* Line 670 of lalr1.cc */ -#line 454 "../s/bif.y" +#line 464 "../s/bif.y" { currentPartitionBifOptions->user = true;} break; - case 144: + case 147: /* Line 670 of lalr1.cc */ -#line 455 "../s/bif.y" +#line 465 "../s/bif.y" { currentPartitionBifOptions->Static = true;} break; - case 145: + case 148: /* Line 670 of lalr1.cc */ -#line 456 "../s/bif.y" +#line 466 "../s/bif.y" { currentPartitionBifOptions->noautostart = true;} break; - case 146: + case 149: /* Line 670 of lalr1.cc */ -#line 457 "../s/bif.y" +#line 467 "../s/bif.y" { currentPartitionBifOptions->multiboot = true;} break; - case 147: + case 150: /* Line 670 of lalr1.cc */ -#line 458 "../s/bif.y" +#line 468 "../s/bif.y" { currentPartitionBifOptions->Protected = true;} break; - case 148: + case 151: /* Line 670 of lalr1.cc */ -#line 459 "../s/bif.y" +#line 469 "../s/bif.y" { currentPartitionBifOptions->SetEarlyHandoff(true); } break; - case 149: + case 152: /* Line 670 of lalr1.cc */ -#line 460 "../s/bif.y" +#line 470 "../s/bif.y" { currentPartitionBifOptions->SetHivec(true); } break; - case 150: + case 153: /* Line 670 of lalr1.cc */ -#line 461 "../s/bif.y" +#line 471 "../s/bif.y" { if(currentPartitionBifOptions->bootloader!=true) LOG_ERROR("XIP mode can be enabled only for bootloader"); currentBifOptions->SetXipMode(); } break; - case 151: + case 154: /* Line 670 of lalr1.cc */ -#line 464 "../s/bif.y" +#line 474 "../s/bif.y" { currentPartitionBifOptions->fileType = (yysemantic_stack_[(1) - (1)].number); } break; - case 152: + case 155: /* Line 670 of lalr1.cc */ -#line 465 "../s/bif.y" +#line 475 "../s/bif.y" { currentPartitionBifOptions->bootImage = true; } break; - case 153: + case 156: /* Line 670 of lalr1.cc */ -#line 466 "../s/bif.y" +#line 476 "../s/bif.y" { currentPartitionBifOptions->fileType = (yysemantic_stack_[(1) - (1)].number); } break; - case 154: + case 157: /* Line 670 of lalr1.cc */ -#line 467 "../s/bif.y" +#line 477 "../s/bif.y" { currentPartitionBifOptions->fileType = (yysemantic_stack_[(1) - (1)].number); } break; - case 155: + case 158: /* Line 670 of lalr1.cc */ -#line 468 "../s/bif.y" +#line 478 "../s/bif.y" { currentPartitionBifOptions->SetPartitionType((yysemantic_stack_[(1) - (1)].ptype_t)); } break; - case 156: + case 159: /* Line 670 of lalr1.cc */ -#line 471 "../s/bif.y" +#line 479 "../s/bif.y" + { currentPartitionBifOptions->SetLockStepFlag();} + break; + + case 160: +/* Line 670 of lalr1.cc */ +#line 482 "../s/bif.y" { currentPartitionBifOptions->SetTrustZone(::TrustZone::Secure); } break; - case 157: + case 161: /* Line 670 of lalr1.cc */ -#line 472 "../s/bif.y" +#line 483 "../s/bif.y" { currentPartitionBifOptions->SetTrustZone((yysemantic_stack_[(3) - (3)].trustzone_t)); } break; - case 158: + case 162: /* Line 670 of lalr1.cc */ -#line 475 "../s/bif.y" +#line 486 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(1) - (1)].number)); } break; - case 159: + case 163: /* Line 670 of lalr1.cc */ -#line 476 "../s/bif.y" +#line 487 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(4) - (1)].number), (yysemantic_stack_[(4) - (3)].number)); } break; - case 160: + case 164: /* Line 670 of lalr1.cc */ -#line 477 "../s/bif.y" +#line 488 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(4) - (1)].number), 0); } break; - case 161: + case 165: /* Line 670 of lalr1.cc */ -#line 479 "../s/bif.y" +#line 490 "../s/bif.y" { currentPartitionBifOptions->SetAuthType((yysemantic_stack_[(3) - (3)].authvalue_t)); } break; - case 162: + case 166: /* Line 670 of lalr1.cc */ -#line 480 "../s/bif.y" +#line 491 "../s/bif.y" { currentPartitionBifOptions->SetEncryptType((yysemantic_stack_[(3) - (3)].encrvalue_t)); } break; - case 163: + case 167: /* Line 670 of lalr1.cc */ -#line 481 "../s/bif.y" +#line 492 "../s/bif.y" { currentPartitionBifOptions->SetChecksumType((yysemantic_stack_[(3) - (3)].checksumvalue_t)); } break; - case 164: + case 168: /* Line 670 of lalr1.cc */ -#line 482 "../s/bif.y" +#line 493 "../s/bif.y" { currentPartitionBifOptions->SetOwnerType((yysemantic_stack_[(3) - (3)].powner_t)); } break; - case 165: + case 169: /* Line 670 of lalr1.cc */ -#line 483 "../s/bif.y" +#line 494 "../s/bif.y" { currentPartitionBifOptions->SetDestCpu((yysemantic_stack_[(3) - (3)].destcpu_t)); } break; - case 166: + case 170: /* Line 670 of lalr1.cc */ -#line 484 "../s/bif.y" +#line 495 "../s/bif.y" { currentPartitionBifOptions->SetDestDevice((yysemantic_stack_[(3) - (3)].destdevice_t)); } break; - case 167: + case 171: /* Line 670 of lalr1.cc */ -#line 485 "../s/bif.y" +#line 496 "../s/bif.y" { currentPartitionBifOptions->SetExceptionLevel((yysemantic_stack_[(3) - (3)].el_t)); } break; - case 168: + case 172: /* Line 670 of lalr1.cc */ -#line 486 "../s/bif.y" +#line 497 "../s/bif.y" { currentPartitionBifOptions->SetAesKeyFile((yysemantic_stack_[(3) - (3)].string)); } break; - case 169: + case 173: /* Line 670 of lalr1.cc */ -#line 487 "../s/bif.y" +#line 498 "../s/bif.y" { currentPartitionBifOptions->ppkFile = ((yysemantic_stack_[(3) - (3)].string)); } break; - case 170: + case 174: /* Line 670 of lalr1.cc */ -#line 488 "../s/bif.y" +#line 499 "../s/bif.y" { currentPartitionBifOptions->pskFile = ((yysemantic_stack_[(3) - (3)].string)); } break; - case 171: + case 175: /* Line 670 of lalr1.cc */ -#line 489 "../s/bif.y" +#line 500 "../s/bif.y" { currentPartitionBifOptions->spkFile = ((yysemantic_stack_[(3) - (3)].string)); } break; - case 172: + case 176: /* Line 670 of lalr1.cc */ -#line 490 "../s/bif.y" +#line 501 "../s/bif.y" { currentPartitionBifOptions->sskFile = ((yysemantic_stack_[(3) - (3)].string)); } break; - case 173: + case 177: /* Line 670 of lalr1.cc */ -#line 491 "../s/bif.y" +#line 502 "../s/bif.y" { currentPartitionBifOptions->spkSelect =((yysemantic_stack_[(3) - (3)].spkselect_t)); currentPartitionBifOptions->spkSelLocal = true; } break; - case 174: + case 178: /* Line 670 of lalr1.cc */ -#line 492 "../s/bif.y" +#line 503 "../s/bif.y" { currentPartitionBifOptions->SetSpkId((yysemantic_stack_[(3) - (3)].number)); } break; - case 175: + case 179: /* Line 670 of lalr1.cc */ -#line 493 "../s/bif.y" +#line 504 "../s/bif.y" { currentPartitionBifOptions->spkSignatureFile = ((yysemantic_stack_[(3) - (3)].string)); } break; - case 177: + case 181: /* Line 670 of lalr1.cc */ -#line 495 "../s/bif.y" +#line 506 "../s/bif.y" { currentPartitionBifOptions->SetPartitionType((yysemantic_stack_[(3) - (3)].ptype_t)); } break; - case 178: + case 182: /* Line 670 of lalr1.cc */ -#line 496 "../s/bif.y" +#line 507 "../s/bif.y" { currentPartitionBifOptions->SetEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t)); } break; - case 179: + case 183: /* Line 670 of lalr1.cc */ -#line 497 "../s/bif.y" +#line 508 "../s/bif.y" { currentPartitionBifOptions->SetRevokeId((yysemantic_stack_[(3) - (3)].number)); } break; - case 180: + case 184: /* Line 670 of lalr1.cc */ -#line 498 "../s/bif.y" +#line 509 "../s/bif.y" { currentPartitionBifOptions->SetDpaCM(DpaCM::DpaCMEnable); } break; - case 181: + case 185: /* Line 670 of lalr1.cc */ -#line 499 "../s/bif.y" +#line 510 "../s/bif.y" { currentPartitionBifOptions->SetSlrNum((yysemantic_stack_[(3) - (3)].number)); } break; - case 182: + case 186: /* Line 670 of lalr1.cc */ -#line 500 "../s/bif.y" +#line 511 "../s/bif.y" + { currentPartitionBifOptions->SetClusterNum((yysemantic_stack_[(3) - (3)].number)); } + break; + + case 187: +/* Line 670 of lalr1.cc */ +#line 512 "../s/bif.y" { currentPartitionBifOptions->SetPufHdLocation(PufHdLoc::PUFinBH); } break; - case 191: + case 188: /* Line 670 of lalr1.cc */ #line 513 "../s/bif.y" + { currentPartitionBifOptions->SetDelayAuth(true); } + break; + + case 197: +/* Line 670 of lalr1.cc */ +#line 526 "../s/bif.y" { (yyval.authvalue_t) = ::Authentication::None;} break; - case 193: + case 199: /* Line 670 of lalr1.cc */ -#line 517 "../s/bif.y" +#line 530 "../s/bif.y" { (yyval.encrvalue_t) = ::Encryption::None;} break; - case 195: + case 201: /* Line 670 of lalr1.cc */ -#line 521 "../s/bif.y" +#line 534 "../s/bif.y" { (yyval.checksumvalue_t) = ::Checksum::None;} break; - case 212: + case 218: /* Line 670 of lalr1.cc */ -#line 570 "../s/bif.y" +#line 583 "../s/bif.y" { currentPartitionBifOptions->alignment = (yysemantic_stack_[(3) - (3)].number); } break; - case 213: + case 219: /* Line 670 of lalr1.cc */ -#line 571 "../s/bif.y" +#line 584 "../s/bif.y" { currentPartitionBifOptions->offset = (yysemantic_stack_[(3) - (3)].number); } break; - case 214: + case 220: /* Line 670 of lalr1.cc */ -#line 572 "../s/bif.y" +#line 585 "../s/bif.y" { currentPartitionBifOptions->SetReserveLength((yysemantic_stack_[(3) - (3)].number), false); } break; - case 215: + case 221: /* Line 670 of lalr1.cc */ -#line 573 "../s/bif.y" +#line 586 "../s/bif.y" { currentPartitionBifOptions->SetReserveLength((yysemantic_stack_[(3) - (3)].number), true); } break; - case 216: + case 222: /* Line 670 of lalr1.cc */ -#line 574 "../s/bif.y" +#line 587 "../s/bif.y" { currentPartitionBifOptions->load = (yysemantic_stack_[(3) - (3)].number); } break; - case 217: + case 223: /* Line 670 of lalr1.cc */ -#line 575 "../s/bif.y" +#line 588 "../s/bif.y" { currentPartitionBifOptions->startup = (yysemantic_stack_[(3) - (3)].number); } break; - case 218: + case 224: /* Line 670 of lalr1.cc */ -#line 576 "../s/bif.y" +#line 589 "../s/bif.y" { currentPartitionBifOptions->bigEndian = true; } break; - case 219: + case 225: /* Line 670 of lalr1.cc */ -#line 577 "../s/bif.y" +#line 590 "../s/bif.y" { currentPartitionBifOptions->a32Mode = true; } break; - case 220: + case 226: /* Line 670 of lalr1.cc */ -#line 578 "../s/bif.y" +#line 591 "../s/bif.y" { currentPartitionBifOptions->pid = (yysemantic_stack_[(3) - (3)].number); } break; - case 221: + case 227: /* Line 670 of lalr1.cc */ -#line 581 "../s/bif.y" +#line 594 "../s/bif.y" { currentPartitionBifOptions->presignFile = (yysemantic_stack_[(3) - (3)].string); } break; - case 222: + case 228: /* Line 670 of lalr1.cc */ -#line 582 "../s/bif.y" +#line 595 "../s/bif.y" { currentPartitionBifOptions->SetUdfDataFile((yysemantic_stack_[(3) - (3)].string)); } break; - case 239: + case 245: /* Line 670 of lalr1.cc */ -#line 607 "../s/bif.y" +#line 620 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[auth_params] is supported only in ZYNQMP architecture"); currentBifOptions->SetPPKSelection((yysemantic_stack_[(3) - (3)].number)); } break; - case 240: + case 246: /* Line 670 of lalr1.cc */ -#line 610 "../s/bif.y" +#line 623 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[auth_params] is supported only in ZYNQMP architecture"); currentBifOptions->SetSPKSelection((yysemantic_stack_[(3) - (3)].spkselect_t)); } break; - case 241: + case 247: /* Line 670 of lalr1.cc */ -#line 613 "../s/bif.y" +#line 626 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_WARNING("BIF attribute error !!!\n\t\t[auth_params] is supported only in ZYNQMP architecture"); currentBifOptions->SetSpkId((yysemantic_stack_[(3) - (3)].number)); } break; - case 242: + case 248: /* Line 670 of lalr1.cc */ -#line 616 "../s/bif.y" +#line 629 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[auth_params] is supported only in ZYNQMP architecture"); currentBifOptions->SetHeaderAuthentication(); } break; - case 245: + case 251: /* Line 670 of lalr1.cc */ -#line 625 "../s/bif.y" +#line 638 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[split] not supported in ZYNQ architecture"); currentBifOptions->SetSplitMode((yysemantic_stack_[(3) - (3)].splitmode_t)); } break; - case 249: + case 255: /* Line 670 of lalr1.cc */ -#line 635 "../s/bif.y" +#line 648 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[split] not supported in ZYNQ architecture"); currentBifOptions->SetSplitFmt(File::MCS); } break; - case 250: + case 256: /* Line 670 of lalr1.cc */ -#line 638 "../s/bif.y" +#line 651 "../s/bif.y" { if(options.GetArchType() != Arch::ZYNQMP) LOG_ERROR("BIF attribute error !!!\n\t\t[split] not supported in ZYNQ architecture"); currentBifOptions->SetSplitFmt(File::BIN); } break; - case 255: + case 261: /* Line 670 of lalr1.cc */ -#line 650 "../s/bif.y" +#line 663 "../s/bif.y" { (yyval.number) = (yysemantic_stack_[(3) - (2)].number); } break; - case 257: + case 263: /* Line 670 of lalr1.cc */ -#line 657 "../s/bif.y" +#line 670 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(2) - (2)].number); *options.debugstr << (yyval.number) << " + " << (yysemantic_stack_[(2) - (2)].number) << std::endl;} break; - case 258: + case 264: /* Line 670 of lalr1.cc */ -#line 658 "../s/bif.y" +#line 671 "../s/bif.y" {(yyval.number) = ~(yysemantic_stack_[(2) - (2)].number); *options.debugstr << (yyval.number) << " ~ " << (yysemantic_stack_[(2) - (2)].number) << std::endl;} break; - case 260: + case 266: /* Line 670 of lalr1.cc */ -#line 663 "../s/bif.y" +#line 676 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) * (yysemantic_stack_[(3) - (3)].number); *options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " + " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 261: + case 267: /* Line 670 of lalr1.cc */ -#line 664 "../s/bif.y" +#line 677 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) / (yysemantic_stack_[(3) - (3)].number); *options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " / " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 262: + case 268: /* Line 670 of lalr1.cc */ -#line 665 "../s/bif.y" +#line 678 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) % (yysemantic_stack_[(3) - (3)].number); *options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " % " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 264: + case 270: /* Line 670 of lalr1.cc */ -#line 669 "../s/bif.y" +#line 682 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) + (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " + " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 265: + case 271: /* Line 670 of lalr1.cc */ -#line 670 "../s/bif.y" +#line 683 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) - (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " - " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 267: + case 273: /* Line 670 of lalr1.cc */ -#line 674 "../s/bif.y" +#line 687 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) << (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " << " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 268: + case 274: /* Line 670 of lalr1.cc */ -#line 675 "../s/bif.y" +#line 688 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) >> (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " >> " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 270: + case 276: /* Line 670 of lalr1.cc */ -#line 679 "../s/bif.y" +#line 692 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) & (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " & " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 272: + case 278: /* Line 670 of lalr1.cc */ -#line 683 "../s/bif.y" +#line 696 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) ^ (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " ^ " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; - case 274: + case 280: /* Line 670 of lalr1.cc */ -#line 688 "../s/bif.y" +#line 701 "../s/bif.y" {(yyval.number) = (yysemantic_stack_[(3) - (1)].number) | (yysemantic_stack_[(3) - (3)].number);*options.debugstr << (yyval.number) << " = " << (yysemantic_stack_[(3) - (1)].number) << " | " << (yysemantic_stack_[(3) - (3)].number) << std::endl;} break; /* Line 670 of lalr1.cc */ -#line 1381 "../bisonflex/bif.tab.cpp" +#line 1425 "../bisonflex/bif.tab.cpp" default: break; } @@ -1589,59 +1633,61 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const short int BisonParser::yypact_ninf_ = -358; + const short int BisonParser::yypact_ninf_ = -372; const short int BisonParser::yypact_[] = { - -358, 12, -11, -358, -358, -358, 60, 79, -358, 712, - -358, -358, 185, 83, 103, 85, 102, 104, 128, 139, - -358, 140, -358, -358, 142, 153, 171, -358, -358, -358, - -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, - -358, -358, -358, -358, -358, -358, -358, -358, 109, -358, - -358, 8, -358, -358, -358, 173, -358, -358, -358, 524, - 191, 199, 200, -358, 203, 207, 648, 99, 20, 92, - 134, 134, 134, -358, 134, 8, -358, 101, 169, 39, - -358, -358, -358, -358, -4, -358, -358, -358, -358, 217, - 218, 219, 221, 222, 227, 228, 229, 233, 234, 236, - 239, 247, 248, 249, 250, -358, -358, 251, 256, 261, - -358, -358, -358, -358, -358, -358, 265, 267, 268, 269, - 272, 273, 274, 279, 292, -358, -358, -358, -358, -358, - 293, 294, 299, 302, 303, 304, -358, -358, -358, 307, - 9, 400, -358, -358, -358, -358, -358, -358, -358, -358, - -358, 92, 134, 101, 296, 160, 58, 308, 305, 310, - -358, 313, -358, 318, 319, -358, -358, -358, -358, 134, - 134, 134, -358, -358, 28, 7, 42, 184, 187, 190, - 190, 190, -358, 190, 177, -358, -358, -358, -358, -358, - -358, 322, 323, -358, -358, -358, -358, -358, -358, -358, - -358, 328, 329, -358, -358, -358, -358, -358, -358, -358, - -358, 330, 331, 332, 335, 10, -358, -46, -49, -67, - 216, 787, 134, 213, 214, 212, 223, 134, 134, 134, - 134, 134, 134, 134, 210, 134, 134, 134, -4, 271, - -4, 134, 134, -4, 101, -4, -4, -4, -4, -4, - -4, -358, 524, -358, 524, -358, -358, -358, 344, 190, - -358, 169, 351, 352, 353, -358, 354, 358, 362, 355, - 99, -4, 648, 134, -358, 20, -358, -358, -73, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 68, - 368, 373, 375, 376, 377, 387, 388, 389, 390, 391, - 392, 393, 394, -358, -358, 397, 137, 134, 134, -358, - 169, 134, 325, 134, -358, 39, -358, -358, -358, -358, - -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, - -358, 190, -358, -358, -358, -358, -358, -358, -358, 190, - 190, 190, 190, 190, 190, 190, -358, -358, 190, -358, - 395, -77, -358, 190, -358, -358, -358, 190, 190, -358, - -358, -358, -358, -358, -358, -358, -358, -358, -358, 134, - -358, 134, 134, 210, 160, 275, 145, 58, -358, -358, - -358, 190, -358, -358, -358, -358, -358, 28, 28, 7, - 7, 42, 184, 187, -358, 401, 402, 416, 419, 430, - 433, -358, -358, 435, -358, 301, -358, -358, -46, -49, - -67, 134, 134, -4, 101, -4, -4, -4, -4, -4, - -4, -358, 177, -358, 190, 190, -358, 190, -358, 190, - -358, 134, 170, -358, 190, 190, -358, 354, -358, -358, - -358, -358, -358, 355, 99, 134, 134, 134, 134, 327, - 134, 320, -358, -358, -358, -358, 190, -358, 442, -53, - -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, - 257, -64, -358, 190, 190, 190, 190, -358, 190, -358, - 134, 183, -358, -358, -358, 306, -44, -358, -358 + -372, 9, -4, -372, 44, -372, -372, 106, 58, -372, + -372, -372, 13, -372, 746, -372, -372, 114, 68, 100, + 85, 89, 93, 75, 107, -372, 136, 135, 162, 167, + -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, + -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, + -372, 144, -372, -372, 61, -372, -372, -372, 178, -372, + -372, -372, 550, 209, 211, 220, -372, 225, 226, 680, + 112, -20, 105, -11, -11, -11, -372, -11, 61, -372, + 115, 214, 19, -372, -372, -372, -372, 106, -372, -372, + -372, -372, -372, 237, 238, 240, 250, 251, 253, 255, + 257, 258, 261, 262, 265, 266, 269, 270, 271, -372, + -372, 276, 277, 278, -372, -372, -372, -372, -372, -372, + 279, 282, 288, 290, 296, 297, 298, 299, -372, 301, + 305, -372, -372, -372, -372, -372, 307, 311, 312, 315, + 316, 318, -372, -372, -372, 321, 8, 420, -372, -372, + -372, -372, -372, -372, -372, -372, -372, 105, -11, 115, + 319, 157, 113, 320, 325, 332, -372, 333, -372, 334, + 335, -372, -372, -372, -372, -11, -11, -11, -372, -372, + 59, 63, 57, 121, 197, 206, 206, 206, -372, 206, + 182, -372, -372, -372, -372, -372, -372, -372, 344, 345, + 346, -372, -372, -372, -372, -372, -372, -372, -372, 349, + 351, -372, -372, -372, -372, -372, -372, -372, -372, 348, + 352, 355, 353, 43, -372, 76, -35, -51, 246, 826, + -11, 229, 235, 236, 234, -11, -11, -11, -11, -11, + -11, -11, 233, -11, -11, -11, 106, 302, 106, -11, + -11, -11, 106, 115, 106, 106, 106, 106, 106, 106, + -372, 550, -372, 550, -372, -372, -372, 371, 206, -372, + 214, 372, 373, 376, -372, 368, 378, 379, 381, 112, + 106, 680, -11, -372, -20, -372, -372, -136, -11, -11, + -11, -11, -11, -11, -11, -11, -11, -11, 79, 382, + 383, 384, 385, 386, 387, 392, 394, 395, 396, 397, + 398, 399, -372, -372, 402, 174, -11, -11, -11, -372, + 214, -11, 326, -11, -372, 19, -372, -372, -372, -372, + -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, + -372, 206, -372, -372, -372, -372, -372, -372, -372, 206, + 206, 206, 206, 206, 206, 206, -372, -372, 206, -372, + 400, -50, -372, 206, -372, -372, -372, 206, 206, 206, + -372, -372, -372, -372, -372, -372, -372, -372, -372, -372, + -11, -372, -11, -11, 233, 157, 267, 161, 113, -372, + -372, -372, 206, -372, -372, -372, -372, -372, 59, 59, + 63, 63, 57, 121, 197, -372, 404, 405, 406, 407, + 408, 409, -372, -372, 410, -372, 260, -372, -372, 76, + -35, -51, -11, -11, 106, 115, 106, 106, 106, 106, + 106, 106, -372, 182, -372, 206, 206, 206, -372, 206, + -372, 206, -372, -11, 15, -372, 206, 206, -372, 368, + -372, -372, -372, -372, -372, 381, 112, -11, -11, -11, + -11, 337, -11, 295, -372, -372, -372, -372, 206, -372, + 417, -49, -372, -372, -372, -372, -372, -372, -372, -372, + -372, -372, 272, -73, -372, 206, 206, 206, 206, -372, + 206, -372, -11, 72, -372, -372, -372, 273, -57, -372, + -372 }; /* YYDEFACT[S] -- default reduction number in state S. Performed when @@ -1650,85 +1696,87 @@ const unsigned short int BisonParser::yydefact_[] = { - 3, 0, 2, 1, 5, 4, 0, 0, 7, 0, - 113, 6, 110, 0, 0, 0, 0, 0, 0, 0, - 70, 0, 251, 252, 0, 0, 0, 229, 228, 230, - 185, 186, 187, 188, 189, 190, 183, 223, 231, 232, - 233, 234, 235, 225, 226, 227, 11, 12, 10, 48, - 14, 69, 9, 8, 13, 0, 184, 224, 112, 0, - 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 50, 0, 68, 15, 0, 0, 0, - 49, 110, 71, 72, 0, 141, 150, 148, 149, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 156, 0, - 0, 0, 0, 0, 0, 218, 219, 0, 0, 0, - 142, 143, 144, 145, 146, 147, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 237, 152, 238, 151, 236, - 223, 232, 233, 234, 235, 225, 198, 182, 180, 0, - 116, 115, 132, 128, 176, 129, 155, 130, 131, 153, - 154, 0, 0, 0, 0, 0, 0, 0, 0, 126, - 47, 0, 208, 0, 84, 86, 79, 254, 253, 0, - 0, 0, 256, 259, 263, 266, 269, 271, 273, 42, - 43, 44, 52, 41, 20, 199, 46, 107, 108, 109, - 103, 0, 0, 200, 201, 203, 204, 205, 206, 207, - 202, 0, 88, 96, 97, 105, 98, 99, 100, 102, - 101, 0, 0, 0, 0, 90, 45, 0, 0, 0, + 3, 0, 2, 1, 0, 6, 4, 0, 0, 257, + 258, 5, 0, 8, 0, 116, 7, 113, 0, 0, + 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, + 235, 234, 236, 191, 192, 193, 194, 195, 196, 189, + 229, 237, 238, 239, 240, 241, 231, 232, 233, 12, + 13, 11, 49, 15, 70, 10, 9, 14, 0, 190, + 230, 115, 0, 0, 0, 0, 75, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 0, 69, 16, + 0, 0, 0, 50, 113, 72, 73, 0, 144, 153, + 151, 152, 159, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 160, 0, 0, 0, 0, 0, 0, 224, + 225, 0, 0, 0, 145, 146, 147, 148, 149, 150, + 0, 0, 0, 0, 0, 0, 0, 0, 188, 0, + 0, 243, 155, 244, 154, 242, 229, 238, 239, 240, + 241, 231, 204, 187, 184, 0, 119, 118, 135, 131, + 180, 132, 158, 133, 134, 156, 157, 0, 0, 0, + 0, 0, 0, 0, 0, 129, 48, 0, 214, 0, + 85, 87, 80, 260, 259, 0, 0, 0, 262, 265, + 269, 272, 275, 277, 279, 43, 44, 45, 53, 42, + 21, 205, 47, 112, 108, 109, 110, 104, 0, 0, + 0, 206, 207, 209, 210, 211, 212, 213, 208, 0, + 89, 97, 98, 106, 99, 100, 101, 103, 102, 0, + 0, 0, 0, 91, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 114, 0, 119, 0, 120, 78, 82, 137, 139, - 73, 0, 0, 0, 0, 242, 80, 0, 0, 81, - 0, 0, 0, 0, 77, 0, 257, 258, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, + 117, 0, 122, 0, 123, 79, 83, 140, 142, 74, + 0, 0, 0, 0, 248, 81, 0, 0, 82, 0, + 0, 0, 0, 78, 0, 263, 264, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 35, 33, 0, 17, 0, 0, 76, - 0, 0, 0, 0, 83, 0, 92, 191, 192, 161, - 193, 194, 162, 195, 196, 163, 197, 164, 124, 123, - 155, 220, 210, 166, 209, 165, 211, 167, 157, 212, - 213, 214, 215, 216, 217, 174, 244, 173, 179, 133, - 135, 158, 134, 140, 221, 125, 222, 181, 122, 121, - 178, 168, 169, 170, 171, 172, 175, 117, 118, 0, - 75, 0, 0, 0, 0, 0, 0, 0, 177, 111, - 127, 87, 85, 255, 260, 261, 262, 264, 265, 267, - 268, 270, 272, 274, 51, 0, 0, 0, 0, 0, - 0, 61, 62, 0, 53, 56, 55, 54, 0, 0, + 0, 0, 36, 34, 0, 18, 0, 0, 0, 77, + 0, 0, 0, 0, 84, 0, 93, 197, 198, 165, + 199, 200, 166, 201, 202, 167, 203, 168, 127, 126, + 158, 226, 216, 170, 215, 169, 217, 171, 161, 218, + 219, 220, 221, 222, 223, 178, 250, 177, 183, 136, + 138, 162, 137, 143, 227, 128, 228, 185, 186, 125, + 124, 182, 172, 173, 174, 175, 176, 179, 120, 121, + 0, 76, 0, 0, 0, 0, 0, 0, 0, 181, + 114, 130, 88, 86, 261, 266, 267, 268, 270, 271, + 273, 274, 276, 278, 280, 52, 0, 0, 0, 0, + 0, 0, 62, 63, 0, 54, 57, 56, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 20, 19, 104, 106, 89, 93, 94, 95, - 91, 0, 0, 138, 239, 241, 240, 243, 248, 245, - 249, 250, 246, 247, 0, 0, 0, 0, 0, 0, - 0, 0, 58, 24, 21, 32, 31, 34, 36, 38, - 30, 22, 23, 25, 26, 27, 28, 29, 18, 136, - 0, 0, 64, 65, 66, 67, 59, 60, 63, 57, - 0, 0, 160, 159, 37, 0, 0, 40, 39 + 0, 0, 17, 21, 20, 111, 105, 107, 90, 94, + 95, 96, 92, 0, 0, 141, 245, 247, 246, 249, + 254, 251, 255, 256, 252, 253, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 25, 22, 33, 32, 35, + 37, 39, 31, 23, 24, 26, 27, 28, 29, 30, + 19, 139, 0, 0, 65, 66, 67, 68, 60, 61, + 64, 58, 0, 0, 164, 163, 38, 0, 0, 41, + 40 }; /* YYPGOTO[NTERM-NUM]. */ const short int BisonParser::yypgoto_[] = { - -358, -358, -358, -358, -358, -358, -358, -358, -297, -358, - -38, -358, -358, -358, 408, -358, -358, -357, -358, 172, - 438, -358, -358, 188, -358, -241, -208, -358, -358, -6, - -358, 450, -358, -124, -358, 192, -60, -358, 29, 93, - -358, -358, 244, -358, -358, -358, -358, 59, 57, 61, - -358, -57, -148, -358, -358, -358, -358, -358, -358, -358, - -358, -61, -358, -358, -358, -358, -358, 460, -358, -358, - 96, 100, 95, -358, -358, -65, -358, -89, -78, -76, - 189, 193, 194, -70 + -372, -372, -372, -372, -372, -372, -372, -372, -300, -372, + -61, -372, -372, -372, 411, -372, -372, -371, -372, 145, + 421, -372, -372, 173, -372, -239, -215, -372, -372, -12, + -372, 446, -372, -78, -372, 191, -65, -372, 20, 96, + -372, -372, 248, -372, -372, -372, -372, 62, 60, 64, + -372, -69, -156, -372, -372, -372, -372, -372, -372, -372, + -372, -67, -372, -372, -372, -372, -372, 468, -372, -372, + 98, 102, 99, -372, -372, -7, -372, -158, -62, -60, + 189, 192, 193, -63 }; /* YYDEFGOTO[NTERM-NUM]. */ const short int BisonParser::yydefgoto_[] = { - -1, 1, 2, 5, 6, 9, 46, 184, 305, 306, - 457, 458, 47, 48, 49, 182, 289, 404, 405, 50, - 51, 52, 154, 163, 164, 201, 214, 215, 202, 82, - 66, 83, 59, 139, 140, 158, 141, 142, 349, 257, - 258, 352, 143, 144, 350, 145, 55, 319, 322, 325, - 327, 146, 186, 203, 204, 205, 206, 207, 208, 209, - 210, 165, 335, 333, 337, 147, 148, 149, 57, 150, - 266, 347, 269, 439, 442, 58, 172, 173, 174, 175, - 176, 177, 178, 259 + -1, 1, 2, 6, 8, 14, 49, 190, 314, 315, + 469, 470, 50, 51, 52, 188, 298, 415, 416, 53, + 54, 55, 160, 169, 170, 209, 222, 223, 210, 85, + 69, 86, 62, 145, 146, 164, 147, 148, 359, 266, + 267, 362, 149, 150, 360, 151, 58, 329, 332, 335, + 337, 152, 192, 211, 212, 213, 214, 215, 216, 217, + 218, 171, 345, 343, 347, 153, 154, 155, 60, 156, + 275, 357, 278, 451, 454, 61, 178, 179, 180, 181, + 182, 183, 184, 268 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1738,194 +1786,204 @@ const unsigned short int BisonParser::yytable_[] = { - 179, 180, 181, 53, 183, 260, 159, 316, 166, 423, - 160, 10, 3, 323, 252, 315, 253, 255, 81, 216, - 370, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 320, 95, 96, 317, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 161, 107, 108, 452, 109, - 211, 324, 110, 111, 112, 113, 114, 115, 116, 117, - 288, 118, 119, 120, 288, 4, 121, 7, 321, 426, - 318, 432, 394, 288, 22, 23, 383, 122, 81, 211, - 276, 277, 8, 123, 288, 483, 22, 23, 395, 67, - 256, 70, 124, 288, 479, 481, 360, 212, 213, 267, - 268, 278, 27, 28, 29, 488, 68, 430, 71, 69, - 72, 125, 126, 127, 128, 129, 130, 38, 131, 132, - 133, 134, 135, 44, 45, 468, 212, 213, 367, 136, - 368, 73, 396, 397, 398, 137, 399, 400, 401, 402, - 403, 20, 422, 76, 138, 74, 22, 23, 77, 162, - 282, 283, 331, 290, 291, 292, 78, 339, 340, 341, - 342, 343, 344, 345, 330, 348, 351, 353, 279, 280, - 281, 357, 358, 354, 79, 356, 18, 293, 359, 84, - 361, 362, 363, 364, 365, 366, 294, 284, 285, 295, - 384, 385, 386, 290, 291, 292, 262, 263, 264, 265, - 440, 441, 151, 381, 387, 388, 379, 60, 389, 390, - 152, 153, 159, 378, 155, 167, 168, 293, 156, 136, - 296, 162, 185, 217, 218, 219, 294, 220, 221, 295, - 187, 188, 189, 222, 223, 224, 61, 424, 425, 225, - 226, 427, 227, 429, 297, 228, 298, 299, 300, 301, - 302, 167, 168, 229, 230, 231, 232, 233, 190, 191, - 296, 192, 234, 303, 167, 168, 461, 235, 62, 63, - 64, 236, 304, 237, 238, 239, 65, 169, 240, 241, - 242, 170, 171, 407, 297, 243, 298, 299, 300, 301, - 302, 193, 194, 195, 196, 197, 198, 199, 244, 245, - 246, 434, 435, 303, 200, 247, 451, 261, 248, 249, - 250, 251, 304, 169, 270, 272, 271, 170, 171, 273, - 470, 395, 274, 286, 275, 287, 169, 288, 307, 308, - 170, 171, 309, 485, 310, 326, 311, 312, 313, 314, - 395, 456, 459, 332, 336, 334, 346, 355, 460, 369, - 462, 463, 464, 465, 466, 467, 338, 371, 372, 373, - 377, 351, 471, 374, 375, 396, 397, 398, 376, 399, - 400, 401, 402, 403, 408, 473, 474, 475, 476, 409, - 478, 410, 411, 412, 396, 397, 398, 472, 399, 400, - 401, 402, 403, 413, 414, 415, 416, 417, 418, 419, - 420, 421, 428, 477, 431, 254, 482, 444, 445, 438, - 459, 486, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 446, 95, 96, 447, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 448, 107, 108, 449, - 109, 450, 484, 110, 111, 112, 113, 114, 115, 116, - 117, 480, 118, 119, 120, 487, 80, 121, 75, 54, - 469, 406, 433, 382, 380, 329, 454, 453, 122, 56, - 437, 455, 443, 436, 123, 391, 0, 0, 0, 0, - 392, 0, 393, 124, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 27, 28, 29, 0, 0, 0, 0, - 0, 0, 125, 126, 127, 128, 129, 130, 38, 131, - 132, 133, 134, 135, 44, 45, 0, 0, 0, 0, - 136, 0, 0, 0, 0, 0, 137, 0, 0, 0, - 0, 0, 0, 0, 0, 138, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 0, 95, 96, 0, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 0, 107, 108, 0, 109, 0, 0, 110, 111, 112, - 113, 114, 115, 116, 117, 0, 118, 119, 120, 0, - 0, 121, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 122, 0, 0, 0, 0, 0, 123, 0, - 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 27, 28, 29, - 0, 0, 0, 0, 0, 0, 125, 126, 127, 128, - 129, 130, 38, 131, 132, 133, 134, 135, 44, 45, - 0, 0, 0, 0, 136, 0, 0, 0, 0, 0, - 137, 0, 0, 0, 0, 0, 0, 0, 0, 138, - 85, 86, 87, 88, 89, 90, 91, 92, 157, 94, - 0, 95, 96, 0, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 0, 107, 108, 0, 109, 0, - 0, 110, 111, 112, 113, 114, 115, 116, 117, 0, - 118, 0, 120, 0, 0, 121, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 10, 11, 0, 0, 0, - 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 13, 0, 14, 0, 0, 0, 0, 0, - 0, 27, 28, 29, 0, 0, 0, 0, 0, 0, - 125, 126, 127, 128, 129, 130, 38, 131, 132, 133, - 134, 135, 44, 45, 0, 0, 0, 0, 136, 0, - 15, 16, 17, 0, 137, 0, 0, 0, 0, 18, - 19, 0, 0, 138, 0, 20, 0, 21, 0, 0, - 22, 23, 0, 0, 0, 24, 25, 0, 26, 85, - 86, 87, 88, 0, 0, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 0, 0, 0, 36, 0, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 0, 0, - 110, 111, 112, 113, 114, 115, 0, 0, 0, 0, + 11, 166, 56, 269, 165, 172, 167, 297, 326, 3, + 185, 186, 187, 261, 189, 434, 13, 285, 286, 394, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 381, 99, 100, 333, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 464, 111, 112, 325, 113, + 330, 7, 114, 115, 116, 117, 118, 119, 120, 121, + 219, 122, 123, 124, 15, 12, 125, 126, 262, 264, + 297, 84, 4, 334, 70, 173, 174, 5, 76, 127, + 224, 438, 495, 405, 219, 128, 297, 129, 331, 84, + 265, 73, 491, 297, 297, 74, 130, 371, 500, 75, + 406, 173, 174, 71, 444, 493, 72, 30, 31, 32, + 442, 220, 221, 77, 287, 168, 131, 132, 133, 134, + 135, 136, 41, 137, 138, 139, 140, 141, 47, 48, + 395, 396, 397, 480, 142, 220, 221, 63, 175, 79, + 143, 80, 176, 177, 9, 10, 407, 408, 409, 144, + 410, 411, 412, 413, 414, 276, 277, 25, 173, 174, + 340, 327, 9, 10, 175, 81, 64, 341, 176, 177, + 82, 482, 349, 350, 351, 352, 353, 354, 355, 433, + 358, 361, 363, 378, 87, 379, 367, 368, 369, 9, + 10, 299, 300, 301, 271, 272, 273, 274, 328, 299, + 300, 301, 65, 66, 67, 288, 289, 290, 293, 294, + 389, 68, 291, 292, 23, 302, 165, 452, 453, 392, + 157, 175, 158, 302, 303, 176, 177, 304, 497, 398, + 399, 159, 303, 400, 401, 304, 161, 162, 142, 364, + 168, 366, 191, 225, 226, 370, 227, 372, 373, 374, + 375, 376, 377, 435, 436, 437, 228, 229, 439, 230, + 441, 231, 305, 232, 233, 463, 295, 234, 235, 473, + 305, 236, 237, 390, 193, 238, 239, 240, 194, 195, + 196, 406, 241, 242, 243, 244, 418, 306, 245, 307, + 308, 309, 310, 311, 246, 306, 247, 307, 308, 309, + 310, 311, 248, 249, 250, 251, 312, 252, 197, 198, + 199, 253, 200, 254, 312, 313, 406, 255, 256, 446, + 447, 257, 258, 313, 259, 260, 279, 407, 408, 409, + 270, 410, 411, 412, 413, 414, 280, 281, 283, 282, + 284, 296, 201, 202, 203, 204, 205, 206, 207, 297, + 316, 317, 318, 319, 321, 208, 320, 324, 322, 468, + 471, 323, 407, 408, 409, 342, 410, 411, 412, 413, + 414, 336, 344, 348, 346, 356, 380, 385, 382, 383, + 361, 483, 384, 365, 386, 387, 388, 484, 419, 420, + 421, 422, 423, 424, 485, 486, 487, 488, 425, 490, + 426, 427, 428, 429, 430, 431, 432, 450, 440, 443, + 456, 457, 458, 459, 460, 461, 462, 472, 489, 474, + 475, 476, 477, 478, 479, 263, 492, 494, 499, 471, + 498, 496, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 417, 99, 100, 78, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 393, 111, 112, + 57, 113, 83, 481, 114, 115, 116, 117, 118, 119, + 120, 121, 391, 122, 123, 124, 445, 339, 125, 126, + 466, 465, 59, 449, 402, 467, 448, 455, 403, 0, + 404, 127, 0, 0, 0, 0, 0, 128, 0, 129, + 0, 0, 0, 0, 0, 0, 0, 0, 130, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, + 31, 32, 0, 0, 0, 0, 0, 0, 131, 132, + 133, 134, 135, 136, 41, 137, 138, 139, 140, 141, + 47, 48, 0, 0, 0, 0, 142, 0, 0, 0, + 0, 0, 143, 0, 0, 0, 0, 0, 0, 0, + 0, 144, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 0, 99, 100, 0, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 0, 111, 112, + 0, 113, 0, 0, 114, 115, 116, 117, 118, 119, + 120, 121, 0, 122, 123, 124, 0, 0, 125, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 127, 0, 0, 0, 0, 0, 128, 0, 129, + 0, 0, 0, 0, 0, 0, 0, 0, 130, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, + 31, 32, 0, 0, 0, 0, 0, 0, 131, 132, + 133, 134, 135, 136, 41, 137, 138, 139, 140, 141, + 47, 48, 0, 0, 0, 0, 142, 0, 0, 0, + 0, 0, 143, 0, 0, 0, 0, 0, 0, 0, + 0, 144, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 163, 98, 0, 99, 100, 0, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 0, 111, 112, + 0, 113, 0, 0, 114, 115, 116, 117, 118, 119, + 120, 121, 0, 122, 0, 124, 0, 0, 125, 126, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 16, 0, 0, 0, 0, 0, 17, 128, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 18, 130, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, + 31, 32, 0, 0, 0, 0, 0, 0, 131, 132, + 133, 134, 135, 136, 41, 137, 138, 139, 140, 141, + 47, 48, 0, 0, 0, 0, 142, 20, 21, 22, + 0, 0, 143, 0, 0, 0, 23, 24, 0, 0, + 0, 144, 0, 0, 25, 0, 26, 0, 0, 9, + 10, 0, 0, 0, 27, 28, 0, 29, 88, 89, + 90, 91, 92, 0, 0, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 0, 0, 0, 39, 0, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 0, 0, + 114, 115, 116, 117, 118, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 28, 29, 0, 0, 0, 0, 0, 0, 328, - 126, 127, 128, 129, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 0, 0, 0, 0, 136 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, + 0, 0, 0, 0, 338, 132, 133, 134, 135, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 0, 0, + 0, 0, 142 }; /* YYCHECK. */ const short int BisonParser::yycheck_[] = { - 70, 71, 72, 9, 74, 153, 66, 215, 69, 306, - 67, 3, 0, 80, 5, 5, 140, 141, 10, 84, - 261, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 80, 23, 24, 80, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 25, 37, 38, 405, 40, - 40, 118, 43, 44, 45, 46, 47, 48, 49, 50, - 137, 52, 53, 54, 137, 76, 57, 7, 117, 310, - 116, 148, 4, 137, 78, 79, 149, 68, 10, 40, - 169, 170, 3, 74, 137, 149, 78, 79, 20, 6, - 151, 6, 83, 137, 451, 148, 244, 87, 88, 41, - 42, 171, 93, 94, 95, 149, 3, 315, 6, 6, - 6, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 422, 87, 88, 252, 120, - 254, 3, 64, 65, 66, 126, 68, 69, 70, 71, - 72, 73, 5, 3, 135, 6, 78, 79, 6, 129, - 143, 144, 222, 16, 17, 18, 3, 227, 228, 229, - 230, 231, 232, 233, 221, 235, 236, 237, 140, 141, - 142, 241, 242, 238, 3, 240, 67, 40, 243, 6, - 245, 246, 247, 248, 249, 250, 49, 145, 146, 52, - 279, 280, 281, 16, 17, 18, 36, 37, 38, 39, - 55, 56, 11, 273, 282, 283, 271, 22, 284, 285, - 11, 11, 272, 270, 11, 81, 82, 40, 11, 120, - 83, 129, 121, 6, 6, 6, 49, 6, 6, 52, - 61, 62, 63, 6, 6, 6, 51, 307, 308, 6, - 6, 311, 6, 313, 107, 6, 109, 110, 111, 112, - 113, 81, 82, 6, 6, 6, 6, 6, 89, 90, - 83, 92, 6, 126, 81, 82, 414, 6, 83, 84, - 85, 6, 135, 6, 6, 6, 91, 143, 6, 6, - 6, 147, 148, 289, 107, 6, 109, 110, 111, 112, - 113, 122, 123, 124, 125, 126, 127, 128, 6, 6, - 6, 371, 372, 126, 135, 6, 5, 11, 6, 6, - 6, 4, 135, 143, 6, 5, 11, 147, 148, 6, - 150, 20, 4, 139, 5, 138, 143, 137, 6, 6, - 147, 148, 4, 150, 5, 119, 6, 6, 6, 4, - 20, 411, 412, 130, 132, 131, 136, 76, 413, 5, - 415, 416, 417, 418, 419, 420, 133, 6, 6, 6, - 5, 431, 432, 9, 6, 64, 65, 66, 6, 68, - 69, 70, 71, 72, 6, 445, 446, 447, 448, 6, - 450, 6, 6, 6, 64, 65, 66, 444, 68, 69, - 70, 71, 72, 6, 6, 6, 6, 6, 6, 6, - 6, 4, 77, 76, 9, 5, 149, 6, 6, 134, - 480, 481, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 6, 23, 24, 6, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 6, 37, 38, 6, - 40, 6, 480, 43, 44, 45, 46, 47, 48, 49, - 50, 9, 52, 53, 54, 149, 48, 57, 20, 9, - 431, 289, 369, 275, 272, 221, 409, 408, 68, 9, - 374, 410, 377, 373, 74, 286, -1, -1, -1, -1, - 287, -1, 288, 83, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 93, 94, 95, -1, -1, -1, -1, - -1, -1, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, -1, -1, -1, -1, - 120, -1, -1, -1, -1, -1, 126, -1, -1, -1, - -1, -1, -1, -1, -1, 135, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, 23, 24, -1, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - -1, 37, 38, -1, 40, -1, -1, 43, 44, 45, - 46, 47, 48, 49, 50, -1, 52, 53, 54, -1, - -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 68, -1, -1, -1, -1, -1, 74, -1, - -1, -1, -1, -1, -1, -1, -1, 83, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, 94, 95, - -1, -1, -1, -1, -1, -1, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - -1, -1, -1, -1, 120, -1, -1, -1, -1, -1, - 126, -1, -1, -1, -1, -1, -1, -1, -1, 135, + 7, 70, 14, 159, 69, 72, 26, 143, 223, 0, + 73, 74, 75, 5, 77, 315, 3, 175, 176, 155, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - -1, 23, 24, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, -1, 37, 38, -1, 40, -1, - -1, 43, 44, 45, 46, 47, 48, 49, 50, -1, - 52, -1, 54, -1, -1, 57, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 3, 4, -1, -1, -1, - -1, -1, 10, -1, -1, -1, -1, -1, -1, -1, - -1, 83, 20, -1, 22, -1, -1, -1, -1, -1, - -1, 93, 94, 95, -1, -1, -1, -1, -1, -1, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, -1, -1, -1, -1, 120, -1, - 58, 59, 60, -1, 126, -1, -1, -1, -1, 67, - 68, -1, -1, 135, -1, 73, -1, 75, -1, -1, - 78, 79, -1, -1, -1, 83, 84, -1, 86, 12, - 13, 14, 15, -1, -1, 93, 94, 95, 96, 97, - 98, 99, 100, 101, -1, -1, -1, 105, -1, 107, - 108, 109, 110, 111, 112, 113, 114, 115, -1, -1, - 43, 44, 45, 46, 47, 48, -1, -1, -1, -1, + 22, 270, 24, 25, 85, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 416, 38, 39, 5, 41, + 85, 7, 44, 45, 46, 47, 48, 49, 50, 51, + 41, 53, 54, 55, 3, 7, 58, 59, 146, 147, + 143, 10, 76, 124, 6, 86, 87, 81, 3, 71, + 87, 320, 155, 4, 41, 77, 143, 79, 123, 10, + 157, 6, 463, 143, 143, 6, 88, 253, 155, 6, + 21, 86, 87, 3, 154, 154, 6, 99, 100, 101, + 325, 92, 93, 6, 177, 135, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 288, 289, 290, 433, 126, 92, 93, 23, 149, 3, + 132, 6, 153, 154, 83, 84, 67, 68, 69, 141, + 71, 72, 73, 74, 75, 42, 43, 78, 86, 87, + 229, 85, 83, 84, 149, 3, 52, 230, 153, 154, + 3, 156, 235, 236, 237, 238, 239, 240, 241, 5, + 243, 244, 245, 261, 6, 263, 249, 250, 251, 83, + 84, 17, 18, 19, 37, 38, 39, 40, 122, 17, + 18, 19, 88, 89, 90, 146, 147, 148, 151, 152, + 279, 97, 149, 150, 70, 41, 281, 56, 57, 282, + 11, 149, 11, 41, 50, 153, 154, 53, 156, 291, + 292, 11, 50, 293, 294, 53, 11, 11, 126, 246, + 135, 248, 127, 6, 6, 252, 6, 254, 255, 256, + 257, 258, 259, 316, 317, 318, 6, 6, 321, 6, + 323, 6, 88, 6, 6, 5, 145, 6, 6, 425, + 88, 6, 6, 280, 60, 6, 6, 6, 64, 65, + 66, 21, 6, 6, 6, 6, 298, 113, 6, 115, + 116, 117, 118, 119, 6, 113, 6, 115, 116, 117, + 118, 119, 6, 6, 6, 6, 132, 6, 94, 95, + 96, 6, 98, 6, 132, 141, 21, 6, 6, 382, + 383, 6, 6, 141, 6, 4, 6, 67, 68, 69, + 11, 71, 72, 73, 74, 75, 11, 5, 4, 6, + 5, 144, 128, 129, 130, 131, 132, 133, 134, 143, + 6, 6, 6, 4, 6, 141, 5, 4, 6, 422, + 423, 6, 67, 68, 69, 136, 71, 72, 73, 74, + 75, 125, 137, 139, 138, 142, 5, 9, 6, 6, + 443, 444, 6, 81, 6, 6, 5, 456, 6, 6, + 6, 6, 6, 6, 457, 458, 459, 460, 6, 462, + 6, 6, 6, 6, 6, 6, 4, 140, 82, 9, + 6, 6, 6, 6, 6, 6, 6, 424, 81, 426, + 427, 428, 429, 430, 431, 5, 9, 155, 155, 492, + 493, 492, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 298, 24, 25, 25, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 284, 38, 39, + 14, 41, 51, 443, 44, 45, 46, 47, 48, 49, + 50, 51, 281, 53, 54, 55, 380, 229, 58, 59, + 420, 419, 14, 385, 295, 421, 384, 388, 296, -1, + 297, 71, -1, -1, -1, -1, -1, 77, -1, 79, + -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 99, + 100, 101, -1, -1, -1, -1, -1, -1, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, -1, -1, -1, 126, -1, -1, -1, + -1, -1, 132, -1, -1, -1, -1, -1, -1, -1, + -1, 141, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 24, 25, -1, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, + -1, 41, -1, -1, 44, 45, 46, 47, 48, 49, + 50, 51, -1, 53, 54, 55, -1, -1, 58, 59, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 71, -1, -1, -1, -1, -1, 77, -1, 79, + -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 99, + 100, 101, -1, -1, -1, -1, -1, -1, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, -1, -1, -1, 126, -1, -1, -1, + -1, -1, 132, -1, -1, -1, -1, -1, -1, -1, + -1, 141, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 24, 25, -1, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, + -1, 41, -1, -1, 44, 45, 46, 47, 48, 49, + 50, 51, -1, 53, -1, 55, -1, -1, 58, 59, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, + 4, -1, -1, -1, -1, -1, 10, 77, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 21, 88, 23, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 99, + 100, 101, -1, -1, -1, -1, -1, -1, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, -1, -1, -1, -1, 126, 61, 62, 63, + -1, -1, 132, -1, -1, -1, 70, 71, -1, -1, + -1, 141, -1, -1, 78, -1, 80, -1, -1, 83, + 84, -1, -1, -1, 88, 89, -1, 91, 12, 13, + 14, 15, 16, -1, -1, 99, 100, 101, 102, 103, + 104, 105, 106, 107, -1, -1, -1, 111, -1, 113, + 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, + 44, 45, 46, 47, 48, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 93, 94, 95, -1, -1, -1, -1, -1, -1, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, -1, -1, -1, -1, 120 + -1, -1, -1, -1, -1, 99, 100, 101, -1, -1, + -1, -1, -1, -1, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, + -1, -1, 126 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -1933,55 +1991,57 @@ const unsigned char BisonParser::yystos_[] = { - 0, 152, 153, 0, 76, 154, 155, 7, 3, 156, - 3, 4, 10, 20, 22, 58, 59, 60, 67, 68, - 73, 75, 78, 79, 83, 84, 86, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 105, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 157, 163, 164, 165, - 170, 171, 172, 180, 182, 197, 218, 219, 226, 183, - 22, 51, 83, 84, 85, 91, 181, 6, 3, 6, - 6, 6, 6, 3, 6, 171, 3, 6, 3, 3, - 165, 10, 180, 182, 6, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 23, 24, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 37, 38, 40, - 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, - 54, 57, 68, 74, 83, 102, 103, 104, 105, 106, - 107, 109, 110, 111, 112, 113, 120, 126, 135, 184, - 185, 187, 188, 193, 194, 196, 202, 216, 217, 218, - 220, 11, 11, 11, 173, 11, 11, 20, 186, 187, - 202, 25, 129, 174, 175, 212, 212, 81, 82, 143, - 147, 148, 227, 228, 229, 230, 231, 232, 233, 234, - 234, 234, 166, 234, 158, 121, 203, 61, 62, 63, - 89, 90, 92, 122, 123, 124, 125, 126, 127, 128, - 135, 176, 179, 204, 205, 206, 207, 208, 209, 210, - 211, 40, 87, 88, 177, 178, 226, 6, 6, 6, + 0, 158, 159, 0, 76, 81, 160, 7, 161, 83, + 84, 232, 7, 3, 162, 3, 4, 10, 21, 23, + 61, 62, 63, 70, 71, 78, 80, 88, 89, 91, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 111, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 163, + 169, 170, 171, 176, 177, 178, 186, 188, 203, 224, + 225, 232, 189, 23, 52, 88, 89, 90, 97, 187, + 6, 3, 6, 6, 6, 6, 3, 6, 177, 3, + 6, 3, 3, 171, 10, 186, 188, 6, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, + 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 38, 39, 41, 44, 45, 46, 47, 48, 49, + 50, 51, 53, 54, 55, 58, 59, 71, 77, 79, + 88, 108, 109, 110, 111, 112, 113, 115, 116, 117, + 118, 119, 126, 132, 141, 190, 191, 193, 194, 199, + 200, 202, 208, 222, 223, 224, 226, 11, 11, 11, + 179, 11, 11, 21, 192, 193, 208, 26, 135, 180, + 181, 218, 218, 86, 87, 149, 153, 154, 233, 234, + 235, 236, 237, 238, 239, 240, 240, 240, 172, 240, + 164, 127, 209, 60, 64, 65, 66, 94, 95, 96, + 98, 128, 129, 130, 131, 132, 133, 134, 141, 182, + 185, 210, 211, 212, 213, 214, 215, 216, 217, 41, + 92, 93, 183, 184, 232, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 4, 5, 184, 5, 184, 212, 190, 191, 234, - 203, 11, 36, 37, 38, 39, 221, 41, 42, 223, - 6, 11, 5, 6, 4, 5, 228, 228, 234, 140, - 141, 142, 143, 144, 145, 146, 139, 138, 137, 167, - 16, 17, 18, 40, 49, 52, 83, 107, 109, 110, - 111, 112, 113, 126, 135, 159, 160, 6, 6, 4, - 5, 6, 6, 6, 4, 5, 177, 80, 116, 198, - 80, 117, 199, 80, 118, 200, 119, 201, 102, 193, - 202, 234, 130, 214, 131, 213, 132, 215, 133, 234, - 234, 234, 234, 234, 234, 234, 136, 222, 234, 189, - 195, 234, 192, 234, 226, 76, 226, 234, 234, 226, - 203, 226, 226, 226, 226, 226, 226, 184, 184, 5, - 176, 6, 6, 6, 9, 6, 6, 5, 202, 226, - 186, 234, 174, 149, 228, 228, 228, 229, 229, 230, - 230, 231, 232, 233, 4, 20, 64, 65, 66, 68, - 69, 70, 71, 72, 168, 169, 170, 180, 6, 6, + 4, 5, 190, 5, 190, 218, 196, 197, 240, 209, + 11, 37, 38, 39, 40, 227, 42, 43, 229, 6, + 11, 5, 6, 4, 5, 234, 234, 240, 146, 147, + 148, 149, 150, 151, 152, 145, 144, 143, 173, 17, + 18, 19, 41, 50, 53, 88, 113, 115, 116, 117, + 118, 119, 132, 141, 165, 166, 6, 6, 6, 4, + 5, 6, 6, 6, 4, 5, 183, 85, 122, 204, + 85, 123, 205, 85, 124, 206, 125, 207, 108, 199, + 208, 240, 136, 220, 137, 219, 138, 221, 139, 240, + 240, 240, 240, 240, 240, 240, 142, 228, 240, 195, + 201, 240, 198, 240, 232, 81, 232, 240, 240, 240, + 232, 209, 232, 232, 232, 232, 232, 232, 190, 190, + 5, 182, 6, 6, 6, 9, 6, 6, 5, 208, + 232, 192, 240, 180, 155, 234, 234, 234, 235, 235, + 236, 236, 237, 238, 239, 4, 21, 67, 68, 69, + 71, 72, 73, 74, 75, 174, 175, 176, 186, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 4, 5, 159, 234, 234, 176, 234, 77, 234, - 177, 9, 148, 190, 234, 234, 222, 221, 134, 224, - 55, 56, 225, 223, 6, 6, 6, 6, 6, 6, - 6, 5, 168, 198, 199, 200, 234, 161, 162, 234, - 226, 203, 226, 226, 226, 226, 226, 226, 159, 189, - 150, 234, 202, 234, 234, 234, 234, 76, 234, 168, - 9, 148, 149, 149, 161, 150, 234, 149, 149 + 6, 6, 4, 5, 165, 240, 240, 240, 182, 240, + 82, 240, 183, 9, 154, 196, 240, 240, 228, 227, + 140, 230, 56, 57, 231, 229, 6, 6, 6, 6, + 6, 6, 6, 5, 174, 204, 205, 206, 240, 167, + 168, 240, 232, 209, 232, 232, 232, 232, 232, 232, + 165, 195, 156, 240, 208, 240, 240, 240, 240, 81, + 240, 174, 9, 154, 155, 155, 167, 156, 240, 155, + 155 }; #if YYDEBUG @@ -2005,7 +2065,7 @@ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405 + 405, 406, 407, 408, 409, 410, 411 }; #endif @@ -2013,68 +2073,70 @@ const unsigned char BisonParser::yyr1_[] = { - 0, 151, 152, 153, 153, 155, 154, 156, 156, 156, - 156, 156, 156, 156, 156, 158, 157, 159, 159, 159, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 161, 161, 162, 162, - 162, 163, 163, 163, 163, 163, 163, 163, 164, 164, - 166, 165, 167, 167, 167, 167, 168, 168, 168, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 170, 170, - 171, 171, 171, 172, 173, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 174, 174, 175, 175, 176, 176, - 177, 177, 177, 178, 178, 178, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 181, 180, 180, 183, 182, 184, 184, 184, 184, 184, - 184, 185, 185, 185, 185, 185, 186, 186, 187, 187, - 187, 187, 187, 188, 188, 189, 189, 190, 190, 191, - 192, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 193, 193, 193, 194, 194, 195, 195, - 195, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, - 196, 196, 196, 197, 197, 197, 197, 197, 197, 197, - 197, 198, 198, 199, 199, 200, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 217, 217, 218, 218, 218, 218, 218, 218, 218, - 218, 218, 219, 219, 219, 219, 220, 220, 220, 221, - 221, 221, 221, 221, 222, 223, 223, 223, 224, 225, - 225, 226, 226, 227, 227, 227, 228, 228, 228, 229, - 229, 229, 229, 230, 230, 230, 231, 231, 231, 232, - 232, 233, 233, 234, 234 + 0, 157, 158, 159, 159, 160, 161, 160, 162, 162, + 162, 162, 162, 162, 162, 162, 164, 163, 165, 165, + 165, 166, 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 167, 167, 168, + 168, 168, 169, 169, 169, 169, 169, 169, 169, 170, + 170, 172, 171, 173, 173, 173, 173, 174, 174, 174, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 176, + 176, 177, 177, 177, 178, 179, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 180, 180, 181, 181, 182, + 182, 183, 183, 183, 184, 184, 184, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 187, 186, 186, 189, 188, 190, 190, + 190, 190, 190, 190, 191, 191, 191, 191, 191, 192, + 192, 193, 193, 193, 193, 193, 194, 194, 195, 195, + 196, 196, 197, 198, 199, 199, 199, 199, 199, 199, + 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, + 200, 200, 201, 201, 201, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 203, + 203, 203, 203, 203, 203, 203, 203, 204, 204, 205, + 205, 206, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 222, + 222, 222, 222, 222, 222, 222, 222, 223, 223, 224, + 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, + 225, 225, 226, 226, 226, 227, 227, 227, 227, 227, + 228, 229, 229, 229, 230, 231, 231, 232, 232, 233, + 233, 233, 234, 234, 234, 235, 235, 235, 235, 236, + 236, 236, 237, 237, 237, 238, 238, 239, 239, 240, + 240 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ const unsigned char BisonParser::yyr2_[] = { - 0, 2, 1, 0, 2, 0, 6, 0, 2, 2, - 2, 2, 2, 2, 2, 0, 5, 1, 3, 2, - 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 1, 3, 1, 1, 3, 1, 4, - 4, 3, 3, 3, 3, 3, 3, 3, 1, 2, - 0, 5, 0, 2, 2, 2, 1, 3, 2, 3, - 3, 1, 1, 3, 3, 3, 3, 3, 2, 1, - 0, 2, 2, 4, 0, 5, 4, 4, 4, 3, - 4, 4, 4, 4, 1, 3, 1, 3, 1, 3, - 1, 3, 2, 3, 3, 3, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, - 0, 5, 1, 0, 4, 1, 1, 3, 3, 2, - 2, 3, 3, 3, 3, 3, 1, 3, 1, 1, - 1, 1, 1, 3, 3, 1, 3, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, - 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, + 0, 2, 1, 0, 2, 3, 0, 6, 0, 2, + 2, 2, 2, 2, 2, 2, 0, 5, 1, 3, + 2, 0, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, + 4, 4, 3, 3, 3, 3, 3, 3, 3, 1, + 2, 0, 5, 0, 2, 2, 2, 1, 3, 2, + 3, 3, 1, 1, 3, 3, 3, 3, 3, 2, + 1, 0, 2, 2, 4, 0, 5, 4, 4, 4, + 3, 4, 4, 4, 4, 1, 3, 1, 3, 1, + 3, 1, 3, 2, 3, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, + 1, 3, 1, 0, 5, 1, 0, 4, 1, 1, + 3, 3, 2, 2, 3, 3, 3, 3, 3, 1, + 3, 1, 1, 1, 1, 1, 3, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 4, 4, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 1, 3, 3, 3, 1, 3, 3, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 3, 3, 3, 1, 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, - 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 1, 3, 1, 3, 3, 3, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 2, 2, 1, - 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, - 3, 1, 3, 1, 3 + 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, + 1, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 2, 2, 1, 3, 3, 3, 1, + 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, + 3 }; #if YYDEBUG @@ -2085,35 +2147,36 @@ { "$end", "error", "$undefined", "OBRACE", "EBRACE", "COMMA", "EQUAL", "COLON", "QUOTE", "SEMICOLON", "OBRACKET", "EBRACKET", "BOOTLOADER", - "XIP_MODE", "EARLY_HANDOFF", "HIVEC", "AUTHENTICATION", "ENCRYPTION", - "CHECKSUM", "PARTITION_OWNER", "PARTITION_TYPE", "PARTITION_NUM", - "BOOT_DEVICE", "DEST_DEVICE", "DEST_CPU", "ADDRESS", "EXCEPTION_LEVEL", - "TRUSTZONE", "ALIGNMENT", "OFFSET", "RESERVE_LEGACY", "RESERVE", "LOAD", - "STARTUP", "BIGENDIAN", "A32_MODE", "PPK_SELECT", "SPK_ID", "SPK_SELECT", - "HEADER_AUTH", "REVOKE_ID", "SPLIT_MODE", "SPLIT_FMT", "BOOT", "USER", - "STATIC", "NOAUTOSTART", "MULTIBOOT", "PROTECTED", "BLOCKS", - "AUTHBLOCKS", "BOOTVECTORS", "PRESIGN", "BIF_SECTION", "UDF_DATA", "MCS", - "BIN", "SLR_NUM", "PARENT_ID", "ID_CODE", "EXT_ID_CODE", - "BYPASS_IDCODE_CHECK", "A_HWROT", "S_HWROT", "UNIQUE_ID", - "PARENT_UNIQUE_ID", "FUNCTION_ID", "IMAGE", "ID", "NAME", - "DELAY_HANDOFF", "DELAY_LOAD", "COPY", "PARTITION", "PFILE", - "METAHEADER", "WORD", "HEXWORD", "FILENAME", "QFILENAME", "NONE", - "DECVALUE", "HEXVALUE", "KEYSRC_ENCRYPTION", "FSBL_CONFIG", - "AUTH_PARAMS", "AUTHJTAG_CONFIG", "DEVICE_DNA", "JTAG_TIMEOUT", - "PUF4KMODE", "SHUTTER", "SPLIT", "SMAP_WIDTH", "PUF_HELPER_FILE", - "BH_KEY_FILE", "BH_KEY_IV", "BH_KEK_IV", "BBRAM_KEK_IV", "EFUSE_KEK_IV", - "EFUSE_USER_KEK0_IV", "EFUSE_USER_KEK1_IV", "USER_KEYS", "PMCDATA", - "BOOTIMAGE", "UDF_BH", "INIT", "PMUFW_IMAGE", "AES_KEY_FILE", - "FAMILY_KEY", "PPK_FILE", "PSK_FILE", "SPK_FILE", "SSK_FILE", - "SPK_SIGNATURE_FILE", "BH_SIGNATURE_FILE", "HEADER_SIGNATURE_FILE", - "AUTHVALUE", "ENCRVALUE", "CHECKSUMVALUE", "POWNERVALUE", "PTYPEVALUE", - "KEY_SRC", "CORE", "BH_RSA", "AUTH_HASH", "INT_HASH", "PUFHD_LOC", - "OPT_KEY", "AUTH_ONLY", "BOOT_DEVICE_TYPE", "DEST_DEVICE_TYPE", - "DEST_CPU_TYPE", "EXCEPTION_LEVEL_TYPE", "TRUSTZONE_TYPE", "SPLITMODE", - "DPA_CM", "SPKSELECT", "OR", "XOR", "AND", "MULT", "DIVIDE", "MODULO", - "PLUS", "MINUS", "LSHIFT", "RSHIFT", "NEGATION", "LPAREN", "RPAREN", - "ASTERISK", "$accept", "bif", "group_list", "bifoptions", "$@1", - "file_list", "metahdr_spec", "$@2", "metahdr_attr_list", "metahdr_attr", + "XIP_MODE", "EARLY_HANDOFF", "HIVEC", "LOCKSTEP", "AUTHENTICATION", + "ENCRYPTION", "CHECKSUM", "PARTITION_OWNER", "PARTITION_TYPE", + "PARTITION_NUM", "BOOT_DEVICE", "DEST_DEVICE", "DEST_CPU", "ADDRESS", + "EXCEPTION_LEVEL", "TRUSTZONE", "ALIGNMENT", "OFFSET", "RESERVE_LEGACY", + "RESERVE", "LOAD", "STARTUP", "BIGENDIAN", "A32_MODE", "PPK_SELECT", + "SPK_ID", "SPK_SELECT", "HEADER_AUTH", "REVOKE_ID", "SPLIT_MODE", + "SPLIT_FMT", "BOOT", "USER", "STATIC", "NOAUTOSTART", "MULTIBOOT", + "PROTECTED", "BLOCKS", "AUTHBLOCKS", "BOOTVECTORS", "PRESIGN", + "BIF_SECTION", "UDF_DATA", "MCS", "BIN", "SLR_NUM", "CLUSTER_NUM", + "DICE", "PARENT_ID", "ID_CODE", "EXT_ID_CODE", "BYPASS_IDCODE_CHECK", + "A_HWROT", "S_HWROT", "UNIQUE_ID", "PARENT_UNIQUE_ID", "FUNCTION_ID", + "IMAGE", "ID", "NAME", "DELAY_HANDOFF", "DELAY_LOAD", "COPY", "INCLUDE", + "DELAY_AUTH", "PARTITION", "PFILE", "METAHEADER", "WORD", "HEXWORD", + "FILENAME", "QFILENAME", "NONE", "DECVALUE", "HEXVALUE", + "KEYSRC_ENCRYPTION", "FSBL_CONFIG", "AUTH_PARAMS", "AUTHJTAG_CONFIG", + "DEVICE_DNA", "JTAG_TIMEOUT", "PUF4KMODE", "PUFROSWAP", "SHUTTER", + "SPLIT", "SMAP_WIDTH", "PUF_HELPER_FILE", "BH_KEY_FILE", "BH_KEY_IV", + "BH_KEK_IV", "BBRAM_KEK_IV", "EFUSE_KEK_IV", "EFUSE_USER_KEK0_IV", + "EFUSE_USER_KEK1_IV", "USER_KEYS", "PMCDATA", "BOOTIMAGE", "UDF_BH", + "INIT", "PMUFW_IMAGE", "AES_KEY_FILE", "FAMILY_KEY", "PPK_FILE", + "PSK_FILE", "SPK_FILE", "SSK_FILE", "SPK_SIGNATURE_FILE", + "BH_SIGNATURE_FILE", "HEADER_SIGNATURE_FILE", "AUTHVALUE", "ENCRVALUE", + "CHECKSUMVALUE", "POWNERVALUE", "PTYPEVALUE", "KEY_SRC", "CORE", + "BH_RSA", "AUTH_HASH", "INT_HASH", "PUFHD_LOC", "OPT_KEY", "AUTH_ONLY", + "BOOT_DEVICE_TYPE", "DEST_DEVICE_TYPE", "DEST_CPU_TYPE", + "EXCEPTION_LEVEL_TYPE", "TRUSTZONE_TYPE", "SPLITMODE", "DPA_CM", + "SPKSELECT", "OR", "XOR", "AND", "MULT", "DIVIDE", "MODULO", "PLUS", + "MINUS", "LSHIFT", "RSHIFT", "NEGATION", "LPAREN", "RPAREN", "ASTERISK", + "$accept", "bif", "group_list", "bifoptions", "$@1", "file_list", + "metahdr_spec", "$@2", "metahdr_attr_list", "metahdr_attr", "metahdr_blk", "metahdr_blk_attr", "new_pdi_spec", "image_spec", "image_list", "$@3", "image_content", "image_attributes_list", "image_attributes", "partition_spec", "partition_content", "other_spec", @@ -2139,88 +2202,90 @@ const BisonParser::rhs_number_type BisonParser::yyrhs_[] = { - 152, 0, -1, 153, -1, -1, 153, 154, -1, -1, - 76, 155, 7, 3, 156, 4, -1, -1, 156, 180, - -1, 156, 172, -1, 156, 164, -1, 156, 157, -1, - 156, 163, -1, 156, 182, -1, 156, 170, -1, -1, - 75, 3, 158, 159, 4, -1, 160, -1, 160, 5, - 159, -1, 160, 159, -1, -1, 17, 6, 199, -1, - 83, 6, 203, -1, 107, 6, 226, -1, 16, 6, - 198, -1, 109, 6, 226, -1, 110, 6, 226, -1, - 111, 6, 226, -1, 112, 6, 226, -1, 113, 6, - 226, -1, 52, 6, 226, -1, 40, 6, 234, -1, - 18, 6, 200, -1, 135, -1, 49, 6, 161, -1, - 126, -1, 162, -1, 162, 9, 161, -1, 234, -1, - 234, 148, 234, 149, -1, 234, 148, 150, 149, -1, - 68, 6, 234, -1, 58, 6, 234, -1, 59, 6, - 234, -1, 60, 6, 234, -1, 197, 6, 226, -1, - 83, 6, 203, -1, 20, 6, 202, -1, 165, -1, - 164, 165, -1, -1, 67, 3, 166, 167, 4, -1, - -1, 167, 168, -1, 167, 180, -1, 167, 170, -1, - 169, -1, 169, 5, 168, -1, 169, 168, -1, 68, - 6, 234, -1, 69, 6, 76, -1, 70, -1, 71, - -1, 72, 6, 234, -1, 20, 6, 202, -1, 64, - 6, 234, -1, 65, 6, 234, -1, 66, 6, 234, - -1, 73, 171, -1, 171, -1, -1, 171, 180, -1, - 171, 182, -1, 10, 83, 11, 203, -1, -1, 10, - 84, 173, 11, 176, -1, 84, 3, 176, 4, -1, - 22, 3, 174, 4, -1, 10, 22, 11, 212, -1, - 22, 6, 212, -1, 10, 85, 11, 221, -1, 10, - 91, 11, 223, -1, 10, 51, 11, 190, -1, 86, - 3, 177, 4, -1, 175, -1, 175, 5, 174, -1, - 212, -1, 25, 6, 234, -1, 179, -1, 179, 5, - 176, -1, 178, -1, 178, 5, 177, -1, 178, 177, - -1, 40, 6, 234, -1, 87, 6, 77, -1, 88, - 6, 234, -1, 204, -1, 205, -1, 207, -1, 208, - -1, 209, -1, 211, -1, 210, -1, 89, -1, 90, - 6, 234, -1, 206, -1, 92, 6, 234, -1, 61, - -1, 62, -1, 63, -1, -1, 10, 181, 186, 11, - 226, -1, 226, -1, -1, 3, 183, 184, 4, -1, - 187, -1, 185, -1, 185, 5, 184, -1, 187, 5, - 184, -1, 185, 184, -1, 187, 184, -1, 74, 6, - 226, -1, 68, 6, 234, -1, 20, 6, 193, -1, - 20, 6, 102, -1, 53, 6, 76, -1, 187, -1, - 187, 5, 186, -1, 193, -1, 196, -1, 216, -1, - 217, -1, 188, -1, 49, 6, 189, -1, 50, 6, - 192, -1, 195, -1, 195, 9, 189, -1, 191, -1, - 191, 5, 190, -1, 234, -1, 234, -1, 12, -1, - 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, - 48, -1, 14, -1, 15, -1, 13, -1, 105, -1, - 103, -1, 218, -1, 220, -1, 202, -1, 27, -1, - 27, 6, 133, -1, 234, -1, 234, 148, 234, 149, - -1, 234, 148, 150, 149, -1, 16, 6, 198, -1, - 17, 6, 199, -1, 18, 6, 200, -1, 19, 6, - 201, -1, 24, 6, 213, -1, 23, 6, 214, -1, - 26, 6, 215, -1, 107, 6, 226, -1, 109, 6, - 226, -1, 110, 6, 226, -1, 111, 6, 226, -1, - 112, 6, 226, -1, 38, 6, 222, -1, 37, 6, - 234, -1, 113, 6, 226, -1, 194, -1, 20, 6, - 202, -1, 83, 6, 203, -1, 40, 6, 234, -1, - 135, -1, 57, 6, 234, -1, 126, -1, 105, -1, - 218, -1, 96, -1, 97, -1, 98, -1, 99, -1, - 100, -1, 101, -1, 80, -1, 116, -1, 80, -1, - 117, -1, 80, -1, 118, -1, 119, -1, 120, -1, - 121, -1, 122, -1, 123, -1, 135, -1, 124, -1, - 125, -1, 126, -1, 127, -1, 128, -1, 129, -1, - 131, -1, 130, -1, 132, -1, 28, 6, 234, -1, - 29, 6, 234, -1, 30, 6, 234, -1, 31, 6, - 234, -1, 32, 6, 234, -1, 33, 6, 234, -1, - 34, -1, 35, -1, 21, 6, 234, -1, 52, 6, - 226, -1, 54, 6, 226, -1, 107, -1, 219, -1, - 113, -1, 114, -1, 115, -1, 94, -1, 93, -1, - 95, -1, 108, -1, 109, -1, 110, -1, 111, -1, - 112, -1, 106, -1, 102, -1, 104, -1, 36, 6, - 234, -1, 38, 6, 222, -1, 37, 6, 234, -1, - 39, -1, 221, 9, 221, -1, 136, -1, 41, 6, - 224, -1, 42, 6, 225, -1, 223, 5, 223, -1, - 134, -1, 55, -1, 56, -1, 78, -1, 79, -1, - 82, -1, 81, -1, 148, 234, 149, -1, 227, -1, - 143, 228, -1, 147, 228, -1, 228, -1, 229, 140, - 228, -1, 229, 141, 228, -1, 229, 142, 228, -1, - 229, -1, 230, 143, 229, -1, 230, 144, 229, -1, - 230, -1, 231, 145, 230, -1, 231, 146, 230, -1, - 231, -1, 232, 139, 231, -1, 232, -1, 233, 138, - 232, -1, 233, -1, 234, 137, 233, -1 + 158, 0, -1, 159, -1, -1, 159, 160, -1, 76, + 7, 232, -1, -1, 81, 161, 7, 3, 162, 4, + -1, -1, 162, 186, -1, 162, 178, -1, 162, 170, + -1, 162, 163, -1, 162, 169, -1, 162, 188, -1, + 162, 176, -1, -1, 80, 3, 164, 165, 4, -1, + 166, -1, 166, 5, 165, -1, 166, 165, -1, -1, + 18, 6, 205, -1, 88, 6, 209, -1, 113, 6, + 232, -1, 17, 6, 204, -1, 115, 6, 232, -1, + 116, 6, 232, -1, 117, 6, 232, -1, 118, 6, + 232, -1, 119, 6, 232, -1, 53, 6, 232, -1, + 41, 6, 240, -1, 19, 6, 206, -1, 141, -1, + 50, 6, 167, -1, 132, -1, 168, -1, 168, 9, + 167, -1, 240, -1, 240, 154, 240, 155, -1, 240, + 154, 156, 155, -1, 71, 6, 240, -1, 61, 6, + 240, -1, 62, 6, 240, -1, 63, 6, 240, -1, + 203, 6, 232, -1, 88, 6, 209, -1, 21, 6, + 208, -1, 171, -1, 170, 171, -1, -1, 70, 3, + 172, 173, 4, -1, -1, 173, 174, -1, 173, 186, + -1, 173, 176, -1, 175, -1, 175, 5, 174, -1, + 175, 174, -1, 71, 6, 240, -1, 72, 6, 81, + -1, 73, -1, 74, -1, 75, 6, 240, -1, 21, + 6, 208, -1, 67, 6, 240, -1, 68, 6, 240, + -1, 69, 6, 240, -1, 78, 177, -1, 177, -1, + -1, 177, 186, -1, 177, 188, -1, 10, 88, 11, + 209, -1, -1, 10, 89, 179, 11, 182, -1, 89, + 3, 182, 4, -1, 23, 3, 180, 4, -1, 10, + 23, 11, 218, -1, 23, 6, 218, -1, 10, 90, + 11, 227, -1, 10, 97, 11, 229, -1, 10, 52, + 11, 196, -1, 91, 3, 183, 4, -1, 181, -1, + 181, 5, 180, -1, 218, -1, 26, 6, 240, -1, + 185, -1, 185, 5, 182, -1, 184, -1, 184, 5, + 183, -1, 184, 183, -1, 41, 6, 240, -1, 92, + 6, 82, -1, 93, 6, 240, -1, 210, -1, 211, + -1, 213, -1, 214, -1, 215, -1, 217, -1, 216, + -1, 94, -1, 96, 6, 240, -1, 212, -1, 98, + 6, 240, -1, 64, -1, 65, -1, 66, -1, 95, + 6, 240, -1, 60, -1, -1, 10, 187, 192, 11, + 232, -1, 232, -1, -1, 3, 189, 190, 4, -1, + 193, -1, 191, -1, 191, 5, 190, -1, 193, 5, + 190, -1, 191, 190, -1, 193, 190, -1, 79, 6, + 232, -1, 71, 6, 240, -1, 21, 6, 199, -1, + 21, 6, 108, -1, 54, 6, 81, -1, 193, -1, + 193, 5, 192, -1, 199, -1, 202, -1, 222, -1, + 223, -1, 194, -1, 50, 6, 195, -1, 51, 6, + 198, -1, 201, -1, 201, 9, 195, -1, 197, -1, + 197, 5, 196, -1, 240, -1, 240, -1, 12, -1, + 44, -1, 45, -1, 46, -1, 47, -1, 48, -1, + 49, -1, 14, -1, 15, -1, 13, -1, 111, -1, + 109, -1, 224, -1, 226, -1, 208, -1, 16, -1, + 28, -1, 28, 6, 139, -1, 240, -1, 240, 154, + 240, 155, -1, 240, 154, 156, 155, -1, 17, 6, + 204, -1, 18, 6, 205, -1, 19, 6, 206, -1, + 20, 6, 207, -1, 25, 6, 219, -1, 24, 6, + 220, -1, 27, 6, 221, -1, 113, 6, 232, -1, + 115, 6, 232, -1, 116, 6, 232, -1, 117, 6, + 232, -1, 118, 6, 232, -1, 39, 6, 228, -1, + 38, 6, 240, -1, 119, 6, 232, -1, 200, -1, + 21, 6, 208, -1, 88, 6, 209, -1, 41, 6, + 240, -1, 141, -1, 58, 6, 240, -1, 59, 6, + 240, -1, 132, -1, 77, -1, 111, -1, 224, -1, + 102, -1, 103, -1, 104, -1, 105, -1, 106, -1, + 107, -1, 85, -1, 122, -1, 85, -1, 123, -1, + 85, -1, 124, -1, 125, -1, 126, -1, 127, -1, + 128, -1, 129, -1, 141, -1, 130, -1, 131, -1, + 132, -1, 133, -1, 134, -1, 135, -1, 137, -1, + 136, -1, 138, -1, 29, 6, 240, -1, 30, 6, + 240, -1, 31, 6, 240, -1, 32, 6, 240, -1, + 33, 6, 240, -1, 34, 6, 240, -1, 35, -1, + 36, -1, 22, 6, 240, -1, 53, 6, 232, -1, + 55, 6, 232, -1, 113, -1, 225, -1, 119, -1, + 120, -1, 121, -1, 100, -1, 99, -1, 101, -1, + 114, -1, 115, -1, 116, -1, 117, -1, 118, -1, + 112, -1, 108, -1, 110, -1, 37, 6, 240, -1, + 39, 6, 228, -1, 38, 6, 240, -1, 40, -1, + 227, 9, 227, -1, 142, -1, 42, 6, 230, -1, + 43, 6, 231, -1, 229, 5, 229, -1, 140, -1, + 56, -1, 57, -1, 83, -1, 84, -1, 87, -1, + 86, -1, 154, 240, 155, -1, 233, -1, 149, 234, + -1, 153, 234, -1, 234, -1, 235, 146, 234, -1, + 235, 147, 234, -1, 235, 148, 234, -1, 235, -1, + 236, 149, 235, -1, 236, 150, 235, -1, 236, -1, + 237, 151, 236, -1, 237, 152, 236, -1, 237, -1, + 238, 145, 237, -1, 238, -1, 239, 144, 238, -1, + 239, -1, 240, 143, 239, -1 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -2228,68 +2293,70 @@ const unsigned short int BisonParser::yyprhs_[] = { - 0, 0, 3, 5, 6, 9, 10, 17, 18, 21, - 24, 27, 30, 33, 36, 39, 40, 46, 48, 52, - 55, 56, 60, 64, 68, 72, 76, 80, 84, 88, - 92, 96, 100, 104, 106, 110, 112, 114, 118, 120, - 125, 130, 134, 138, 142, 146, 150, 154, 158, 160, - 163, 164, 170, 171, 174, 177, 180, 182, 186, 189, - 193, 197, 199, 201, 205, 209, 213, 217, 221, 224, - 226, 227, 230, 233, 238, 239, 245, 250, 255, 260, - 264, 269, 274, 279, 284, 286, 290, 292, 296, 298, - 302, 304, 308, 311, 315, 319, 323, 325, 327, 329, - 331, 333, 335, 337, 339, 343, 345, 349, 351, 353, - 355, 356, 362, 364, 365, 370, 372, 374, 378, 382, - 385, 388, 392, 396, 400, 404, 408, 410, 414, 416, - 418, 420, 422, 424, 428, 432, 434, 438, 440, 444, - 446, 448, 450, 452, 454, 456, 458, 460, 462, 464, - 466, 468, 470, 472, 474, 476, 478, 480, 484, 486, - 491, 496, 500, 504, 508, 512, 516, 520, 524, 528, - 532, 536, 540, 544, 548, 552, 556, 558, 562, 566, - 570, 572, 576, 578, 580, 582, 584, 586, 588, 590, - 592, 594, 596, 598, 600, 602, 604, 606, 608, 610, - 612, 614, 616, 618, 620, 622, 624, 626, 628, 630, - 632, 634, 636, 640, 644, 648, 652, 656, 660, 662, - 664, 668, 672, 676, 678, 680, 682, 684, 686, 688, - 690, 692, 694, 696, 698, 700, 702, 704, 706, 708, - 712, 716, 720, 722, 726, 728, 732, 736, 740, 742, - 744, 746, 748, 750, 752, 754, 758, 760, 763, 766, - 768, 772, 776, 780, 782, 786, 790, 792, 796, 800, - 802, 806, 808, 812, 814 + 0, 0, 3, 5, 6, 9, 13, 14, 21, 22, + 25, 28, 31, 34, 37, 40, 43, 44, 50, 52, + 56, 59, 60, 64, 68, 72, 76, 80, 84, 88, + 92, 96, 100, 104, 108, 110, 114, 116, 118, 122, + 124, 129, 134, 138, 142, 146, 150, 154, 158, 162, + 164, 167, 168, 174, 175, 178, 181, 184, 186, 190, + 193, 197, 201, 203, 205, 209, 213, 217, 221, 225, + 228, 230, 231, 234, 237, 242, 243, 249, 254, 259, + 264, 268, 273, 278, 283, 288, 290, 294, 296, 300, + 302, 306, 308, 312, 315, 319, 323, 327, 329, 331, + 333, 335, 337, 339, 341, 343, 347, 349, 353, 355, + 357, 359, 363, 365, 366, 372, 374, 375, 380, 382, + 384, 388, 392, 395, 398, 402, 406, 410, 414, 418, + 420, 424, 426, 428, 430, 432, 434, 438, 442, 444, + 448, 450, 454, 456, 458, 460, 462, 464, 466, 468, + 470, 472, 474, 476, 478, 480, 482, 484, 486, 488, + 490, 492, 496, 498, 503, 508, 512, 516, 520, 524, + 528, 532, 536, 540, 544, 548, 552, 556, 560, 564, + 568, 570, 574, 578, 582, 584, 588, 592, 594, 596, + 598, 600, 602, 604, 606, 608, 610, 612, 614, 616, + 618, 620, 622, 624, 626, 628, 630, 632, 634, 636, + 638, 640, 642, 644, 646, 648, 650, 652, 654, 658, + 662, 666, 670, 674, 678, 680, 682, 686, 690, 694, + 696, 698, 700, 702, 704, 706, 708, 710, 712, 714, + 716, 718, 720, 722, 724, 726, 730, 734, 738, 740, + 744, 746, 750, 754, 758, 760, 762, 764, 766, 768, + 770, 772, 776, 778, 781, 784, 786, 790, 794, 798, + 800, 804, 808, 810, 814, 818, 820, 824, 826, 830, + 832 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ const unsigned short int BisonParser::yyrline_[] = { - 0, 196, 196, 198, 199, 202, 202, 208, 209, 210, - 211, 212, 213, 214, 215, 218, 218, 223, 224, 225, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 247, 248, 251, 253, - 255, 259, 260, 261, 262, 263, 264, 265, 268, 269, - 272, 272, 276, 277, 278, 279, 282, 283, 284, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 299, 300, - 303, 304, 305, 308, 311, 311, 314, 315, 316, 321, - 322, 323, 324, 325, 328, 329, 332, 333, 336, 337, - 340, 341, 342, 345, 346, 347, 350, 353, 355, 357, - 359, 361, 363, 365, 367, 369, 375, 379, 380, 381, - 384, 384, 391, 397, 397, 403, 404, 405, 406, 407, - 408, 411, 414, 415, 416, 417, 422, 423, 426, 427, - 428, 429, 430, 433, 434, 437, 438, 441, 442, 445, - 450, 452, 453, 454, 455, 456, 457, 458, 459, 460, - 461, 464, 465, 466, 467, 468, 471, 472, 475, 476, - 477, 479, 480, 481, 482, 483, 484, 485, 486, 487, - 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, - 498, 499, 500, 503, 504, 505, 506, 507, 508, 509, - 510, 513, 514, 517, 518, 521, 522, 525, 528, 531, - 534, 537, 540, 543, 546, 549, 552, 555, 558, 561, - 564, 567, 570, 571, 572, 573, 574, 575, 576, 577, - 578, 581, 582, 585, 586, 587, 588, 589, 590, 591, - 592, 593, 596, 597, 598, 599, 602, 603, 604, 607, - 610, 613, 616, 619, 622, 625, 628, 629, 632, 635, - 638, 644, 645, 648, 649, 650, 656, 657, 658, 662, - 663, 664, 665, 668, 669, 670, 673, 674, 675, 678, - 679, 682, 683, 687, 688 + 0, 196, 196, 198, 199, 202, 203, 203, 209, 210, + 211, 212, 213, 214, 215, 216, 219, 219, 224, 225, + 226, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 248, 249, 252, + 254, 256, 260, 261, 262, 263, 264, 265, 266, 269, + 270, 273, 273, 277, 278, 279, 280, 283, 284, 285, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 299, + 300, 303, 304, 305, 308, 311, 311, 314, 315, 316, + 321, 322, 323, 324, 325, 328, 329, 332, 333, 336, + 337, 340, 341, 342, 345, 346, 347, 350, 353, 355, + 357, 359, 361, 363, 365, 367, 369, 375, 379, 380, + 381, 382, 387, 394, 394, 401, 407, 407, 413, 414, + 415, 416, 417, 418, 421, 424, 425, 426, 427, 432, + 433, 436, 437, 438, 439, 440, 443, 444, 447, 448, + 451, 452, 455, 460, 462, 463, 464, 465, 466, 467, + 468, 469, 470, 471, 474, 475, 476, 477, 478, 479, + 482, 483, 486, 487, 488, 490, 491, 492, 493, 494, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 516, + 517, 518, 519, 520, 521, 522, 523, 526, 527, 530, + 531, 534, 535, 538, 541, 544, 547, 550, 553, 556, + 559, 562, 565, 568, 571, 574, 577, 580, 583, 584, + 585, 586, 587, 588, 589, 590, 591, 594, 595, 598, + 599, 600, 601, 602, 603, 604, 605, 606, 609, 610, + 611, 612, 615, 616, 617, 620, 623, 626, 629, 632, + 635, 638, 641, 642, 645, 648, 651, 657, 658, 661, + 662, 663, 669, 670, 671, 675, 676, 677, 678, 681, + 682, 683, 686, 687, 688, 691, 692, 695, 696, 700, + 701 }; // Print the state stack on the debug stream. @@ -2369,7 +2436,8 @@ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150 + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -2378,24 +2446,24 @@ } const int BisonParser::yyeof_ = 0; - const int BisonParser::yylast_ = 907; + const int BisonParser::yylast_ = 952; const int BisonParser::yynnts_ = 84; const int BisonParser::yyempty_ = -2; const int BisonParser::yyfinal_ = 3; const int BisonParser::yyterror_ = 1; const int BisonParser::yyerrcode_ = 256; - const int BisonParser::yyntokens_ = 151; + const int BisonParser::yyntokens_ = 157; - const unsigned int BisonParser::yyuser_token_number_max_ = 405; + const unsigned int BisonParser::yyuser_token_number_max_ = 411; const BisonParser::token_number_type BisonParser::yyundef_token_ = 2; /* Line 1141 of lalr1.cc */ #line 23 "../s/bif.y" } // BIF /* Line 1141 of lalr1.cc */ -#line 2397 "../bisonflex/bif.tab.cpp" +#line 2465 "../bisonflex/bif.tab.cpp" /* Line 1142 of lalr1.cc */ -#line 693 "../s/bif.y" +#line 706 "../s/bif.y" void BIF::BisonParser::error(const BIF::BisonParser::location_type &loc, const std::string &msg) { Parsing::Error(loc,msg); diff -Nru xilinx-bootgen-2022.1/bif.tab.hpp xilinx-bootgen-2022.2/bif.tab.hpp --- xilinx-bootgen-2022.1/bif.tab.hpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bif.tab.hpp 2022-09-26 06:24:42.000000000 +0000 @@ -137,141 +137,147 @@ XIP_MODE = 268, EARLY_HANDOFF = 269, HIVEC = 270, - AUTHENTICATION = 271, - ENCRYPTION = 272, - CHECKSUM = 273, - PARTITION_OWNER = 274, - PARTITION_TYPE = 275, - PARTITION_NUM = 276, - BOOT_DEVICE = 277, - DEST_DEVICE = 278, - DEST_CPU = 279, - ADDRESS = 280, - EXCEPTION_LEVEL = 281, - TRUSTZONE = 282, - ALIGNMENT = 283, - OFFSET = 284, - RESERVE_LEGACY = 285, - RESERVE = 286, - LOAD = 287, - STARTUP = 288, - BIGENDIAN = 289, - A32_MODE = 290, - PPK_SELECT = 291, - SPK_ID = 292, - SPK_SELECT = 293, - HEADER_AUTH = 294, - REVOKE_ID = 295, - SPLIT_MODE = 296, - SPLIT_FMT = 297, - BOOT = 298, - USER = 299, - STATIC = 300, - NOAUTOSTART = 301, - MULTIBOOT = 302, - PROTECTED = 303, - BLOCKS = 304, - AUTHBLOCKS = 305, - BOOTVECTORS = 306, - PRESIGN = 307, - BIF_SECTION = 308, - UDF_DATA = 309, - MCS = 310, - BIN = 311, - SLR_NUM = 312, - PARENT_ID = 313, - ID_CODE = 314, - EXT_ID_CODE = 315, - BYPASS_IDCODE_CHECK = 316, - A_HWROT = 317, - S_HWROT = 318, - UNIQUE_ID = 319, - PARENT_UNIQUE_ID = 320, - FUNCTION_ID = 321, - IMAGE = 322, - ID = 323, - NAME = 324, - DELAY_HANDOFF = 325, - DELAY_LOAD = 326, - COPY = 327, - PARTITION = 328, - PFILE = 329, - METAHEADER = 330, - WORD = 331, - HEXWORD = 332, - FILENAME = 333, - QFILENAME = 334, - NONE = 335, - DECVALUE = 336, - HEXVALUE = 337, - KEYSRC_ENCRYPTION = 338, - FSBL_CONFIG = 339, - AUTH_PARAMS = 340, - AUTHJTAG_CONFIG = 341, - DEVICE_DNA = 342, - JTAG_TIMEOUT = 343, - PUF4KMODE = 344, - SHUTTER = 345, - SPLIT = 346, - SMAP_WIDTH = 347, - PUF_HELPER_FILE = 348, - BH_KEY_FILE = 349, - BH_KEY_IV = 350, - BH_KEK_IV = 351, - BBRAM_KEK_IV = 352, - EFUSE_KEK_IV = 353, - EFUSE_USER_KEK0_IV = 354, - EFUSE_USER_KEK1_IV = 355, - USER_KEYS = 356, - PMCDATA = 357, - BOOTIMAGE = 358, - UDF_BH = 359, - INIT = 360, - PMUFW_IMAGE = 361, - AES_KEY_FILE = 362, - FAMILY_KEY = 363, - PPK_FILE = 364, - PSK_FILE = 365, - SPK_FILE = 366, - SSK_FILE = 367, - SPK_SIGNATURE_FILE = 368, - BH_SIGNATURE_FILE = 369, - HEADER_SIGNATURE_FILE = 370, - AUTHVALUE = 371, - ENCRVALUE = 372, - CHECKSUMVALUE = 373, - POWNERVALUE = 374, - PTYPEVALUE = 375, - KEY_SRC = 376, - CORE = 377, - BH_RSA = 378, - AUTH_HASH = 379, - INT_HASH = 380, - PUFHD_LOC = 381, - OPT_KEY = 382, - AUTH_ONLY = 383, - BOOT_DEVICE_TYPE = 384, - DEST_DEVICE_TYPE = 385, - DEST_CPU_TYPE = 386, - EXCEPTION_LEVEL_TYPE = 387, - TRUSTZONE_TYPE = 388, - SPLITMODE = 389, - DPA_CM = 390, - SPKSELECT = 391, - OR = 392, - XOR = 393, - AND = 394, - MULT = 395, - DIVIDE = 396, - MODULO = 397, - PLUS = 398, - MINUS = 399, - LSHIFT = 400, - RSHIFT = 401, - NEGATION = 402, - LPAREN = 403, - RPAREN = 404, - ASTERISK = 405 + LOCKSTEP = 271, + AUTHENTICATION = 272, + ENCRYPTION = 273, + CHECKSUM = 274, + PARTITION_OWNER = 275, + PARTITION_TYPE = 276, + PARTITION_NUM = 277, + BOOT_DEVICE = 278, + DEST_DEVICE = 279, + DEST_CPU = 280, + ADDRESS = 281, + EXCEPTION_LEVEL = 282, + TRUSTZONE = 283, + ALIGNMENT = 284, + OFFSET = 285, + RESERVE_LEGACY = 286, + RESERVE = 287, + LOAD = 288, + STARTUP = 289, + BIGENDIAN = 290, + A32_MODE = 291, + PPK_SELECT = 292, + SPK_ID = 293, + SPK_SELECT = 294, + HEADER_AUTH = 295, + REVOKE_ID = 296, + SPLIT_MODE = 297, + SPLIT_FMT = 298, + BOOT = 299, + USER = 300, + STATIC = 301, + NOAUTOSTART = 302, + MULTIBOOT = 303, + PROTECTED = 304, + BLOCKS = 305, + AUTHBLOCKS = 306, + BOOTVECTORS = 307, + PRESIGN = 308, + BIF_SECTION = 309, + UDF_DATA = 310, + MCS = 311, + BIN = 312, + SLR_NUM = 313, + CLUSTER_NUM = 314, + DICE = 315, + PARENT_ID = 316, + ID_CODE = 317, + EXT_ID_CODE = 318, + BYPASS_IDCODE_CHECK = 319, + A_HWROT = 320, + S_HWROT = 321, + UNIQUE_ID = 322, + PARENT_UNIQUE_ID = 323, + FUNCTION_ID = 324, + IMAGE = 325, + ID = 326, + NAME = 327, + DELAY_HANDOFF = 328, + DELAY_LOAD = 329, + COPY = 330, + INCLUDE = 331, + DELAY_AUTH = 332, + PARTITION = 333, + PFILE = 334, + METAHEADER = 335, + WORD = 336, + HEXWORD = 337, + FILENAME = 338, + QFILENAME = 339, + NONE = 340, + DECVALUE = 341, + HEXVALUE = 342, + KEYSRC_ENCRYPTION = 343, + FSBL_CONFIG = 344, + AUTH_PARAMS = 345, + AUTHJTAG_CONFIG = 346, + DEVICE_DNA = 347, + JTAG_TIMEOUT = 348, + PUF4KMODE = 349, + PUFROSWAP = 350, + SHUTTER = 351, + SPLIT = 352, + SMAP_WIDTH = 353, + PUF_HELPER_FILE = 354, + BH_KEY_FILE = 355, + BH_KEY_IV = 356, + BH_KEK_IV = 357, + BBRAM_KEK_IV = 358, + EFUSE_KEK_IV = 359, + EFUSE_USER_KEK0_IV = 360, + EFUSE_USER_KEK1_IV = 361, + USER_KEYS = 362, + PMCDATA = 363, + BOOTIMAGE = 364, + UDF_BH = 365, + INIT = 366, + PMUFW_IMAGE = 367, + AES_KEY_FILE = 368, + FAMILY_KEY = 369, + PPK_FILE = 370, + PSK_FILE = 371, + SPK_FILE = 372, + SSK_FILE = 373, + SPK_SIGNATURE_FILE = 374, + BH_SIGNATURE_FILE = 375, + HEADER_SIGNATURE_FILE = 376, + AUTHVALUE = 377, + ENCRVALUE = 378, + CHECKSUMVALUE = 379, + POWNERVALUE = 380, + PTYPEVALUE = 381, + KEY_SRC = 382, + CORE = 383, + BH_RSA = 384, + AUTH_HASH = 385, + INT_HASH = 386, + PUFHD_LOC = 387, + OPT_KEY = 388, + AUTH_ONLY = 389, + BOOT_DEVICE_TYPE = 390, + DEST_DEVICE_TYPE = 391, + DEST_CPU_TYPE = 392, + EXCEPTION_LEVEL_TYPE = 393, + TRUSTZONE_TYPE = 394, + SPLITMODE = 395, + DPA_CM = 396, + SPKSELECT = 397, + OR = 398, + XOR = 399, + AND = 400, + MULT = 401, + DIVIDE = 402, + MODULO = 403, + PLUS = 404, + MINUS = 405, + LSHIFT = 406, + RSHIFT = 407, + NEGATION = 408, + LPAREN = 409, + RPAREN = 410, + ASTERISK = 411 }; }; @@ -448,7 +454,7 @@ #line 23 "../s/bif.y" } // BIF /* Line 33 of lalr1.cc */ -#line 452 "../bisonflex/bif.tab.hpp" +#line 458 "../bisonflex/bif.tab.hpp" diff -Nru xilinx-bootgen-2022.1/bif.y xilinx-bootgen-2022.2/bif.y --- xilinx-bootgen-2022.1/bif.y 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bif.y 2022-09-26 06:24:42.000000000 +0000 @@ -101,7 +101,7 @@ %token OBRACE EBRACE %token COMMA EQUAL COLON QUOTE SEMICOLON %token OBRACKET EBRACKET -%token BOOTLOADER XIP_MODE EARLY_HANDOFF HIVEC +%token BOOTLOADER XIP_MODE EARLY_HANDOFF HIVEC LOCKSTEP %token AUTHENTICATION ENCRYPTION CHECKSUM %token PARTITION_OWNER PARTITION_TYPE PARTITION_NUM %token BOOT_DEVICE DEST_DEVICE DEST_CPU ADDRESS @@ -114,9 +114,9 @@ %token PRESIGN BIF_SECTION %token UDF_DATA %token MCS BIN -%token SLR_NUM +%token SLR_NUM CLUSTER_NUM DICE %token PARENT_ID ID_CODE EXT_ID_CODE BYPASS_IDCODE_CHECK A_HWROT S_HWROT UNIQUE_ID PARENT_UNIQUE_ID FUNCTION_ID -%token IMAGE ID NAME DELAY_HANDOFF DELAY_LOAD COPY +%token IMAGE ID NAME DELAY_HANDOFF DELAY_LOAD COPY INCLUDE DELAY_AUTH %token PARTITION PFILE %token METAHEADER %token WORD HEXWORD @@ -125,7 +125,7 @@ %token DECVALUE HEXVALUE %token KEYSRC_ENCRYPTION FSBL_CONFIG AUTH_PARAMS %token AUTHJTAG_CONFIG DEVICE_DNA JTAG_TIMEOUT -%token PUF4KMODE SHUTTER SPLIT SMAP_WIDTH +%token PUF4KMODE PUFROSWAP SHUTTER SPLIT SMAP_WIDTH %token PUF_HELPER_FILE BH_KEY_FILE BH_KEY_IV %token BH_KEK_IV BBRAM_KEK_IV EFUSE_KEK_IV EFUSE_USER_KEK0_IV EFUSE_USER_KEK1_IV USER_KEYS %token PMCDATA BOOTIMAGE UDF_BH INIT PMUFW_IMAGE @@ -199,7 +199,8 @@ | group_list bifoptions ; -bifoptions : WORD { currentBifOptions = new BifOptions(options.GetArchType(),$1); } +bifoptions : INCLUDE COLON filename { options.includeBifOptionsList.push_back($3); } + | WORD { currentBifOptions = new BifOptions(options.GetArchType(),$1); } COLON OBRACE file_list EBRACE { options.bifOptions = currentBifOptions; options.bifOptionsList.push_back(currentBifOptions); } @@ -216,7 +217,7 @@ ; metahdr_spec : METAHEADER OBRACE { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); } + currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); } metahdr_attr_list EBRACE ; @@ -227,7 +228,7 @@ metahdr_attr : /* empty */ | ENCRYPTION EQUAL encrvalue { currentBifOptions->SetMetaHeaderEncryptType($3); } - | KEYSRC_ENCRYPTION EQUAL key_src { currentBifOptions->SetMetaHeaderEncryptionKeySource($3); } + | KEYSRC_ENCRYPTION EQUAL key_src { currentBifOptions->SetMetaHeaderEncryptionKeySource($3, options.IsVersalNetSeries()); } | AES_KEY_FILE EQUAL filename { currentBifOptions->metaHdrAttributes.encrKeyFile = $3; } | AUTHENTICATION EQUAL authvalue { currentBifOptions->SetMetaHeaderAuthType($3); } | PPK_FILE EQUAL filename { currentBifOptions->metaHdrAttributes.ppk = $3; } @@ -293,7 +294,6 @@ | UNIQUE_ID EQUAL expression { currentImageBifOptions->SetUniqueId($3); } | PARENT_UNIQUE_ID EQUAL expression { currentImageBifOptions->SetParentUniqueId($3); } | FUNCTION_ID EQUAL expression { currentImageBifOptions->SetFunctionId($3); } - ; partition_spec : PARTITION partition_content @@ -379,23 +379,33 @@ | BYPASS_IDCODE_CHECK { currentBifOptions->SetBypassIdcodeFlag(true); } | A_HWROT { currentBifOptions->SetAHwRoTFlag(true); } | S_HWROT { currentBifOptions->SetSHwRoTFlag(true); } + | PUFROSWAP EQUAL expression { if(options.GetArchType() == Arch::VERSAL && options.IsVersalNetSeries()) + currentBifOptions->SetPufRingOscilltorSwapConfigValue($3); + else + LOG_ERROR("BIF attribute error !!!\n\t 'puf_ro_swap' is supported only in VersalNet architecture"); + } + | DICE { if(options.GetArchType() == Arch::VERSAL && options.IsVersalNetSeries()) + currentBifOptions->SetDiceEnable(); + else + LOG_ERROR("BIF attribute error !!!\n\t 'dice_enable' is supported only in VersalNet architecture"); + } ; file_spec : OBRACKET { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); } + currentPartitionBifOptions->SetArchType(options.GetArchType(),options.IsVersalNetSeries()); } attribute_list EBRACKET filename { currentPartitionBifOptions->filename = $5; currentPartitionBifOptions->filelist.push_back($5); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); } | filename { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); + currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); currentPartitionBifOptions->filename = $1; currentPartitionBifOptions->filelist.push_back($1); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); }; new_file_spec : OBRACE { currentPartitionBifOptions = new PartitionBifOptions(); - currentPartitionBifOptions->SetArchType(options.GetArchType()); } + currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); } new_attribute_list EBRACE ; @@ -414,8 +424,8 @@ | ID EQUAL expression { currentPartitionBifOptions->partitionId = $3; } | PARTITION_TYPE EQUAL boolattr | PARTITION_TYPE EQUAL PMCDATA { currentPartitionBifOptions->fileType = $3; } - | BIF_SECTION EQUAL WORD { currentPartitionBifOptions->bifSection = $3; - currentPartitionBifOptions->filename = currentPartitionBifOptions->GetOutputFileFromBifSection(options.GetOutputFileNames().front(), $3); + | BIF_SECTION EQUAL WORD { currentPartitionBifOptions->bifSection = $3; + currentPartitionBifOptions->filename = currentPartitionBifOptions->GetOutputFileFromBifSection(options.GetOutputFileNames().front(), $3, currentImageBifOptions->GetImageType()); currentBifOptions->Add(currentPartitionBifOptions, currentImageBifOptions); } ; @@ -466,6 +476,7 @@ | key_file { currentPartitionBifOptions->fileType = $1; } | other_files { currentPartitionBifOptions->fileType = $1; } | ptypevalue { currentPartitionBifOptions->SetPartitionType($1); } + | LOCKSTEP { currentPartitionBifOptions->SetLockStepFlag();} ; trustzone_type : TRUSTZONE { currentPartitionBifOptions->SetTrustZone(::TrustZone::Secure); } @@ -497,7 +508,9 @@ | REVOKE_ID EQUAL expression { currentPartitionBifOptions->SetRevokeId($3); } | DPA_CM { currentPartitionBifOptions->SetDpaCM(DpaCM::DpaCMEnable); } | SLR_NUM EQUAL expression { currentPartitionBifOptions->SetSlrNum($3); } + | CLUSTER_NUM EQUAL expression { currentPartitionBifOptions->SetClusterNum($3); } | PUFHD_LOC { currentPartitionBifOptions->SetPufHdLocation(PufHdLoc::PUFinBH); } + | DELAY_AUTH { currentPartitionBifOptions->SetDelayAuth(true); } ; other_file_attr : INIT diff -Nru xilinx-bootgen-2022.1/bif.yy.cpp xilinx-bootgen-2022.2/bif.yy.cpp --- xilinx-bootgen-2022.1/bif.yy.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bif.yy.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -406,8 +406,8 @@ (yy_c_buf_p) = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 247 -#define YY_END_OF_BUFFER 248 +#define YY_NUM_RULES 262 +#define YY_END_OF_BUFFER 263 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -415,130 +415,136 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[1111] = +static yyconst flex_int16_t yy_accept[1171] = { 0, - 0, 0, 248, 246, 243, 244, 245, 246, 235, 237, - 226, 227, 228, 229, 221, 230, 241, 234, 215, 215, - 218, 219, 246, 220, 246, 217, 240, 222, 223, 239, - 240, 217, 217, 217, 217, 217, 217, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 224, 238, 225, 236, 243, 244, 0, 0, - 241, 1, 241, 215, 217, 241, 231, 232, 217, 0, - 240, 217, 217, 240, 217, 217, 217, 240, 240, 240, - 217, 240, 240, 240, 240, 240, 217, 217, 240, 240, - 217, 240, 217, 217, 217, 240, 240, 240, 240, 217, - - 240, 240, 240, 240, 240, 240, 48, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 185, 240, - 240, 240, 184, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 242, 0, 0, - 2, 241, 216, 0, 217, 240, 217, 240, 240, 217, - 68, 182, 240, 240, 240, 240, 240, 240, 211, 240, - 240, 240, 88, 90, 240, 240, 240, 240, 240, 240, - 240, 240, 217, 240, 241, 240, 240, 240, 240, 240, - - 240, 209, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 210, 75, 240, 151, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 32, 84, 82, 180, 240, 240, 240, 240, 181, 240, - 240, 241, 240, 89, 240, 240, 70, 240, 240, 158, - 241, 148, 149, 240, 240, 240, 240, 196, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 56, 152, 240, - 187, 0, 241, 240, 241, 240, 241, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 7, 240, 241, 240, 30, 166, 240, 240, 240, - - 240, 240, 240, 240, 189, 190, 191, 192, 240, 240, - 240, 240, 240, 50, 80, 240, 240, 240, 240, 240, - 33, 240, 240, 240, 29, 240, 241, 163, 206, 240, - 49, 147, 240, 241, 67, 240, 240, 240, 240, 156, - 240, 240, 240, 154, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 177, 178, 241, 240, 240, - 240, 240, 240, 155, 241, 241, 241, 240, 240, 76, - 77, 240, 240, 241, 157, 241, 240, 240, 240, 240, - 240, 240, 240, 240, 87, 240, 240, 8, 240, 167, - 170, 173, 175, 240, 169, 172, 174, 176, 240, 168, - - 171, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 98, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 241, 240, 240, 240, 240, 240, 240, - 71, 97, 240, 240, 240, 240, 240, 240, 240, 240, - 17, 240, 23, 240, 240, 240, 240, 241, 241, 240, - 240, 241, 240, 240, 240, 240, 79, 240, 240, 240, - 186, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 241, 240, 240, 240, 240, 240, 150, 241, 241, - 240, 240, 240, 240, 241, 241, 241, 240, 241, 240, - 240, 240, 240, 205, 240, 240, 240, 240, 81, 240, - - 240, 241, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 18, 240, - 240, 240, 240, 240, 240, 241, 240, 240, 240, 240, - 240, 240, 241, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 96, 240, 240, 241, 241, - 240, 240, 241, 241, 240, 208, 26, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 146, 145, 241, 240, 240, 240, 240, 240, 241, 241, - 241, 240, 194, 240, 240, 241, 241, 241, 240, 241, - - 202, 240, 240, 240, 240, 240, 9, 240, 34, 240, - 241, 240, 240, 240, 126, 128, 127, 129, 141, 240, - 144, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 91, 240, 240, - 240, 240, 240, 240, 240, 241, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 46, 240, 240, 240, 121, 240, 162, 241, 240, 240, - 85, 83, 240, 135, 240, 240, 54, 240, 240, 36, - 4, 240, 37, 240, 240, 240, 241, 130, 240, 28, - - 240, 142, 241, 159, 160, 25, 137, 240, 241, 241, - 241, 240, 241, 240, 38, 240, 39, 31, 240, 240, - 241, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 74, 240, 240, 240, 240, 240, 240, 241, 241, - 240, 240, 240, 240, 240, 240, 153, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 164, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 52, - 133, 241, 240, 240, 240, 241, 240, 92, 241, 241, - - 240, 241, 240, 240, 240, 5, 241, 240, 64, 6, - 240, 240, 13, 134, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 60, 55, 240, 240, - 240, 240, 240, 44, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 241, 241, 240, 240, 240, 240, 240, - 240, 240, 240, 65, 240, 240, 240, 240, 240, 240, - 240, 240, 11, 240, 195, 45, 240, 22, 240, 240, - 12, 136, 241, 125, 240, 204, 161, 207, 241, 94, - 240, 200, 240, 240, 193, 241, 107, 108, 109, 110, - 111, 112, 113, 114, 240, 35, 240, 240, 19, 240, - - 240, 240, 240, 240, 240, 240, 106, 105, 51, 240, - 20, 240, 240, 3, 240, 240, 240, 16, 240, 213, - 240, 240, 72, 73, 240, 240, 240, 240, 240, 66, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 24, - 240, 57, 240, 240, 198, 241, 240, 93, 139, 199, - 240, 201, 240, 197, 240, 240, 240, 240, 240, 240, - 240, 240, 41, 123, 143, 43, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 122, 58, - 203, 240, 240, 240, 240, 10, 240, 240, 53, 179, - 240, 240, 21, 240, 240, 240, 240, 240, 59, 240, - - 240, 240, 240, 240, 138, 240, 240, 240, 61, 240, - 240, 240, 240, 240, 240, 240, 124, 214, 240, 240, - 240, 240, 40, 240, 240, 240, 103, 104, 102, 240, - 240, 15, 240, 240, 14, 100, 101, 99, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 69, - 240, 131, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 86, 27, 240, 212, 240, 165, - 240, 240, 240, 240, 240, 115, 118, 188, 240, 42, - 240, 78, 132, 240, 240, 240, 240, 240, 240, 47, - 240, 240, 240, 240, 240, 240, 240, 95, 240, 183, - - 240, 240, 62, 63, 140, 116, 119, 117, 120, 0 + 0, 0, 263, 261, 258, 259, 260, 261, 250, 252, + 241, 242, 243, 244, 236, 245, 256, 249, 230, 230, + 233, 234, 261, 235, 261, 232, 255, 237, 238, 254, + 255, 232, 232, 232, 232, 232, 232, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 239, 253, 240, 251, 258, 259, 0, 0, + 256, 1, 256, 230, 232, 256, 246, 247, 232, 0, + 255, 232, 232, 255, 232, 232, 232, 255, 255, 255, + 232, 255, 255, 255, 255, 255, 232, 232, 255, 255, + 255, 232, 255, 255, 232, 232, 232, 255, 255, 255, + + 255, 232, 255, 255, 255, 255, 255, 255, 51, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 200, 255, 255, 255, 199, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 257, + 0, 0, 2, 256, 231, 0, 232, 255, 232, 232, + 255, 255, 232, 71, 196, 255, 255, 255, 255, 255, + 255, 226, 255, 255, 255, 91, 93, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 232, 255, 256, + + 100, 255, 255, 255, 255, 255, 255, 224, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 225, 78, 255, 159, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 35, 87, + 85, 194, 255, 255, 255, 255, 195, 255, 255, 256, + 255, 255, 92, 255, 255, 73, 255, 255, 166, 256, + 156, 157, 255, 255, 255, 255, 211, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 59, 160, 255, 202, + 0, 256, 255, 256, 255, 256, 256, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + + 255, 7, 255, 256, 255, 255, 33, 174, 255, 255, + 255, 255, 255, 255, 255, 255, 204, 205, 206, 207, + 255, 255, 255, 255, 255, 53, 83, 255, 255, 255, + 255, 255, 255, 36, 255, 255, 255, 32, 255, 255, + 256, 171, 221, 255, 52, 155, 255, 256, 70, 255, + 255, 255, 255, 164, 255, 255, 255, 162, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 189, + 191, 256, 256, 255, 255, 255, 255, 255, 163, 256, + 256, 256, 255, 255, 79, 80, 255, 255, 256, 165, + 256, 255, 255, 255, 255, 255, 255, 255, 255, 90, + + 255, 255, 8, 255, 175, 179, 183, 186, 255, 178, + 182, 185, 188, 255, 176, 180, 177, 181, 184, 187, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 104, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 256, 255, 255, 255, 255, 255, 255, 255, + 255, 74, 103, 255, 255, 255, 255, 255, 255, 255, + 255, 18, 255, 24, 255, 255, 255, 255, 255, 255, + 256, 256, 255, 255, 256, 255, 255, 255, 255, 82, + 255, 255, 255, 201, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 256, 190, 192, 255, 255, + + 255, 255, 255, 158, 256, 256, 255, 255, 255, 255, + 256, 256, 256, 255, 256, 255, 255, 255, 255, 220, + 255, 255, 255, 255, 84, 255, 255, 256, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 19, 255, 255, 255, 255, 255, + 255, 256, 255, 255, 255, 255, 255, 255, 255, 255, + 256, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 102, 255, 255, 255, 256, 256, + 255, 255, 256, 256, 255, 223, 29, 255, 255, 255, + + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 154, 153, 256, 255, 255, 255, 255, 255, 256, + 256, 256, 255, 209, 255, 255, 256, 256, 256, 255, + 256, 217, 255, 255, 255, 255, 255, 9, 255, 37, + 255, 256, 255, 255, 255, 132, 134, 133, 135, 149, + 255, 152, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 94, 255, + 197, 255, 255, 255, 255, 255, 255, 255, 255, 256, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + + 255, 255, 255, 255, 49, 255, 28, 255, 255, 127, + 255, 255, 170, 256, 255, 255, 88, 86, 255, 141, + 255, 255, 57, 255, 255, 39, 4, 255, 40, 255, + 255, 255, 255, 256, 136, 255, 31, 255, 150, 256, + 167, 168, 26, 143, 255, 256, 256, 256, 255, 256, + 255, 41, 255, 42, 34, 255, 255, 256, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 77, 255, + 255, 255, 255, 255, 255, 255, 255, 256, 256, 255, + + 255, 255, 255, 255, 255, 161, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 27, 255, 172, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 55, + 255, 139, 256, 255, 255, 255, 256, 255, 95, 256, + 256, 255, 256, 255, 255, 255, 5, 256, 255, 67, + 6, 255, 255, 13, 140, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 63, 58, 255, + 255, 255, 255, 255, 47, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 256, 256, 255, 255, + 255, 255, 255, 255, 255, 255, 68, 255, 255, 255, + + 255, 255, 255, 255, 255, 11, 255, 210, 48, 255, + 23, 255, 255, 12, 142, 255, 256, 131, 255, 219, + 169, 222, 256, 97, 255, 215, 255, 255, 208, 256, + 113, 114, 115, 116, 117, 118, 119, 120, 255, 38, + 255, 255, 20, 255, 255, 255, 255, 255, 255, 255, + 112, 111, 54, 255, 21, 255, 255, 3, 255, 255, + 17, 255, 16, 255, 228, 255, 255, 255, 75, 76, + 255, 255, 255, 255, 255, 69, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 25, 255, 60, 255, 255, + 213, 255, 256, 255, 96, 256, 147, 214, 255, 216, + + 255, 212, 255, 255, 255, 255, 255, 255, 255, 255, + 44, 129, 151, 46, 255, 255, 255, 146, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 128, 61, 218, + 255, 255, 255, 255, 10, 255, 255, 56, 144, 193, + 255, 256, 256, 255, 22, 255, 255, 255, 255, 255, + 62, 255, 255, 255, 255, 255, 145, 255, 255, 255, + 64, 255, 255, 255, 255, 255, 255, 255, 130, 229, + 255, 255, 255, 255, 256, 256, 43, 255, 255, 255, + 109, 110, 108, 255, 255, 15, 255, 255, 14, 106, + 107, 105, 255, 255, 255, 255, 255, 255, 255, 255, + + 255, 255, 256, 256, 255, 72, 255, 137, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 89, 30, 98, 256, 255, 227, 255, 173, 255, 255, + 255, 255, 255, 121, 124, 203, 255, 45, 255, 81, + 256, 138, 255, 255, 255, 255, 255, 255, 50, 255, + 99, 255, 255, 255, 255, 255, 255, 101, 255, 198, + 255, 255, 65, 66, 148, 122, 125, 123, 126, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -584,261 +590,273 @@ 3, 3, 3, 3, 3, 3, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[1115] = +static yyconst flex_int16_t yy_base[1175] = { 0, - 0, 0, 2297, 2298, 69, 2293, 2298, 70, 2298, 2298, - 2298, 2298, 2298, 0, 2298, 0, 0, 60, 119, 38, - 2298, 2298, 2265, 2298, 2262, 171, 220, 2298, 2298, 2298, - 2265, 227, 232, 103, 103, 248, 237, 108, 122, 2232, - 37, 2236, 124, 115, 214, 258, 2231, 280, 300, 41, - 271, 2240, 2298, 2298, 2298, 2298, 169, 2285, 2280, 173, - 0, 2298, 360, 138, 413, 460, 2298, 2298, 2258, 232, - 2257, 254, 489, 257, 152, 64, 189, 264, 154, 223, - 235, 295, 153, 267, 276, 122, 318, 306, 301, 278, - 323, 296, 329, 307, 356, 365, 304, 329, 351, 330, - - 350, 353, 358, 330, 367, 379, 369, 373, 375, 377, - 378, 388, 382, 387, 231, 391, 414, 376, 393, 419, - 434, 421, 394, 397, 398, 431, 422, 430, 437, 433, - 440, 491, 467, 493, 441, 509, 435, 495, 497, 499, - 436, 501, 525, 427, 500, 514, 517, 523, 520, 524, - 438, 528, 531, 532, 535, 538, 534, 2298, 550, 2281, - 2298, 590, 0, 0, 549, 595, 313, 540, 542, 553, - 554, 2255, 560, 584, 586, 589, 585, 597, 2254, 581, - 548, 605, 2253, 623, 611, 578, 616, 614, 587, 613, - 620, 617, 557, 621, 646, 624, 625, 628, 640, 622, - - 644, 2252, 646, 647, 648, 649, 650, 653, 651, 655, - 656, 659, 660, 2251, 2250, 667, 688, 668, 658, 669, - 663, 673, 694, 677, 682, 684, 689, 691, 692, 695, - 2249, 2248, 698, 697, 704, 699, 700, 701, 2247, 723, - 705, 730, 718, 2246, 727, 728, 2245, 703, 729, 2244, - 2219, 746, 750, 707, 759, 731, 736, 758, 741, 760, - 753, 748, 756, 761, 762, 757, 764, 2242, 2241, 765, - 768, 2261, 806, 767, 814, 773, 82, 771, 782, 777, - 783, 472, 808, 785, 781, 787, 789, 812, 813, 816, - 815, 823, 790, 2220, 817, 2238, 2237, 818, 824, 826, - - 827, 828, 836, 831, 0, 0, 0, 0, 834, 837, - 842, 843, 839, 2236, 846, 850, 851, 859, 853, 856, - 2235, 854, 860, 861, 2234, 872, 2203, 875, 2232, 864, - 2231, 2230, 876, 2201, 2228, 877, 878, 879, 881, 2227, - 883, 886, 888, 2226, 887, 889, 895, 893, 897, 898, - 899, 902, 775, 901, 929, 0, 0, 2198, 903, 906, - 905, 907, 910, 2224, 2192, 2192, 2191, 911, 916, 2220, - 2219, 919, 928, 919, 931, 2201, 923, 937, 938, 939, - 941, 942, 947, 948, 2217, 949, 953, 965, 957, 0, - 0, 0, 0, 970, 0, 0, 0, 0, 979, 0, - - 0, 956, 985, 955, 960, 964, 973, 984, 961, 990, - 991, 992, 976, 993, 994, 995, 1002, 996, 998, 1007, - 1006, 1009, 1005, 2185, 1010, 1011, 1012, 1018, 1025, 1034, - 1029, 1039, 1015, 1019, 1020, 1040, 1042, 1044, 1047, 1048, - 2215, 1049, 1050, 1053, 1054, 1055, 1057, 2201, 2183, 1061, - 1060, 204, 1058, 1064, 1063, 1066, 2212, 1067, 1070, 1071, - 1077, 1076, 1080, 1081, 1082, 1084, 1086, 1091, 1094, 1096, - 1109, 2196, 1092, 1098, 1107, 1110, 1113, 2223, 2196, 2195, - 1115, 1114, 1116, 1118, 2180, 2179, 2181, 1117, 2186, 1119, - 1120, 1121, 1125, 2203, 1122, 1123, 1128, 1126, 2202, 1129, - - 1134, 2184, 1130, 1138, 1136, 1158, 1154, 1159, 1166, 1139, - 1165, 1161, 1162, 1167, 1168, 1169, 1170, 1172, 1173, 1174, - 1177, 1175, 1176, 1181, 1185, 1186, 1189, 1201, 2200, 1179, - 1203, 1208, 1209, 1210, 1211, 2184, 1183, 1212, 1213, 1215, - 1214, 1218, 2170, 1228, 1224, 1229, 1219, 1233, 1230, 1235, - 1237, 1243, 1248, 1234, 1239, 1245, 1241, 1254, 2162, 2183, - 1244, 1252, 2170, 2179, 1259, 2193, 2192, 1263, 1268, 1266, - 1269, 1270, 1272, 1273, 1275, 1276, 1277, 1279, 1281, 1284, - 2191, 2190, 2166, 1285, 1288, 1286, 1299, 1289, 2158, 2152, - 2151, 1293, 2185, 1295, 1297, 2157, 2157, 2169, 1302, 2148, - - 2180, 1304, 1310, 1312, 1313, 1314, 2179, 1316, 2178, 1315, - 2159, 1317, 1318, 1320, 2176, 2175, 2174, 2173, 2172, 1329, - 2171, 1331, 1322, 1326, 1332, 1333, 1339, 1335, 1340, 1337, - 1344, 1349, 1351, 1345, 1353, 1358, 1363, 1364, 1365, 1360, - 1367, 1369, 1370, 1371, 1373, 1375, 1372, 0, 1377, 1378, - 1379, 1380, 1382, 1383, 1387, 1401, 1397, 1399, 1401, 1403, - 1405, 1410, 1408, 1411, 1414, 1415, 1413, 1416, 1422, 1423, - 2170, 1419, 1424, 1417, 2169, 1425, 0, 2133, 1426, 1427, - 0, 0, 1428, 2167, 1433, 1437, 2166, 1443, 1445, 2165, - 2164, 1448, 2163, 1447, 1450, 1451, 2131, 2161, 1452, 1457, - - 1456, 2160, 2146, 0, 0, 2158, 2157, 1455, 2124, 2137, - 2120, 1470, 2122, 1461, 2152, 1460, 2151, 2150, 1472, 1474, - 2116, 1475, 1479, 1480, 1481, 1483, 1484, 1485, 1488, 1499, - 1490, 1489, 1493, 1492, 1494, 1495, 1503, 1500, 1508, 1509, - 1496, 1502, 1511, 1514, 1520, 1521, 1523, 1524, 1528, 1527, - 1532, 2148, 1529, 1537, 1538, 1534, 1540, 1542, 2149, 2154, - 1543, 1546, 1549, 1551, 1552, 1557, 2145, 1556, 1558, 1561, - 1562, 1563, 1564, 1571, 1565, 1576, 1573, 1577, 0, 1574, - 1579, 1578, 1585, 1581, 1586, 1587, 1588, 1589, 1596, 2144, - 2143, 2110, 1604, 1607, 1608, 2106, 1609, 0, 2119, 2122, - - 1610, 2121, 1611, 1614, 1615, 2137, 2105, 1643, 2135, 2134, - 1617, 1628, 2133, 2132, 1622, 1618, 1619, 1616, 1648, 1649, - 1652, 1653, 1654, 1625, 1620, 1623, 2131, 2130, 1655, 1656, - 1658, 1659, 1662, 2129, 1667, 1668, 1670, 1671, 1673, 1669, - 1675, 1676, 1678, 2134, 2136, 1679, 1681, 1683, 1692, 1682, - 1674, 1699, 1701, 2126, 1702, 1703, 1705, 1706, 1707, 1708, - 1713, 1709, 2125, 1710, 2124, 2123, 1714, 1715, 1717, 1716, - 2122, 2121, 2103, 2119, 1721, 2118, 0, 2117, 2097, 0, - 1726, 0, 1718, 1719, 2115, 2097, 2113, 2112, 2111, 2110, - 2109, 2108, 2107, 2106, 1729, 2105, 1720, 1741, 2104, 1731, - - 1733, 1734, 1742, 1743, 1744, 1749, 2103, 2102, 2101, 1753, - 2100, 1747, 1754, 2099, 1755, 1756, 1761, 2098, 1759, 2097, - 1768, 1769, 0, 0, 1772, 1774, 1773, 1775, 1777, 2096, - 1776, 1787, 1780, 1790, 1781, 1778, 1784, 1779, 1793, 2095, - 1782, 2094, 1802, 1804, 2093, 2064, 1807, 0, 2091, 2090, - 1808, 0, 1810, 2089, 1809, 1811, 1813, 1816, 1819, 1815, - 1820, 1817, 2088, 2087, 2086, 2085, 1824, 1825, 1818, 1828, - 1841, 1844, 1846, 1822, 1847, 1848, 1851, 1842, 2084, 2083, - 2082, 1850, 1853, 1852, 1855, 2081, 1858, 1857, 2080, 0, - 1860, 1866, 2079, 1865, 1869, 1870, 1874, 1875, 2078, 1876, - - 1877, 1880, 1881, 1887, 2077, 1886, 1879, 1885, 2076, 1889, - 1890, 1891, 1898, 1895, 1905, 1900, 2075, 2074, 1906, 1909, - 1908, 1910, 2061, 1917, 1918, 1907, 2060, 2059, 2058, 1923, - 1927, 2057, 1919, 1924, 2056, 2054, 2053, 2052, 1930, 1932, - 1937, 1938, 1943, 1942, 1945, 1946, 1948, 1949, 1951, 2051, - 1952, 2050, 1958, 1950, 1954, 1956, 1964, 1989, 1991, 1961, - 1962, 1967, 1966, 1990, 2049, 2048, 1992, 2046, 1993, 2044, - 1994, 1995, 1996, 1998, 1999, 2043, 2042, 2041, 1997, 2040, - 2000, 2039, 2033, 2004, 2001, 2005, 2006, 2003, 2007, 1959, - 2008, 2002, 2012, 2025, 2026, 2030, 2031, 1957, 2032, 1627, - - 2045, 2047, 1178, 693, 553, 432, 428, 384, 230, 2298, - 152, 2092, 2095, 2098 + 0, 0, 2402, 2403, 69, 2398, 2403, 70, 2403, 2403, + 2403, 2403, 2403, 0, 2403, 0, 0, 60, 119, 38, + 2403, 2403, 2370, 2403, 2367, 171, 220, 2403, 2403, 2403, + 2370, 227, 232, 103, 121, 248, 237, 108, 115, 2337, + 37, 2341, 260, 126, 214, 258, 2336, 283, 303, 41, + 276, 2345, 2403, 2403, 2403, 2403, 169, 2390, 2385, 172, + 0, 2403, 363, 121, 416, 463, 2403, 2403, 2363, 165, + 2362, 228, 492, 227, 120, 306, 320, 56, 152, 147, + 145, 294, 329, 230, 254, 267, 299, 220, 313, 148, + 324, 353, 357, 308, 302, 364, 383, 382, 361, 350, + + 386, 333, 231, 359, 378, 368, 383, 385, 417, 420, + 421, 422, 360, 398, 424, 399, 310, 393, 428, 379, + 427, 438, 498, 431, 434, 441, 444, 445, 446, 432, + 440, 499, 450, 495, 471, 500, 474, 529, 501, 503, + 504, 493, 515, 519, 548, 527, 520, 530, 531, 526, + 523, 545, 551, 552, 554, 555, 556, 557, 559, 2403, + 573, 2386, 2403, 615, 0, 0, 620, 621, 576, 577, + 565, 568, 579, 604, 2360, 566, 586, 611, 622, 610, + 602, 2359, 613, 605, 629, 2358, 643, 634, 638, 603, + 561, 639, 612, 646, 647, 648, 650, 651, 653, 668, + + 2357, 662, 666, 668, 670, 665, 671, 2356, 672, 675, + 673, 676, 679, 678, 677, 680, 681, 691, 695, 698, + 702, 2355, 2354, 703, 718, 704, 699, 706, 710, 709, + 724, 447, 713, 715, 717, 719, 720, 728, 2353, 2352, + 730, 729, 739, 732, 733, 735, 2351, 749, 750, 768, + 767, 748, 2350, 756, 760, 2349, 740, 768, 2348, 2323, + 783, 785, 762, 784, 734, 774, 791, 782, 793, 786, + 788, 789, 796, 797, 790, 800, 2346, 2345, 798, 801, + 2365, 839, 229, 843, 802, 398, 849, 815, 803, 799, + 809, 818, 837, 822, 820, 843, 825, 846, 850, 848, + + 852, 856, 857, 2324, 858, 860, 2342, 2341, 861, 862, + 864, 866, 870, 871, 872, 874, 0, 0, 0, 0, + 873, 876, 884, 887, 893, 2340, 882, 886, 897, 889, + 896, 899, 900, 2339, 903, 901, 902, 2338, 905, 907, + 2307, 922, 2336, 911, 2335, 2334, 919, 2305, 2332, 920, + 921, 924, 926, 2331, 928, 929, 935, 2330, 930, 938, + 939, 940, 942, 945, 944, 946, 948, 952, 967, 0, + 0, 2302, 963, 947, 950, 957, 972, 964, 2328, 2296, + 2296, 2295, 975, 974, 2324, 2323, 976, 981, 968, 977, + 2305, 979, 984, 985, 986, 988, 990, 991, 992, 2321, + + 993, 997, 1014, 1002, 0, 0, 0, 0, 1023, 0, + 0, 0, 0, 1035, 0, 0, 0, 0, 0, 0, + 1003, 577, 1007, 1015, 1017, 1020, 1021, 1029, 1032, 1034, + 1033, 1036, 1039, 1040, 1041, 1043, 1044, 1056, 1049, 1053, + 1061, 1050, 2289, 1054, 1062, 1058, 1057, 1073, 1082, 1084, + 1086, 1100, 1089, 1060, 1066, 1091, 1093, 1068, 1095, 1094, + 1097, 2319, 1102, 1104, 1103, 1106, 1107, 1108, 1111, 1112, + 2305, 2287, 1114, 1113, 1096, 1117, 1124, 1126, 1130, 2316, + 1131, 1133, 1134, 1137, 1135, 1136, 1142, 1139, 1144, 1145, + 1141, 1146, 1155, 309, 80, 2300, 0, 0, 1151, 1150, + + 1153, 1157, 1156, 2327, 2300, 2299, 1159, 1171, 1172, 1177, + 2284, 2283, 2285, 1169, 2290, 1178, 1175, 1179, 1180, 2307, + 1181, 1182, 1185, 144, 2306, 1190, 1184, 2288, 1193, 1195, + 1196, 1206, 1207, 1217, 1208, 1211, 1221, 1214, 1218, 1220, + 1222, 1219, 1224, 1225, 1226, 1227, 1241, 1229, 1230, 1234, + 1235, 1238, 1253, 1251, 2304, 1254, 1257, 1259, 1262, 1261, + 1265, 2288, 1263, 1239, 1270, 1273, 1268, 1278, 1282, 1285, + 2274, 1279, 1284, 1289, 1287, 1297, 1288, 1291, 1292, 1295, + 1300, 1310, 1303, 1301, 1315, 1313, 1321, 1323, 2266, 2287, + 1324, 1328, 2274, 2283, 1329, 2297, 2296, 1330, 1331, 1332, + + 1333, 1334, 1337, 1335, 1339, 1340, 1341, 1342, 1344, 1345, + 1349, 2295, 2294, 2270, 1347, 1354, 1360, 1364, 1348, 2262, + 2256, 2255, 1356, 2289, 1366, 1370, 2261, 2261, 2273, 1374, + 2252, 2284, 1375, 1381, 1378, 1383, 1379, 2283, 1384, 2282, + 1385, 2263, 1386, 1387, 1389, 2280, 2279, 2278, 2277, 2276, + 1390, 2275, 1388, 1392, 1391, 1393, 1401, 1406, 1408, 1394, + 1410, 1412, 1416, 1419, 1420, 1422, 1425, 1426, 1428, 1430, + 1427, 1431, 1435, 1437, 1438, 1439, 1440, 1441, 0, 1443, + 2274, 1444, 1450, 1446, 1453, 1454, 1456, 1458, 1465, 1238, + 1464, 1460, 1466, 1474, 1467, 1475, 1476, 1479, 1481, 1482, + + 1486, 1487, 1480, 1489, 2273, 1492, 2272, 1495, 1494, 2271, + 1500, 1501, 0, 2235, 1502, 1503, 0, 0, 1504, 2269, + 1505, 1509, 2268, 1507, 1514, 2267, 2266, 1516, 2265, 1521, + 1522, 1515, 1523, 2233, 2263, 1518, 1540, 1524, 2262, 2248, + 0, 0, 2260, 2259, 1527, 2226, 2239, 2222, 1525, 2224, + 1530, 2254, 1544, 2253, 2252, 1548, 1549, 2218, 1550, 1551, + 1553, 1555, 1559, 1556, 1558, 1560, 1569, 1563, 1564, 1565, + 1566, 1567, 1568, 1576, 1581, 1584, 1585, 1571, 1572, 1575, + 1578, 1590, 1594, 1593, 1596, 1600, 1597, 1607, 2250, 1608, + 1609, 1615, 1610, 1616, 1618, 1620, 1619, 2251, 2256, 1621, + + 1622, 1625, 1627, 1629, 1626, 2247, 1630, 1637, 1634, 1636, + 1638, 1639, 1641, 1647, 1651, 1652, 2246, 1657, 0, 1655, + 1662, 1663, 1661, 1658, 1664, 1669, 1666, 1667, 1676, 2245, + 1665, 2244, 2211, 1684, 1670, 1686, 2207, 1685, 0, 2220, + 2223, 1688, 2222, 1689, 1691, 1692, 2238, 2206, 1734, 2236, + 2235, 1695, 1696, 2234, 2233, 1707, 1698, 1705, 1699, 1703, + 1721, 1735, 1737, 1738, 1714, 1706, 1708, 2232, 2231, 1739, + 1711, 1716, 1744, 1746, 2230, 1748, 1751, 1752, 1753, 1754, + 1755, 1757, 1759, 1758, 1760, 1763, 2235, 2237, 1764, 1768, + 1775, 1777, 1762, 1769, 1785, 1783, 2227, 1786, 1788, 1766, + + 1790, 1697, 1791, 1793, 1794, 2226, 1796, 2225, 2224, 1799, + 1800, 1801, 1802, 2223, 2222, 1806, 2204, 2220, 1805, 2219, + 0, 2218, 2198, 2229, 1803, 0, 1810, 1811, 2215, 2197, + 2213, 2212, 2211, 2210, 2209, 2208, 2207, 2206, 1813, 2205, + 1814, 1821, 2204, 1817, 1825, 1827, 1828, 1832, 1831, 1830, + 2203, 2202, 2201, 1839, 2200, 1836, 1840, 2199, 1833, 1835, + 2198, 1841, 2197, 1837, 2196, 1848, 1846, 1847, 0, 0, + 1858, 1859, 1866, 1860, 1861, 2195, 1867, 1869, 1871, 1872, + 1875, 1876, 1877, 1878, 1879, 2194, 1880, 2193, 1886, 1884, + 2192, 1892, 2163, 1896, 0, 1879, 2190, 2189, 1897, 0, + + 1899, 2188, 1900, 1902, 1903, 1904, 1905, 1906, 1907, 1914, + 2187, 2186, 2185, 2184, 1917, 1919, 1930, 2183, 1908, 1931, + 1934, 1935, 1910, 1936, 1941, 1939, 1938, 2182, 2181, 2180, + 1943, 1946, 1945, 1932, 2179, 1947, 1948, 2178, 2177, 0, + 1954, 2149, 2148, 1957, 2174, 1958, 1959, 1961, 1962, 1963, + 2173, 1966, 1968, 1970, 1972, 1973, 2172, 1976, 1978, 1980, + 2171, 1981, 1983, 1984, 1991, 1993, 1995, 1996, 2170, 2169, + 1997, 1998, 2002, 2001, 2141, 2141, 2166, 2005, 2006, 2012, + 2165, 2164, 2163, 2004, 2011, 2162, 2009, 2022, 2161, 2151, + 2148, 2147, 2013, 2020, 2026, 2028, 2031, 2034, 2035, 2038, + + 2042, 2040, 2114, 2127, 2041, 2144, 2043, 2143, 2046, 2047, + 2044, 2048, 2054, 2079, 2081, 2050, 2052, 2056, 2075, 2053, + 2142, 2141, 0, 2119, 2076, 2138, 2082, 2137, 2084, 2085, + 2086, 2087, 2088, 2135, 2134, 2132, 2089, 2131, 2090, 2130, + 2101, 2051, 2094, 2092, 2095, 2097, 2098, 2101, 1719, 2103, + 0, 2110, 2104, 2091, 2113, 2115, 2118, 1228, 2116, 804, + 2133, 2136, 567, 525, 390, 311, 301, 226, 223, 2403, + 147, 2179, 2182, 2185 } ; -static yyconst flex_int16_t yy_def[1115] = +static yyconst flex_int16_t yy_def[1175] = { 0, - 1110, 1, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1111, 1110, 1111, 1111, 1111, 1111, 19, - 1110, 1110, 1110, 1110, 1110, 1110, 26, 1110, 1110, 1110, + 1170, 1, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1171, 1170, 1171, 1171, 1171, 1171, 19, + 1170, 1170, 1170, 1170, 1170, 1170, 26, 1170, 1170, 1170, 27, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 1110, 1110, 1110, 1110, 1110, 1110, 1112, 1112, - 1111, 1110, 1113, 19, 19, 65, 1110, 1110, 26, 1110, - 27, 26, 27, 27, 73, 73, 73, 27, 27, 27, - 73, 27, 27, 27, 27, 27, 73, 73, 27, 27, - 73, 27, 73, 73, 73, 27, 27, 27, 27, 73, + 27, 27, 1170, 1170, 1170, 1170, 1170, 1170, 1172, 1172, + 1171, 1170, 1173, 19, 19, 65, 1170, 1170, 26, 1170, + 27, 26, 27, 27, 26, 73, 73, 27, 27, 27, + 26, 27, 27, 27, 27, 27, 26, 26, 27, 27, + 27, 26, 27, 27, 26, 73, 73, 27, 27, 27, + 27, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 1170, + 1170, 1174, 1170, 1173, 66, 1171, 26, 27, 26, 73, + 27, 27, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 1110, 1110, 1114, - 1110, 1113, 66, 1111, 73, 27, 73, 27, 27, 73, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 73, 27, 1111, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 26, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, - 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 1171, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 1171, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 1112, 1111, 27, 1111, 27, 1111, 27, 27, 27, + 1172, 1171, 27, 1171, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 1111, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 1111, 1111, 1111, 1111, 27, 27, + 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 1171, 1171, 1171, 1171, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 1111, 27, 27, 27, - 27, 27, 27, 1111, 27, 27, 27, 27, 27, 27, + 1171, 27, 27, 27, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 1111, 1111, 1111, 27, 27, - 27, 27, 27, 27, 1111, 1111, 1111, 27, 27, 27, - 27, 27, 27, 1111, 27, 1111, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 1111, - 1111, 1111, 1111, 27, 1111, 1111, 1111, 1111, 27, 1111, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 1171, + 1171, 1171, 1171, 27, 27, 27, 27, 27, 27, 1171, + 1171, 1171, 27, 27, 27, 27, 27, 27, 1171, 27, + 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 1171, 1171, 1171, 1171, 27, 1171, + 1171, 1171, 1171, 27, 1171, 1171, 1171, 1171, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 1111, 1111, 27, - 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 1111, 27, 27, 27, 27, 27, 1111, 1111, 1111, - 27, 27, 27, 27, 1111, 1111, 1111, 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 1171, 1171, 27, 27, 1171, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 1171, 1171, 1171, 27, 27, - 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 1171, 1171, 1171, 27, 27, 27, 27, + 1171, 1171, 1171, 27, 1171, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 1111, 27, 27, 27, 27, - 27, 27, 1111, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 1111, 1111, - 27, 27, 1111, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 1111, 27, 27, 27, 27, 27, 1111, 1111, - 1111, 27, 27, 27, 27, 1111, 1111, 1111, 27, 1111, + 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, + 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 1171, 1171, + 27, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 1171, 27, 27, 27, 27, 27, 1171, + 1171, 1171, 27, 27, 27, 27, 1171, 1171, 1171, 27, + 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 1111, 27, 27, - 27, 27, 27, 27, 27, 1111, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 1171, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 1111, 1111, 27, 27, - 1111, 1111, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 1111, 27, 27, 27, - 27, 27, 1111, 1111, 1111, 27, 27, 27, 1111, 1111, - 1111, 27, 1111, 27, 27, 27, 27, 27, 27, 27, - 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 1171, 1171, 27, 27, 1171, 1171, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 1171, 27, 27, 27, 27, 27, 1171, + 1171, 1171, 27, 27, 27, 1171, 1171, 1171, 27, 1171, + 27, 27, 27, 27, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 1111, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 1111, 27, 27, 27, 1111, 27, 1111, 1111, 1111, + 27, 27, 27, 27, 27, 27, 27, 1171, 1171, 27, - 27, 1111, 27, 27, 27, 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 1171, 27, 27, 27, 1171, 27, 1171, 1171, + 1171, 27, 1171, 27, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 1111, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 1111, 27, 27, 27, 1111, 27, 1111, 1111, - 27, 1111, 27, 27, 27, 1111, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 1171, 27, 27, 27, + 1171, 27, 1171, 1171, 27, 1171, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 1111, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 1111, 27, 1111, 27, 27, - 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 1111, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 1171, 27, 1171, 1171, 27, 27, 27, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 1171, + 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + + 27, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 1171, 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - + 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 1171, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, - 1110, 1110, 1110, 1110 + 1170, 1170, 1170, 1170 } ; -static yyconst flex_int16_t yy_nxt[2369] = +static yyconst flex_int16_t yy_nxt[2474] = { 0, 4, 5, 6, 7, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, @@ -848,261 +866,273 @@ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 27, 27, 52, 27, 27, 53, 54, 55, 56, 57, 62, 61, 57, 59, 59, 63, 59, 59, 59, - 59, 111, 59, 69, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 112, 151, 400, + 59, 113, 59, 1170, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 114, 153, 613, - 401, 61, 60, 60, 60, 152, 59, 170, 59, 59, + 175, 61, 60, 60, 60, 154, 59, 1170, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 87, 91, 88, 1110, - 89, 65, 105, 66, 61, 120, 106, 90, 92, 65, - 65, 65, 65, 65, 65, 107, 114, 115, 116, 121, - 57, 69, 61, 57, 108, 109, 117, 182, 118, 158, - 1110, 1110, 66, 61, 119, 61, 61, 61, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 70, 178, + 64, 64, 64, 64, 64, 64, 87, 1170, 88, 61, + 89, 65, 107, 66, 90, 61, 108, 91, 109, 65, + 65, 65, 65, 65, 65, 92, 122, 110, 111, 93, + 57, 1170, 1170, 57, 1170, 1170, 94, 172, 160, 1170, + 123, 166, 66, 61, 61, 61, 61, 61, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 70, 161, - 159, 61, 173, 69, 71, 71, 179, 61, 69, 169, + 176, 166, 178, 69, 71, 71, 177, 61, 189, 639, 71, 69, 69, 69, 69, 69, 69, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 171, 164, 72, - 1110, 73, 71, 215, 69, 563, 564, 1110, 1110, 122, - 71, 71, 71, 71, 71, 71, 74, 75, 164, 123, - 76, 77, 124, 81, 165, 78, 125, 100, 79, 82, - 83, 1110, 174, 84, 1110, 101, 85, 80, 93, 102, - 94, 1110, 175, 95, 1110, 103, 86, 104, 126, 96, - - 127, 97, 136, 1110, 168, 1110, 128, 98, 172, 129, - 130, 99, 153, 131, 154, 132, 133, 166, 134, 155, - 137, 180, 1110, 1110, 138, 69, 69, 277, 1110, 156, - 181, 1110, 69, 186, 176, 187, 191, 69, 139, 140, - 141, 142, 69, 143, 144, 185, 196, 145, 69, 69, - 193, 146, 147, 177, 184, 148, 1110, 1110, 149, 150, - 160, 160, 161, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 183, 160, 188, 69, 197, 1110, 1110, 195, - 1110, 189, 200, 204, 190, 1110, 192, 160, 160, 160, - 160, 160, 1110, 198, 1110, 160, 1110, 160, 160, 203, - - 1110, 201, 1110, 1110, 1110, 1110, 1110, 205, 207, 1110, - 199, 1110, 202, 208, 1110, 1110, 194, 210, 1110, 218, - 1110, 1110, 213, 209, 1110, 1110, 160, 160, 160, 160, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 206, 1110, 211, 212, 219, 214, 1110, 61, 1110, 1110, - 216, 228, 227, 226, 1110, 1110, 217, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 225, 1110, 1110, 254, - 230, 220, 221, 231, 222, 233, 61, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 223, 229, 232, - 235, 224, 163, 234, 1110, 249, 241, 244, 264, 1110, - - 163, 163, 163, 163, 163, 163, 69, 69, 167, 69, - 69, 69, 69, 69, 69, 69, 1110, 238, 1110, 239, - 1110, 69, 1110, 242, 1110, 406, 1110, 1110, 1110, 69, - 69, 69, 69, 69, 69, 236, 1110, 247, 240, 251, - 255, 1110, 252, 253, 1110, 237, 248, 1110, 243, 250, - 1110, 1110, 1110, 245, 257, 1110, 246, 259, 1110, 1110, - 256, 1110, 1110, 273, 263, 1110, 272, 1110, 69, 1110, - 262, 258, 69, 260, 261, 1110, 69, 267, 268, 269, - 1110, 1110, 270, 265, 279, 266, 272, 1110, 274, 271, - 160, 160, 161, 160, 160, 160, 160, 160, 160, 160, - - 160, 160, 278, 160, 281, 1110, 282, 292, 1110, 275, - 280, 1110, 1110, 1110, 1110, 303, 1110, 160, 160, 160, - 160, 160, 1110, 291, 1110, 160, 284, 160, 160, 285, - 286, 283, 1110, 289, 276, 287, 290, 294, 1110, 288, - 1110, 1110, 296, 1110, 1110, 293, 299, 1110, 1110, 1110, - 1110, 1110, 1110, 295, 298, 1110, 160, 160, 160, 160, - 297, 300, 301, 305, 306, 307, 308, 1110, 302, 310, - 313, 1110, 311, 1110, 1110, 1110, 1110, 1110, 1110, 304, - 1110, 309, 1110, 1110, 312, 1110, 1110, 1110, 314, 316, - 1110, 317, 319, 318, 1110, 1110, 1110, 315, 324, 320, - - 1110, 322, 327, 325, 1110, 328, 332, 326, 334, 1110, - 321, 1110, 329, 331, 323, 1110, 1110, 330, 1110, 1110, - 1110, 1110, 1110, 339, 1110, 1110, 1110, 1110, 1110, 337, - 1110, 1110, 1110, 333, 1110, 341, 342, 340, 335, 344, - 338, 345, 346, 347, 352, 1110, 351, 356, 357, 348, - 1110, 343, 336, 355, 1110, 1110, 1110, 349, 1110, 350, - 366, 359, 353, 1110, 367, 363, 368, 369, 1110, 364, - 354, 361, 374, 1110, 376, 1110, 360, 1110, 370, 371, - 1110, 358, 362, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 372, 1110, 1110, 381, 1110, 1110, 375, 373, 1110, 377, - - 1110, 380, 1110, 387, 1110, 378, 385, 389, 1110, 1110, - 1110, 386, 1110, 382, 1110, 383, 1110, 1110, 379, 384, - 468, 404, 388, 390, 391, 392, 393, 405, 402, 403, - 394, 395, 396, 397, 398, 1110, 399, 411, 413, 1110, - 1110, 412, 1110, 1110, 1110, 1110, 414, 407, 423, 408, - 1110, 1110, 409, 1110, 1110, 1110, 415, 410, 1110, 416, - 417, 1110, 419, 1110, 1110, 418, 1110, 425, 428, 1110, - 1110, 420, 427, 1110, 421, 432, 431, 1110, 1110, 429, - 1110, 1110, 426, 1110, 422, 438, 1110, 1110, 1110, 449, - 437, 1110, 430, 444, 434, 440, 436, 435, 433, 1110, - - 443, 441, 1110, 1110, 1110, 1110, 1110, 442, 1110, 439, - 1110, 446, 450, 1110, 1110, 1110, 1110, 445, 454, 447, - 1110, 453, 1110, 455, 1110, 1110, 1110, 460, 1110, 1110, - 1110, 456, 1110, 1110, 1110, 451, 459, 1110, 1110, 458, - 457, 463, 465, 1110, 469, 464, 1110, 466, 470, 471, - 1110, 461, 467, 462, 474, 1110, 1110, 476, 1110, 481, - 485, 486, 475, 473, 1110, 1110, 1110, 477, 1110, 1110, - 488, 490, 484, 482, 1110, 1110, 1110, 487, 483, 502, - 1110, 491, 1110, 1110, 1110, 492, 493, 1110, 1110, 495, - 506, 1110, 1110, 507, 500, 497, 501, 1110, 494, 508, - - 1110, 496, 509, 1110, 503, 511, 1110, 498, 499, 505, - 510, 1110, 1110, 512, 519, 504, 514, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 513, 1110, 523, 515, 516, 1110, - 521, 517, 1110, 1110, 1110, 518, 1110, 1110, 1110, 1110, - 530, 531, 1110, 543, 525, 1110, 1110, 1110, 527, 520, - 538, 522, 1110, 534, 529, 528, 1110, 524, 526, 532, - 533, 1110, 540, 535, 541, 539, 1110, 1110, 537, 1110, - 545, 1110, 546, 542, 1110, 1110, 1110, 1110, 544, 547, - 1110, 1110, 1110, 548, 1110, 1110, 550, 1110, 1110, 554, - 1110, 1110, 553, 1110, 1110, 551, 556, 1110, 1110, 557, - - 565, 558, 561, 1110, 1110, 552, 549, 1110, 1110, 1110, - 568, 1110, 555, 1110, 562, 566, 572, 581, 1110, 1110, - 573, 1110, 567, 1110, 576, 1110, 569, 575, 582, 570, - 571, 574, 584, 580, 1110, 577, 1110, 1110, 578, 579, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 585, 1110, 1110, 587, 1110, 1110, 1110, 593, 595, - 594, 1110, 601, 1110, 602, 1110, 1110, 588, 586, 592, - 607, 604, 603, 605, 610, 616, 609, 615, 617, 599, - 612, 1110, 613, 606, 620, 1110, 1110, 618, 1110, 1110, - 614, 608, 1110, 1110, 1110, 1110, 1110, 1110, 619, 1110, - - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 622, 1110, 625, - 1110, 623, 1110, 1110, 629, 635, 1110, 626, 630, 621, - 636, 624, 634, 631, 637, 638, 627, 632, 1110, 640, - 1110, 639, 628, 642, 633, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 649, 641, 1110, 1110, 643, 644, 645, - 647, 1110, 646, 652, 653, 1110, 1110, 1110, 654, 650, - 1110, 1110, 1110, 651, 1110, 655, 1110, 664, 1110, 657, - 1110, 1110, 1110, 663, 658, 1110, 672, 665, 659, 1110, - 666, 1110, 669, 662, 674, 660, 1110, 673, 661, 667, - 1110, 668, 671, 1110, 676, 1110, 1110, 1110, 679, 1110, - - 1110, 670, 1110, 1110, 1110, 675, 1110, 685, 1110, 687, - 680, 1110, 1110, 1110, 686, 1110, 1110, 690, 688, 683, - 1110, 693, 1110, 689, 1110, 696, 1110, 684, 691, 1110, - 700, 1110, 695, 694, 699, 692, 698, 1110, 701, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 706, 1110, 702, 1110, - 712, 708, 707, 1110, 715, 714, 1110, 717, 1110, 1110, - 1110, 722, 1110, 724, 1110, 716, 1110, 1110, 725, 718, - 719, 1110, 1110, 730, 720, 727, 1110, 728, 1110, 726, - 1110, 731, 723, 732, 738, 1110, 733, 1110, 734, 729, - 1110, 1110, 1110, 736, 1110, 737, 1110, 1110, 1110, 1110, - - 1110, 735, 1110, 739, 1110, 1110, 1110, 1110, 740, 1110, - 1110, 741, 742, 743, 1110, 745, 749, 748, 753, 744, - 751, 759, 746, 760, 1110, 756, 1110, 758, 1110, 752, - 1110, 747, 1110, 754, 750, 1110, 757, 1110, 1110, 755, - 1110, 1110, 1110, 1110, 1110, 763, 1110, 764, 761, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 762, 769, 766, 770, - 1110, 777, 773, 765, 1110, 768, 771, 767, 778, 772, - 1110, 774, 1110, 775, 1110, 1110, 776, 1110, 1110, 1110, - 780, 783, 1110, 1110, 1110, 782, 781, 1110, 1110, 787, - 789, 785, 788, 784, 790, 786, 794, 1110, 791, 1110, - - 804, 1110, 1110, 793, 795, 803, 1110, 1110, 1110, 797, - 1110, 1110, 1110, 801, 806, 1110, 1110, 1110, 816, 1110, - 1110, 1110, 1110, 1110, 810, 805, 1110, 1110, 815, 1110, - 1110, 818, 819, 811, 812, 1110, 1110, 809, 1110, 808, - 817, 1110, 820, 813, 824, 822, 823, 1110, 1110, 814, - 1110, 1110, 825, 826, 1110, 1110, 1110, 827, 821, 1110, - 831, 1110, 829, 828, 1110, 1110, 832, 1110, 834, 1110, - 1110, 833, 835, 1110, 830, 837, 1110, 839, 1110, 1110, - 842, 836, 838, 1110, 1110, 1110, 840, 841, 1110, 1110, - 1110, 1110, 1110, 846, 849, 843, 850, 853, 1110, 848, - - 1110, 1110, 856, 1110, 1110, 1110, 1110, 855, 1110, 852, - 847, 851, 1110, 1110, 1110, 1110, 1110, 858, 859, 864, - 860, 862, 865, 1110, 857, 854, 861, 869, 866, 867, - 870, 1110, 871, 863, 1110, 1110, 1110, 1110, 1110, 868, - 872, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 874, 1110, - 1110, 876, 1110, 883, 1110, 1110, 900, 898, 875, 885, - 887, 888, 889, 890, 891, 892, 893, 894, 878, 881, - 1110, 895, 896, 884, 897, 1110, 1110, 899, 906, 1110, - 1110, 1110, 1110, 1110, 907, 1110, 1110, 908, 902, 1110, - 901, 903, 904, 905, 1110, 1110, 1110, 1110, 1110, 909, - - 1110, 1110, 1110, 1110, 913, 1110, 1110, 912, 1110, 1110, - 1110, 911, 916, 910, 917, 920, 918, 921, 925, 1110, - 926, 922, 927, 919, 914, 915, 1110, 930, 1110, 1110, - 1110, 928, 1110, 1110, 1110, 1110, 1110, 1110, 931, 929, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 932, - 933, 934, 937, 1110, 943, 939, 1110, 942, 1110, 936, - 1110, 1110, 938, 944, 935, 947, 940, 941, 1110, 1110, - 1110, 1110, 953, 949, 1110, 945, 1110, 950, 954, 951, - 1110, 1110, 1110, 1110, 958, 955, 1110, 957, 1110, 962, - 956, 960, 959, 964, 961, 1110, 1110, 963, 965, 1110, - - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 967, 1110, 969, 966, 1110, 968, 976, 1110, 982, 970, - 1110, 974, 972, 971, 973, 975, 979, 977, 981, 1110, - 978, 1110, 983, 980, 1110, 1110, 1110, 1110, 1110, 984, - 1110, 986, 1110, 1110, 1110, 1110, 1110, 1110, 989, 1110, - 985, 1110, 1110, 991, 993, 1110, 987, 1004, 1001, 995, - 997, 988, 994, 998, 1000, 992, 996, 1002, 1110, 1110, - 1003, 1110, 1005, 1110, 1110, 1110, 999, 1110, 1110, 1110, - 1110, 1015, 1110, 1009, 1110, 1110, 1006, 1110, 1007, 1011, - 1008, 1010, 1110, 1110, 1012, 1014, 1110, 1110, 1013, 1017, - - 1022, 1110, 1110, 1110, 1110, 1024, 1110, 1110, 1110, 1016, - 1023, 1018, 1110, 1110, 1110, 1026, 1110, 1110, 1110, 1019, - 1020, 1021, 1110, 1025, 1031, 1110, 1032, 1110, 1030, 1033, - 1034, 1035, 1110, 1110, 1110, 1110, 1110, 1110, 1027, 1028, - 1029, 1039, 1041, 1036, 1110, 1110, 1110, 1043, 1040, 1037, - 1110, 1110, 1048, 1038, 1110, 1051, 1042, 1110, 1049, 1110, - 1044, 1045, 1046, 1047, 1110, 1110, 1053, 1052, 1055, 1110, - 1110, 1050, 1110, 1110, 1054, 1110, 1110, 1110, 1110, 1110, - 1056, 1110, 1060, 1110, 1110, 1110, 1110, 1058, 1110, 1110, - 1064, 1110, 1065, 1110, 1110, 1072, 1057, 1061, 1068, 1062, - - 1069, 1059, 1067, 1073, 1063, 1079, 1074, 1075, 1076, 1077, - 1070, 1080, 1078, 1066, 1081, 1071, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1083, 1088, 1089, 1110, - 1084, 1090, 1085, 1093, 1099, 1086, 1087, 1082, 1092, 1094, - 1095, 1096, 1110, 1110, 1091, 1097, 1100, 1110, 1110, 1110, - 1110, 1098, 1106, 1107, 1108, 1109, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1105, 1110, 1110, 1110, 1110, 1110, 1110, 1101, - 1102, 1103, 1104, 59, 59, 162, 162, 162, 160, 160, - - 160, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 990, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 952, 1110, 948, 1110, 1110, 1110, 946, 1110, 1110, - 1110, 1110, 1110, 1110, 924, 923, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 886, 1110, 882, 880, 879, 877, 873, - 1110, 1110, 1110, 845, 844, 1110, 807, 1110, 1110, 1110, - 802, 800, 799, 798, 1110, 1110, 796, 1110, 1110, 792, - 1110, 1110, 1110, 1110, 1110, 779, 1110, 1110, 1110, 1110, - - 1110, 1110, 1110, 1110, 721, 1110, 1110, 1110, 713, 711, - 710, 709, 1110, 705, 704, 703, 697, 1110, 1110, 1110, - 1110, 682, 681, 678, 677, 656, 648, 1110, 611, 1110, - 1110, 600, 598, 597, 596, 591, 590, 589, 583, 1110, - 560, 559, 1110, 536, 1110, 489, 1110, 1110, 480, 479, - 478, 1110, 472, 1110, 1110, 1110, 452, 1110, 1110, 1110, - 448, 1110, 1110, 1110, 1110, 1110, 424, 1110, 1110, 1110, - 365, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 161, 1110, 1110, 158, 58, 157, 135, - 113, 110, 1110, 68, 67, 58, 1110, 3, 1110, 1110, - - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110 + 71, 71, 71, 71, 71, 71, 71, 1170, 167, 72, + 1170, 73, 71, 1170, 1170, 1170, 1170, 1170, 1170, 124, + 71, 71, 71, 71, 71, 71, 74, 75, 187, 125, + 76, 77, 126, 81, 171, 78, 127, 102, 79, 82, + 83, 1170, 207, 84, 183, 103, 85, 80, 95, 104, + 96, 168, 409, 97, 1170, 105, 86, 106, 128, 98, + + 129, 99, 116, 117, 118, 138, 130, 100, 184, 131, + 132, 101, 119, 133, 120, 134, 135, 155, 136, 156, + 121, 1170, 185, 139, 157, 69, 1170, 140, 1170, 1170, + 612, 69, 223, 179, 158, 1170, 1170, 1170, 1170, 69, + 1170, 141, 142, 143, 144, 69, 145, 146, 196, 173, + 147, 1170, 180, 186, 148, 149, 1170, 188, 150, 197, + 1170, 151, 152, 162, 162, 163, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 181, 162, 1170, 174, 190, + 1170, 191, 182, 69, 1170, 206, 1170, 1170, 1170, 69, + 162, 162, 162, 162, 162, 1170, 200, 203, 162, 195, + + 162, 162, 69, 202, 192, 1170, 1170, 198, 69, 1170, + 1170, 193, 1170, 1170, 194, 415, 416, 1170, 208, 209, + 1170, 210, 226, 211, 218, 1170, 1170, 201, 204, 162, + 162, 162, 162, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 199, 1170, 205, 212, 1170, 1170, 1170, + 61, 1170, 224, 219, 1170, 1170, 213, 222, 1170, 1170, + 214, 1170, 217, 215, 220, 1170, 221, 1170, 1170, 216, + 225, 1170, 1170, 1170, 1170, 239, 233, 1170, 227, 61, + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, + 228, 229, 240, 234, 238, 165, 235, 236, 1170, 351, + + 243, 1170, 237, 165, 165, 165, 165, 165, 165, 69, + 69, 169, 69, 69, 69, 69, 69, 170, 69, 1170, + 1170, 246, 1170, 247, 69, 1170, 1170, 1170, 1170, 249, + 1170, 1170, 69, 69, 69, 69, 69, 69, 230, 244, + 257, 241, 1170, 250, 256, 248, 1170, 1170, 251, 245, + 1170, 231, 1170, 1170, 1170, 232, 1170, 1170, 1170, 242, + 264, 254, 260, 253, 255, 261, 262, 259, 252, 263, + 266, 268, 1170, 271, 258, 1170, 269, 270, 1170, 1170, + 265, 1170, 1170, 1170, 1170, 272, 1170, 267, 1170, 281, + 286, 287, 1170, 1170, 1170, 1170, 69, 537, 278, 277, + + 276, 279, 69, 1170, 1170, 308, 1170, 274, 275, 281, + 289, 273, 292, 1170, 280, 162, 162, 163, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 288, 162, 1170, + 1170, 1170, 1170, 293, 282, 284, 290, 1170, 1170, 1170, + 1170, 300, 162, 162, 162, 162, 162, 1170, 1170, 1170, + 162, 294, 162, 162, 291, 301, 1170, 304, 299, 283, + 285, 1170, 295, 296, 302, 1170, 1170, 307, 297, 303, + 1170, 310, 298, 1170, 1170, 1170, 305, 1170, 1170, 309, + 1170, 162, 162, 162, 162, 317, 318, 319, 320, 1170, + 313, 312, 1170, 1170, 311, 1170, 306, 1170, 1170, 1170, + + 1170, 314, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 315, + 322, 316, 323, 325, 324, 326, 329, 328, 1170, 321, + 330, 331, 1170, 327, 332, 1170, 1170, 335, 333, 1170, + 1170, 1170, 341, 1170, 337, 342, 1170, 1170, 348, 334, + 1170, 338, 1170, 340, 1170, 1170, 1170, 1170, 343, 336, + 345, 1170, 339, 346, 353, 1170, 1170, 1170, 344, 1170, + 1170, 1170, 1170, 355, 356, 354, 1170, 1170, 349, 347, + 366, 352, 358, 359, 360, 1170, 1170, 1170, 361, 357, + 365, 373, 350, 1170, 362, 370, 371, 1170, 367, 1170, + 363, 374, 364, 387, 1170, 1170, 368, 381, 369, 382, + + 376, 1170, 378, 385, 386, 389, 375, 391, 379, 1170, + 1170, 1170, 1170, 1170, 377, 1170, 1170, 1170, 1170, 372, + 1170, 383, 384, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 392, 396, 395, 388, 1170, 390, 393, 402, + 404, 400, 1170, 423, 401, 1170, 397, 1170, 398, 1170, + 422, 394, 1170, 424, 399, 403, 405, 406, 407, 408, + 410, 411, 412, 413, 1170, 414, 417, 418, 419, 420, + 1170, 425, 421, 1170, 430, 1170, 426, 1170, 427, 1170, + 431, 428, 433, 1170, 1170, 1170, 429, 1170, 1170, 1170, + 434, 1170, 436, 1170, 432, 438, 435, 1170, 1170, 1170, + + 1170, 1170, 437, 1170, 439, 449, 448, 440, 444, 1170, + 447, 1170, 452, 1170, 1170, 442, 1170, 441, 453, 445, + 1170, 459, 450, 1170, 1170, 446, 1170, 1170, 1170, 1170, + 1170, 462, 1170, 455, 1170, 451, 472, 454, 1170, 456, + 457, 461, 466, 464, 458, 460, 1170, 1170, 1170, 1170, + 463, 1170, 468, 1170, 470, 1170, 1170, 1170, 467, 473, + 465, 477, 1170, 469, 476, 1170, 1170, 1170, 478, 1170, + 483, 1170, 1170, 1170, 1170, 1170, 479, 1170, 474, 1170, + 497, 498, 481, 482, 1170, 480, 494, 495, 486, 488, + 487, 1170, 489, 491, 1170, 493, 490, 485, 500, 1170, + + 484, 1170, 1170, 1170, 1170, 492, 1170, 499, 1170, 511, + 512, 1170, 1170, 1170, 501, 1170, 514, 1170, 1170, 1170, + 1170, 503, 502, 507, 1170, 510, 513, 516, 528, 1170, + 1170, 508, 518, 519, 1170, 509, 521, 517, 526, 523, + 527, 1170, 1170, 532, 1170, 520, 533, 1170, 1170, 522, + 1170, 524, 525, 529, 531, 534, 1170, 536, 535, 1170, + 1170, 1170, 1170, 1170, 530, 538, 1170, 1170, 1170, 540, + 1170, 1170, 544, 547, 541, 542, 1170, 1170, 543, 539, + 1170, 1170, 545, 1170, 1170, 1170, 549, 1170, 1170, 1170, + 551, 546, 548, 1170, 553, 1170, 554, 565, 556, 557, + + 1170, 558, 555, 550, 552, 560, 564, 559, 561, 1170, + 566, 1170, 563, 1170, 571, 573, 1170, 567, 1170, 574, + 1170, 1170, 1170, 569, 1170, 570, 568, 1170, 572, 1170, + 1170, 1170, 577, 1170, 1170, 1170, 576, 578, 1170, 1170, + 1170, 1170, 579, 582, 1170, 581, 583, 593, 594, 585, + 575, 1170, 586, 1170, 580, 591, 588, 1170, 1170, 595, + 1170, 1170, 1170, 1170, 1170, 584, 1170, 592, 1170, 1170, + 587, 1170, 1170, 1170, 598, 596, 602, 1170, 1170, 603, + 1170, 606, 1170, 1170, 1170, 597, 1170, 604, 605, 609, + 599, 615, 600, 601, 611, 607, 1170, 608, 1170, 1170, + + 610, 618, 1170, 616, 1170, 1170, 1170, 1170, 1170, 1170, + 619, 1170, 1170, 623, 617, 624, 625, 1170, 626, 633, + 1170, 632, 1170, 1170, 641, 646, 635, 638, 647, 649, + 634, 630, 636, 1170, 1170, 1170, 648, 640, 1170, 644, + 651, 1170, 637, 643, 1170, 1170, 1170, 1170, 1170, 1170, + 645, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 798, 656, + 799, 1170, 1170, 653, 654, 1170, 1170, 660, 1170, 666, + 650, 657, 652, 667, 668, 655, 665, 669, 1170, 658, + 1170, 1170, 661, 670, 1170, 659, 1170, 662, 1170, 1170, + 1170, 663, 1170, 671, 672, 1170, 681, 1170, 664, 675, + + 1170, 674, 676, 677, 678, 1170, 1170, 686, 673, 1170, + 682, 1170, 1170, 685, 1170, 1170, 1170, 683, 1170, 1170, + 691, 684, 1170, 680, 1170, 692, 688, 1170, 1170, 693, + 1170, 687, 689, 697, 703, 698, 694, 1170, 700, 695, + 1170, 699, 1170, 696, 705, 701, 702, 707, 1170, 708, + 1170, 1170, 706, 704, 709, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 712, 1170, 711, 1170, 1170, 1170, 1170, + 721, 1170, 1170, 723, 1170, 1170, 1170, 710, 715, 726, + 722, 1170, 724, 1170, 732, 729, 716, 1170, 725, 719, + 733, 1170, 727, 1170, 720, 731, 730, 1170, 735, 728, + + 736, 1170, 1170, 738, 737, 1170, 1170, 739, 1170, 743, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 749, 744, 745, 752, 751, 754, 1170, 762, + 759, 753, 761, 1170, 755, 1170, 763, 1170, 756, 1170, + 770, 767, 765, 1170, 757, 764, 1170, 1170, 768, 1170, + 766, 760, 1170, 1170, 1170, 1170, 769, 1170, 1170, 775, + 773, 771, 1170, 774, 1170, 1170, 1170, 1170, 1170, 772, + 1170, 1170, 776, 1170, 778, 777, 779, 1170, 780, 782, + 1170, 1170, 786, 1170, 785, 1170, 781, 1170, 783, 788, + 791, 1170, 1170, 1170, 1170, 789, 795, 794, 784, 787, + + 792, 1170, 1170, 1170, 790, 797, 1170, 1170, 1170, 1170, + 802, 796, 793, 1170, 1170, 800, 1170, 801, 803, 1170, + 812, 1170, 1170, 805, 808, 804, 809, 1170, 1170, 1170, + 1170, 1170, 1170, 807, 1170, 806, 1170, 813, 816, 810, + 811, 1170, 1170, 1170, 818, 1170, 814, 815, 1170, 1170, + 1170, 1170, 1170, 823, 1170, 817, 820, 1170, 827, 826, + 828, 822, 821, 825, 829, 824, 830, 1170, 842, 834, + 832, 1170, 836, 831, 844, 1170, 1170, 1170, 1170, 835, + 1170, 838, 1170, 1170, 845, 1170, 1170, 1170, 857, 847, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 851, 1170, 1170, + + 856, 846, 1170, 1170, 860, 1170, 859, 852, 1170, 850, + 853, 1170, 1170, 858, 849, 854, 861, 1170, 863, 864, + 1170, 1170, 855, 1170, 1170, 865, 870, 1170, 866, 867, + 872, 862, 868, 869, 1170, 1170, 1170, 1170, 871, 873, + 875, 874, 1170, 1170, 876, 1170, 1170, 1170, 1170, 1170, + 878, 877, 1170, 1170, 1170, 881, 1170, 1170, 882, 884, + 885, 1170, 880, 1170, 1170, 1170, 1170, 879, 1170, 883, + 892, 889, 886, 893, 1170, 891, 896, 899, 1170, 1170, + 894, 898, 1170, 895, 1170, 1170, 890, 901, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 903, 1170, 1170, 897, 900, + + 902, 905, 907, 1170, 909, 904, 910, 908, 913, 912, + 914, 1170, 1170, 1170, 906, 1170, 1170, 911, 1170, 1170, + 915, 919, 1170, 1170, 1170, 1170, 1170, 916, 918, 920, + 1170, 927, 1170, 1170, 1170, 1170, 929, 942, 1170, 944, + 940, 1170, 983, 1170, 922, 945, 1170, 925, 1170, 939, + 928, 931, 932, 933, 934, 935, 936, 937, 938, 941, + 946, 1170, 1170, 943, 1170, 1170, 1170, 950, 954, 955, + 951, 1170, 952, 1170, 947, 1170, 948, 949, 1170, 1170, + 1170, 1170, 1170, 953, 1170, 1170, 1170, 1170, 957, 1170, + 1170, 1170, 956, 1170, 960, 1170, 1170, 962, 963, 965, + + 961, 967, 1170, 971, 1170, 958, 968, 972, 959, 966, + 1170, 964, 1170, 1170, 973, 1170, 974, 1170, 1170, 975, + 1170, 1170, 976, 1170, 977, 981, 1170, 1170, 1170, 1170, + 1170, 978, 1170, 1170, 979, 985, 980, 1170, 1170, 989, + 1170, 1170, 988, 982, 1170, 984, 992, 990, 1170, 994, + 997, 986, 1170, 987, 1170, 1170, 1001, 1170, 1170, 1170, + 1170, 991, 1170, 1170, 1170, 1003, 1170, 1170, 1170, 998, + 1010, 999, 1002, 1170, 1170, 1170, 1004, 1006, 1007, 1005, + 1008, 1009, 1012, 1011, 1013, 1170, 1170, 1170, 1170, 1015, + 1017, 1014, 1018, 1170, 1170, 1016, 1170, 1019, 1170, 1170, + + 1025, 1020, 1170, 1170, 1170, 1170, 1170, 1170, 1021, 1022, + 1024, 1170, 1027, 1170, 1023, 1029, 1031, 1028, 1026, 1170, + 1042, 1043, 1030, 1170, 1170, 1032, 1170, 1170, 1038, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1034, 1170, 1033, 1035, + 1036, 1170, 1041, 1045, 1170, 1037, 1170, 1039, 1049, 1050, + 1047, 1052, 1057, 1046, 1044, 1053, 1048, 1170, 1170, 1170, + 1054, 1170, 1170, 1170, 1055, 1170, 1170, 1051, 1170, 1056, + 1170, 1061, 1170, 1170, 1170, 1170, 1058, 1067, 1059, 1060, + 1062, 1170, 1063, 1066, 1170, 1170, 1170, 1064, 1170, 1170, + 1170, 1065, 1069, 1170, 1074, 1170, 1071, 1170, 1078, 1170, + + 1170, 1077, 1068, 1170, 1070, 1170, 1080, 1170, 1170, 1072, + 1170, 1170, 1073, 1079, 1085, 1087, 1088, 1086, 1170, 1084, + 1170, 1089, 1170, 1170, 1170, 1170, 1081, 1082, 1170, 1170, + 1083, 1170, 1170, 1170, 1093, 1095, 1170, 1097, 1170, 1170, + 1170, 1094, 1090, 1102, 1091, 1092, 1105, 1170, 1108, 1170, + 1109, 1100, 1099, 1170, 1096, 1170, 1098, 1101, 1170, 1106, + 1107, 1170, 1170, 1112, 1110, 1170, 1111, 1170, 1170, 1170, + 1170, 1170, 1116, 1170, 1170, 1170, 1114, 1170, 1170, 1170, + 1170, 1170, 1120, 1170, 1113, 1117, 1121, 1130, 1127, 1126, + 1115, 1118, 1125, 1131, 1119, 1137, 1132, 1133, 1134, 1135, + + 1138, 1136, 1170, 1170, 1122, 1129, 1170, 1128, 1170, 1170, + 1140, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1142, 1170, 1170, 1139, 1170, 1170, 1147, 1148, 1170, 1143, + 1170, 1170, 1144, 1149, 1153, 1145, 1146, 1170, 1152, 1154, + 1170, 1155, 1170, 1170, 1150, 1170, 1156, 1151, 1160, 1157, + 1166, 1167, 1159, 1168, 1169, 1161, 1158, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1165, 1141, 1170, 1170, + 1170, 1170, 1124, 1123, 1170, 1170, 1163, 1162, 1170, 1164, + 59, 59, 164, 164, 164, 162, 162, 162, 1170, 1170, + 1170, 1170, 1170, 1170, 1104, 1103, 1170, 1170, 1170, 1170, + + 1170, 1170, 1076, 1075, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1040, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1000, 1170, 996, 995, 1170, 1170, 1170, 993, 1170, + 1170, 1170, 1170, 1170, 1170, 970, 969, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 930, 1170, 926, 924, 923, 921, + 917, 1170, 1170, 1170, 1170, 888, 887, 1170, 848, 1170, + 1170, 1170, 843, 841, 840, 839, 1170, 1170, 837, 1170, + 1170, 833, 1170, 1170, 1170, 1170, 1170, 819, 1170, 1170, + + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 758, 1170, + 1170, 1170, 750, 748, 747, 746, 1170, 742, 741, 740, + 734, 1170, 1170, 1170, 1170, 718, 717, 714, 713, 690, + 679, 1170, 642, 1170, 1170, 631, 629, 628, 627, 622, + 621, 620, 614, 1170, 590, 589, 1170, 562, 1170, 515, + 1170, 1170, 506, 505, 504, 1170, 496, 1170, 1170, 1170, + 475, 1170, 1170, 1170, 471, 1170, 1170, 1170, 1170, 1170, + 443, 1170, 1170, 1170, 380, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 163, 1170, + 1170, 160, 58, 159, 137, 115, 112, 1170, 68, 67, + + 58, 1170, 3, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170 } ; -static yyconst flex_int16_t yy_chk[2369] = +static yyconst flex_int16_t yy_chk[2474] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1112,289 +1142,303 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 18, 20, 5, 8, 8, 18, 8, 8, 8, - 8, 41, 8, 76, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 41, 50, 277, + 8, 41, 8, 78, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 41, 50, 495, - 277, 20, 8, 8, 8, 50, 8, 76, 8, 8, + 78, 20, 8, 8, 8, 50, 8, 495, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 34, 35, 34, 86, - 34, 19, 38, 19, 1111, 44, 38, 34, 35, 19, - 19, 19, 19, 19, 19, 39, 43, 43, 43, 44, - 57, 75, 64, 57, 39, 39, 43, 86, 43, 60, - 83, 79, 19, 26, 43, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 83, + 19, 19, 19, 19, 19, 19, 34, 75, 34, 1171, + 34, 19, 38, 19, 34, 64, 38, 34, 39, 19, + 19, 19, 19, 19, 19, 35, 44, 39, 39, 35, + 57, 524, 81, 57, 80, 90, 35, 75, 60, 79, + 44, 70, 19, 26, 64, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 60, - 60, 64, 79, 26, 26, 26, 83, 26, 77, 75, + 79, 70, 81, 26, 26, 26, 80, 26, 90, 524, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 77, 70, 32, - 80, 32, 27, 115, 81, 452, 452, 1109, 115, 45, - 27, 27, 27, 27, 27, 27, 32, 32, 70, 45, - 32, 32, 45, 33, 72, 32, 45, 37, 32, 33, - 33, 72, 80, 33, 74, 37, 33, 32, 36, 37, - 36, 78, 81, 36, 84, 37, 33, 37, 46, 36, - - 46, 36, 48, 85, 74, 90, 46, 36, 78, 46, - 46, 36, 51, 46, 51, 46, 46, 72, 46, 51, - 48, 84, 82, 92, 48, 88, 94, 167, 89, 51, - 85, 97, 167, 90, 82, 90, 92, 87, 48, 49, - 49, 49, 91, 49, 49, 89, 97, 49, 93, 100, - 94, 49, 49, 82, 88, 49, 98, 104, 49, 49, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 87, 63, 91, 95, 98, 101, 99, 96, - 102, 91, 100, 104, 91, 103, 93, 63, 63, 63, - 63, 63, 96, 99, 105, 63, 107, 63, 63, 103, - - 108, 101, 109, 118, 110, 111, 106, 105, 107, 113, - 99, 1108, 102, 108, 114, 112, 95, 110, 116, 118, - 119, 123, 113, 109, 124, 125, 63, 63, 63, 63, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 106, 117, 111, 112, 119, 114, 120, 65, 122, 127, - 116, 125, 124, 123, 144, 1107, 117, 128, 126, 1106, - 130, 121, 137, 141, 129, 151, 122, 131, 135, 144, - 127, 120, 120, 128, 121, 130, 65, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 121, 126, 129, - 131, 121, 66, 130, 133, 141, 135, 137, 151, 282, - - 66, 66, 66, 66, 66, 66, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 133, 132, 133, - 134, 73, 138, 136, 139, 282, 140, 145, 142, 73, - 73, 73, 73, 73, 73, 132, 136, 139, 134, 143, - 145, 146, 143, 143, 147, 132, 140, 149, 136, 142, - 148, 150, 143, 138, 146, 152, 138, 147, 153, 154, - 145, 157, 155, 165, 150, 156, 159, 168, 165, 169, - 149, 146, 170, 148, 148, 181, 193, 154, 155, 156, - 1105, 171, 156, 152, 169, 153, 159, 173, 165, 157, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - - 162, 162, 168, 162, 171, 186, 173, 181, 180, 166, - 170, 174, 177, 175, 189, 193, 176, 162, 162, 162, - 162, 162, 166, 180, 178, 162, 175, 162, 162, 176, - 176, 174, 182, 177, 166, 176, 178, 184, 185, 176, - 190, 188, 186, 187, 192, 182, 189, 191, 194, 200, - 184, 196, 197, 185, 188, 198, 162, 162, 162, 162, - 187, 190, 191, 195, 195, 195, 195, 199, 192, 197, - 200, 201, 198, 203, 204, 205, 206, 207, 209, 194, - 208, 196, 210, 211, 199, 219, 212, 213, 201, 204, - 221, 205, 207, 206, 216, 218, 220, 203, 212, 208, - - 222, 210, 217, 213, 224, 217, 221, 216, 223, 225, - 209, 226, 218, 220, 211, 217, 227, 219, 228, 229, - 1104, 223, 230, 226, 234, 233, 236, 237, 238, 224, - 248, 235, 241, 222, 254, 228, 229, 227, 223, 230, - 225, 233, 234, 235, 240, 243, 238, 242, 242, 235, - 240, 229, 223, 241, 245, 246, 249, 236, 256, 237, - 252, 243, 240, 257, 253, 248, 254, 254, 259, 249, - 240, 245, 258, 252, 260, 262, 243, 253, 255, 255, - 261, 242, 246, 263, 266, 258, 255, 260, 264, 265, - 256, 267, 270, 262, 274, 271, 259, 257, 278, 260, - - 276, 261, 353, 267, 280, 260, 265, 271, 285, 279, - 281, 266, 284, 263, 286, 263, 287, 293, 260, 264, - 353, 280, 270, 273, 273, 273, 273, 281, 278, 279, - 274, 275, 275, 275, 275, 283, 276, 284, 286, 288, - 289, 285, 291, 290, 295, 298, 287, 283, 293, 283, - 292, 299, 283, 300, 301, 302, 288, 283, 304, 289, - 290, 309, 292, 303, 310, 291, 313, 295, 300, 311, - 312, 292, 299, 315, 292, 304, 303, 316, 317, 301, - 319, 322, 298, 320, 292, 315, 318, 323, 324, 328, - 313, 330, 302, 322, 310, 317, 312, 311, 309, 326, - - 320, 318, 328, 333, 336, 337, 338, 319, 339, 316, - 341, 324, 330, 342, 345, 343, 346, 323, 337, 326, - 348, 336, 347, 338, 349, 350, 351, 345, 354, 352, - 359, 339, 361, 360, 362, 333, 343, 363, 368, 342, - 341, 348, 350, 369, 354, 349, 372, 351, 355, 355, - 377, 346, 352, 347, 360, 373, 355, 362, 375, 368, - 374, 374, 361, 359, 378, 379, 380, 363, 381, 382, - 375, 377, 373, 369, 383, 384, 386, 374, 372, 388, - 387, 377, 404, 402, 389, 378, 379, 405, 409, 381, - 394, 406, 388, 394, 387, 383, 387, 394, 380, 399, - - 407, 382, 399, 413, 388, 403, 399, 384, 386, 389, - 402, 408, 403, 404, 409, 388, 406, 410, 411, 412, - 414, 415, 416, 418, 405, 419, 413, 407, 407, 417, - 411, 407, 423, 421, 420, 408, 422, 425, 426, 427, - 419, 419, 433, 431, 415, 428, 434, 435, 416, 410, - 426, 412, 429, 422, 418, 417, 431, 414, 415, 420, - 421, 430, 428, 423, 429, 427, 432, 436, 425, 437, - 433, 438, 434, 430, 439, 440, 442, 443, 432, 435, - 444, 445, 446, 436, 447, 453, 438, 451, 450, 443, - 455, 454, 442, 456, 458, 439, 445, 459, 460, 446, - - 453, 447, 450, 462, 461, 440, 437, 463, 464, 465, - 456, 466, 444, 467, 451, 454, 461, 470, 468, 473, - 462, 469, 455, 470, 465, 474, 458, 464, 471, 459, - 460, 463, 473, 469, 475, 466, 471, 476, 467, 468, - 477, 482, 481, 483, 488, 484, 490, 491, 492, 495, - 496, 474, 493, 498, 476, 497, 500, 503, 482, 484, - 483, 501, 490, 505, 491, 504, 510, 477, 475, 481, - 497, 493, 492, 495, 501, 507, 500, 506, 508, 488, - 503, 507, 504, 496, 511, 506, 508, 509, 512, 513, - 505, 498, 511, 509, 514, 515, 516, 517, 510, 518, - - 519, 520, 522, 523, 521, 1103, 530, 513, 524, 516, - 537, 514, 525, 526, 520, 523, 527, 517, 521, 512, - 524, 515, 522, 521, 525, 526, 518, 521, 528, 527, - 531, 526, 519, 530, 521, 532, 533, 534, 535, 538, - 539, 541, 540, 537, 528, 542, 547, 531, 532, 533, - 535, 545, 534, 539, 540, 544, 546, 549, 541, 538, - 548, 554, 550, 538, 551, 542, 555, 547, 557, 544, - 552, 561, 556, 546, 544, 553, 554, 548, 544, 562, - 549, 558, 552, 545, 556, 544, 565, 555, 544, 550, - 568, 551, 553, 570, 558, 569, 571, 572, 561, 573, - - 574, 552, 575, 576, 577, 557, 578, 569, 579, 571, - 562, 580, 584, 586, 570, 585, 588, 574, 572, 565, - 592, 577, 594, 573, 595, 580, 587, 568, 575, 599, - 586, 602, 579, 578, 585, 576, 584, 603, 587, 604, - 605, 606, 610, 608, 612, 613, 592, 614, 588, 623, - 599, 595, 594, 624, 603, 602, 620, 605, 622, 625, - 626, 612, 628, 614, 630, 604, 627, 629, 620, 606, - 608, 631, 634, 626, 610, 623, 632, 624, 633, 622, - 635, 627, 613, 628, 634, 636, 629, 640, 630, 625, - 637, 638, 639, 632, 641, 633, 642, 643, 644, 647, - - 645, 631, 646, 635, 649, 650, 651, 652, 636, 653, - 654, 637, 638, 639, 655, 641, 645, 644, 650, 640, - 647, 656, 642, 656, 657, 653, 658, 655, 659, 649, - 660, 643, 661, 651, 646, 663, 654, 662, 664, 652, - 667, 665, 666, 668, 674, 659, 672, 660, 657, 669, - 670, 673, 676, 679, 680, 683, 658, 665, 662, 666, - 685, 674, 669, 661, 686, 664, 667, 663, 676, 668, - 688, 670, 689, 672, 694, 692, 673, 695, 696, 699, - 679, 685, 708, 701, 700, 683, 680, 716, 714, 689, - 694, 686, 692, 685, 695, 688, 700, 712, 696, 719, - - 716, 720, 722, 699, 701, 714, 723, 724, 725, 708, - 726, 727, 728, 712, 720, 729, 732, 731, 730, 734, - 733, 735, 736, 741, 724, 719, 730, 738, 729, 742, - 737, 732, 733, 725, 726, 739, 740, 723, 743, 722, - 731, 744, 734, 727, 738, 736, 737, 745, 746, 728, - 747, 748, 739, 740, 750, 749, 753, 741, 735, 751, - 745, 756, 743, 742, 754, 755, 746, 757, 748, 758, - 761, 747, 749, 762, 744, 751, 763, 754, 764, 765, - 757, 750, 753, 768, 766, 769, 755, 756, 770, 771, - 772, 773, 775, 761, 764, 758, 765, 769, 774, 763, - - 777, 780, 772, 776, 778, 782, 781, 771, 784, 768, - 762, 766, 783, 785, 786, 787, 788, 774, 775, 781, - 776, 778, 782, 789, 773, 770, 777, 786, 783, 784, - 787, 793, 788, 780, 794, 795, 797, 801, 803, 785, - 789, 804, 805, 818, 811, 816, 817, 825, 793, 815, - 826, 795, 824, 803, 1100, 812, 818, 816, 794, 805, - 808, 808, 808, 808, 808, 808, 808, 808, 797, 801, - 808, 811, 812, 804, 815, 819, 820, 817, 824, 821, - 822, 823, 829, 830, 825, 831, 832, 826, 820, 833, - 819, 821, 822, 823, 835, 836, 840, 837, 838, 829, - - 839, 851, 841, 842, 833, 843, 846, 832, 847, 850, - 848, 831, 837, 830, 838, 841, 839, 842, 846, 849, - 847, 843, 848, 840, 835, 836, 852, 851, 853, 855, - 856, 849, 857, 858, 859, 860, 862, 864, 852, 850, - 861, 867, 868, 870, 869, 883, 884, 897, 875, 853, - 855, 856, 859, 881, 868, 861, 895, 867, 900, 858, - 901, 902, 860, 869, 857, 875, 862, 864, 898, 903, - 904, 905, 895, 881, 912, 870, 906, 883, 897, 884, - 910, 913, 915, 916, 902, 898, 919, 901, 917, 906, - 900, 904, 903, 912, 905, 921, 922, 910, 913, 925, - - 927, 926, 928, 931, 929, 936, 938, 933, 935, 941, - 916, 937, 919, 915, 932, 917, 929, 934, 936, 921, - 939, 927, 925, 922, 926, 928, 933, 931, 935, 943, - 932, 944, 937, 934, 947, 951, 955, 953, 956, 938, - 957, 941, 960, 958, 962, 969, 959, 961, 944, 974, - 939, 967, 968, 947, 953, 970, 943, 969, 962, 956, - 958, 943, 955, 959, 961, 951, 957, 967, 971, 978, - 968, 972, 970, 973, 975, 976, 960, 982, 977, 984, - 983, 978, 985, 974, 988, 987, 971, 991, 972, 976, - 973, 975, 994, 992, 976, 977, 995, 996, 976, 983, - - 991, 997, 998, 1000, 1001, 994, 1007, 1002, 1003, 982, - 992, 984, 1008, 1006, 1004, 996, 1010, 1011, 1012, 985, - 987, 988, 1014, 995, 1002, 1013, 1003, 1016, 1001, 1004, - 1004, 1006, 1015, 1019, 1026, 1021, 1020, 1022, 997, 998, - 1000, 1011, 1013, 1007, 1024, 1025, 1033, 1015, 1012, 1008, - 1030, 1034, 1022, 1010, 1031, 1026, 1014, 1039, 1024, 1040, - 1016, 1019, 1020, 1021, 1041, 1042, 1031, 1030, 1034, 1044, - 1043, 1025, 1045, 1046, 1033, 1047, 1048, 1054, 1049, 1051, - 1039, 1055, 1042, 1056, 1098, 1053, 1090, 1041, 1060, 1061, - 1046, 1057, 1047, 1063, 1062, 1056, 1040, 1043, 1051, 1044, - - 1053, 1041, 1049, 1057, 1045, 1061, 1058, 1058, 1059, 1059, - 1054, 1062, 1060, 1048, 1063, 1055, 1058, 1064, 1059, 1067, - 1069, 1071, 1072, 1073, 1079, 1074, 1075, 1081, 1085, 1092, - 1088, 1084, 1086, 1087, 1089, 1091, 1067, 1074, 1075, 1093, - 1069, 1079, 1071, 1085, 1092, 1072, 1073, 1064, 1084, 1086, - 1087, 1088, 1094, 1095, 1081, 1089, 1093, 1096, 1097, 1099, - 1083, 1091, 1101, 1101, 1102, 1102, 1082, 1080, 1078, 1077, - 1076, 1070, 1101, 1068, 1102, 1066, 1065, 1052, 1050, 1038, - 1037, 1036, 1099, 1035, 1032, 1029, 1028, 1027, 1023, 1094, - 1095, 1096, 1097, 1112, 1112, 1113, 1113, 1113, 1114, 1114, - - 1114, 1018, 1017, 1009, 1005, 999, 993, 989, 986, 981, - 980, 979, 966, 965, 964, 963, 954, 950, 949, 946, - 945, 942, 940, 930, 920, 918, 914, 911, 909, 908, - 907, 899, 896, 894, 893, 892, 891, 890, 889, 888, - 887, 886, 885, 879, 878, 876, 874, 873, 872, 871, - 866, 865, 863, 854, 845, 844, 834, 828, 827, 814, - 813, 810, 809, 807, 806, 802, 800, 799, 796, 792, - 791, 790, 767, 760, 759, 752, 721, 718, 717, 715, - 713, 711, 710, 709, 707, 706, 703, 702, 698, 697, - 693, 691, 690, 687, 684, 678, 675, 671, 621, 619, - - 618, 617, 616, 615, 611, 609, 607, 601, 600, 598, - 597, 596, 593, 591, 590, 589, 583, 582, 581, 567, - 566, 564, 563, 560, 559, 543, 536, 529, 502, 499, - 494, 489, 487, 486, 485, 480, 479, 478, 472, 457, - 449, 448, 441, 424, 385, 376, 371, 370, 367, 366, - 365, 364, 358, 344, 340, 335, 334, 332, 331, 329, - 327, 325, 321, 314, 297, 296, 294, 272, 269, 268, - 251, 250, 247, 244, 239, 232, 231, 215, 214, 202, - 183, 179, 172, 160, 71, 69, 59, 58, 52, 47, - 42, 40, 31, 25, 23, 6, 3, 1110, 1110, 1110, - - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110 + 27, 27, 27, 27, 27, 27, 27, 88, 72, 32, + 1169, 32, 27, 1168, 74, 72, 283, 84, 103, 45, + 27, 27, 27, 27, 27, 27, 32, 32, 88, 45, + 32, 32, 45, 33, 74, 32, 45, 37, 32, 33, + 33, 85, 103, 33, 84, 37, 33, 32, 36, 37, + 36, 72, 283, 36, 86, 37, 33, 37, 46, 36, + + 46, 36, 43, 43, 43, 48, 46, 36, 85, 46, + 46, 36, 43, 46, 43, 46, 46, 51, 46, 51, + 43, 82, 86, 48, 51, 76, 87, 48, 1167, 95, + 494, 76, 117, 82, 51, 94, 494, 117, 1166, 77, + 89, 48, 49, 49, 49, 77, 49, 49, 94, 76, + 49, 91, 82, 87, 49, 49, 83, 89, 49, 95, + 102, 49, 49, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 83, 63, 100, 77, 91, + 92, 91, 83, 96, 93, 102, 104, 113, 99, 96, + 63, 63, 63, 63, 63, 106, 98, 100, 63, 93, + + 63, 63, 97, 99, 92, 105, 120, 96, 97, 98, + 107, 92, 108, 101, 92, 286, 286, 1165, 104, 105, + 118, 106, 120, 107, 113, 114, 116, 98, 101, 63, + 63, 63, 63, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 97, 109, 101, 108, 110, 111, 112, + 65, 115, 118, 114, 121, 119, 109, 116, 124, 130, + 110, 125, 112, 111, 115, 122, 115, 131, 126, 111, + 119, 127, 128, 129, 232, 130, 124, 133, 121, 65, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 122, 122, 131, 125, 129, 66, 126, 127, 135, 232, + + 133, 137, 128, 66, 66, 66, 66, 66, 66, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 142, 135, 134, 135, 73, 123, 132, 136, 139, 137, + 140, 141, 73, 73, 73, 73, 73, 73, 123, 134, + 142, 132, 143, 138, 141, 136, 144, 147, 138, 134, + 151, 123, 1164, 150, 146, 123, 138, 148, 149, 132, + 147, 140, 145, 139, 140, 145, 145, 144, 138, 146, + 148, 149, 152, 151, 143, 145, 150, 150, 153, 154, + 147, 155, 156, 157, 158, 152, 159, 148, 191, 161, + 169, 170, 171, 176, 1163, 172, 170, 422, 158, 157, + + 156, 158, 170, 169, 422, 191, 173, 154, 155, 161, + 172, 153, 176, 177, 159, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 171, 164, 181, + 190, 174, 184, 177, 167, 168, 173, 180, 178, 193, + 183, 181, 164, 164, 164, 164, 164, 167, 168, 179, + 164, 178, 164, 164, 174, 183, 185, 187, 180, 167, + 168, 188, 179, 179, 184, 189, 192, 190, 179, 185, + 187, 193, 179, 194, 195, 196, 188, 197, 198, 192, + 199, 164, 164, 164, 164, 200, 200, 200, 200, 202, + 196, 195, 206, 203, 194, 204, 189, 205, 207, 209, + + 211, 197, 210, 212, 215, 214, 213, 216, 217, 198, + 203, 199, 204, 206, 205, 207, 211, 210, 218, 202, + 212, 213, 219, 209, 214, 220, 227, 217, 215, 221, + 224, 226, 225, 228, 219, 225, 230, 229, 231, 216, + 233, 220, 234, 224, 235, 225, 236, 237, 226, 218, + 228, 231, 221, 229, 234, 238, 242, 241, 227, 244, + 245, 265, 246, 236, 237, 235, 243, 257, 231, 230, + 248, 233, 238, 241, 242, 252, 248, 249, 243, 237, + 246, 251, 231, 254, 243, 250, 250, 255, 248, 263, + 244, 252, 245, 265, 251, 258, 248, 261, 249, 262, + + 254, 266, 257, 264, 264, 267, 252, 269, 258, 268, + 261, 264, 262, 270, 255, 271, 272, 275, 267, 250, + 269, 263, 263, 273, 274, 279, 290, 276, 280, 285, + 289, 1160, 269, 271, 270, 266, 291, 268, 269, 276, + 280, 274, 288, 290, 275, 292, 272, 295, 272, 294, + 289, 269, 297, 291, 273, 279, 282, 282, 282, 282, + 284, 284, 284, 284, 293, 285, 287, 287, 287, 287, + 296, 292, 288, 298, 294, 300, 293, 299, 293, 301, + 295, 293, 297, 302, 303, 305, 293, 306, 309, 310, + 298, 311, 300, 312, 296, 302, 299, 313, 314, 315, + + 321, 316, 301, 322, 302, 312, 311, 302, 305, 327, + 310, 323, 315, 328, 324, 303, 330, 302, 316, 306, + 325, 327, 313, 331, 329, 309, 332, 333, 336, 337, + 335, 330, 339, 322, 340, 314, 342, 321, 344, 323, + 324, 329, 335, 332, 325, 328, 347, 350, 351, 342, + 331, 352, 337, 353, 340, 355, 356, 359, 336, 344, + 333, 351, 357, 339, 350, 360, 361, 362, 352, 363, + 359, 365, 364, 366, 374, 367, 353, 375, 347, 368, + 373, 373, 356, 357, 376, 355, 369, 369, 362, 364, + 363, 378, 365, 367, 369, 368, 366, 361, 375, 377, + + 360, 384, 383, 387, 390, 367, 392, 374, 388, 389, + 389, 393, 394, 395, 376, 396, 390, 397, 398, 399, + 401, 378, 377, 383, 402, 388, 389, 392, 403, 404, + 421, 384, 393, 394, 423, 387, 396, 392, 402, 398, + 402, 403, 424, 409, 425, 395, 409, 426, 427, 397, + 409, 399, 401, 403, 404, 414, 428, 421, 414, 429, + 431, 430, 414, 432, 403, 423, 433, 434, 435, 425, + 436, 437, 427, 430, 426, 426, 439, 442, 426, 424, + 440, 444, 428, 438, 447, 446, 432, 454, 441, 445, + 434, 429, 431, 455, 435, 458, 436, 446, 438, 438, + + 448, 439, 437, 433, 434, 441, 445, 440, 442, 449, + 447, 450, 444, 451, 452, 454, 453, 448, 456, 455, + 457, 460, 459, 450, 461, 451, 449, 452, 453, 463, + 465, 464, 458, 466, 467, 468, 457, 459, 469, 470, + 474, 473, 460, 464, 476, 463, 465, 475, 475, 467, + 456, 477, 468, 478, 461, 473, 470, 479, 481, 476, + 482, 483, 485, 486, 484, 466, 488, 474, 491, 487, + 469, 489, 490, 492, 479, 477, 484, 500, 499, 485, + 501, 488, 493, 503, 502, 478, 507, 486, 487, 491, + 481, 499, 482, 483, 493, 489, 514, 490, 508, 509, + + 492, 502, 517, 500, 510, 516, 518, 519, 521, 522, + 503, 527, 523, 507, 501, 508, 509, 526, 510, 517, + 529, 516, 530, 531, 527, 532, 519, 523, 533, 535, + 518, 514, 521, 532, 533, 535, 534, 526, 536, 530, + 537, 538, 522, 529, 534, 539, 542, 540, 537, 541, + 531, 543, 544, 545, 546, 1158, 548, 549, 690, 542, + 690, 550, 551, 539, 540, 552, 564, 546, 547, 549, + 536, 543, 538, 550, 551, 541, 548, 552, 554, 544, + 553, 556, 547, 552, 557, 545, 558, 547, 560, 559, + 563, 547, 561, 553, 554, 567, 564, 565, 547, 558, + + 566, 557, 559, 560, 561, 568, 572, 567, 556, 569, + 565, 573, 570, 566, 575, 577, 574, 565, 578, 579, + 572, 565, 580, 563, 576, 572, 569, 581, 584, 572, + 583, 568, 570, 574, 580, 575, 572, 582, 577, 572, + 586, 576, 585, 573, 581, 578, 579, 583, 587, 584, + 588, 591, 582, 580, 585, 592, 595, 598, 599, 600, + 601, 602, 604, 588, 603, 587, 605, 606, 607, 608, + 599, 609, 610, 601, 615, 619, 611, 586, 591, 604, + 600, 616, 602, 623, 610, 607, 592, 617, 603, 595, + 611, 618, 605, 625, 598, 609, 608, 626, 615, 606, + + 616, 630, 633, 618, 617, 635, 637, 619, 634, 623, + 636, 639, 641, 643, 644, 653, 645, 651, 655, 654, + 656, 660, 630, 625, 626, 634, 633, 636, 657, 651, + 643, 635, 645, 658, 637, 659, 653, 661, 639, 662, + 660, 657, 655, 663, 641, 654, 664, 665, 658, 666, + 656, 644, 667, 668, 671, 669, 659, 670, 672, 665, + 663, 661, 673, 664, 674, 675, 676, 677, 678, 662, + 680, 682, 666, 684, 668, 667, 669, 683, 670, 672, + 685, 686, 676, 687, 675, 688, 671, 692, 673, 678, + 683, 691, 689, 693, 695, 680, 687, 686, 674, 677, + + 684, 694, 696, 697, 682, 689, 698, 703, 699, 700, + 693, 688, 685, 701, 702, 691, 704, 692, 694, 706, + 703, 709, 708, 696, 699, 695, 700, 711, 712, 715, + 716, 719, 721, 698, 724, 697, 722, 704, 709, 701, + 702, 725, 732, 728, 712, 736, 706, 708, 730, 731, + 733, 738, 749, 721, 745, 711, 715, 751, 725, 724, + 728, 719, 716, 722, 730, 721, 731, 737, 749, 736, + 733, 753, 738, 732, 751, 756, 757, 759, 760, 737, + 761, 745, 762, 764, 753, 765, 763, 766, 767, 757, + 768, 769, 770, 771, 772, 773, 767, 761, 778, 779, + + 766, 756, 780, 774, 770, 781, 769, 762, 775, 760, + 763, 776, 777, 768, 759, 764, 771, 782, 773, 774, + 784, 783, 765, 785, 787, 775, 780, 786, 776, 777, + 782, 772, 778, 779, 788, 790, 791, 793, 781, 783, + 785, 784, 792, 794, 786, 795, 797, 796, 800, 801, + 788, 787, 802, 805, 803, 792, 804, 807, 793, 795, + 796, 809, 791, 810, 808, 811, 812, 790, 813, 794, + 803, 800, 797, 804, 814, 802, 808, 811, 815, 816, + 805, 810, 820, 807, 818, 824, 801, 813, 823, 821, + 822, 825, 831, 827, 828, 815, 826, 835, 809, 812, + + 814, 818, 821, 829, 823, 816, 824, 822, 827, 826, + 828, 834, 838, 836, 820, 842, 844, 825, 845, 846, + 829, 835, 852, 853, 902, 857, 859, 831, 834, 836, + 860, 844, 858, 866, 856, 867, 846, 857, 871, 859, + 853, 865, 902, 872, 838, 860, 1149, 842, 861, 852, + 845, 849, 849, 849, 849, 849, 849, 849, 849, 856, + 861, 849, 862, 858, 863, 864, 870, 865, 871, 872, + 866, 873, 867, 874, 862, 876, 863, 864, 877, 878, + 879, 880, 881, 870, 882, 884, 883, 885, 874, 893, + 886, 889, 873, 900, 878, 890, 894, 880, 881, 883, + + 879, 885, 891, 889, 892, 876, 886, 890, 877, 884, + 896, 882, 895, 898, 891, 899, 892, 901, 903, 893, + 904, 905, 894, 907, 895, 900, 910, 911, 912, 913, + 925, 896, 919, 916, 898, 904, 899, 927, 928, 911, + 939, 941, 910, 901, 944, 903, 916, 912, 942, 919, + 925, 905, 945, 907, 946, 947, 939, 950, 949, 948, + 959, 913, 960, 956, 964, 942, 954, 957, 962, 927, + 950, 928, 941, 967, 968, 966, 944, 946, 947, 945, + 948, 949, 956, 954, 957, 971, 972, 974, 975, 960, + 964, 959, 966, 973, 977, 962, 978, 967, 979, 980, + + 975, 968, 981, 982, 983, 984, 985, 987, 971, 972, + 974, 990, 978, 989, 973, 980, 982, 979, 977, 992, + 996, 996, 981, 994, 999, 983, 1001, 1003, 990, 1004, + 1005, 1006, 1007, 1008, 1009, 1019, 985, 1023, 984, 987, + 989, 1010, 994, 1001, 1015, 989, 1016, 992, 1006, 1007, + 1004, 1009, 1019, 1003, 999, 1010, 1005, 1017, 1020, 1034, + 1015, 1021, 1022, 1024, 1016, 1027, 1026, 1008, 1025, 1017, + 1031, 1023, 1033, 1032, 1036, 1037, 1020, 1027, 1021, 1022, + 1024, 1041, 1025, 1026, 1044, 1046, 1047, 1025, 1048, 1049, + 1050, 1025, 1032, 1052, 1041, 1053, 1034, 1054, 1046, 1055, + + 1056, 1044, 1031, 1058, 1033, 1059, 1048, 1060, 1062, 1036, + 1063, 1064, 1037, 1047, 1054, 1056, 1056, 1055, 1065, 1053, + 1066, 1058, 1067, 1068, 1071, 1072, 1049, 1050, 1074, 1073, + 1052, 1084, 1078, 1079, 1063, 1065, 1087, 1067, 1085, 1080, + 1093, 1064, 1059, 1074, 1060, 1062, 1078, 1094, 1084, 1088, + 1085, 1072, 1071, 1095, 1066, 1096, 1068, 1073, 1097, 1079, + 1080, 1098, 1099, 1093, 1087, 1100, 1088, 1102, 1105, 1101, + 1107, 1111, 1096, 1109, 1110, 1112, 1095, 1116, 1142, 1117, + 1120, 1113, 1100, 1118, 1094, 1097, 1101, 1112, 1109, 1107, + 1095, 1098, 1105, 1113, 1099, 1117, 1114, 1114, 1115, 1115, + + 1118, 1116, 1119, 1125, 1102, 1111, 1114, 1110, 1115, 1127, + 1120, 1129, 1130, 1131, 1132, 1133, 1137, 1139, 1154, 1144, + 1125, 1143, 1145, 1119, 1146, 1147, 1132, 1133, 1148, 1127, + 1150, 1153, 1129, 1137, 1144, 1130, 1131, 1152, 1143, 1145, + 1155, 1146, 1156, 1159, 1139, 1157, 1147, 1141, 1153, 1148, + 1161, 1161, 1152, 1162, 1162, 1154, 1150, 1140, 1138, 1136, + 1161, 1135, 1134, 1162, 1128, 1126, 1159, 1124, 1122, 1121, + 1108, 1106, 1104, 1103, 1092, 1091, 1156, 1155, 1090, 1157, + 1172, 1172, 1173, 1173, 1173, 1174, 1174, 1174, 1089, 1086, + 1083, 1082, 1081, 1077, 1076, 1075, 1070, 1069, 1061, 1057, + + 1051, 1045, 1043, 1042, 1039, 1038, 1035, 1030, 1029, 1028, + 1018, 1014, 1013, 1012, 1011, 1002, 998, 997, 993, 991, + 988, 986, 976, 965, 963, 961, 958, 955, 953, 952, + 951, 943, 940, 938, 937, 936, 935, 934, 933, 932, + 931, 930, 929, 924, 923, 922, 920, 918, 917, 915, + 914, 909, 908, 906, 897, 888, 887, 875, 869, 868, + 855, 854, 851, 850, 848, 847, 843, 841, 840, 837, + 833, 832, 830, 817, 806, 799, 798, 789, 758, 755, + 754, 752, 750, 748, 747, 746, 744, 743, 740, 739, + 735, 734, 729, 727, 726, 723, 720, 714, 710, 707, + + 705, 681, 652, 650, 649, 648, 647, 646, 642, 640, + 638, 632, 631, 629, 628, 627, 624, 622, 621, 620, + 614, 613, 612, 597, 596, 594, 593, 590, 589, 571, + 562, 555, 528, 525, 520, 515, 513, 512, 511, 506, + 505, 504, 496, 480, 472, 471, 462, 443, 400, 391, + 386, 385, 382, 381, 380, 379, 372, 358, 354, 349, + 348, 346, 345, 343, 341, 338, 334, 326, 308, 307, + 304, 281, 278, 277, 260, 259, 256, 253, 247, 240, + 239, 223, 222, 208, 201, 186, 182, 175, 162, 71, + 69, 59, 58, 52, 47, 42, 40, 31, 25, 23, + + 6, 3, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, + 1170, 1170, 1170 } ; -static yyconst flex_int16_t yy_rule_linenum[247] = +static yyconst flex_int16_t yy_rule_linenum[262] = { 0, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, + 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 105, 106, - 107, 108, 109, 110, 112, 114, 115, 116, 118, 119, - 120, 121, 122, 124, 125, 126, 127, 129, 130, 131, - 132, 133, 134, 135, 136, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 108, 109, 110, 111, 112, 113, 115, 117, 118, + 119, 121, 122, 123, 124, 125, 127, 128, 129, 130, + 132, 133, 134, 135, 136, 137, 138, 139, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 174, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 198, 199, 200, 201, 202, 203, 204, 205, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 240, 241, 242, 243, 244, 246, 247, 248, - 249, 250, 252, 253, 254, 256, 258, 259, 260, 261, - - 262, 263, 264, 266, 268, 269, 270, 271, 272, 273, - 274, 276, 277, 278, 280, 281, 282, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 308, - 309, 310, 312, 313, 314, 315 + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 255, 256, 257, + + 258, 259, 261, 262, 263, 264, 265, 267, 268, 269, + 271, 273, 274, 275, 276, 277, 278, 279, 281, 283, + 284, 285, 286, 287, 288, 289, 291, 292, 293, 295, + 296, 297, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 323, 324, 325, 327, 328, 329, + 330 } ; /* The intent behind this definition is that it'll catch @@ -1433,7 +1477,7 @@ /* see http://www.lysator.liu.se/c/ANSI-C-grammar-l.html */ #line 35 "../s/bif.l" # define YY_USER_ACTION yylloc->columns (yyleng); -#line 1437 "../bisonflex/bif.yy.cpp" +#line 1481 "../bisonflex/bif.yy.cpp" #define INITIAL 0 @@ -1597,7 +1641,7 @@ yylloc->step (); -#line 1601 "../bisonflex/bif.yy.cpp" +#line 1645 "../bisonflex/bif.yy.cpp" if ( !(yy_init) ) { @@ -1660,13 +1704,13 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1111 ) + if ( yy_current_state >= 1171 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 1110 ); + while ( yy_current_state != 1170 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1685,12 +1729,12 @@ { if ( yy_act == 0 ) std::cerr << "--scanner backing up\n"; - else if ( yy_act < 247 ) + else if ( yy_act < 262 ) std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << "(\"" << yytext << "\")\n"; - else if ( yy_act == 247 ) + else if ( yy_act == 262 ) std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; - else if ( yy_act == 248 ) + else if ( yy_act == 263 ) std::cerr << "--(end of buffer or a NUL)\n"; else std::cerr << "--EOF (start condition " << YY_START << ")\n"; @@ -1790,1160 +1834,1235 @@ case 17: YY_RULE_SETUP #line 61 "../s/bif.l" -return tok::HIVEC; +return tok::DELAY_AUTH; YY_BREAK case 18: YY_RULE_SETUP #line 62 "../s/bif.l" -return tok::BLOCKS; +return tok::HIVEC; YY_BREAK case 19: YY_RULE_SETUP #line 63 "../s/bif.l" -return tok::AUTHBLOCKS; +return tok::BLOCKS; YY_BREAK case 20: YY_RULE_SETUP #line 64 "../s/bif.l" -return tok::BIGENDIAN; +return tok::AUTHBLOCKS; YY_BREAK case 21: YY_RULE_SETUP #line 65 "../s/bif.l" -return tok::A32_MODE; +return tok::BIGENDIAN; YY_BREAK case 22: YY_RULE_SETUP #line 66 "../s/bif.l" -return tok::PARTITION; +return tok::A32_MODE; YY_BREAK case 23: YY_RULE_SETUP #line 67 "../s/bif.l" -return tok::IMAGE; +return tok::PARTITION; YY_BREAK case 24: YY_RULE_SETUP #line 68 "../s/bif.l" -return tok::METAHEADER; +return tok::IMAGE; YY_BREAK case 25: YY_RULE_SETUP #line 69 "../s/bif.l" -return tok::BIF_SECTION; +return tok::METAHEADER; YY_BREAK case 26: YY_RULE_SETUP -#line 71 "../s/bif.l" -yylval->number = tok::OFFSET; return tok::OFFSET; +#line 70 "../s/bif.l" +return tok::BIF_SECTION; YY_BREAK case 27: YY_RULE_SETUP -#line 72 "../s/bif.l" -yylval->number = tok::RESERVE_LEGACY; return tok::RESERVE_LEGACY; +#line 71 "../s/bif.l" +return tok::LOCKSTEP; YY_BREAK case 28: YY_RULE_SETUP -#line 73 "../s/bif.l" -yylval->number = tok::RESERVE; return tok::RESERVE; +#line 72 "../s/bif.l" +return tok::INCLUDE; YY_BREAK case 29: YY_RULE_SETUP #line 74 "../s/bif.l" -yylval->number = tok::LOAD; return tok::LOAD; +yylval->number = tok::OFFSET; return tok::OFFSET; YY_BREAK case 30: YY_RULE_SETUP #line 75 "../s/bif.l" -yylval->number = tok::COPY; return tok::COPY; +yylval->number = tok::RESERVE_LEGACY; return tok::RESERVE_LEGACY; YY_BREAK case 31: YY_RULE_SETUP #line 76 "../s/bif.l" -yylval->number = tok::STARTUP; return tok::STARTUP; +yylval->number = tok::RESERVE; return tok::RESERVE; YY_BREAK case 32: YY_RULE_SETUP #line 77 "../s/bif.l" -yylval->number = tok::PARTITION_NUM; return tok::PARTITION_NUM; +yylval->number = tok::LOAD; return tok::LOAD; YY_BREAK case 33: YY_RULE_SETUP #line 78 "../s/bif.l" -yylval->number = tok::INIT; return tok::INIT; +yylval->number = tok::COPY; return tok::COPY; YY_BREAK case 34: YY_RULE_SETUP #line 79 "../s/bif.l" -yylval->number = tok::UDF_BH; return tok::UDF_BH; +yylval->number = tok::STARTUP; return tok::STARTUP; YY_BREAK case 35: YY_RULE_SETUP #line 80 "../s/bif.l" -yylval->number = tok::AES_KEY_FILE; return tok::AES_KEY_FILE; +yylval->number = tok::PARTITION_NUM; return tok::PARTITION_NUM; YY_BREAK case 36: YY_RULE_SETUP #line 81 "../s/bif.l" -yylval->number = tok::PPK_FILE; return tok::PPK_FILE; +yylval->number = tok::INIT; return tok::INIT; YY_BREAK case 37: YY_RULE_SETUP #line 82 "../s/bif.l" -yylval->number = tok::PSK_FILE; return tok::PSK_FILE; +yylval->number = tok::UDF_BH; return tok::UDF_BH; YY_BREAK case 38: YY_RULE_SETUP #line 83 "../s/bif.l" -yylval->number = tok::SPK_FILE; return tok::SPK_FILE; +yylval->number = tok::AES_KEY_FILE; return tok::AES_KEY_FILE; YY_BREAK case 39: YY_RULE_SETUP #line 84 "../s/bif.l" -yylval->number = tok::SSK_FILE; return tok::SSK_FILE; +yylval->number = tok::PPK_FILE; return tok::PPK_FILE; YY_BREAK case 40: YY_RULE_SETUP #line 85 "../s/bif.l" -yylval->number = tok::SPK_SIGNATURE_FILE; return tok::SPK_SIGNATURE_FILE; +yylval->number = tok::PSK_FILE; return tok::PSK_FILE; YY_BREAK case 41: YY_RULE_SETUP #line 86 "../s/bif.l" -yylval->number = tok::BH_SIGNATURE_FILE; return tok::BH_SIGNATURE_FILE; +yylval->number = tok::SPK_FILE; return tok::SPK_FILE; YY_BREAK case 42: YY_RULE_SETUP #line 87 "../s/bif.l" -yylval->number = tok::HEADER_SIGNATURE_FILE; return tok::HEADER_SIGNATURE_FILE; +yylval->number = tok::SSK_FILE; return tok::SSK_FILE; YY_BREAK case 43: YY_RULE_SETUP #line 88 "../s/bif.l" -yylval->number = tok::BOOTVECTORS; return tok::BOOTVECTORS; +yylval->number = tok::SPK_SIGNATURE_FILE; return tok::SPK_SIGNATURE_FILE; YY_BREAK case 44: YY_RULE_SETUP #line 89 "../s/bif.l" -yylval->number = tok::BOOTIMAGE; return tok::BOOTIMAGE; +yylval->number = tok::BH_SIGNATURE_FILE; return tok::BH_SIGNATURE_FILE; YY_BREAK case 45: YY_RULE_SETUP #line 90 "../s/bif.l" -yylval->number = tok::PARENT_ID; return tok::PARENT_ID; +yylval->number = tok::HEADER_SIGNATURE_FILE; return tok::HEADER_SIGNATURE_FILE; YY_BREAK case 46: YY_RULE_SETUP #line 91 "../s/bif.l" -yylval->number = tok::ID_CODE; return tok::ID_CODE; +yylval->number = tok::BOOTVECTORS; return tok::BOOTVECTORS; YY_BREAK case 47: YY_RULE_SETUP #line 92 "../s/bif.l" -yylval->number = tok::EXT_ID_CODE; return tok::EXT_ID_CODE; +yylval->number = tok::BOOTIMAGE; return tok::BOOTIMAGE; YY_BREAK case 48: YY_RULE_SETUP #line 93 "../s/bif.l" -yylval->number = tok::ID; return tok::ID; +yylval->number = tok::PARENT_ID; return tok::PARENT_ID; YY_BREAK case 49: YY_RULE_SETUP #line 94 "../s/bif.l" -yylval->number = tok::NAME; return tok::NAME; +yylval->number = tok::ID_CODE; return tok::ID_CODE; YY_BREAK case 50: YY_RULE_SETUP #line 95 "../s/bif.l" -yylval->number = tok::PFILE; return tok::PFILE; +yylval->number = tok::EXT_ID_CODE; return tok::EXT_ID_CODE; YY_BREAK case 51: YY_RULE_SETUP #line 96 "../s/bif.l" -yylval->number = tok::BH_KEY_FILE; return tok::BH_KEY_FILE; +yylval->number = tok::ID; return tok::ID; YY_BREAK case 52: YY_RULE_SETUP #line 97 "../s/bif.l" -yylval->number = tok::PUF_HELPER_FILE; return tok::PUF_HELPER_FILE; +yylval->number = tok::NAME; return tok::NAME; YY_BREAK case 53: YY_RULE_SETUP #line 98 "../s/bif.l" -yylval->number = tok::PMUFW_IMAGE; return tok::PMUFW_IMAGE; +yylval->number = tok::PFILE; return tok::PFILE; YY_BREAK case 54: YY_RULE_SETUP #line 99 "../s/bif.l" -yylval->number = tok::PMCDATA; return tok::PMCDATA; +yylval->number = tok::BH_KEY_FILE; return tok::BH_KEY_FILE; YY_BREAK case 55: YY_RULE_SETUP #line 100 "../s/bif.l" -yylval->number = tok::BH_KEY_IV; return tok::BH_KEY_IV; +yylval->number = tok::PUF_HELPER_FILE; return tok::PUF_HELPER_FILE; YY_BREAK case 56: YY_RULE_SETUP #line 101 "../s/bif.l" -yylval->number = tok::UNIQUE_ID; return tok::UNIQUE_ID; +yylval->number = tok::PMUFW_IMAGE; return tok::PMUFW_IMAGE; YY_BREAK case 57: YY_RULE_SETUP #line 102 "../s/bif.l" -yylval->number = tok::PARENT_UNIQUE_ID; return tok::PARENT_UNIQUE_ID; +yylval->number = tok::PMCDATA; return tok::PMCDATA; YY_BREAK case 58: YY_RULE_SETUP #line 103 "../s/bif.l" -yylval->number = tok::FUNCTION_ID; return tok::FUNCTION_ID; +yylval->number = tok::BH_KEY_IV; return tok::BH_KEY_IV; YY_BREAK case 59: YY_RULE_SETUP -#line 105 "../s/bif.l" -yylval->number = tok::BBRAM_KEK_IV; return tok::BBRAM_KEK_IV; +#line 104 "../s/bif.l" +yylval->number = tok::UNIQUE_ID; return tok::UNIQUE_ID; YY_BREAK case 60: YY_RULE_SETUP -#line 106 "../s/bif.l" -yylval->number = tok::BH_KEK_IV; return tok::BH_KEK_IV; +#line 105 "../s/bif.l" +yylval->number = tok::PARENT_UNIQUE_ID; return tok::PARENT_UNIQUE_ID; YY_BREAK case 61: YY_RULE_SETUP -#line 107 "../s/bif.l" -yylval->number = tok::EFUSE_KEK_IV; return tok::EFUSE_KEK_IV; +#line 106 "../s/bif.l" +yylval->number = tok::FUNCTION_ID; return tok::FUNCTION_ID; YY_BREAK case 62: YY_RULE_SETUP #line 108 "../s/bif.l" -yylval->number = tok::EFUSE_USER_KEK0_IV; return tok::EFUSE_USER_KEK0_IV; +yylval->number = tok::BBRAM_KEK_IV; return tok::BBRAM_KEK_IV; YY_BREAK case 63: YY_RULE_SETUP #line 109 "../s/bif.l" -yylval->number = tok::EFUSE_USER_KEK1_IV; return tok::EFUSE_USER_KEK1_IV; +yylval->number = tok::BH_KEK_IV; return tok::BH_KEK_IV; YY_BREAK case 64: YY_RULE_SETUP #line 110 "../s/bif.l" -yylval->number = tok::USER_KEYS; return tok::USER_KEYS; +yylval->number = tok::EFUSE_KEK_IV; return tok::EFUSE_KEK_IV; YY_BREAK case 65: YY_RULE_SETUP -#line 112 "../s/bif.l" -yylval->number = tok::FAMILY_KEY; return tok::FAMILY_KEY; +#line 111 "../s/bif.l" +yylval->number = tok::EFUSE_USER_KEK0_IV; return tok::EFUSE_USER_KEK0_IV; YY_BREAK case 66: YY_RULE_SETUP -#line 114 "../s/bif.l" -return tok::ENCRYPTION; +#line 112 "../s/bif.l" +yylval->number = tok::EFUSE_USER_KEK1_IV; return tok::EFUSE_USER_KEK1_IV; YY_BREAK case 67: YY_RULE_SETUP -#line 115 "../s/bif.l" -yylval->number = 0; return tok::NONE; +#line 113 "../s/bif.l" +yylval->number = tok::USER_KEYS; return tok::USER_KEYS; YY_BREAK case 68: YY_RULE_SETUP -#line 116 "../s/bif.l" -yylval->number = Encryption::AES; return tok::ENCRVALUE; +#line 115 "../s/bif.l" +yylval->number = tok::FAMILY_KEY; return tok::FAMILY_KEY; YY_BREAK case 69: YY_RULE_SETUP -#line 118 "../s/bif.l" -return tok::AUTHENTICATION; +#line 117 "../s/bif.l" +return tok::ENCRYPTION; YY_BREAK case 70: YY_RULE_SETUP -#line 119 "../s/bif.l" -yylval->number = Authentication::RSA; return tok::AUTHVALUE; +#line 118 "../s/bif.l" +yylval->number = 0; return tok::NONE; YY_BREAK case 71: YY_RULE_SETUP -#line 120 "../s/bif.l" -yylval->number = Authentication::ECDSA; return tok::AUTHVALUE; +#line 119 "../s/bif.l" +yylval->number = Encryption::AES; return tok::ENCRVALUE; YY_BREAK case 72: YY_RULE_SETUP #line 121 "../s/bif.l" -yylval->number = Authentication::ECDSA; return tok::AUTHVALUE; +return tok::AUTHENTICATION; YY_BREAK case 73: YY_RULE_SETUP #line 122 "../s/bif.l" -yylval->number = Authentication::ECDSAp521; return tok::AUTHVALUE; +yylval->number = Authentication::RSA; return tok::AUTHVALUE; YY_BREAK case 74: YY_RULE_SETUP -#line 124 "../s/bif.l" -return tok::CHECKSUM; +#line 123 "../s/bif.l" +yylval->number = Authentication::ECDSA; return tok::AUTHVALUE; YY_BREAK case 75: YY_RULE_SETUP -#line 125 "../s/bif.l" -yylval->number = Checksum::MD5; return tok::CHECKSUMVALUE; +#line 124 "../s/bif.l" +yylval->number = Authentication::ECDSA; return tok::AUTHVALUE; YY_BREAK case 76: YY_RULE_SETUP -#line 126 "../s/bif.l" -yylval->number = Checksum::SHA2; return tok::CHECKSUMVALUE; +#line 125 "../s/bif.l" +yylval->number = Authentication::ECDSAp521; return tok::AUTHVALUE; YY_BREAK case 77: YY_RULE_SETUP #line 127 "../s/bif.l" -yylval->number = Checksum::SHA3; return tok::CHECKSUMVALUE; +return tok::CHECKSUM; YY_BREAK case 78: YY_RULE_SETUP -#line 129 "../s/bif.l" -return tok::PARTITION_OWNER; +#line 128 "../s/bif.l" +yylval->number = Checksum::MD5; return tok::CHECKSUMVALUE; YY_BREAK case 79: YY_RULE_SETUP -#line 130 "../s/bif.l" -return tok::PARTITION_OWNER; +#line 129 "../s/bif.l" +yylval->number = Checksum::SHA2; return tok::CHECKSUMVALUE; YY_BREAK case 80: YY_RULE_SETUP -#line 131 "../s/bif.l" -yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; +#line 130 "../s/bif.l" +yylval->number = Checksum::SHA3; return tok::CHECKSUMVALUE; YY_BREAK case 81: YY_RULE_SETUP #line 132 "../s/bif.l" -yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; +return tok::PARTITION_OWNER; YY_BREAK case 82: YY_RULE_SETUP #line 133 "../s/bif.l" -yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; +return tok::PARTITION_OWNER; YY_BREAK case 83: YY_RULE_SETUP #line 134 "../s/bif.l" -yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; +yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; YY_BREAK case 84: YY_RULE_SETUP #line 135 "../s/bif.l" -yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; +yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; YY_BREAK case 85: YY_RULE_SETUP #line 136 "../s/bif.l" -yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; +yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; YY_BREAK case 86: YY_RULE_SETUP -#line 138 "../s/bif.l" -return tok::PARTITION_TYPE; +#line 137 "../s/bif.l" +yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; YY_BREAK case 87: YY_RULE_SETUP -#line 139 "../s/bif.l" -return tok::PARTITION_TYPE; +#line 138 "../s/bif.l" +yylval->number = PartitionOwner::FSBL; return tok::POWNERVALUE ; YY_BREAK case 88: YY_RULE_SETUP -#line 140 "../s/bif.l" -yylval->number = PartitionType::CONFIG_DATA_OBJ;return tok::PTYPEVALUE; +#line 139 "../s/bif.l" +yylval->number = PartitionOwner::UBOOT; return tok::POWNERVALUE ; YY_BREAK case 89: YY_RULE_SETUP #line 141 "../s/bif.l" -yylval->number = PartitionType::RAW; return tok::PTYPEVALUE; +return tok::PARTITION_TYPE; YY_BREAK case 90: YY_RULE_SETUP #line 142 "../s/bif.l" -yylval->number = PartitionType::CFI; return tok::PTYPEVALUE; +return tok::PARTITION_TYPE; YY_BREAK case 91: YY_RULE_SETUP #line 143 "../s/bif.l" -yylval->number = PartitionType::CFI_GSC; return tok::PTYPEVALUE; +yylval->number = PartitionType::CONFIG_DATA_OBJ; return tok::PTYPEVALUE; YY_BREAK case 92: YY_RULE_SETUP #line 144 "../s/bif.l" -yylval->number = PartitionType::SLR_BOOT; return tok::PTYPEVALUE; +yylval->number = PartitionType::RAW; return tok::PTYPEVALUE; YY_BREAK case 93: YY_RULE_SETUP #line 145 "../s/bif.l" -yylval->number = PartitionType::SLR_CONFIG; return tok::PTYPEVALUE; +yylval->number = PartitionType::CFI; return tok::PTYPEVALUE; YY_BREAK case 94: YY_RULE_SETUP #line 146 "../s/bif.l" -yylval->number = PartitionType::SLR_SLAVE; return tok::PTYPEVALUE; +yylval->number = PartitionType::CFI_GSC; return tok::PTYPEVALUE; YY_BREAK case 95: YY_RULE_SETUP -#line 148 "../s/bif.l" -yylval->number = tok::KEYSRC_ENCRYPTION; return tok::KEYSRC_ENCRYPTION; +#line 147 "../s/bif.l" +yylval->number = PartitionType::SLR_BOOT; return tok::PTYPEVALUE; YY_BREAK case 96: YY_RULE_SETUP -#line 149 "../s/bif.l" -yylval->number = tok::KEYSRC_ENCRYPTION; return tok::KEYSRC_ENCRYPTION; +#line 148 "../s/bif.l" +yylval->number = PartitionType::SLR_CONFIG; return tok::PTYPEVALUE; YY_BREAK case 97: YY_RULE_SETUP -#line 150 "../s/bif.l" -yylval->number = KeySource::EfuseRedKey; return tok::KEY_SRC; +#line 149 "../s/bif.l" +yylval->number = PartitionType::SLR_SLAVE; return tok::PTYPEVALUE; YY_BREAK case 98: YY_RULE_SETUP -#line 151 "../s/bif.l" -yylval->number = KeySource::BbramRedKey; return tok::KEY_SRC; +#line 150 "../s/bif.l" +yylval->number = PartitionType::SLR_SLAVE_BOOT; return tok::PTYPEVALUE; YY_BREAK case 99: YY_RULE_SETUP -#line 152 "../s/bif.l" -yylval->number = KeySource::EfuseRedKey; return tok::KEY_SRC; +#line 151 "../s/bif.l" +yylval->number = PartitionType::SLR_SLAVE_CONFIG; return tok::PTYPEVALUE; YY_BREAK case 100: YY_RULE_SETUP -#line 153 "../s/bif.l" -yylval->number = KeySource::EfuseBlkKey; return tok::KEY_SRC; +#line 152 "../s/bif.l" +yylval->number = PartitionType::ELF; return tok::PTYPEVALUE; YY_BREAK case 101: YY_RULE_SETUP #line 154 "../s/bif.l" -yylval->number = KeySource::EfuseGryKey; return tok::KEY_SRC; +yylval->number = tok::KEYSRC_ENCRYPTION; return tok::KEYSRC_ENCRYPTION; YY_BREAK case 102: YY_RULE_SETUP #line 155 "../s/bif.l" -yylval->number = KeySource::BbramRedKey; return tok::KEY_SRC; +yylval->number = tok::KEYSRC_ENCRYPTION; return tok::KEYSRC_ENCRYPTION; YY_BREAK case 103: YY_RULE_SETUP #line 156 "../s/bif.l" -yylval->number = KeySource::BbramBlkKey; return tok::KEY_SRC; +yylval->number = KeySource::EfuseRedKey; return tok::KEY_SRC; YY_BREAK case 104: YY_RULE_SETUP #line 157 "../s/bif.l" -yylval->number = KeySource::BbramGryKey; return tok::KEY_SRC; +yylval->number = KeySource::BbramRedKey; return tok::KEY_SRC; YY_BREAK case 105: YY_RULE_SETUP #line 158 "../s/bif.l" -yylval->number = KeySource::BhGryKey; return tok::KEY_SRC; +yylval->number = KeySource::EfuseRedKey; return tok::KEY_SRC; YY_BREAK case 106: YY_RULE_SETUP #line 159 "../s/bif.l" -yylval->number = KeySource::BhBlkKey; return tok::KEY_SRC; +yylval->number = KeySource::EfuseBlkKey; return tok::KEY_SRC; YY_BREAK case 107: YY_RULE_SETUP #line 160 "../s/bif.l" -yylval->number = KeySource::UserKey0; return tok::KEY_SRC; +yylval->number = KeySource::EfuseGryKey; return tok::KEY_SRC; YY_BREAK case 108: YY_RULE_SETUP #line 161 "../s/bif.l" -yylval->number = KeySource::UserKey1; return tok::KEY_SRC; +yylval->number = KeySource::BbramRedKey; return tok::KEY_SRC; YY_BREAK case 109: YY_RULE_SETUP #line 162 "../s/bif.l" -yylval->number = KeySource::UserKey2; return tok::KEY_SRC; +yylval->number = KeySource::BbramBlkKey; return tok::KEY_SRC; YY_BREAK case 110: YY_RULE_SETUP #line 163 "../s/bif.l" -yylval->number = KeySource::UserKey3; return tok::KEY_SRC; +yylval->number = KeySource::BbramGryKey; return tok::KEY_SRC; YY_BREAK case 111: YY_RULE_SETUP #line 164 "../s/bif.l" -yylval->number = KeySource::UserKey4; return tok::KEY_SRC; +yylval->number = KeySource::BhGryKey; return tok::KEY_SRC; YY_BREAK case 112: YY_RULE_SETUP #line 165 "../s/bif.l" -yylval->number = KeySource::UserKey5; return tok::KEY_SRC; +yylval->number = KeySource::BhBlkKey; return tok::KEY_SRC; YY_BREAK case 113: YY_RULE_SETUP #line 166 "../s/bif.l" -yylval->number = KeySource::UserKey6; return tok::KEY_SRC; +yylval->number = KeySource::UserKey0; return tok::KEY_SRC; YY_BREAK case 114: YY_RULE_SETUP #line 167 "../s/bif.l" -yylval->number = KeySource::UserKey7; return tok::KEY_SRC; +yylval->number = KeySource::UserKey1; return tok::KEY_SRC; YY_BREAK case 115: YY_RULE_SETUP #line 168 "../s/bif.l" -yylval->number = KeySource::EfuseUserKey0; return tok::KEY_SRC; +yylval->number = KeySource::UserKey2; return tok::KEY_SRC; YY_BREAK case 116: YY_RULE_SETUP #line 169 "../s/bif.l" -yylval->number = KeySource::EfuseUserBlkKey0; return tok::KEY_SRC; +yylval->number = KeySource::UserKey3; return tok::KEY_SRC; YY_BREAK case 117: YY_RULE_SETUP #line 170 "../s/bif.l" -yylval->number = KeySource::EfuseUserGryKey0; return tok::KEY_SRC; +yylval->number = KeySource::UserKey4; return tok::KEY_SRC; YY_BREAK case 118: YY_RULE_SETUP #line 171 "../s/bif.l" -yylval->number = KeySource::EfuseUserKey1; return tok::KEY_SRC; +yylval->number = KeySource::UserKey5; return tok::KEY_SRC; YY_BREAK case 119: YY_RULE_SETUP #line 172 "../s/bif.l" -yylval->number = KeySource::EfuseUserBlkKey1; return tok::KEY_SRC; +yylval->number = KeySource::UserKey6; return tok::KEY_SRC; YY_BREAK case 120: YY_RULE_SETUP #line 173 "../s/bif.l" -yylval->number = KeySource::EfuseUserGryKey1; return tok::KEY_SRC; +yylval->number = KeySource::UserKey7; return tok::KEY_SRC; YY_BREAK case 121: YY_RULE_SETUP #line 174 "../s/bif.l" -yylval->number = KeySource::BhKupKey; return tok::KEY_SRC; +yylval->number = KeySource::EfuseUserKey0; return tok::KEY_SRC; YY_BREAK case 122: YY_RULE_SETUP -#line 176 "../s/bif.l" -yylval->number = tok::FSBL_CONFIG; return tok::FSBL_CONFIG; +#line 175 "../s/bif.l" +yylval->number = KeySource::EfuseUserBlkKey0; return tok::KEY_SRC; YY_BREAK case 123: YY_RULE_SETUP -#line 177 "../s/bif.l" -yylval->number = tok::FSBL_CONFIG; return tok::FSBL_CONFIG; +#line 176 "../s/bif.l" +yylval->number = KeySource::EfuseUserGryKey0; return tok::KEY_SRC; YY_BREAK case 124: YY_RULE_SETUP -#line 178 "../s/bif.l" -yylval->number = tok::FSBL_CONFIG; return tok::FSBL_CONFIG; +#line 177 "../s/bif.l" +yylval->number = KeySource::EfuseUserKey1; return tok::KEY_SRC; YY_BREAK case 125: YY_RULE_SETUP -#line 179 "../s/bif.l" -yylval->number = Core::R5Single; return tok::CORE; +#line 178 "../s/bif.l" +yylval->number = KeySource::EfuseUserBlkKey1; return tok::KEY_SRC; YY_BREAK case 126: YY_RULE_SETUP -#line 180 "../s/bif.l" -yylval->number = Core::A53Singlex32; return tok::CORE; +#line 179 "../s/bif.l" +yylval->number = KeySource::EfuseUserGryKey1; return tok::KEY_SRC; YY_BREAK case 127: YY_RULE_SETUP -#line 181 "../s/bif.l" -yylval->number = Core::A53Singlex32; return tok::CORE; +#line 180 "../s/bif.l" +yylval->number = KeySource::BhKupKey; return tok::KEY_SRC; YY_BREAK case 128: YY_RULE_SETUP #line 182 "../s/bif.l" -yylval->number = Core::A53Singlex64; return tok::CORE; +yylval->number = tok::FSBL_CONFIG; return tok::FSBL_CONFIG; YY_BREAK case 129: YY_RULE_SETUP #line 183 "../s/bif.l" -yylval->number = Core::A53Singlex64; return tok::CORE; +yylval->number = tok::FSBL_CONFIG; return tok::FSBL_CONFIG; YY_BREAK case 130: YY_RULE_SETUP #line 184 "../s/bif.l" -yylval->number = Core::R5Dual; return tok::CORE; +yylval->number = tok::FSBL_CONFIG; return tok::FSBL_CONFIG; YY_BREAK case 131: YY_RULE_SETUP #line 185 "../s/bif.l" -yylval->number = BhRsa::BhRsaEnable; return tok::BH_RSA; +yylval->number = Core::R5Single; return tok::CORE; YY_BREAK case 132: YY_RULE_SETUP #line 186 "../s/bif.l" -yylval->number = AuthHash::Sha2; return tok::AUTH_HASH; +yylval->number = Core::A53Singlex32; return tok::CORE; YY_BREAK case 133: YY_RULE_SETUP #line 187 "../s/bif.l" -yylval->number = PufHdLoc::PUFinBH; return tok::PUFHD_LOC; +yylval->number = Core::A53Singlex32; return tok::CORE; YY_BREAK case 134: YY_RULE_SETUP #line 188 "../s/bif.l" -yylval->number = AuthOnly::Enabled; return tok::AUTH_ONLY; +yylval->number = Core::A53Singlex64; return tok::CORE; YY_BREAK case 135: YY_RULE_SETUP #line 189 "../s/bif.l" -yylval->number = OptKey::OptKeyinSecHdr; return tok::OPT_KEY; +yylval->number = Core::A53Singlex64; return tok::CORE; YY_BREAK case 136: YY_RULE_SETUP #line 190 "../s/bif.l" -yylval->number = PufMode::PUF4K; return tok::PUF4KMODE; +yylval->number = Core::R5Dual; return tok::CORE; YY_BREAK case 137: YY_RULE_SETUP #line 191 "../s/bif.l" -yylval->number = tok::SHUTTER; return tok::SHUTTER; +yylval->number = BhRsa::BhRsaEnable; return tok::BH_RSA; YY_BREAK case 138: YY_RULE_SETUP #line 192 "../s/bif.l" -yylval->number = DpaCM::DpaCMEnable; return tok::DPA_CM; +yylval->number = AuthHash::Sha2; return tok::AUTH_HASH; YY_BREAK case 139: YY_RULE_SETUP #line 193 "../s/bif.l" -yylval->number = tok::SMAP_WIDTH; return tok::SMAP_WIDTH; +yylval->number = PufHdLoc::PUFinBH; return tok::PUFHD_LOC; YY_BREAK case 140: YY_RULE_SETUP #line 194 "../s/bif.l" -yylval->number = tok::BYPASS_IDCODE_CHECK; return tok::BYPASS_IDCODE_CHECK; +yylval->number = AuthOnly::Enabled; return tok::AUTH_ONLY; YY_BREAK case 141: YY_RULE_SETUP #line 195 "../s/bif.l" -yylval->number = tok::A_HWROT; return tok::A_HWROT; +yylval->number = OptKey::OptKeyinSecHdr; return tok::OPT_KEY; YY_BREAK case 142: YY_RULE_SETUP #line 196 "../s/bif.l" -yylval->number = tok::S_HWROT; return tok::S_HWROT; +yylval->number = PufMode::PUF4K; return tok::PUF4KMODE; YY_BREAK case 143: YY_RULE_SETUP -#line 198 "../s/bif.l" -return tok::BOOT_DEVICE; +#line 197 "../s/bif.l" +yylval->number = tok::SHUTTER; return tok::SHUTTER; YY_BREAK case 144: YY_RULE_SETUP -#line 199 "../s/bif.l" -yylval->number = tok::ADDRESS; return tok::ADDRESS; +#line 198 "../s/bif.l" +yylval->number = tok::PUFROSWAP; return tok::PUFROSWAP; YY_BREAK case 145: YY_RULE_SETUP -#line 200 "../s/bif.l" -yylval->number = BootDevice::QSPI32; return tok::BOOT_DEVICE_TYPE ; +#line 199 "../s/bif.l" +yylval->number = DpaCM::DpaCMEnable; return tok::DPA_CM; YY_BREAK case 146: YY_RULE_SETUP -#line 201 "../s/bif.l" -yylval->number = BootDevice::QSPI24; return tok::BOOT_DEVICE_TYPE ; +#line 200 "../s/bif.l" +yylval->number = tok::DICE; return tok::DICE; YY_BREAK case 147: YY_RULE_SETUP -#line 202 "../s/bif.l" -yylval->number = BootDevice::NAND; return tok::BOOT_DEVICE_TYPE ; +#line 201 "../s/bif.l" +yylval->number = tok::SMAP_WIDTH; return tok::SMAP_WIDTH; YY_BREAK case 148: YY_RULE_SETUP -#line 203 "../s/bif.l" -yylval->number = BootDevice::SD0; return tok::BOOT_DEVICE_TYPE ; +#line 202 "../s/bif.l" +yylval->number = tok::BYPASS_IDCODE_CHECK; return tok::BYPASS_IDCODE_CHECK; YY_BREAK case 149: YY_RULE_SETUP -#line 204 "../s/bif.l" -yylval->number = BootDevice::SD1; return tok::BOOT_DEVICE_TYPE ; +#line 203 "../s/bif.l" +yylval->number = tok::A_HWROT; return tok::A_HWROT; YY_BREAK case 150: YY_RULE_SETUP -#line 205 "../s/bif.l" -yylval->number = BootDevice::SDLS; return tok::BOOT_DEVICE_TYPE ; +#line 204 "../s/bif.l" +yylval->number = tok::S_HWROT; return tok::S_HWROT; YY_BREAK case 151: YY_RULE_SETUP #line 206 "../s/bif.l" -yylval->number = BootDevice::MMC; return tok::BOOT_DEVICE_TYPE ; +return tok::BOOT_DEVICE; YY_BREAK case 152: YY_RULE_SETUP #line 207 "../s/bif.l" -yylval->number = BootDevice::USB; return tok::BOOT_DEVICE_TYPE ; +yylval->number = tok::ADDRESS; return tok::ADDRESS; YY_BREAK case 153: YY_RULE_SETUP #line 208 "../s/bif.l" -yylval->number = BootDevice::ETHERNET; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::QSPI32; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 154: YY_RULE_SETUP #line 209 "../s/bif.l" -yylval->number = BootDevice::PCIE; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::QSPI24; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 155: YY_RULE_SETUP #line 210 "../s/bif.l" -yylval->number = BootDevice::SATA; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::NAND; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 156: YY_RULE_SETUP #line 211 "../s/bif.l" -yylval->number = BootDevice::OSPI; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::SD0; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 157: YY_RULE_SETUP #line 212 "../s/bif.l" -yylval->number = BootDevice::SMAP; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::SD1; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 158: YY_RULE_SETUP #line 213 "../s/bif.l" -yylval->number = BootDevice::SBI; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::SDLS; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 159: YY_RULE_SETUP #line 214 "../s/bif.l" -yylval->number = BootDevice::SD0RAW; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::MMC; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 160: YY_RULE_SETUP #line 215 "../s/bif.l" -yylval->number = BootDevice::SD1RAW; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::USB; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 161: YY_RULE_SETUP #line 216 "../s/bif.l" -yylval->number = BootDevice::SDLSRAW; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::ETHERNET; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 162: YY_RULE_SETUP #line 217 "../s/bif.l" -yylval->number = BootDevice::MMCRAW; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::PCIE; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 163: YY_RULE_SETUP #line 218 "../s/bif.l" -yylval->number = BootDevice::MMC0; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::SATA; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 164: YY_RULE_SETUP #line 219 "../s/bif.l" -yylval->number = BootDevice::MMC0RAW; return tok::BOOT_DEVICE_TYPE ; +yylval->number = BootDevice::OSPI; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 165: YY_RULE_SETUP -#line 221 "../s/bif.l" -return tok::DEST_CPU; +#line 220 "../s/bif.l" +yylval->number = BootDevice::SMAP; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 166: YY_RULE_SETUP -#line 222 "../s/bif.l" -return tok::DEST_CPU; +#line 221 "../s/bif.l" +yylval->number = BootDevice::SBI; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 167: YY_RULE_SETUP -#line 223 "../s/bif.l" -yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; +#line 222 "../s/bif.l" +yylval->number = BootDevice::SD0RAW; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 168: YY_RULE_SETUP -#line 224 "../s/bif.l" -yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; +#line 223 "../s/bif.l" +yylval->number = BootDevice::SD1RAW; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 169: YY_RULE_SETUP -#line 225 "../s/bif.l" -yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; +#line 224 "../s/bif.l" +yylval->number = BootDevice::SDLSRAW; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 170: YY_RULE_SETUP -#line 226 "../s/bif.l" -yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; +#line 225 "../s/bif.l" +yylval->number = BootDevice::MMCRAW; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 171: YY_RULE_SETUP -#line 227 "../s/bif.l" -yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; +#line 226 "../s/bif.l" +yylval->number = BootDevice::MMC0; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 172: YY_RULE_SETUP -#line 228 "../s/bif.l" -yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; +#line 227 "../s/bif.l" +yylval->number = BootDevice::MMC0RAW; return tok::BOOT_DEVICE_TYPE ; YY_BREAK case 173: YY_RULE_SETUP #line 229 "../s/bif.l" -yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; +return tok::DEST_CPU; YY_BREAK case 174: YY_RULE_SETUP #line 230 "../s/bif.l" -yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; +return tok::DEST_CPU; YY_BREAK case 175: YY_RULE_SETUP #line 231 "../s/bif.l" -yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; YY_BREAK case 176: YY_RULE_SETUP #line 232 "../s/bif.l" -yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; YY_BREAK case 177: YY_RULE_SETUP #line 233 "../s/bif.l" -yylval->number = DestinationCPU::R5_0; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; YY_BREAK case 178: YY_RULE_SETUP #line 234 "../s/bif.l" -yylval->number = DestinationCPU::R5_1; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_0; return tok::DEST_CPU_TYPE; YY_BREAK case 179: YY_RULE_SETUP #line 235 "../s/bif.l" -yylval->number = DestinationCPU::R5_lockstep; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; YY_BREAK case 180: YY_RULE_SETUP #line 236 "../s/bif.l" -yylval->number = DestinationCPU::PMU; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; YY_BREAK case 181: YY_RULE_SETUP #line 237 "../s/bif.l" -yylval->number = DestinationCPU::PMU; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; YY_BREAK case 182: YY_RULE_SETUP #line 238 "../s/bif.l" -yylval->number = DestinationCPU::AIE; return tok::DEST_CPU_TYPE; +yylval->number = DestinationCPU::A53_1; return tok::DEST_CPU_TYPE; YY_BREAK case 183: YY_RULE_SETUP -#line 240 "../s/bif.l" -return tok::DEST_DEVICE; +#line 239 "../s/bif.l" +yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; YY_BREAK case 184: YY_RULE_SETUP -#line 241 "../s/bif.l" -yylval->number = DestinationDevice::DEST_DEV_PS; return tok::DEST_DEVICE_TYPE; +#line 240 "../s/bif.l" +yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; YY_BREAK case 185: YY_RULE_SETUP -#line 242 "../s/bif.l" -yylval->number = DestinationDevice::DEST_DEV_PL; return tok::DEST_DEVICE_TYPE; +#line 241 "../s/bif.l" +yylval->number = DestinationCPU::A53_2; return tok::DEST_CPU_TYPE; YY_BREAK case 186: YY_RULE_SETUP -#line 243 "../s/bif.l" -yylval->number = DestinationDevice::DEST_DEV_PMU; return tok::DEST_DEVICE_TYPE; +#line 242 "../s/bif.l" +yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; YY_BREAK case 187: YY_RULE_SETUP -#line 244 "../s/bif.l" -yylval->number = DestinationDevice::DEST_DEV_XIP; return tok::DEST_DEVICE_TYPE; +#line 243 "../s/bif.l" +yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; YY_BREAK case 188: YY_RULE_SETUP -#line 246 "../s/bif.l" -return tok::EXCEPTION_LEVEL; +#line 244 "../s/bif.l" +yylval->number = DestinationCPU::A53_3; return tok::DEST_CPU_TYPE; YY_BREAK case 189: YY_RULE_SETUP -#line 247 "../s/bif.l" -yylval->number = ExceptionLevel::EL0; return tok::EXCEPTION_LEVEL_TYPE; +#line 245 "../s/bif.l" +yylval->number = DestinationCPU::R5_0; return tok::DEST_CPU_TYPE; YY_BREAK case 190: YY_RULE_SETUP -#line 248 "../s/bif.l" -yylval->number = ExceptionLevel::EL1; return tok::EXCEPTION_LEVEL_TYPE; +#line 246 "../s/bif.l" +yylval->number = DestinationCPU::R5_0; return tok::DEST_CPU_TYPE; YY_BREAK case 191: YY_RULE_SETUP -#line 249 "../s/bif.l" -yylval->number = ExceptionLevel::EL2; return tok::EXCEPTION_LEVEL_TYPE; +#line 247 "../s/bif.l" +yylval->number = DestinationCPU::R5_1; return tok::DEST_CPU_TYPE; YY_BREAK case 192: YY_RULE_SETUP -#line 250 "../s/bif.l" -yylval->number = ExceptionLevel::EL3; return tok::EXCEPTION_LEVEL_TYPE; +#line 248 "../s/bif.l" +yylval->number = DestinationCPU::R5_1; return tok::DEST_CPU_TYPE; YY_BREAK case 193: YY_RULE_SETUP -#line 252 "../s/bif.l" -return tok::TRUSTZONE; +#line 249 "../s/bif.l" +yylval->number = DestinationCPU::R5_lockstep; return tok::DEST_CPU_TYPE; YY_BREAK case 194: YY_RULE_SETUP -#line 253 "../s/bif.l" -yylval->number = TrustZone::Secure; return tok::TRUSTZONE_TYPE; +#line 250 "../s/bif.l" +yylval->number = DestinationCPU::PMU; return tok::DEST_CPU_TYPE; YY_BREAK case 195: YY_RULE_SETUP -#line 254 "../s/bif.l" -yylval->number = TrustZone::NonSecure; return tok::TRUSTZONE_TYPE; +#line 251 "../s/bif.l" +yylval->number = DestinationCPU::PMU; return tok::DEST_CPU_TYPE; YY_BREAK case 196: YY_RULE_SETUP -#line 256 "../s/bif.l" -yylval->number = tok::SLR_NUM; return tok::SLR_NUM; +#line 252 "../s/bif.l" +yylval->number = DestinationCPU::AIE; return tok::DEST_CPU_TYPE; YY_BREAK case 197: YY_RULE_SETUP -#line 258 "../s/bif.l" -yylval->number = tok::AUTH_PARAMS; return tok::AUTH_PARAMS; +#line 253 "../s/bif.l" +yylval->number = tok::CLUSTER_NUM; return tok::CLUSTER_NUM; YY_BREAK case 198: YY_RULE_SETUP -#line 259 "../s/bif.l" -yylval->number = tok::PPK_SELECT; return tok::PPK_SELECT; +#line 255 "../s/bif.l" +return tok::DEST_DEVICE; YY_BREAK case 199: YY_RULE_SETUP -#line 260 "../s/bif.l" -yylval->number = tok::SPK_SELECT; return tok::SPK_SELECT; +#line 256 "../s/bif.l" +yylval->number = DestinationDevice::DEST_DEV_PS; return tok::DEST_DEVICE_TYPE; YY_BREAK case 200: YY_RULE_SETUP -#line 261 "../s/bif.l" -yylval->number = SpkSelect::SPK_eFUSE; return tok::SPKSELECT; +#line 257 "../s/bif.l" +yylval->number = DestinationDevice::DEST_DEV_PL; return tok::DEST_DEVICE_TYPE; YY_BREAK case 201: YY_RULE_SETUP -#line 262 "../s/bif.l" -yylval->number = SpkSelect::USER_eFUSE; return tok::SPKSELECT; +#line 258 "../s/bif.l" +yylval->number = DestinationDevice::DEST_DEV_PMU; return tok::DEST_DEVICE_TYPE; YY_BREAK case 202: YY_RULE_SETUP -#line 263 "../s/bif.l" -yylval->number = tok::SPK_ID; return tok::SPK_ID; +#line 259 "../s/bif.l" +yylval->number = DestinationDevice::DEST_DEV_XIP; return tok::DEST_DEVICE_TYPE; YY_BREAK case 203: YY_RULE_SETUP -#line 264 "../s/bif.l" -return tok::HEADER_AUTH; +#line 261 "../s/bif.l" +return tok::EXCEPTION_LEVEL; YY_BREAK case 204: YY_RULE_SETUP -#line 266 "../s/bif.l" -yylval->number = tok::REVOKE_ID; return tok::REVOKE_ID; +#line 262 "../s/bif.l" +yylval->number = ExceptionLevel::EL0; return tok::EXCEPTION_LEVEL_TYPE; YY_BREAK case 205: YY_RULE_SETUP -#line 268 "../s/bif.l" -yylval->number = tok::SPLIT; return tok::SPLIT; +#line 263 "../s/bif.l" +yylval->number = ExceptionLevel::EL1; return tok::EXCEPTION_LEVEL_TYPE; YY_BREAK case 206: YY_RULE_SETUP -#line 269 "../s/bif.l" -yylval->number = tok::SPLIT_MODE; return tok::SPLIT_MODE; +#line 264 "../s/bif.l" +yylval->number = ExceptionLevel::EL2; return tok::EXCEPTION_LEVEL_TYPE; YY_BREAK case 207: YY_RULE_SETUP -#line 270 "../s/bif.l" -yylval->number = SplitMode::SlaveMode; return tok::SPLITMODE; +#line 265 "../s/bif.l" +yylval->number = ExceptionLevel::EL3; return tok::EXCEPTION_LEVEL_TYPE; YY_BREAK case 208: YY_RULE_SETUP -#line 271 "../s/bif.l" -yylval->number = SplitMode::Normal; return tok::SPLITMODE; +#line 267 "../s/bif.l" +return tok::TRUSTZONE; YY_BREAK case 209: YY_RULE_SETUP -#line 272 "../s/bif.l" -yylval->number = tok::SPLIT_FMT; return tok::SPLIT_FMT; +#line 268 "../s/bif.l" +yylval->number = TrustZone::Secure; return tok::TRUSTZONE_TYPE; YY_BREAK case 210: YY_RULE_SETUP -#line 273 "../s/bif.l" -return tok::MCS; +#line 269 "../s/bif.l" +yylval->number = TrustZone::NonSecure; return tok::TRUSTZONE_TYPE; YY_BREAK case 211: YY_RULE_SETUP -#line 274 "../s/bif.l" -return tok::BIN; +#line 271 "../s/bif.l" +yylval->number = tok::SLR_NUM; return tok::SLR_NUM; YY_BREAK case 212: YY_RULE_SETUP -#line 276 "../s/bif.l" -yylval->number = tok::AUTHJTAG_CONFIG; return tok::AUTHJTAG_CONFIG; +#line 273 "../s/bif.l" +yylval->number = tok::AUTH_PARAMS; return tok::AUTH_PARAMS; YY_BREAK case 213: YY_RULE_SETUP -#line 277 "../s/bif.l" -yylval->number = tok::DEVICE_DNA; return tok::DEVICE_DNA; +#line 274 "../s/bif.l" +yylval->number = tok::PPK_SELECT; return tok::PPK_SELECT; YY_BREAK case 214: YY_RULE_SETUP -#line 278 "../s/bif.l" -yylval->number = tok::JTAG_TIMEOUT; return tok::JTAG_TIMEOUT; +#line 275 "../s/bif.l" +yylval->number = tok::SPK_SELECT; return tok::SPK_SELECT; YY_BREAK case 215: YY_RULE_SETUP -#line 280 "../s/bif.l" -yylval->number=atoi(yytext); return tok::DECVALUE; +#line 276 "../s/bif.l" +yylval->number = SpkSelect::SPK_eFUSE; return tok::SPKSELECT; YY_BREAK case 216: YY_RULE_SETUP -#line 281 "../s/bif.l" -yylval->number=strtoul(yytext+2,NULL,16); return tok::HEXVALUE; +#line 277 "../s/bif.l" +yylval->number = SpkSelect::USER_eFUSE; return tok::SPKSELECT; YY_BREAK case 217: YY_RULE_SETUP -#line 282 "../s/bif.l" -yylval->string=strdup(yytext); return tok::HEXWORD; +#line 278 "../s/bif.l" +yylval->number = tok::SPK_ID; return tok::SPK_ID; YY_BREAK case 218: YY_RULE_SETUP -#line 284 "../s/bif.l" -return tok::COLON; +#line 279 "../s/bif.l" +return tok::HEADER_AUTH; YY_BREAK case 219: YY_RULE_SETUP -#line 285 "../s/bif.l" -return tok::SEMICOLON; +#line 281 "../s/bif.l" +yylval->number = tok::REVOKE_ID; return tok::REVOKE_ID; YY_BREAK case 220: YY_RULE_SETUP -#line 286 "../s/bif.l" -return tok::EQUAL; +#line 283 "../s/bif.l" +yylval->number = tok::SPLIT; return tok::SPLIT; YY_BREAK case 221: YY_RULE_SETUP -#line 287 "../s/bif.l" -return tok::COMMA; +#line 284 "../s/bif.l" +yylval->number = tok::SPLIT_MODE; return tok::SPLIT_MODE; YY_BREAK case 222: YY_RULE_SETUP -#line 288 "../s/bif.l" -return tok::OBRACKET; +#line 285 "../s/bif.l" +yylval->number = SplitMode::SlaveMode; return tok::SPLITMODE; YY_BREAK case 223: YY_RULE_SETUP -#line 289 "../s/bif.l" -return tok::EBRACKET; +#line 286 "../s/bif.l" +yylval->number = SplitMode::Normal; return tok::SPLITMODE; YY_BREAK case 224: YY_RULE_SETUP -#line 290 "../s/bif.l" -return tok::OBRACE; +#line 287 "../s/bif.l" +yylval->number = tok::SPLIT_FMT; return tok::SPLIT_FMT; YY_BREAK case 225: YY_RULE_SETUP -#line 291 "../s/bif.l" -return tok::EBRACE; +#line 288 "../s/bif.l" +return tok::MCS; YY_BREAK case 226: YY_RULE_SETUP -#line 292 "../s/bif.l" -return tok::LPAREN; +#line 289 "../s/bif.l" +return tok::BIN; YY_BREAK case 227: YY_RULE_SETUP -#line 293 "../s/bif.l" -return tok::RPAREN; +#line 291 "../s/bif.l" +yylval->number = tok::AUTHJTAG_CONFIG; return tok::AUTHJTAG_CONFIG; YY_BREAK case 228: YY_RULE_SETUP -#line 294 "../s/bif.l" -return tok::ASTERISK; +#line 292 "../s/bif.l" +yylval->number = tok::DEVICE_DNA; return tok::DEVICE_DNA; YY_BREAK case 229: YY_RULE_SETUP -#line 296 "../s/bif.l" -return tok::PLUS; +#line 293 "../s/bif.l" +yylval->number = tok::JTAG_TIMEOUT; return tok::JTAG_TIMEOUT; YY_BREAK case 230: YY_RULE_SETUP -#line 297 "../s/bif.l" -return tok::MINUS; +#line 295 "../s/bif.l" +yylval->number=atoi(yytext); return tok::DECVALUE; YY_BREAK case 231: YY_RULE_SETUP -#line 298 "../s/bif.l" -return tok::LSHIFT; +#line 296 "../s/bif.l" +yylval->number=strtoul(yytext+2,NULL,16); return tok::HEXVALUE; YY_BREAK case 232: YY_RULE_SETUP -#line 299 "../s/bif.l" -return tok::RSHIFT; +#line 297 "../s/bif.l" +yylval->string=strdup(yytext); return tok::HEXWORD; YY_BREAK case 233: YY_RULE_SETUP -#line 300 "../s/bif.l" -return tok::MULT; +#line 299 "../s/bif.l" +return tok::COLON; YY_BREAK case 234: YY_RULE_SETUP -#line 301 "../s/bif.l" -return tok::DIVIDE; +#line 300 "../s/bif.l" +return tok::SEMICOLON; YY_BREAK case 235: YY_RULE_SETUP -#line 302 "../s/bif.l" -return tok::MODULO; +#line 301 "../s/bif.l" +return tok::EQUAL; YY_BREAK case 236: YY_RULE_SETUP -#line 303 "../s/bif.l" -return tok::NEGATION; +#line 302 "../s/bif.l" +return tok::COMMA; YY_BREAK case 237: YY_RULE_SETUP -#line 304 "../s/bif.l" -return tok::AND; +#line 303 "../s/bif.l" +return tok::OBRACKET; YY_BREAK case 238: YY_RULE_SETUP -#line 305 "../s/bif.l" -return tok::OR; +#line 304 "../s/bif.l" +return tok::EBRACKET; YY_BREAK case 239: YY_RULE_SETUP -#line 306 "../s/bif.l" -return tok::XOR; +#line 305 "../s/bif.l" +return tok::OBRACE; YY_BREAK case 240: YY_RULE_SETUP -#line 308 "../s/bif.l" -yylval->string=strdup(yytext); return tok::WORD; +#line 306 "../s/bif.l" +return tok::EBRACE; YY_BREAK case 241: YY_RULE_SETUP -#line 309 "../s/bif.l" -yylval->string=strdup(yytext); return tok::FILENAME; +#line 307 "../s/bif.l" +return tok::LPAREN; YY_BREAK case 242: YY_RULE_SETUP -#line 310 "../s/bif.l" -yylval->string=strdup(yytext+1); yylval->string[strlen(yytext)-2]=0; return tok::QFILENAME; +#line 308 "../s/bif.l" +return tok::RPAREN; YY_BREAK case 243: YY_RULE_SETUP -#line 312 "../s/bif.l" -yylloc->step (); +#line 309 "../s/bif.l" +return tok::ASTERISK; YY_BREAK case 244: -/* rule 244 can match eol */ YY_RULE_SETUP -#line 313 "../s/bif.l" -yylloc->lines (yyleng); yylloc->step (); +#line 311 "../s/bif.l" +return tok::PLUS; YY_BREAK case 245: YY_RULE_SETUP -#line 314 "../s/bif.l" -/* ignore (Linux only) */ +#line 312 "../s/bif.l" +return tok::MINUS; YY_BREAK case 246: YY_RULE_SETUP -#line 315 "../s/bif.l" -printf("WARNING: bad character! '%s' (0x%02X)\n",yytext,yytext[0]); +#line 313 "../s/bif.l" +return tok::LSHIFT; YY_BREAK case 247: YY_RULE_SETUP +#line 314 "../s/bif.l" +return tok::RSHIFT; + YY_BREAK +case 248: +YY_RULE_SETUP +#line 315 "../s/bif.l" +return tok::MULT; + YY_BREAK +case 249: +YY_RULE_SETUP #line 316 "../s/bif.l" +return tok::DIVIDE; + YY_BREAK +case 250: +YY_RULE_SETUP +#line 317 "../s/bif.l" +return tok::MODULO; + YY_BREAK +case 251: +YY_RULE_SETUP +#line 318 "../s/bif.l" +return tok::NEGATION; + YY_BREAK +case 252: +YY_RULE_SETUP +#line 319 "../s/bif.l" +return tok::AND; + YY_BREAK +case 253: +YY_RULE_SETUP +#line 320 "../s/bif.l" +return tok::OR; + YY_BREAK +case 254: +YY_RULE_SETUP +#line 321 "../s/bif.l" +return tok::XOR; + YY_BREAK +case 255: +YY_RULE_SETUP +#line 323 "../s/bif.l" +yylval->string=strdup(yytext); return tok::WORD; + YY_BREAK +case 256: +YY_RULE_SETUP +#line 324 "../s/bif.l" +yylval->string=strdup(yytext); return tok::FILENAME; + YY_BREAK +case 257: +YY_RULE_SETUP +#line 325 "../s/bif.l" +yylval->string=strdup(yytext+1); yylval->string[strlen(yytext)-2]=0; return tok::QFILENAME; + YY_BREAK +case 258: +YY_RULE_SETUP +#line 327 "../s/bif.l" +yylloc->step (); + YY_BREAK +case 259: +/* rule 259 can match eol */ +YY_RULE_SETUP +#line 328 "../s/bif.l" +yylloc->lines (yyleng); yylloc->step (); + YY_BREAK +case 260: +YY_RULE_SETUP +#line 329 "../s/bif.l" +/* ignore (Linux only) */ + YY_BREAK +case 261: +YY_RULE_SETUP +#line 330 "../s/bif.l" +printf("WARNING: bad character! '%s' (0x%02X)\n",yytext,yytext[0]); + YY_BREAK +case 262: +YY_RULE_SETUP +#line 331 "../s/bif.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2947 "../bisonflex/bif.yy.cpp" +#line 3066 "../bisonflex/bif.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3345,7 +3464,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1111 ) + if ( yy_current_state >= 1171 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -3378,11 +3497,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1111 ) + if ( yy_current_state >= 1171 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 1110); + yy_is_jam = (yy_current_state == 1170); return yy_is_jam ? 0 : yy_current_state; } @@ -3992,7 +4111,7 @@ /* %ok-for-header */ -#line 316 "../s/bif.l" +#line 331 "../s/bif.l" diff -Nru xilinx-bootgen-2022.1/bifoptions.cpp xilinx-bootgen-2022.2/bifoptions.cpp --- xilinx-bootgen-2022.1/bifoptions.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bifoptions.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -64,6 +64,7 @@ , pufMode(PufMode::PUF12K) , optKey(OptKey::None) , shutterVal(SHUTTER_VAL) + , pufRoSwapConfigVal(0) , dpaCM(DpaCM::DpaCMDisable) , ppkSelect(0) , spkSelect(1) @@ -92,6 +93,9 @@ , slrConfigCnt(0) , aHwrot(false) , sHwrot(false) + , pmcdataBlocks(0) + , dice(DICE::DiceDisable) + , slrNum(0xFF) { arch = architecture; SetGroupName(name); @@ -166,7 +170,12 @@ , revokeId(0x00000000) , slrNum(0xFF) , pufHdLoc(PufHdLoc::PUFinEFuse) + , versalNetSeries(false) + , clusterNum(0) + , lockstep(false) , updateReserveInPh(false) + , bifSection("") + , delayAuth(false) { } /******************************************************************************/ @@ -264,6 +273,9 @@ { pmcDataAesFile = StringUtils::RemoveExtension(StringUtils::BaseName((currentPartitionBifOptions)->filename)) + ".nky"; } + + if(!(currentPartitionBifOptions->pmcData)) + partitionBifOptionList.push_back(currentPartitionBifOptions); currentPartitionBifOptions->pmcData = true; break; @@ -472,6 +484,12 @@ } /******************************************************************************/ +void BifOptions::ClearPmcCdoFileList() +{ + pmcCdoFileList.clear(); +} + +/******************************************************************************/ void BifOptions::SetPmcCdoFileList(const std::string& filename) { pmcCdoFileList.push_back(filename); @@ -594,6 +612,18 @@ } /******************************************************************************/ +void BifOptions::SetPufRingOscilltorSwapConfigValue(uint32_t value) +{ + pufRoSwapConfigVal = value; +} + +/******************************************************************************/ +void BifOptions::SetDiceEnable() +{ + dice = DICE::DiceEnable; +} + +/******************************************************************************/ void BifOptions::SetPUFHelperFileName(std::string filename) { if (arch == Arch::ZYNQ) @@ -1007,12 +1037,15 @@ } /******************************************************************************/ -static void ValidateEncryptionKeySource(KeySource::Type type) +static void ValidateEncryptionKeySource(KeySource::Type type, bool versalNetSeries) { - if ((type == KeySource::EfuseGryKey) || (type == KeySource::BhGryKey) || (type == KeySource::BbramGryKey) - || (type == KeySource::EfuseUserGryKey0) || (type == KeySource::EfuseUserGryKey1)) + if (!versalNetSeries) { - LOG_ERROR("The usage of obfuscated keys is deprecated in Versal.\n\t Refer 'bootgen -arch versal -bif_help keysrc' for valid key sources."); + if ((type == KeySource::EfuseGryKey) || (type == KeySource::BhGryKey) || (type == KeySource::BbramGryKey) + || (type == KeySource::EfuseUserGryKey0) || (type == KeySource::EfuseUserGryKey1)) + { + LOG_ERROR("The usage of obfuscated keys is deprecated in Versal.\n\t Refer 'bootgen -arch versal -bif_help keysrc' for valid key sources."); + } } static bool bhBlkKek = false; @@ -1091,9 +1124,9 @@ } /******************************************************************************/ -void BifOptions::SetMetaHeaderEncryptionKeySource(KeySource::Type type) +void BifOptions::SetMetaHeaderEncryptionKeySource(KeySource::Type type, bool versalNetSeries) { - ValidateEncryptionKeySource(type); + ValidateEncryptionKeySource(type, versalNetSeries); metaHdrAttributes.encrKeySource = type; } @@ -1162,14 +1195,15 @@ /******************************************************************************/ void PartitionBifOptions::SetEncryptionKeySource(KeySource::Type type) { - ValidateEncryptionKeySource(type); + ValidateEncryptionKeySource(type, versalNetSeries); keySrc = type; } /******************************************************************************/ -void PartitionBifOptions::SetArchType(Arch::Type type) +void PartitionBifOptions::SetArchType(Arch::Type type, bool flag) { arch = type; + versalNetSeries = flag; } /******************************************************************************/ @@ -1389,6 +1423,36 @@ } /******************************************************************************/ +void PartitionBifOptions::SetClusterNum(uint8_t id) +{ + if (arch == Arch::VERSAL && versalNetSeries) + { + if (id != 0 && id != 1 && id != 2 && id != 3) + { + LOG_ERROR("cluster can only take values from 0 to 3."); + } + clusterNum = id; + } + else + { + LOG_ERROR("BIF attribute error !!!\n\t 'cluster' is supported only in VersalNet architecture"); + } +} + +/******************************************************************************/ +void PartitionBifOptions::SetLockStepFlag() +{ + if (arch == Arch::VERSAL && versalNetSeries) + { + lockstep = true; + } + else + { + LOG_ERROR("BIF attribute error !!!\n\t 'lockstep' is supported only in VersalNet architecture"); + } +} + +/******************************************************************************/ std::vector& PartitionBifOptions::GetEncryptionBlocks(void) { return blocks; @@ -1437,6 +1501,12 @@ } /******************************************************************************/ +void PartitionBifOptions::SetDelayAuth(bool flag) +{ + delayAuth = flag; +} + +/******************************************************************************/ uint32_t PartitionBifOptions::GetDefaultEncryptionBlockSize(void) { return defBlockSize; @@ -1467,9 +1537,13 @@ } /******************************************************************************/ -std::string PartitionBifOptions::GetOutputFileFromBifSection(std::string out_file, std::string bif_section) +std::string PartitionBifOptions::GetOutputFileFromBifSection(std::string out_file, std::string bif_section, PartitionType::Type part_type) { std::string filename = StringUtils::RemoveExtension(out_file) + "_" + bif_section + StringUtils::GetExtension(out_file); + if (part_type == PartitionType::SLR_BOOT || part_type == PartitionType::SLR_CONFIG) + { + filename = StringUtils::RemoveExtension(out_file) + "_" + bif_section + ".bin"; + } return filename; } @@ -1747,6 +1821,18 @@ } /******************************************************************************/ +uint32_t BifOptions::GetPufRingOscilltorSwapConfigValue(void) +{ + return pufRoSwapConfigVal; +} + +/******************************************************************************/ +DICE::Type BifOptions::GetDice(void) +{ + return dice; +} + +/******************************************************************************/ DpaCM::Type BifOptions::GetDpaCM(void) { return dpaCM; diff -Nru xilinx-bootgen-2022.1/bifoptions.h xilinx-bootgen-2022.2/bifoptions.h --- xilinx-bootgen-2022.1/bifoptions.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bifoptions.h 2022-09-26 06:24:42.000000000 +0000 @@ -79,7 +79,7 @@ public: PartitionBifOptions(); - void SetArchType(Arch::Type type); + void SetArchType(Arch::Type type, bool versalNetSeries); void SetEncryptionBlocks(uint32_t size, uint32_t num = 1); void SetDefaultEncryptionBlockSize(uint32_t blk); void SetDestCpu(DestinationCPU::Type); @@ -97,12 +97,15 @@ void SetHivec(bool); void SetRevokeId(uint32_t); void SetSlrNum(uint8_t); + void SetClusterNum(uint8_t id); + void SetLockStepFlag(); void SetAesKeyFile(std::string filename); void SetUdfDataFile(std::string filename); void SetEncryptionKeySource(KeySource::Type type); void SetAuthBlockAttr(size_t blocksizeattr); void SetPufHdLocation(PufHdLoc::Type); void SetReserveLength(uint64_t length, bool flag); + void SetDelayAuth(bool flag); std::string GetUdfDataFile(void); std::vector& GetEncryptionBlocks(void); @@ -111,7 +114,8 @@ DpaCM::Type GetDpaCM(void); uint32_t GetRevokeId(void); PufHdLoc::Type GetPufHdLocation(void); - std::string GetOutputFileFromBifSection(std::string out_file, std::string bif_section); + std::string GetOutputFileFromBifSection(std::string, std::string, PartitionType::Type); + bool IsVersalNetSeries(void) { return versalNetSeries; } void Dump(void) { @@ -157,6 +161,7 @@ DpaCM::Type dpaCM; PufHdLoc::Type pufHdLoc; uint8_t slrNum; + uint8_t clusterNum; //no default declared Override alignment; @@ -178,6 +183,7 @@ bool early_handoff; bool bootloader; bool hivec; + bool lockstep; KeySource::Type keySrc; size_t authblockattr; size_t pid; @@ -197,6 +203,10 @@ std::vector filelist; bool updateReserveInPh; Arch::Type arch; + bool delayAuth; + +private: + bool versalNetSeries; }; /******************************************************************************/ @@ -355,6 +365,7 @@ void SetSplitMode(SplitMode::Type type); void SetSplitFmt(File::Type type); void SetPmcdataFile(const std::string & filename); + void ClearPmcCdoFileList(); void SetPmcCdoFileList(const std::string & filename); void SetPdiId(uint32_t id); void SetGroupName(std::string name); @@ -369,9 +380,11 @@ void SetOptKey(OptKey::Type type); void SetPufMode(PufMode::Type type); void SetShutterValue(uint32_t value); + void SetPufRingOscilltorSwapConfigValue(uint32_t value); + void SetDiceEnable(); void InsertEncryptionBlock(uint32_t size); void SetCore(Core::Type type); - void SetMetaHeaderEncryptionKeySource(KeySource::Type type); + void SetMetaHeaderEncryptionKeySource(KeySource::Type type, bool versalNetSeries); void SetMetaHeaderEncryptType(Encryption::Type type); void SetMetaHeaderAuthType(Authentication::Type type); void SetPufHdinBHFlag(); @@ -389,6 +402,8 @@ BootDevice::Type GetBootDevice(void); uint32_t GetBootDeviceAddress(void); uint32_t GetShutterValue(void); + uint32_t GetPufRingOscilltorSwapConfigValue(void); + DICE::Type GetDice(void); std::string GetHeaderSignatureFile(void); PufMode::Type GetPufMode(void); PufHdLoc::Type GetPufHdLoc(void); @@ -451,7 +466,7 @@ std::list imageBifOptionList; std::list partitionBifOptionList; Core::Type GetCore(void); - + //Versal Binary::Address_t pmcCdoLoadAddress; std::string pmcDataAesFile; @@ -471,6 +486,8 @@ uint32_t slrConfigCnt; PartitionBifOptions* lastPartitionBifOption; BootDevice::Type bootDevice; + std::vector pmcdataBlocks; + uint8_t slrNum; private: std::string regInitFile; std::string udfBhFile; @@ -505,7 +522,9 @@ PufMode::Type pufMode; OptKey::Type optKey; uint32_t shutterVal; + uint32_t pufRoSwapConfigVal; DpaCM::Type dpaCM; + DICE::Type dice; bool xipMode; uint32_t ppkSelect; bool isPPKSelectGlobal; diff -Nru xilinx-bootgen-2022.1/binary-versal.cpp xilinx-bootgen-2022.2/binary-versal.cpp --- xilinx-bootgen-2022.1/binary-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/binary-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -90,7 +90,7 @@ if (runningAddress > sec.Address) { LOG_DUMP_IMAGE(*this); - LOG_ERROR("Section %s offset of 0x%X overlaps with prior section end address of %X", sec.Name.c_str(), sec.Address, runningAddress); + LOG_ERROR("Section %s offset of 0x%X overlaps with prior section end address of 0x%X", sec.Name.c_str(), sec.Address, runningAddress); } } else diff -Nru xilinx-bootgen-2022.1/binary.cpp xilinx-bootgen-2022.2/binary.cpp --- xilinx-bootgen-2022.1/binary.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/binary.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,7 +79,7 @@ if (runningAddress > sec.Address) { LOG_DUMP_IMAGE(*this); - LOG_ERROR("Section %s offset of 0x%X overlaps with prior section end address of %X", sec.Name.c_str(), sec.Address, runningAddress); + LOG_ERROR("Section %s offset of 0x%X overlaps with prior section end address of 0x%X", sec.Name.c_str(), sec.Address, runningAddress); } } else diff -Nru xilinx-bootgen-2022.1/bootgenenum.h xilinx-bootgen-2022.2/bootgenenum.h --- xilinx-bootgen-2022.1/bootgenenum.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootgenenum.h 2022-09-26 06:24:42.000000000 +0000 @@ -218,6 +218,26 @@ } Type; }; +/* DICE */ +struct DICE +{ + typedef enum + { + DiceDisable = 0, + DiceEnable = 3, + } Type; +}; + +/* LockStep */ +struct Lockstep +{ + typedef enum + { + LockstepDisable = 0, + LockstepEnable = 3, + } Type; +}; + /* Authentication Hash Selection */ struct AuthHash { diff -Nru xilinx-bootgen-2022.1/bootheader-versal.cpp xilinx-bootgen-2022.2/bootheader-versal.cpp --- xilinx-bootgen-2022.1/bootheader-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootheader-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ #include "bootheader-versal.h" #include "authentication-versal.h" +#define PLM_MAX_SIZE 0x60000 //384KB + /* ------------------------------------------------------------------------------- ***************************************************** F U N C T I O N S *** @@ -124,10 +126,25 @@ SetEncryptionKeySource(bi.options.GetEncryptedKeySource(), bi.bifOptions); SetPmcCdoLoadAddress(bi.bifOptions->GetPmcCdoLoadAddress()); SetShutterValue(bi.bifOptions->GetShutterValue()); + SetPufRingOscilltorSwapConfigValue(bi.bifOptions->GetPufRingOscilltorSwapConfigValue()); SetGreyOrBlackKey(bi.bifOptions->GetBhKeyFile()); + + if (bi.options.IsVersalNetSeries() && bi.bifOptions->GetBHKekIVFile() != "") + { + kekIvFile = bi.bifOptions->GetBHKekIVFile(); + } + SetGreyOrBlackIv(kekIvFile); SetPlmSecureHdrIv(bi.options.secHdrIv); SetPmcDataSecureHdrIv(bi.options.secHdrIvPmcData); + if (bi.options.IsVersalNetSeries()) + { + SetRevokeId(bi.imageList.front()->GetPartitionRevocationId()); + } + else + { + SetRevokeId(0x00000000); + } SetRomReserved(); SetPmcFwReserved(); BuildRegInitTable(bi.options); @@ -178,7 +195,14 @@ PartitionHeader& bootloaderHdr(*(fsbl->GetPartitionHeaderList().front())); BootloaderAddressAndSizeCheck(bootloaderHdr); - SetSourceOffset((uint32_t)bootloaderHdr.partition->section->Address); + if (bootloaderHdr.imageHeader->GetChecksumContext()->Type() != Checksum::None && bi.options.IsVersalNetSeries()) + { + SetSourceOffset((uint32_t)bootloaderHdr.partition->section->Address + SHA3_LENGTH_BYTES); + } + else + { + SetSourceOffset((uint32_t)bootloaderHdr.partition->section->Address); + } SetPlmLength((uint32_t)bootloaderHdr.GetPartitionSize()); SetBHForXIP(bi); @@ -216,6 +240,10 @@ } SetHeaderChecksum(); + if (bHTable->totalPlmLength > PLM_MAX_SIZE && !bi.options.IsVersalNetSeries()) + { + LOG_ERROR("Total PLM size : %dKB > maximum allowable size (384KB)", bHTable->totalPlmLength / 1024); + } } /******************************************************************************/ @@ -491,6 +519,16 @@ bHTable->bhAttributes |= bi.partitionHeaderList.front()->imageHeader->GetDpacm() << DPA_CM_BIT_SHIFT; bHTable->bhAttributes |= bi.bifOptions->GetBhRsa() << BH_RSA_BIT_SHIFT; bHTable->bhAttributes |= bi.bifOptions->GetPufMode() << BH_PUF_MODE_BIT_SHIFT; + + if (bi.options.IsVersalNetSeries()) + { + if (bi.partitionHeaderList.front()->imageHeader->GetAuthenticationType() != Authentication::None) + { + bHTable->bhAttributes |= BH_RSA_SINGED_BIT_MASK << BH_RSA_SINGED_BIT_SHIFT; + } + + bHTable->bhAttributes |= bi.bifOptions->GetDice() << BH_DICE_BIT_SHIFT; + } } } @@ -536,6 +574,18 @@ } /******************************************************************************/ +void VersalBootHeader::SetRevokeId(uint32_t id) +{ + bHTable->revokeId = id; +} + +/******************************************************************************/ +void VersalBootHeader::SetPufRingOscilltorSwapConfigValue(uint32_t value) +{ + bHTable->pufRoSwapConfigVal = value; +} + +/******************************************************************************/ void VersalBootHeader::SetImageHeaderByteOffset(uint32_t address) { bHTable->imageHeaderByteOffset = address; diff -Nru xilinx-bootgen-2022.1/bootheader-versal.h xilinx-bootgen-2022.2/bootheader-versal.h --- xilinx-bootgen-2022.1/bootheader-versal.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootheader-versal.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,8 @@ #define DEFAULT_RESERVED_VERSAL 0 #define SMAP_BUS_WIDTH 4 -#define ROM_BH_RESERVED 17 + +#define ROM_BH_RESERVED 15 #define PLM_BH_RESERVED 24 #define SHA3_PAD_SIZE_VERSAL 19 #define MAX_REG_INIT_VERSAL 512 @@ -51,6 +52,12 @@ #define DPA_CM_BIT_SHIFT 10 #define DPA_CM_BIT_MASK 3 +//VersalNet +#define BH_RSA_SINGED_BIT_SHIFT 18 +#define BH_RSA_SINGED_BIT_MASK 3 + +#define BH_DICE_BIT_SHIFT 20 +#define BH_DICE_BIT_MASK 3 /* ------------------------------------------------------------------------------- @@ -80,7 +87,9 @@ uint32_t plmSecureHdrIv[IV_LENGTH]; // (0x64) uint32_t shutterValue; // (0x70) uint32_t pmcCdoSecureHdrIv[IV_LENGTH]; // (0x74) - uint32_t romReserved[ROM_BH_RESERVED]; // (0x80) + uint32_t pufRoSwapConfigVal; // (0x80) - Valid only for VersalNet + uint32_t revokeId; // (0x84) + uint32_t romReserved[ROM_BH_RESERVED]; // (0x88) uint32_t imageHeaderByteOffset; // (0xC4) uint32_t plmReserved[PLM_BH_RESERVED]; // (0xC8) uint32_t reginit[MAX_REG_INIT_VERSAL]; // (0x128) @@ -118,6 +127,7 @@ void SetSourceOffset(uint32_t offset); void SetHeaderChecksum(void); void SetShutterValue(uint32_t value); + void SetPufRingOscilltorSwapConfigValue(uint32_t value); void SetImageHeaderByteOffset(uint32_t address); void SetEncryptionKeySource(KeySource::Type keyType, BifOptions* bifOptions); void SetGreyOrBlackKey(std::string keyFile); @@ -133,6 +143,7 @@ void SetTotalPmcCdoLength(uint32_t size); void SetBHAttributes(BootImage& bi); void SetBHAttributes(uint32_t attributes); + void SetRevokeId(uint32_t id); void SetRomReserved(); void SetPmcFwReserved(); void SetSHA3Padding(); diff -Nru xilinx-bootgen-2022.1/bootheader.h xilinx-bootgen-2022.2/bootheader.h --- xilinx-bootgen-2022.1/bootheader.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootheader.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,6 +94,12 @@ RegisterInitPair registerInitialization [MAX_REGISTER_INITS]; } RegisterInitTable; +typedef struct +{ + uint64_t baseaddr; + uint64_t size; +} RegisterInitAddressRange; + /* ------------------------------------------------------------------------------- ********************************************************* C L A S S E S *** @@ -105,8 +111,10 @@ public: RegisterTable() : regtab(NULL) - , count(0) + , count(0) + , fileParseEnd(false) { + invalidAddr.clear(); } void Build (Options& option, RegisterInitTable* regTable0); @@ -117,6 +125,8 @@ private: RegisterInitTable* regtab; uint32_t count; + bool fileParseEnd; + std::vector invalidAddr; }; diff -Nru xilinx-bootgen-2022.1/bootimage-versal.cpp xilinx-bootgen-2022.2/bootimage-versal.cpp --- xilinx-bootgen-2022.1/bootimage-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootimage-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -54,6 +54,7 @@ currentAuthCtx->hash = hash; partitionHeaderTable->firstSection = NULL; convertAieElfToCdo = true; + current_image_block = 0; createSubSystemPdis = true; } @@ -465,6 +466,8 @@ } uint8_t* aC = new uint8_t[sizeof(AuthCertificate4096Sha3PaddingStructure)]; + memset(aC, 0, sizeof(AuthCertificate4096Sha3PaddingStructure)); + if (!(fseek(binFile, ph->GetAuthCertificateOffset(), SEEK_SET))) { size_t result = fread(aC, 1, sizeof(AuthCertificate4096Sha3PaddingStructure), binFile); @@ -594,6 +597,8 @@ LOG_ERROR("Cannot read file %s", it->filename.c_str()); } uint8_t* aC = new uint8_t[sizeof(AuthCertificate4096Sha3PaddingStructure)]; + memset(aC, 0, sizeof(AuthCertificate4096Sha3PaddingStructure)); + if (!(fseek(binFile, ph->GetAuthCertificateOffset(), SEEK_SET))) { size_t result = fread(aC, 1, sizeof(AuthCertificate4096Sha3PaddingStructure), binFile); @@ -800,6 +805,9 @@ image->SetPartitionRevocationId(partitionBifOptions->GetRevokeId()); image->SetDpacm(partitionBifOptions->dpaCM); image->SetPufHdLocation(partitionBifOptions->pufHdLoc); + image->SetClusterNum(partitionBifOptions->clusterNum); + image->SetLockStepFlag(partitionBifOptions->lockstep); + image->SetDelayAuthFlag(partitionBifOptions->delayAuth); if ((bifoptions->GetDpaCM() == DpaCM::DpaCMEnable) && (image->IsBootloader())) { @@ -1047,7 +1055,7 @@ uint32_t defaultEncrBlockSize = partitionBifOptions->GetDefaultEncryptionBlockSize(); image->SetDefaultEncrBlockSize(defaultEncrBlockSize); - if (image->IsBootloader()) + if (image->IsBootloader() && !(options.IsVersalNetSeries())) { for (uint32_t itr = 0; itr < encrBlocks.size(); itr++) { @@ -1058,8 +1066,8 @@ { Binary::Length_t encrBlocksSize = 0; Binary::Length_t encrOverhead = 0; - Binary::Length_t secureChunkSize = VersalPartition::GetSecureChunkSize(); - if (partitionBifOptions->authType == Authentication::None) + Binary::Length_t secureChunkSize = GetSecureChunkSize(image->IsBootloader()); + if (partitionBifOptions->authType == Authentication::None && !partitionBifOptions->delayAuth) { secureChunkSize += SHA3_LENGTH_BYTES; } @@ -1866,3 +1874,16 @@ LOG_INFO("After Link "); LOG_DUMP_IMAGE(*cache); } + +/******************************************************************************/ +uint64_t VersalBootImage::GetSecureChunkSize(bool isBootloader) +{ + if (options.IsVersalNetSeries() && isBootloader == true) + { + return (SECURE_16K_CHUNK - SHA3_LENGTH_BYTES); + } + else + { + return (SECURE_32K_CHUNK - SHA3_LENGTH_BYTES); + } +} diff -Nru xilinx-bootgen-2022.1/bootimage-versal.h xilinx-bootgen-2022.2/bootimage-versal.h --- xilinx-bootgen-2022.1/bootimage-versal.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootimage-versal.h 2022-09-26 06:24:42.000000000 +0000 @@ -65,6 +65,7 @@ void ConfigureEncryptionBlocks(ImageHeader * image, PartitionBifOptions* partitionBifOptions); void SetPmcdataFile(const std::string & filename); void SetPmcDataLoadAddress(Binary::Address_t addr); + uint64_t GetSecureChunkSize(bool isBootloader); uint32_t current_image_block; }; #endif diff -Nru xilinx-bootgen-2022.1/bootimage.cpp xilinx-bootgen-2022.2/bootimage.cpp --- xilinx-bootgen-2022.1/bootimage.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootimage.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -45,55 +45,63 @@ */ /******************************************************************************/ -void BIF_File::Process(Options& options) +void BIF_File::Process(Options& options) { - std::string basefile = StringUtils::BaseName(biffilename); - - LOG_TRACE("BIF file parsing started"); - - BIF::FlexScanner scanner; - BIF::BisonParser parser(scanner, options); - - scanner.filename = biffilename; - std::ifstream s(biffilename.c_str()); - - if (!s) - { - LOG_ERROR("Cannot read BIF file - %s ", basefile.c_str()); - } - if(s.peek() == EOF) + ParseBifFile(options); + + bifOptionList = options.bifOptionsList; + + /* Parse the include bif file */ + if (options.includeBifOptionsList.size() > 1) { - LOG_ERROR("BIF file is empty - %s ", basefile.c_str()); + LOG_ERROR("Multiple include bif files is not supported."); } - scanner.switch_streams(&s); - int res = parser.parse(); - if (res) + if (options.includeBifOptionsList.size() != 0) { - LOG_ERROR("BIF file parsing failed with code %d", res); - } + options.bifOptionsList.clear(); + biffilename = options.includeBifOptionsList.front(); + ParseBifFile(options); - LOG_INFO("BIF file parsing completed successfully"); + includeBifOptionList = options.bifOptionsList; - //bifOptionList.push_back(options.bifOptions); - - bifOptionList = options.bifOptionsList; - BootImage* currentbi = NULL; - uint8_t index = 0; - bool ssit_bif = false; - for (std::vector::iterator bifoptions = bifOptionList.begin(); bifoptions != bifOptionList.end(); bifoptions++) - { - if ((*bifoptions)->slrBootCnt != 0 || (*bifoptions)->slrConfigCnt != 0) + if (options.IsSsitBif()) { - ssit_bif = true; - break; + includeBifOptionList.back()->slrNum = 0x00; + + /* Back populate the slr number, based on the group name in master bif for SSIT use cases */ + for (std::list::iterator itr = includeBifOptionList.back()->partitionBifOptionList.begin(); itr != includeBifOptionList.back()->partitionBifOptionList.end(); itr++) + { + if (((*itr)->slrNum != 0xFF) && ((strcmp((*itr)->bifSection.c_str(), "") != 0))) + { + for (std::size_t j = 0; j < includeBifOptionList.size(); j++) + { + if (strcmp(includeBifOptionList[j]->GetGroupName().c_str(), (*itr)->bifSection.c_str()) == 0) + { + includeBifOptionList[j]->slrNum = (*itr)->slrNum; + break; + } + } + } + } } + + ReplaceFiles(); + options.bifOptionsList = bifOptionList = includeBifOptionList; } - for (std::vector::iterator bifoptions = bifOptionList.begin(); bifoptions != bifOptionList.end();bifoptions++) + BootImage* currentbi = NULL; + uint8_t index = 0; + + for (std::vector::iterator bifoptions = bifOptionList.begin(); bifoptions != bifOptionList.end(); bifoptions++) { - if (((*bifoptions)->slrBootCnt == 0 || (*bifoptions)->slrConfigCnt == 0) && ssit_bif) + if (((*bifoptions)->slrBootCnt == 0) && ((*bifoptions)->slrConfigCnt == 0) && options.IsSsitBif()) { (*bifoptions)->pdiType = PartitionType::SLR_SLAVE; + if ((*bifoptions)->smapWidth != 0) + { + LOG_WARNING("smap_width for SSIT SLAVE PDIs is identified as %d. Setting it to the default value : 0.", (*bifoptions)->smapWidth); + (*bifoptions)->smapWidth = 0; + } } if (options.archType == Arch::ZYNQMP) @@ -201,6 +209,10 @@ else { out_filename = StringUtils::RemoveExtension(*filename) + "_" + bi->Name + StringUtils::GetExtension(*filename); + if (options.IsSsitBif()) + { + out_filename = StringUtils::RemoveExtension(*filename) + "_" + bi->Name + ".bin"; + } } OutputFile* file = OutputFile::Factory(out_filename); file->Output(options, *bi->cache); @@ -253,6 +265,7 @@ , firstIv(NULL) , firstOptKey(NULL) , overlayCDO(NULL) + , globalSlrId(0) { bifOptions = options.bifOptionsList.at(index); Name = bifOptions->GetGroupName(); @@ -346,13 +359,13 @@ } /******************************************************************************/ -void BootImage::BuildAndLink(Binary* cache) -{ - if( imageList.size() == 0 ) +void BootImage::BuildAndLink(Binary* cache) +{ + if( imageList.size() == 0 ) { LOG_WARNING("No partition images given"); } - + currentAuthCtx->SetPpkSelect(bifOptions->GetPpkSelection()); currentAuthCtx->SetSpkSelect(bifOptions->GetSpkSelection()); currentAuthCtx->SetSpkIdentification(bifOptions->GetSpkId()); @@ -665,3 +678,109 @@ { encryptionKeyFileVec.push_back(filename); } + +/******************************************************************************/ +void BIF_File::ParseBifFile(Options& options) +{ + std::string basefile = StringUtils::BaseName(biffilename); + + LOG_TRACE("Parsing BIF file - %s", basefile.c_str()); + BIF::FlexScanner scanner; + BIF::BisonParser parser(scanner, options); + + scanner.filename = biffilename; + std::ifstream s(biffilename.c_str()); + + if (!s) + { + LOG_ERROR("Cannot read BIF file - %s ", basefile.c_str()); + } + if (s.peek() == EOF) + { + LOG_ERROR("BIF file is empty - %s ", basefile.c_str()); + } + scanner.switch_streams(&s); + int res = parser.parse(); + if (res) + { + LOG_ERROR("BIF file - %s, parsing failed with code %d", basefile.c_str(), res); + } + + LOG_INFO("BIF file parsed successfully - %s ", basefile.c_str()); +} + +/******************************************************************************/ +void BIF_File::ReplaceFiles() +{ + /* If slr number matches between partitions - replace the files */ + for (size_t i = 0; i < includeBifOptionList.size(); i++) + { + for (size_t j = 0; j < bifOptionList.size(); j++) + { + for (std::list::iterator itr1 = bifOptionList[j]->partitionBifOptionList.begin(); itr1 != bifOptionList[j]->partitionBifOptionList.end(); itr1++) + { + if (includeBifOptionList[i]->slrNum == (*itr1)->slrNum) + { + if ((*itr1)->bootloader) + { + for (std::list::iterator itr2 = includeBifOptionList[i]->partitionBifOptionList.begin(); itr2 != includeBifOptionList[i]->partitionBifOptionList.end(); itr2++) + { + if ((*itr2)->bootloader) + { + if((*itr1)->slrNum != 0xFF) + LOG_TRACE("Replacing '%s' with '%s' for SLR %d", (*itr2)->filename.c_str(), (*itr1)->filename.c_str(), (*itr1)->slrNum); + else + LOG_TRACE("Replacing '%s' with '%s'", (*itr2)->filename.c_str(), (*itr1)->filename.c_str()); + + (*itr2)->filename = (*itr1)->filename; + (*itr2)->filelist = (*itr1)->filelist; + break; + } + } + } + + if ((*itr1)->pmcData) + { + for (std::list::iterator itr2 = includeBifOptionList[i]->partitionBifOptionList.begin(); itr2 != includeBifOptionList[i]->partitionBifOptionList.end(); itr2++) + { + if ((*itr2)->pmcData) + { + if ((*itr1)->slrNum != 0xFF) + LOG_TRACE("Replacing '%s' with '%s' for SLR %d", (*itr2)->filename.c_str(), (*itr1)->filename.c_str(), (*itr1)->slrNum); + else + LOG_TRACE("Replacing '%s' with '%s'", (*itr2)->filename.c_str(), (*itr1)->filename.c_str()); + + (*itr2)->filename = (*itr1)->filename; + includeBifOptionList[i]->SetPmcdataFile((*itr1)->filename); + (*itr2)->filelist = (*itr1)->filelist; + + includeBifOptionList[i]->ClearPmcCdoFileList(); + for (size_t listSize = 0; listSize < (*itr1)->filelist.size(); listSize++) + includeBifOptionList[i]->SetPmcCdoFileList((*itr1)->filelist[listSize]); + break; + } + } + } + + if ((*itr1)->destCPUType == DestinationCPU::PMU) + { + for (std::list::iterator itr2 = includeBifOptionList[i]->partitionBifOptionList.begin(); itr2 != includeBifOptionList[i]->partitionBifOptionList.end(); itr2++) + { + if ((*itr2)->destCPUType == DestinationCPU::PMU) + { + if ((*itr1)->slrNum != 0xFF) + LOG_TRACE("Replacing '%s' with '%s' for SLR %d", (*itr2)->filename.c_str(), (*itr1)->filename.c_str(), (*itr1)->slrNum); + else + LOG_TRACE("Replacing '%s' with '%s'", (*itr2)->filename.c_str(), (*itr1)->filename.c_str()); + + (*itr2)->filename = (*itr1)->filename; + (*itr2)->filelist = (*itr1)->filelist; + break; + } + } + } + } + } + } + } +} diff -Nru xilinx-bootgen-2022.1/bootimage.h xilinx-bootgen-2022.2/bootimage.h --- xilinx-bootgen-2022.1/bootimage.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/bootimage.h 2022-09-26 06:24:42.000000000 +0000 @@ -71,10 +71,13 @@ public: BIF_File(std::string& filename0) : biffilename(filename0) {} void Process(Options& options); + void ParseBifFile(Options& options); + void ReplaceFiles(); private: std::string biffilename; void Output(Options& options, uint8_t index); std::vector bifOptionList; + std::vector includeBifOptionList; std::vector bootImages; }; @@ -157,6 +160,7 @@ std::string bitFilename; void * overlayCDO; + virtual uint64_t GetSecureChunkSize(bool isBootloader) { return 0; } //private: bool assumeEncryption; uint32_t* deviceKey; @@ -174,5 +178,8 @@ bool bootloaderEncrypt; KeySource::Type bootloaderKeySource; bool bootloaderAuthenticate; + uint32_t xplm_modules_data_length; + uint32_t* xplm_modules_data; + char globalSlrId; }; #endif diff -Nru xilinx-bootgen-2022.1/cdo-alloc.c xilinx-bootgen-2022.2/cdo-alloc.c --- xilinx-bootgen-2022.1/cdo-alloc.c 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-alloc.c 2022-09-26 06:24:42.000000000 +0000 @@ -1,6 +1,5 @@ -// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 /****************************************************************************** -* Copyright 2019-2021 Xilinx, Inc. +* Copyright 2019-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff -Nru xilinx-bootgen-2022.1/cdo-alloc.h xilinx-bootgen-2022.2/cdo-alloc.h --- xilinx-bootgen-2022.1/cdo-alloc.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-alloc.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,4 +1,3 @@ -// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 /****************************************************************************** * Copyright 2019-2022 Xilinx, Inc. * diff -Nru xilinx-bootgen-2022.1/cdo-binary.c xilinx-bootgen-2022.2/cdo-binary.c --- xilinx-bootgen-2022.1/cdo-binary.c 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-binary.c 2022-09-26 06:24:42.000000000 +0000 @@ -31,9 +31,13 @@ #define u32pair(hi, lo) (((uint64_t)(hi) << 32) | (lo)) #define HDR_IDN_WRD (0x584C4E58U) -uint32_t* slr_sync_points; -uint8_t num_of_sync_points = 0; -uint8_t search_sync_points = 0; +static uint32_t* slr_sync_points; +static uint32_t* noc_start_markers; +static uint32_t* noc_end_markers; +static uint8_t num_start_markers = 0; +static uint8_t num_end_markers = 0; +static uint8_t num_of_sync_points = 0; +static uint8_t search_sync_points = 0; enum { /*General Commands */ @@ -101,6 +105,9 @@ CMD2_BREAK = 0x11dU, CMD2_OT_CHECK = 0x11eU, CMD2_PSM_SEQUENCE = 0x11fU, + CMD2_PLM_UPDATE = 0x120U, + CMD2_SCATTER_WRITE = 0x121U, + CMD2_SCATTER_WRITE2 = 0x122U, /* PM Commands */ CMD2_PM_GET_API_VERSION = 0x201U, @@ -154,6 +161,10 @@ CMD2_PM_ISO_CONTROL = 0x240U, CMD2_PM_ACTIVATE_SUBSYSTEM = 0x241U, CMD2_PM_SET_NODE_ACCESS = 0x242U, + CMD2_PM_BISR = 0x243, + CMD2_PM_APPLY_TRIM = 0x244, + CMD2_PM_NOC_CLOCK_ENABLE = 0x245, + CMD2_PM_IF_NOC_CLOCK_ENABLE = 0x246, /* NPI Commands */ CMD2_NPI_SEQ = 0x301U, @@ -174,6 +185,7 @@ /* Loader Commands */ CMD2_LDR_SET_IMAGE_INFO = 0x704U, + CMD2_LDR_CFRAME_CLEAR_CHECK = 0x70cU, /* EM Commands */ CMD2_EM_SET_ACTION = 0x801U, @@ -580,6 +592,15 @@ cdocmd_add_end(seq); break; } + case CMD2_SCATTER_WRITE: + if (args < 2) goto unexpected; + cdocmd_add_scatter_write(seq, u32xe(p[i+0]), args - 1, &p[i+1], be); + break; + case CMD2_SCATTER_WRITE2: + if (args < 3) goto unexpected; + cdocmd_add_scatter_write2(seq, u32xe(p[i+0]), u32xe(p[i+1]), args - 2, &p[i+2], be); + break; + case CMD2_NPI_SEQ: if (args != 2) goto unexpected; cdocmd_add_npi_seq(seq, u32xe(p[i+0]), u32xe(p[i+1])); @@ -802,6 +823,24 @@ if (args < 1) goto unexpected; cdocmd_add_pm_set_node_access(seq, u32xe(p[i+0]), args - 1, &p[i+1], be); break; + case CMD2_PM_BISR: + if (args != 1) goto unexpected; + cdocmd_add_pm_bisr(seq, u32xe(p[i+0])); + break; + case CMD2_PM_APPLY_TRIM: + if (args != 1) goto unexpected; + cdocmd_add_pm_apply_trim(seq, u32xe(p[i+0])); + break; + case CMD2_PM_NOC_CLOCK_ENABLE: + if (args < 1) goto unexpected; + cdocmd_add_pm_noc_clock_enable(seq, u32xe(p[i+0]), args - 1, &p[i+1], be); + break; + case CMD2_PM_IF_NOC_CLOCK_ENABLE: + if (args != 2 && args != 3) goto unexpected; + cdocmd_add_pm_if_noc_clock_enable(seq, u32xe(p[i+0]), u32xe(p[i+1]), + args == 3 ? u32xe(p[i+2]) : 1); + break; + case CMD2_CFU_SET_CRC32: if (args < 1) goto unexpected; if (u32xe(p[i+0]) == 0) { @@ -851,6 +890,10 @@ if (args != 4) goto unexpected; cdocmd_add_ldr_set_image_info(seq, u32xe(p[i+0]), u32xe(p[i+1]), u32xe(p[i+2]), u32xe(p[i+3])); break; + case CMD2_LDR_CFRAME_CLEAR_CHECK: + if (args != 1) goto unexpected; + cdocmd_add_ldr_cframe_clear_check(seq, u32xe(p[i+0])); + break; default: cdocmd_add_generic_command(seq, hdr & 0xffff, p + i, args, be); break; @@ -868,6 +911,68 @@ return 1; } +uint32_t check_cdo_commands(void* data, uint32_t l, uint32_t * xplm_data, uint32_t xplm_length) { + uint32_t be = 0; + uint32_t * p = (uint32_t *)data; + uint32_t hdrlen = u32xe(p[0]); + uint32_t len = u32xe(p[3]); + uint32_t total_len = hdrlen + 1 + len; + uint32_t i = hdrlen + 1; + uint32_t cmdpos = 0; + uint32_t hdr; + uint8_t cmd_id; + uint8_t module_id; + size_t index; + + if (l < total_len) { + fprintf(stderr, "warning: incomplete CDO buffer %"PRIu32", expected %"PRIu32"\n", l, total_len); + total_len = l; + } else if (l > total_len) { + l = total_len; + } + while (i < l) { + uint32_t args; + int cmd_found; + cmdpos = i; + hdr = u32xe(p[i++]); + if (verbose) { + fprintf(stderr, "info: decoding command %#"PRIx32" at %"PRIu32"\n", hdr, cmdpos); + } + args = (hdr >> 16) & 255; + if (args == 255) { + if (hdr == CMD2_END) goto found_end_marker; + if (i >= l) { + fprintf(stderr, "incomplete CDO command %#"PRIx32" at %"PRIu32"\n", hdr, cmdpos); + return -1; + } + args = u32xe(p[i++]); + } + if (l - i < args) { + fprintf(stderr, "incomplete CDO command %#"PRIx32" at %"PRIu32"\n", hdr, cmdpos); + return -1; + } + cmd_id = hdr & 0xff; + module_id = (hdr & 0xff00) >> 0x8; + // TODO: only PLM commands are supported for now + if (module_id != 0x1) continue; + cmd_found = 0; + size_t cmdInfo_size = sizeof(XPlmi_CmdInfo); + for (index = 0; index < (xplm_length/ cmdInfo_size); index++) { + uint8_t* cmdInfo = (uint8_t*)malloc(cmdInfo_size); + memset(cmdInfo, 0, cmdInfo_size); + memcpy(cmdInfo, xplm_data + (index * (cmdInfo_size/4)), cmdInfo_size); + XPlmi_CmdInfo* cmd_info = (XPlmi_CmdInfo*)(cmdInfo); + if (cmd_info->cmd_id == cmd_id && cmd_info->module_id == module_id && cmd_info->min_arg_cnt >= args && cmd_info->max_arg_cnt <= args) { + cmd_found = 1; + break; + } + } + if (cmd_found == 0) return -1; + } +found_end_marker: +return 0; +} + static uint32_t decode_v2(CdoSequence * seq, uint32_t * p, uint32_t l, uint32_t be) { uint32_t hdrlen = u32xe(p[0]); uint32_t len = u32xe(p[3]); @@ -1565,6 +1670,19 @@ case CdoCmdMarker: { uint32_t len = strlen((char *)cmd->buf); uint32_t count = (len + 3)/4; + /* Search for the START markers with string "NOC Start up", only for SSIT devices */ + if (search_sync_points && (cmd->value == 0x64 || cmd->value == 0x65) && (strcmp((char*)cmd->buf, "NOC Startup") == 0)) { + /* Store the offset of each of the START and END marker with "NOC Start up" string */ + if (cmd->value == 0x64) { + num_start_markers++; + noc_start_markers = (uint32_t *)realloc(noc_start_markers, num_start_markers * 2 * sizeof(uint32_t)); + memcpy(noc_start_markers + (num_start_markers - 1), &pos, 4); + } else { + num_end_markers++; + noc_end_markers = (uint32_t *)realloc(noc_end_markers, num_end_markers * 2 * sizeof(uint32_t)); + memcpy(noc_end_markers + (num_end_markers - 1), &pos, 4); + } + } hdr2(&p, &pos, CMD2_MARKER, 1 + count, be); p[pos++] = u32xe(cmd->value); memset(p + pos, 0, count*4); @@ -1587,6 +1705,8 @@ pos = pos_save; p[pos++] = u32xe(cmd->value); p = encode_v2_cmd(l, blockend, &pos, be); + /* Update payload size incase it changed due to alignment */ + p[pos_save - 1] = u32xe(pos - pos_save); } l = blockend; if (l != lh) l = l->next; @@ -1640,6 +1760,21 @@ if (l != lh) l = l->next; break; } + case CdoCmdScatterWrite: + hdr2(&p, &pos, CMD2_SCATTER_WRITE, 1 + cmd->count, be); + p[pos++] = u32xe(cmd->value); + memcpy(p + pos, cmd->buf, cmd->count * sizeof(uint32_t)); + byte_swap_buffer(p + pos, cmd->count, be); + pos += cmd->count; + break; + case CdoCmdScatterWrite2: + hdr2(&p, &pos, CMD2_SCATTER_WRITE2, 2 + cmd->count, be); + p[pos++] = u32xe(cmd->value); + p[pos++] = u32xe(cmd->mask); + memcpy(p + pos, cmd->buf, cmd->count * sizeof(uint32_t)); + byte_swap_buffer(p + pos, cmd->count, be); + pos += cmd->count; + break; case CdoCmdNpiSeq: hdr2(&p, &pos, CMD2_NPI_SEQ, 2, be); @@ -1929,6 +2064,29 @@ p[pos++] = u32xe(cmd->id); p[pos++] = u32xe(cmd->value); break; + case CdoCmdPmBisr: + hdr2(&p, &pos, CMD2_PM_BISR, 1, be); + p[pos++] = u32xe(cmd->id); + break; + case CdoCmdPmApplyTrim: + hdr2(&p, &pos, CMD2_PM_APPLY_TRIM, 1, be); + p[pos++] = u32xe(cmd->id); + break; + case CdoCmdPmNocClockEnable: + hdr2(&p, &pos, CMD2_PM_NOC_CLOCK_ENABLE, 1 + cmd->count, be); + p[pos++] = u32xe(cmd->id); + memcpy(p + pos, cmd->buf, cmd->count * sizeof(uint32_t)); + byte_swap_buffer(p + pos, cmd->count, be); + pos += cmd->count; + break; + case CdoCmdPmIfNocClockEnable: + hdr2(&p, &pos, CMD2_PM_IF_NOC_CLOCK_ENABLE, cmd->flags != 1 ? 3 : 2, be); + p[pos++] = u32xe(cmd->id); + p[pos++] = u32xe(cmd->value); + if (cmd->flags != 1) { + p[pos++] = u32xe(cmd->flags); + } + break; case CdoCmdPmActivateSubsystem: hdr2(&p, &pos, CMD2_PM_ACTIVATE_SUBSYSTEM, 1, be); p[pos++] = u32xe(cmd->id); @@ -1995,6 +2153,10 @@ p[pos++] = u32xe(cmd->mask); p[pos++] = u32xe(cmd->count); break; + case CdoCmdLdrCframeClearCheck: + hdr2(&p, &pos, CMD2_LDR_CFRAME_CLEAR_CHECK, 1, be); + p[pos++] = u32xe(cmd->id); + break; default: fprintf(stderr, "unknown command (%u)\n", cmd->type); break; @@ -2037,8 +2199,12 @@ void search_for_sync_points(void) { num_of_sync_points = 0; + num_start_markers = 0; + num_end_markers = 0; search_sync_points = 1; slr_sync_points = NULL; + noc_start_markers = NULL; + noc_end_markers = NULL; } uint32_t* get_slr_sync_point_offsets(void) @@ -2047,7 +2213,30 @@ return slr_sync_points; } +uint32_t* get_slr_start_marker_offsets(void) +{ + search_sync_points = 0; + return noc_start_markers; +} + +uint32_t* get_slr_end_marker_offsets(void) +{ + search_sync_points = 0; + return noc_end_markers; +} + size_t get_num_of_sync_points(void) { return num_of_sync_points; -} \ No newline at end of file +} + +size_t get_num_start_markers(void) +{ + return num_start_markers; +} + +size_t get_num_end_markers(void) +{ + return num_end_markers; +} + diff -Nru xilinx-bootgen-2022.1/cdo-binary.h xilinx-bootgen-2022.2/cdo-binary.h --- xilinx-bootgen-2022.1/cdo-binary.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-binary.h 2022-09-26 06:24:42.000000000 +0000 @@ -19,13 +19,28 @@ #include "cdo-command.h" +typedef struct +{ + uint8_t cmd_id; + uint8_t module_id; + uint16_t reserved1; + uint8_t min_arg_cnt; + uint8_t max_arg_cnt; + uint16_t reserved2; +} XPlmi_CmdInfo; + void cdobinary_set_verbose(uint32_t verbose); void cdobinary_set_auto_align(uint32_t enable); void cdobinary_set_add_offset(uint32_t enable); CdoSequence * decode_cdo_binary(const void * data, size_t len); void * cdoseq_to_binary(CdoSequence * seq, size_t * sizep, uint32_t be); +uint32_t check_cdo_commands(void* data, uint32_t l, uint32_t * xplm_data, uint32_t xplm_length); int is_cdo_data(void * data, size_t size); uint32_t* get_slr_sync_point_offsets(void); +uint32_t* get_slr_start_marker_offsets(void); +uint32_t* get_slr_end_marker_offsets(void); void search_for_sync_points(void); size_t get_num_of_sync_points(void); +size_t get_num_start_markers(void); +size_t get_num_end_markers(void); #endif /* D_cdo_binary */ diff -Nru xilinx-bootgen-2022.1/cdo-command.c xilinx-bootgen-2022.2/cdo-command.c --- xilinx-bootgen-2022.1/cdo-command.c 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-command.c 2022-09-26 06:24:42.000000000 +0000 @@ -23,8 +23,8 @@ #include #include "cdo-alloc.h" #include "cdo-command.h" -UserKeys user_keys; +UserKeys user_keys; static CdoSequence * default_seq; #define USER_KEYS_BASE_ADDR 0xF11E0110 @@ -181,6 +181,8 @@ cmd->type == CdoCmdCframeRead || cmd->type == CdoCmdNop || cmd->type == CdoCmdEventLogging || + cmd->type == CdoCmdScatterWrite || + cmd->type == CdoCmdScatterWrite2 || cmd->type == CdoCmdNpiWrite || cmd->type == CdoCmdPmIoctl || cmd->type == CdoCmdPmQueryData || @@ -189,7 +191,8 @@ cmd->type == CdoCmdPmAddNodeParent || cmd->type == CdoCmdPmAddRequirement || cmd->type == CdoCmdPmInitNode || - cmd->type == CdoCmdPmSetNodeAccess) { + cmd->type == CdoCmdPmSetNodeAccess || + cmd->type == CdoCmdPmNocClockEnable) { uint32_t * p; uint32_t i; cmd->count = (cmd->count & 15) + 1; @@ -739,6 +742,34 @@ add_command(seq, cmd); } +void cdocmd_add_pm_bisr(CdoSequence * seq, uint32_t tagid) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdPmBisr); + cmd->id = tagid; + add_command(seq, cmd); +} + +void cdocmd_add_pm_apply_trim(CdoSequence * seq, uint32_t trimtype) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdPmApplyTrim); + cmd->id = trimtype; + add_command(seq, cmd); +} + +void cdocmd_add_pm_noc_clock_enable(CdoSequence * seq, uint32_t nodeid, uint32_t count, void * buf, uint32_t be) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdPmNocClockEnable); + cmd->id = nodeid; + cmd->count = count; + cmd->buf = copy_buf(buf, count, be); + add_command(seq, cmd); +} + +void cdocmd_add_pm_if_noc_clock_enable(CdoSequence * seq, uint32_t index, uint32_t state, uint32_t level) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdPmIfNocClockEnable); + cmd->id = index; + cmd->value = state; + cmd->flags = level; + add_command(seq, cmd); +} + void cdocmd_add_cfu_set_crc32(CdoSequence * seq, uint32_t type, uint32_t value) { CdoCommand * cmd = cdocmd_alloc(CdoCmdCfuSetCrc32); cmd->flags = type; @@ -908,6 +939,23 @@ add_command(seq, cmd); } +void cdocmd_add_scatter_write(CdoSequence * seq, uint32_t value, uint32_t count, void * buf, uint32_t be) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdScatterWrite); + cmd->value = value; + cmd->count = count; + cmd->buf = copy_buf(buf, count, be); + add_command(seq, cmd); +} + +void cdocmd_add_scatter_write2(CdoSequence * seq, uint32_t value1, uint32_t value2, uint32_t count, void * buf, uint32_t be) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdScatterWrite2); + cmd->value = value1; + cmd->mask = value2; + cmd->count = count; + cmd->buf = copy_buf(buf, count, be); + add_command(seq, cmd); +} + void cdocmd_add_pm_register_notifier(CdoSequence * seq, uint32_t nodeid, uint32_t mask, uint32_t arg1, uint32_t arg2) { CdoCommand * cmd = cdocmd_alloc(CdoCmdPmRegisterNotifier); cmd->id = nodeid; @@ -934,6 +982,12 @@ add_command(seq, cmd); } +void cdocmd_add_ldr_cframe_clear_check(CdoSequence * seq, uint32_t block_type) { + CdoCommand * cmd = cdocmd_alloc(CdoCmdLdrCframeClearCheck); + cmd->id = block_type; + add_command(seq, cmd); +} + void cdocmd_insert_seq(CdoCommand * cmd, CdoSequence * seq) { list_concat(&cmd->link_all, &seq->cmds); list_init(&seq->cmds); diff -Nru xilinx-bootgen-2022.1/cdo-command.h xilinx-bootgen-2022.2/cdo-command.h --- xilinx-bootgen-2022.1/cdo-command.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-command.h 2022-09-26 06:24:42.000000000 +0000 @@ -77,6 +77,8 @@ CdoCmdBreak, CdoCmdOtCheck, CdoCmdPsmSequence, + CdoCmdScatterWrite, + CdoCmdScatterWrite2, CdoCmdNpiSeq, CdoCmdNpiPreCfg, CdoCmdNpiWrite, @@ -130,6 +132,10 @@ CdoCmdPmFeatureCheck, CdoCmdPmIsoControl, CdoCmdPmActivateSubsystem, + CdoCmdPmBisr, + CdoCmdPmApplyTrim, + CdoCmdPmNocClockEnable, + CdoCmdPmIfNocClockEnable, CdoCmdPmSetNodeAccess, CdoCmdCfuSetCrc32, CdoCmdCfuDecompress, @@ -142,6 +148,7 @@ CdoCmdCfuCfiType, CdoCmdEmSetAction, CdoCmdLdrSetImageInfo, + CdoCmdLdrCframeClearCheck, /* The following line must be last */ CdoCmdLast @@ -187,6 +194,11 @@ void cdocmd_add_npi_write(CdoSequence * seq, uint32_t addr, uint32_t flags, uint32_t count, void * buf, uint32_t be); void cdocmd_add_npi_shutdown(CdoSequence * seq, uint32_t addr, uint32_t flags); +void cdocmd_add_scatter_write(CdoSequence * seq, uint32_t value, uint32_t count, void * buf, uint32_t be); +void cdocmd_add_scatter_write2(CdoSequence * seq, uint32_t value1, uint32_t value2, uint32_t count, void * buf, uint32_t be); +void cdocmd_add_pm_bisr(CdoSequence * seq, uint32_t tagid); +void cdocmd_add_pm_apply_trim(CdoSequence * seq, uint32_t trimtype); + void cdocmd_add_pm_get_api_version(CdoSequence * seq); void cdocmd_add_pm_get_device_status(CdoSequence * seq, uint32_t nodeid); void cdocmd_add_pm_register_notifier(CdoSequence * seq, uint32_t nodeid, uint32_t mask, uint32_t arg1, uint32_t arg2); @@ -237,6 +249,8 @@ void cdocmd_add_pm_iso_control(CdoSequence * seq, uint32_t nodeid, uint32_t value); void cdocmd_add_pm_activate_subsystem(CdoSequence * seq, uint32_t ssid); void cdocmd_add_pm_set_node_access(CdoSequence * seq, uint32_t nodeid, uint32_t count, void * buf, uint32_t be); +void cdocmd_add_pm_noc_clock_enable(CdoSequence * seq, uint32_t nodeid, uint32_t count, void * buf, uint32_t be); +void cdocmd_add_pm_if_noc_clock_enable(CdoSequence * seq, uint32_t index, uint32_t state, uint32_t break_level); void cdocmd_add_cfu_set_crc32(CdoSequence * seq, uint32_t type, uint32_t value); void cdocmd_add_cfu_decompress(CdoSequence * seq, uint32_t type); @@ -265,6 +279,7 @@ void cdocmd_add_ot_check(CdoSequence * seq, uint32_t value); void cdocmd_add_psm_sequence(CdoSequence * seq); void cdocmd_add_ldr_set_image_info(CdoSequence * seq, uint32_t nodeid, uint32_t uid, uint32_t puid, uint32_t funcid); +void cdocmd_add_ldr_cframe_clear_check(CdoSequence * seq, uint32_t block_type); void cdocmd_add_em_set_action(CdoSequence * seq, uint32_t nodeid, uint32_t action, uint32_t mask); void cdocmd_insert_seq(CdoCommand * cmd, CdoSequence * seq); void cdocmd_concat_seq(CdoSequence * seq, CdoSequence * seq2); diff -Nru xilinx-bootgen-2022.1/cdo-load.c xilinx-bootgen-2022.2/cdo-load.c --- xilinx-bootgen-2022.1/cdo-load.c 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-load.c 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2019-2021 Xilinx, Inc. +* Copyright 2019-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,11 +18,26 @@ #include #include #include +#include +#include #include "cdo-binary.h" #include "cdo-source.h" #include "cdo-raw.h" #include "cdo-load.h" +#define MAX_LINE_LENGTH 100 +static char slr_id_binary; + +char slr_id_from_binary(char ch) +{ + if (slr_id_binary != 0) + { + ch = slr_id_binary; + slr_id_binary = 0; + } + return ch; +} + void * file_to_buf(const char * path, size_t * sizep) { FILE * f = fopen(path, "rb"); void * buf = NULL; @@ -66,11 +81,12 @@ CdoSequence * cdoseq_load_cdo(const char * path) { CdoSequence * seq = NULL; + CdoSequence * hdr_seq = NULL; CdoRawInfo * raw = NULL; size_t size; void * data = file_to_buf(path, &size); if (data == NULL) goto done; - raw = decode_raw(data, size); + raw = decode_raw(&hdr_seq, data, size); if (raw != NULL) { free(data); data = raw->data; @@ -101,6 +117,11 @@ } else { free(data); } + if (hdr_seq && seq) { + cdocmd_concat_seq(hdr_seq, seq); + cdocmd_delete_sequence(seq); + seq = hdr_seq; + } return seq; } diff -Nru xilinx-bootgen-2022.1/cdo-load.h xilinx-bootgen-2022.2/cdo-load.h --- xilinx-bootgen-2022.1/cdo-load.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-load.h 2022-09-26 06:24:42.000000000 +0000 @@ -19,10 +19,14 @@ #include #include "cdo-command.h" +#define MARKER_DEVICE 0x1 +#define MARKER_SLRID 0x5 +#define MARKER_DATE 0x6 void * file_to_buf(const char * path, size_t * sizep); CdoSequence * cdoseq_load_cdo(const char * path); +char slr_id_from_binary(char ch); void cdoseq_extract_writes(CdoSequence * seq); CdoSequence* cdoseq_extract_cdo_till_ssit_sync_slaves(CdoSequence * seq, uint32_t sync_index); #endif /* D_cdo_load */ diff -Nru xilinx-bootgen-2022.1/cdo-raw.c xilinx-bootgen-2022.2/cdo-raw.c --- xilinx-bootgen-2022.1/cdo-raw.c 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-raw.c 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2019-2020 Xilinx, Inc. +* Copyright 2019-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,7 +94,7 @@ return 0; } -CdoRawInfo * decode_raw(void * data, size_t size) { +CdoRawInfo * decode_raw(CdoSequence ** seq, void * data, size_t size) { CdoRawInfo * raw = NULL; CdoRawType type; size_t offset = 0; @@ -147,10 +147,38 @@ goto error; } skipnewline(s, e); + *seq = cdocmd_create_sequence(); while (s < e) { + char buf[1024]; p = s; skipline(s, e); - if (s-p >= 5 && memcmp(p, "Bits:", 5) == 0) { + if (s-p >= 10 && memcmp(p, "Created by", 10) == 0) { + p += 10; + /*strncpy(buf, p, s - p); + buf[s - p] = '\0'; + cdocmd_add_marker(*seq, 1, buf);*/ + } else if (s-p >= 12 && memcmp(p, "Design name:", 12) == 0) { + // TODO: Design name includes SLR, add it as a separate marker + p += 12; + strncpy(buf, p, s - p); + buf[s - p] = '\0'; + cdocmd_add_marker(*seq, 2, buf); + } else if (s-p >= 13 && memcmp(p, "Architecture:", 13) == 0) { + p += 13; + strncpy(buf, p, s - p); + buf[s - p] = '\0'; + cdocmd_add_marker(*seq, 3, buf); + } else if (s-p >= 5 && memcmp(p, "Part:", 5) == 0) { + p += 5; + strncpy(buf, p, s - p); + buf[s - p] = '\0'; + cdocmd_add_marker(*seq, 4, buf); + } else if (s-p >= 5 && memcmp(p, "Date:", 5) == 0) { + p += 5; + /*strncpy(buf, p, s - p); + buf[s - p] = '\0'; + cdocmd_add_marker(*seq, 6, buf);*/ + } else if (s-p >= 5 && memcmp(p, "Bits:", 5) == 0) { uint64_t bytes; if (s >= e) goto error; p += 5; diff -Nru xilinx-bootgen-2022.1/cdo-raw.h xilinx-bootgen-2022.2/cdo-raw.h --- xilinx-bootgen-2022.1/cdo-raw.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-raw.h 2022-09-26 06:24:42.000000000 +0000 @@ -17,6 +17,8 @@ #ifndef D_cdo_raw #define D_cdo_raw +#include "cdo-command.h" + typedef struct CdoRawInfo CdoRawInfo; typedef enum { @@ -31,7 +33,7 @@ uint32_t data[1]; /* Must be last */ }; -CdoRawInfo * decode_raw(void * data, size_t size); +CdoRawInfo * decode_raw(CdoSequence ** seq, void * data, size_t size); void encode_raw(FILE * f, void * data, size_t size); #endif /* D_cdo_raw */ diff -Nru xilinx-bootgen-2022.1/cdo-source.c xilinx-bootgen-2022.2/cdo-source.c --- xilinx-bootgen-2022.1/cdo-source.c 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-source.c 2022-09-26 06:24:42.000000000 +0000 @@ -21,6 +21,10 @@ #include #include "cdo-load.h" #include "cdo-source.h" +#include + +static char* slr_id_ptr; +static char slr_id; #if defined(_WIN32) #define strcasecmp(x,y) stricmp(x,y) @@ -73,6 +77,8 @@ { "break", CdoCmdBreak }, { "ot_check", CdoCmdOtCheck }, { "psm_sequence", CdoCmdPsmSequence }, + { "scatter_write", CdoCmdScatterWrite }, + { "scatter_write2", CdoCmdScatterWrite2 }, { "npi_seq", CdoCmdNpiSeq }, { "npi_precfg", CdoCmdNpiPreCfg }, { "npi_write", CdoCmdNpiWrite }, @@ -125,6 +131,10 @@ { "pm_init_node", CdoCmdPmInitNode }, { "pm_feature_check", CdoCmdPmFeatureCheck }, { "pm_iso_control", CdoCmdPmIsoControl }, + { "pm_bisr", CdoCmdPmBisr }, + { "pm_apply_trim", CdoCmdPmApplyTrim }, + { "pm_noc_clock_enable", CdoCmdPmNocClockEnable }, + { "pm_if_noc_clock_enable", CdoCmdPmIfNocClockEnable }, { "pm_activate_subsystem", CdoCmdPmActivateSubsystem }, { "pm_set_node_access", CdoCmdPmSetNodeAccess }, { "cfu_set_crc32", CdoCmdCfuSetCrc32 }, @@ -138,9 +148,20 @@ { "cfu_cfi_type", CdoCmdCfuCfiType }, { "em_set_action", CdoCmdEmSetAction }, { "ldr_set_image_info", CdoCmdLdrSetImageInfo }, + { "cframe_clear_check", CdoCmdLdrCframeClearCheck }, { NULL, 0 } }; +char* marker_list[] = { + "PMC_DATA", + "LPD_DATA", + "FPD_DATA", + "PMC_DATA_SLR_1", + "PMC_DATA_SLR_2", + "PMC_DATA_SLR_3" +}; +int marker_count[sizeof(marker_list) / sizeof(marker_list[0])]; + static uint32_t iseol(char ** sp) { char * s = *sp; skipsp(s); @@ -252,6 +273,36 @@ return 1; } +char slr_id_from_source(char ch) +{ + if (slr_id != 0) + { + ch = slr_id; + slr_id = 0; + } + return ch; +} + +static void check_redundant_markers(char * marker_string) +{ + bool same_marker_found = false; + int i = 0; + for (; i < (sizeof(marker_list) / sizeof(marker_list[0])); i++) + { + if (strcasecmp(marker_string, marker_list[i]) == 0) + { + if (marker_count[i]++ > 2) + { + same_marker_found = true; + } + } + } + if (same_marker_found == true) + { + printf("[WARNING]: The marker %s is found more than once.\n", marker_string); + } +} + CdoSequence * cdoseq_from_source(FILE * f) { CdoSequence * seq = cdocmd_create_sequence(); uint32_t cap = 2; @@ -526,6 +577,16 @@ if (parse_u32(&s, &value)) goto syntax_error; if (iseol(&s)) goto syntax_error; if (parse_string(&s, &name)) goto syntax_error; + check_redundant_markers(name); + if (value == MARKER_DEVICE || value == MARKER_DATE) + { + break; + } + if (value == MARKER_SLRID) + { + slr_id_ptr = name; + slr_id = *slr_id_ptr; + } cdocmd_add_marker(seq, value, name); free(name); break; @@ -572,6 +633,29 @@ cdocmd_add_psm_sequence(seq); level++; break; + case CdoCmdScatterWrite: { + uint32_t * buf; + uint32_t count; + uint32_t value; + if (parse_u32(&s, &value)) goto syntax_error; + if (parse_buf(&s, &buf, &count)) goto syntax_error; + cdocmd_add_scatter_write(seq, value, count, buf, is_be_host()); + free(buf); + break; + } + case CdoCmdScatterWrite2: { + uint32_t * buf; + uint32_t count; + uint32_t value1; + uint32_t value2; + if (parse_u32(&s, &value1)) goto syntax_error; + if (parse_u32(&s, &value2)) goto syntax_error; + if (parse_buf(&s, &buf, &count)) goto syntax_error; + cdocmd_add_scatter_write2(seq, value1, value2, count, buf, is_be_host()); + free(buf); + break; + } + case CdoCmdNpiSeq: case CdoCmdNpiPreCfg: case CdoCmdNpiShutdown: { @@ -996,6 +1080,43 @@ cdocmd_add_pm_iso_control(seq, nodeid, value); break; } + case CdoCmdPmBisr: { + uint32_t tagid; + if (parse_u32(&s, &tagid)) goto syntax_error; + cdocmd_add_pm_bisr(seq, tagid); + break; + } + + case CdoCmdPmApplyTrim: { + uint32_t trimtype; + if (parse_u32(&s, &trimtype)) goto syntax_error; + cdocmd_add_pm_apply_trim(seq, trimtype); + break; + } + + case CdoCmdPmNocClockEnable: { + uint32_t nodeid; + uint32_t count; + uint32_t * buf; + if (parse_u32(&s, &nodeid)) goto syntax_error; + if (parse_buf(&s, &buf, &count)) goto syntax_error; + cdocmd_add_pm_noc_clock_enable(seq, nodeid, count, buf, is_be_host()); + free(buf); + break; + } + + case CdoCmdPmIfNocClockEnable: { + uint32_t index; + uint32_t state; + uint32_t level = 1; + if (parse_u32(&s, &index)) goto syntax_error; + if (parse_u32(&s, &state)) goto syntax_error; + skipsp(s); + if (istok(*s) && parse_u32(&s, &level)) goto syntax_error; + cdocmd_add_pm_if_noc_clock_enable(seq, index, state, level); + break; + } + case CdoCmdPmActivateSubsystem: { uint32_t id; if (parse_u32(&s, &id)) goto syntax_error; @@ -1094,6 +1215,12 @@ cdocmd_add_ldr_set_image_info(seq, nodeid, uid, puid, funcid); break; } + case CdoCmdLdrCframeClearCheck: { + uint32_t id; + if (parse_u32(&s, &id)) goto syntax_error; + cdocmd_add_ldr_cframe_clear_check(seq, id); + break; + } default: goto syntax_error; } @@ -1349,6 +1476,21 @@ fprintf(f, "psm_sequence\n"); level++; break; + case CdoCmdScatterWrite: + fprintf(f, "scatter_write "); + print_x64(f, cmd->value); + print_buf(f, cmd->buf, cmd->count); + fprintf(f, "\n"); + break; + case CdoCmdScatterWrite2: + fprintf(f, "scatter_write2 "); + print_x64(f, cmd->value); + fprintf(f, " "); + print_x64(f, cmd->mask); + print_buf(f, cmd->buf, cmd->count); + fprintf(f, "\n"); + break; + case CdoCmdNpiSeq: fprintf(f, "npi_seq "); print_x64(f, cmd->dstaddr); @@ -1705,6 +1847,33 @@ print_x64(f, cmd->value); fprintf(f, "\n"); break; + case CdoCmdPmBisr: + fprintf(f, "pm_bisr "); + print_x64(f, cmd->id); + fprintf(f, "\n"); + break; + case CdoCmdPmApplyTrim: + fprintf(f, "pm_apply_trim "); + print_x64(f, cmd->id); + fprintf(f, "\n"); + break; + case CdoCmdPmNocClockEnable: + fprintf(f, "pm_noc_clock_enable "); + print_x64(f, cmd->id); + print_buf(f, cmd->buf, cmd->count); + fprintf(f, "\n"); + break; + case CdoCmdPmIfNocClockEnable: + fprintf(f, "pm_if_noc_clock_enable "); + print_x64(f, cmd->id); + fprintf(f, " "); + print_x64(f, cmd->value); + if (cmd->flags != 1) { + fprintf(f, " "); + print_x64(f, cmd->flags); + } + fprintf(f, "\n"); + break; case CdoCmdPmActivateSubsystem: fprintf(f, "pm_activate_subsystem "); print_x64(f, cmd->id); @@ -1785,6 +1954,11 @@ print_x64(f, cmd->count); fprintf(f, "\n"); break; + case CdoCmdLdrCframeClearCheck: + fprintf(f, "cframe_clear_check "); + print_x64(f, cmd->id); + fprintf(f, "\n"); + break; default: fprintf(f, "unknown command (%u)\n", cmd->type); break; diff -Nru xilinx-bootgen-2022.1/cdo-source.h xilinx-bootgen-2022.2/cdo-source.h --- xilinx-bootgen-2022.1/cdo-source.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cdo-source.h 2022-09-26 06:24:42.000000000 +0000 @@ -22,5 +22,5 @@ CdoSequence * cdoseq_from_source(FILE * f); void cdoseq_to_source(FILE * f, CdoSequence * seq); - +char slr_id_from_source(char ch); #endif /* D_cdo_source */ diff -Nru xilinx-bootgen-2022.1/checksum-versal.cpp xilinx-bootgen-2022.2/checksum-versal.cpp --- xilinx-bootgen-2022.1/checksum-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/checksum-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2019 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,16 +77,21 @@ for (std::list::iterator j = pHList.begin(); j != pHList.end(); j++) { PartitionHeader& partHdr(**j); + /* Do not calculate checksum on entire partition for VersalNet bootloader - hashing is calculated on the first chunk + hash of previous chunk in VersalNet + This is handled while doing the chunking of the partition. So need need to calculate again */ if (partHdr.IsBootloader()) { - // For FSBL, checksum should be like Bootimage Integrity, the checksum should be attached right at the end of the FSBL - partHdr.partition->section->IncreaseLengthAndPadTo(partHdr.partition->section->Length + hdr.GetChecksumContext()->Size(), 0); + if (!bi.options.IsVersalNetSeries()) + { + // For FSBL, checksum should be like Bootimage Integrity, the checksum should be attached right at the end of the FSBL + partHdr.partition->section->IncreaseLengthAndPadTo(partHdr.partition->section->Length + hdr.GetChecksumContext()->Size(), 0); + } } else { - // For other partitions, a new checksum section is created and added at the end of image. - Section* s = hdr.GetChecksumContext()->Build(partHdr.partition->section->Name); - partHdr.checksumSection = s; + // For other partitions, a new checksum section is created and added at the end of image. + Section* s = hdr.GetChecksumContext()->Build(partHdr.partition->section->Name); + partHdr.checksumSection = s; } } } @@ -103,9 +108,14 @@ for (std::list::iterator j = pHList.begin(); j != pHList.end(); j++) { PartitionHeader& partHdr(**j); + /* Do not calculate checksum on entire partition for VersalNet bootloader - hashing is calculated on the first chunk + hash of previous chunk in VersalNet + This is handled while doing the chunking of the partition. So need need to calculate again */ if (partHdr.IsBootloader()) { - hdr.GetChecksumContext()->Link(partHdr.IsBootloader(), partHdr.partition->section->Data, partHdr.partition->section->Length - hdr.GetChecksumContext()->Size(), partHdr.partition->section); + if (!bi.options.IsVersalNetSeries()) + { + hdr.GetChecksumContext()->Link(partHdr.IsBootloader(), partHdr.partition->section->Data, partHdr.partition->section->Length - hdr.GetChecksumContext()->Size(), partHdr.partition->section); + } } else { diff -Nru xilinx-bootgen-2022.1/cmdoptions.l xilinx-bootgen-2022.2/cmdoptions.l --- xilinx-bootgen-2022.1/cmdoptions.l 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cmdoptions.l 2022-09-26 06:24:42.000000000 +0000 @@ -120,6 +120,7 @@ zynqmp return tok::ZYNQMP; versal return tok::VERSAL; fpga return tok::FPGA; + versalnet return tok::VERSALNET; \-r return tok::_R; diff -Nru xilinx-bootgen-2022.1/cmdoptions.tab.cpp xilinx-bootgen-2022.2/cmdoptions.tab.cpp --- xilinx-bootgen-2022.1/cmdoptions.tab.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cmdoptions.tab.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1316,207 +1316,213 @@ { options.SetArchType(Arch::FPGA); } break; - case 180: + case 179: /* Line 670 of lalr1.cc */ -#line 315 "../../s/cmdoptions.y" - { options.SetGreyKeyGeneration(true); } +#line 312 "../../s/cmdoptions.y" + { options.SetArchType(Arch::VERSALNET); } break; case 181: /* Line 670 of lalr1.cc */ #line 316 "../../s/cmdoptions.y" - { options.SetMetalKeyGeneration(true); } + { options.SetGreyKeyGeneration(true); } break; case 182: /* Line 670 of lalr1.cc */ #line 317 "../../s/cmdoptions.y" - { options.SetAuthKeyGeneration(GenAuthKeys::PEM); } + { options.SetMetalKeyGeneration(true); } break; case 183: /* Line 670 of lalr1.cc */ #line 318 "../../s/cmdoptions.y" - { options.SetAuthKeyGeneration(GenAuthKeys::RSA); } + { options.SetAuthKeyGeneration(GenAuthKeys::PEM); } break; case 184: /* Line 670 of lalr1.cc */ #line 319 "../../s/cmdoptions.y" - { options.SetAuthKeyGeneration(GenAuthKeys::ECDSA); } + { options.SetAuthKeyGeneration(GenAuthKeys::RSA); } break; case 185: /* Line 670 of lalr1.cc */ #line 320 "../../s/cmdoptions.y" - { options.SetAuthKeyGeneration(GenAuthKeys::ECDSAP521); } + { options.SetAuthKeyGeneration(GenAuthKeys::ECDSA); } break; case 186: /* Line 670 of lalr1.cc */ -#line 323 "../../s/cmdoptions.y" - { options.SetAuthKeyGeneration(GenAuthKeys::PEM); } +#line 321 "../../s/cmdoptions.y" + { options.SetAuthKeyGeneration(GenAuthKeys::ECDSAP521); } break; case 187: /* Line 670 of lalr1.cc */ #line 324 "../../s/cmdoptions.y" - { options.SetAuthKeyGeneration(GenAuthKeys::RSA); } + { options.SetAuthKeyGeneration(GenAuthKeys::PEM); } break; case 188: /* Line 670 of lalr1.cc */ -#line 327 "../../s/cmdoptions.y" +#line 325 "../../s/cmdoptions.y" + { options.SetAuthKeyGeneration(GenAuthKeys::RSA); } + break; + + case 189: +/* Line 670 of lalr1.cc */ +#line 328 "../../s/cmdoptions.y" { options.SetSecureDebugAuthType(Authentication::ECDSA); options.SetSecureDebugImageFile("secureDebugImage-ecdsa.bin"); } break; - case 189: + case 190: /* Line 670 of lalr1.cc */ -#line 329 "../../s/cmdoptions.y" +#line 330 "../../s/cmdoptions.y" { options.SetSecureDebugAuthType(Authentication::RSA); options.SetSecureDebugImageFile("secureDebugImage-rsa.bin"); } break; - case 190: + case 191: /* Line 670 of lalr1.cc */ -#line 332 "../../s/cmdoptions.y" +#line 333 "../../s/cmdoptions.y" { options.SetSecureDebugImageFile((yysemantic_stack_[(2) - (2)].cstring)); } break; - case 192: + case 193: /* Line 670 of lalr1.cc */ -#line 335 "../../s/cmdoptions.y" +#line 336 "../../s/cmdoptions.y" { options.SetSecureDebugAuthType(Authentication::ECDSA); options.SetSecureDebugImageFile("authenticatedJtagImage-ecdsa.bin"); } break; - case 193: + case 194: /* Line 670 of lalr1.cc */ -#line 337 "../../s/cmdoptions.y" +#line 338 "../../s/cmdoptions.y" { options.SetSecureDebugAuthType(Authentication::RSA); options.SetSecureDebugImageFile("authenticatedJtagImage-rsa.bin"); } break; - case 194: + case 195: /* Line 670 of lalr1.cc */ -#line 341 "../../s/cmdoptions.y" +#line 342 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(1) - (1)].cstring)); options.SetVerifyImageOption(true); } break; - case 195: + case 196: /* Line 670 of lalr1.cc */ -#line 344 "../../s/cmdoptions.y" +#line 345 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(1) - (1)].cstring)); options.SetReadImageOption(ReadImageOption::ALL); } break; - case 196: -/* Line 670 of lalr1.cc */ -#line 346 "../../s/cmdoptions.y" - { options.SetReadImageFile((yysemantic_stack_[(2) - (1)].cstring)); } - break; - case 197: /* Line 670 of lalr1.cc */ -#line 349 "../../s/cmdoptions.y" - { options.SetReadImageOption(ReadImageOption::BH); } +#line 347 "../../s/cmdoptions.y" + { options.SetReadImageFile((yysemantic_stack_[(2) - (1)].cstring)); } break; case 198: /* Line 670 of lalr1.cc */ #line 350 "../../s/cmdoptions.y" - { options.SetReadImageOption(ReadImageOption::IHT); } + { options.SetReadImageOption(ReadImageOption::BH); } break; case 199: /* Line 670 of lalr1.cc */ #line 351 "../../s/cmdoptions.y" - { options.SetReadImageOption(ReadImageOption::IH); } + { options.SetReadImageOption(ReadImageOption::IHT); } break; case 200: /* Line 670 of lalr1.cc */ #line 352 "../../s/cmdoptions.y" - { options.SetReadImageOption(ReadImageOption::PHT); } + { options.SetReadImageOption(ReadImageOption::IH); } break; case 201: /* Line 670 of lalr1.cc */ #line 353 "../../s/cmdoptions.y" - { options.SetReadImageOption(ReadImageOption::AC); } + { options.SetReadImageOption(ReadImageOption::PHT); } break; case 202: /* Line 670 of lalr1.cc */ -#line 356 "../../s/cmdoptions.y" - { options.SetDumpOption(DumpOption::BH); } +#line 354 "../../s/cmdoptions.y" + { options.SetReadImageOption(ReadImageOption::AC); } break; case 203: /* Line 670 of lalr1.cc */ #line 357 "../../s/cmdoptions.y" + { options.SetDumpOption(DumpOption::BH); } + break; + + case 204: +/* Line 670 of lalr1.cc */ +#line 358 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(2) - (1)].cstring)); options.SetDumpOption(DumpOption::BH); } break; - case 204: + case 205: /* Line 670 of lalr1.cc */ -#line 359 "../../s/cmdoptions.y" +#line 360 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(2) - (2)].cstring)); options.SetDumpOption(DumpOption::BH); } break; - case 205: + case 206: /* Line 670 of lalr1.cc */ -#line 361 "../../s/cmdoptions.y" +#line 362 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(1) - (1)].cstring)); options.SetDumpOption(DumpOption::PARTITIONS); } break; - case 206: + case 207: /* Line 670 of lalr1.cc */ -#line 363 "../../s/cmdoptions.y" +#line 364 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(2) - (1)].cstring)); options.SetDumpOption(DumpOption::PLM); } break; - case 207: + case 208: /* Line 670 of lalr1.cc */ -#line 365 "../../s/cmdoptions.y" +#line 366 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(2) - (1)].cstring)); options.SetDumpOption(DumpOption::PMC_CDO); } break; - case 208: + case 209: /* Line 670 of lalr1.cc */ -#line 367 "../../s/cmdoptions.y" +#line 368 "../../s/cmdoptions.y" { options.SetReadImageFile((yysemantic_stack_[(2) - (1)].cstring)); options.SetDumpOption(DumpOption::BOOT_FILES); } break; - case 209: + case 210: /* Line 670 of lalr1.cc */ -#line 369 "../../s/cmdoptions.y" +#line 370 "../../s/cmdoptions.y" { options.SetDumpOption(DumpOption::SLAVE_PDIS); } break; - case 210: + case 211: /* Line 670 of lalr1.cc */ -#line 372 "../../s/cmdoptions.y" +#line 373 "../../s/cmdoptions.y" { options.SetEncryptionDump(true,"aes_log.txt"); } break; - case 211: + case 212: /* Line 670 of lalr1.cc */ -#line 373 "../../s/cmdoptions.y" +#line 374 "../../s/cmdoptions.y" { options.SetEncryptionDump(true,(yysemantic_stack_[(1) - (1)].cstring)); } break; /* Line 670 of lalr1.cc */ -#line 1520 "cmdoptions.tab.cpp" +#line 1526 "cmdoptions.tab.cpp" default: break; } @@ -1728,35 +1734,35 @@ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ - const signed char BisonParser::yypact_ninf_ = -76; + const signed char BisonParser::yypact_ninf_ = -77; const short int BisonParser::yypact_[] = { - -76, 11, 114, -76, -45, -62, 28, 104, -76, -76, - -76, -56, -75, 163, 0, 5, 84, -53, 108, -76, - 50, 76, 75, -76, -76, -45, -45, -76, 52, -45, - -49, -44, -42, 85, -47, -45, -45, -45, -45, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -45, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -45, 15, - -76, -76, -76, -76, -76, -76, -76, -76, -67, -76, - -76, -65, -76, -76, -76, -76, -76, -76, -76, 37, - -76, -76, -76, -76, 118, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -45, -76, -76, 58, -76, - 57, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, 64, 67, -76, -76, -76, -76, - -76, -76, 68, 87, 89, -76, 92, 98, -45, -76, - 100, -76, -76, -76 + -77, 17, 110, -77, -47, -56, 27, 101, -77, -77, + -77, -53, -76, 168, 0, 5, 96, -47, 131, -77, + 49, 87, 86, -77, -77, -47, -47, -77, 47, -47, + -50, -45, -43, 73, -40, -47, -47, -47, -47, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -47, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -47, 14, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -68, + -77, -77, -66, -77, -77, -77, -77, -77, -77, -77, + 28, -77, -77, -77, -77, 89, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -47, -77, -77, 29, + -77, 148, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, 51, 50, -77, -77, -77, + -77, -77, -77, 58, 59, 62, -77, 61, 64, -47, + -77, 67, -77, -77, -77 }; /* YYDEFACT[S] -- default reduction number in state S. Performed when @@ -1768,7 +1774,7 @@ 3, 0, 2, 1, 0, 49, 0, 51, 32, 19, 18, 0, 81, 148, 0, 0, 0, 0, 0, 29, 0, 0, 145, 30, 34, 0, 0, 17, 20, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 210, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 211, 4, 7, 44, 45, 46, 43, 5, 164, 50, 0, 9, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, @@ -1780,36 +1786,36 @@ 116, 118, 117, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, 138, 143, 144, 14, 149, 150, 151, 152, 153, - 12, 47, 48, 6, 165, 166, 23, 209, 202, 205, - 39, 40, 175, 176, 177, 178, 28, 167, 0, 24, - 169, 0, 25, 146, 147, 11, 42, 16, 22, 0, - 26, 182, 183, 185, 0, 180, 181, 184, 31, 189, - 188, 35, 193, 192, 36, 191, 154, 155, 156, 10, - 195, 37, 194, 38, 41, 211, 33, 8, 204, 206, - 207, 208, 203, 171, 172, 168, 173, 174, 170, 21, - 186, 187, 179, 190, 0, 158, 197, 198, 199, 200, - 201, 196, 0, 0, 160, 157, 0, 0, 162, 159, - 0, 163, 15, 161 + 12, 47, 48, 6, 165, 166, 23, 210, 203, 206, + 39, 40, 175, 176, 177, 178, 179, 28, 167, 0, + 24, 169, 0, 25, 146, 147, 11, 42, 16, 22, + 0, 26, 183, 184, 186, 0, 181, 182, 185, 31, + 190, 189, 35, 194, 193, 36, 192, 154, 155, 156, + 10, 196, 37, 195, 38, 41, 212, 33, 8, 205, + 207, 208, 209, 204, 171, 172, 168, 173, 174, 170, + 21, 187, 188, 180, 191, 0, 158, 198, 199, 200, + 201, 202, 197, 0, 0, 160, 157, 0, 0, 162, + 159, 0, 163, 15, 161 }; /* YYPGOTO[NTERM-NUM]. */ const signed char BisonParser::yypgoto_[] = { - -76, -76, -76, -76, -6, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76 + -77, -77, -77, -77, -6, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, + -77, -77, -77 }; /* YYDEFGOTO[NTERM-NUM]. */ const short int BisonParser::yydefgoto_[] = { - -1, 1, 2, 39, 45, 153, 40, 79, 144, 175, - 150, 198, 225, 234, 238, 242, 47, 156, 169, 172, - 215, 218, 166, 188, 222, 191, 194, 195, 203, 201, - 231, 160, 206 + -1, 1, 2, 39, 45, 153, 40, 79, 144, 176, + 150, 199, 226, 235, 239, 243, 47, 156, 170, 173, + 216, 219, 167, 189, 223, 192, 195, 196, 204, 202, + 232, 160, 207 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1819,64 +1825,64 @@ const unsigned char BisonParser::yytable_[] = { - 49, 181, 182, 183, 184, 185, 186, 189, 187, 192, - 159, 3, 213, 190, 216, 193, 214, 46, 217, 176, - 177, 151, 152, 180, 80, 81, 154, 155, 161, 200, - 202, 204, 205, 199, 48, 41, 42, 43, 44, 209, - 210, 211, 207, 82, 83, 84, 85, 86, 87, 88, + 49, 182, 183, 184, 185, 186, 187, 190, 188, 193, + 159, 161, 214, 191, 217, 194, 215, 3, 218, 177, + 178, 151, 152, 181, 46, 81, 154, 155, 80, 201, + 203, 205, 206, 48, 41, 42, 43, 44, 210, 211, + 212, 200, 208, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 212, 167, 168, 125, + 119, 120, 121, 122, 123, 124, 213, 168, 169, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 41, 42, - 43, 44, 157, 170, 171, 173, 174, 4, 5, 6, - 219, 7, 8, 9, 10, 11, 12, 13, 226, 227, - 228, 229, 230, 14, 15, 178, 179, 16, 162, 163, - 164, 17, 165, 18, 224, 196, 197, 19, 232, 20, - 21, 235, 208, 22, 233, 158, 23, 24, 25, 26, - 27, 28, 29, 30, 41, 42, 43, 44, 220, 221, - 31, 236, 32, 33, 237, 239, 34, 145, 146, 147, - 148, 149, 240, 243, 35, 0, 0, 0, 0, 223, - 36, 37, 38, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 0, 71, 72, 73, 74, 75, - 76, 77, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 241, 0, 0, 0, 0, 0, 0, 0, + 43, 44, 220, 4, 5, 6, 225, 7, 8, 9, + 10, 11, 12, 13, 157, 171, 172, 174, 175, 14, + 15, 179, 180, 16, 197, 198, 233, 17, 234, 18, + 221, 222, 236, 19, 237, 240, 20, 21, 238, 241, + 22, 244, 209, 23, 24, 25, 26, 27, 28, 29, + 30, 162, 163, 164, 0, 165, 166, 31, 158, 32, + 33, 0, 0, 34, 0, 0, 0, 41, 42, 43, + 44, 35, 145, 146, 147, 148, 149, 36, 37, 38, + 224, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 0, 71, 72, 73, 74, 75, 76, 77, + 227, 228, 229, 230, 231, 0, 0, 0, 0, 0, + 0, 0, 0, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 78 + 0, 0, 0, 0, 78 }; /* YYCHECK. */ const short int BisonParser::yycheck_[] = { - 6, 50, 51, 52, 53, 54, 55, 51, 57, 51, - 16, 0, 79, 57, 79, 57, 83, 79, 83, 25, - 26, 21, 22, 29, 80, 100, 21, 22, 81, 35, - 36, 37, 38, 80, 6, 80, 81, 82, 83, 24, - 25, 26, 48, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 71, 37, 38, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 80, 81, - 82, 83, 28, 37, 38, 40, 41, 3, 4, 5, - 83, 7, 8, 9, 10, 11, 12, 13, 71, 72, - 73, 74, 75, 19, 20, 83, 84, 23, 30, 31, - 32, 27, 34, 29, 86, 60, 61, 33, 84, 35, - 36, 83, 158, 39, 87, 71, 42, 43, 44, 45, - 46, 47, 48, 49, 80, 81, 82, 83, 50, 51, - 56, 84, 58, 59, 85, 83, 62, 14, 15, 16, - 17, 18, 84, 83, 70, -1, -1, -1, -1, 195, - 76, 77, 78, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, -1, 111, 112, 113, 114, 115, - 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 238, -1, -1, -1, -1, -1, -1, -1, + 6, 51, 52, 53, 54, 55, 56, 52, 58, 52, + 16, 17, 80, 58, 80, 58, 84, 0, 84, 25, + 26, 21, 22, 29, 80, 101, 21, 22, 81, 35, + 36, 37, 38, 6, 81, 82, 83, 84, 24, 25, + 26, 81, 48, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 72, 38, 39, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 81, 82, + 83, 84, 84, 3, 4, 5, 87, 7, 8, 9, + 10, 11, 12, 13, 28, 38, 39, 41, 42, 19, + 20, 84, 85, 23, 61, 62, 85, 27, 88, 29, + 51, 52, 84, 33, 85, 84, 36, 37, 86, 85, + 40, 84, 158, 43, 44, 45, 46, 47, 48, 49, + 50, 30, 31, 32, -1, 34, 35, 57, 72, 59, + 60, -1, -1, 63, -1, -1, -1, 81, 82, 83, + 84, 71, 14, 15, 16, 17, 18, 77, 78, 79, + 196, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, -1, 112, 113, 114, 115, 116, 117, 118, + 72, 73, 74, 75, 76, -1, -1, -1, -1, -1, + -1, -1, -1, 239, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 152 + -1, -1, -1, -1, 153 }; /* STOS_[STATE-NUM] -- The (internal number of the) accessing @@ -1884,31 +1890,31 @@ const unsigned char BisonParser::yystos_[] = { - 0, 184, 185, 0, 3, 4, 5, 7, 8, 9, + 0, 185, 186, 0, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 19, 20, 23, 27, 29, 33, - 35, 36, 39, 42, 43, 44, 45, 46, 47, 48, - 49, 56, 58, 59, 62, 70, 76, 77, 78, 186, - 189, 80, 81, 82, 83, 187, 79, 199, 6, 187, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 111, 112, 113, 114, 115, 116, 117, 152, 190, - 80, 100, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 191, 14, 15, 16, 17, 18, - 193, 21, 22, 188, 21, 22, 200, 28, 71, 187, - 214, 81, 30, 31, 32, 34, 205, 37, 38, 201, - 37, 38, 202, 40, 41, 192, 187, 187, 83, 84, - 187, 50, 51, 52, 53, 54, 55, 57, 206, 51, - 57, 208, 51, 57, 209, 210, 60, 61, 194, 80, - 187, 212, 187, 211, 187, 187, 215, 187, 187, 24, - 25, 26, 71, 79, 83, 203, 79, 83, 204, 83, - 50, 51, 207, 187, 86, 195, 71, 72, 73, 74, - 75, 213, 84, 87, 196, 83, 84, 85, 197, 83, - 84, 187, 198, 83 + 36, 37, 40, 43, 44, 45, 46, 47, 48, 49, + 50, 57, 59, 60, 63, 71, 77, 78, 79, 187, + 190, 81, 82, 83, 84, 188, 80, 200, 6, 188, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 112, 113, 114, 115, 116, 117, 118, 153, 191, + 81, 101, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 192, 14, 15, 16, 17, 18, + 194, 21, 22, 189, 21, 22, 201, 28, 72, 188, + 215, 188, 30, 31, 32, 34, 35, 206, 38, 39, + 202, 38, 39, 203, 41, 42, 193, 188, 188, 84, + 85, 188, 51, 52, 53, 54, 55, 56, 58, 207, + 52, 58, 209, 52, 58, 210, 211, 61, 62, 195, + 81, 188, 213, 188, 212, 188, 188, 216, 188, 188, + 24, 25, 26, 72, 80, 84, 204, 80, 84, 205, + 84, 51, 52, 208, 188, 87, 196, 72, 73, 74, + 75, 76, 214, 85, 88, 197, 84, 85, 86, 198, + 84, 85, 188, 199, 84 }; #if YYDEBUG @@ -1935,7 +1941,7 @@ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437 + 435, 436, 437, 438 }; #endif @@ -1943,28 +1949,28 @@ const unsigned char BisonParser::yyr1_[] = { - 0, 183, 184, 185, 185, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 187, 187, 187, 187, 188, 188, 189, - 189, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 0, 184, 185, 186, 186, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 188, 188, 188, 188, 189, 189, 190, 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 192, 192, 192, 193, 193, - 193, 193, 193, 193, 194, 194, 195, 195, 196, 196, - 197, 197, 198, 198, 199, 200, 200, 201, 201, 202, - 202, 203, 203, 204, 204, 205, 205, 205, 205, 206, - 206, 206, 206, 206, 206, 206, 207, 207, 208, 208, - 209, 209, 210, 210, 211, 212, 212, 213, 213, 213, - 213, 213, 214, 214, 214, 214, 214, 214, 214, 214, - 215, 215 + 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 193, 193, 193, 194, 194, + 194, 194, 194, 194, 195, 195, 196, 196, 197, 197, + 198, 198, 199, 199, 200, 201, 201, 202, 202, 203, + 203, 204, 204, 205, 205, 206, 206, 206, 206, 206, + 207, 207, 207, 207, 207, 207, 207, 208, 208, 209, + 209, 210, 210, 211, 211, 212, 213, 213, 214, 214, + 214, 214, 214, 215, 215, 215, 215, 215, 215, 215, + 215, 216, 216 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1988,11 +1994,11 @@ 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 3, 0, 3, 0, 3, 0, 1, 1, 1, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, - 0, 1 + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, + 1, 0, 1 }; #if YYDEBUG @@ -2006,43 +2012,43 @@ "_LOG", "ERROR", "WARNING", "INFO", "DEBUG", "TRACE", "_SPLIT", "_PROCESS_BITSTREAM", "MCS", "BIN", "_DUMP", "DUMP_PLM", "DUMP_PMC_CDO", "DUMP_BOOT_FILES", "_DUMP_DIR", "DUMP_SLAVE_PDIS", "_ARCH", "ZYNQ", - "ZYNQMP", "VERSAL", "_R", "FPGA", "_DUAL_QSPI_MODE", "_DUAL_OSPI_MODE", - "PARALLEL", "STACKED", "_W", "ON", "OFF", "_NOAUTHBLOCKS", "_ZYNQMPES1", - "_OVERLAYCDO", "_EFUSEPPKBITS", "_GENERATE_HASHES", "_PADIMAGEHEADER", - "_SPKSIGNATURE", "_GENERATE_KEYS", "PEM", "RSA", "ECDSAP521", "AUTH", - "GREY", "METAL", "_SECUREDEBUG", "ECDSA", "_AUTHJTAG", "_ENCRYPT", - "BBRAM", "EFUSE", "_P_TOK", "_INTERFACE", "SMAPx8", "SMAPx16", "SMAPx32", - "SPI", "BPIx8", "BPIx16", "_READ", "READ_BH", "READ_IHT", "READ_IH", - "READ_PHT", "READ_AC", "_VERIFY", "_VERIFYKDF", "_ZYNQMPENCRDUMP", - "HEXVALUE", "IDENTIFIER", "FILENAME", "QFILENAME", "HEXSTRING", "EQUALS", - "HMAC", "STARTCBC", "KEY0", "COMMA", "HBIFHELP", "HARCH", "HIMAGE", - "HFILL", "HO", "HP", "HW", "HEFUSEPPKBITS", "HGENHASHES", "HLEGACY", - "HPADHDR", "H_SPKSIGN", "HPACKAGE", "HENCRYPT", "HGENKEYS", "HDQSPI", - "HLOG", "HZYNQMPES1", "HPROCESSBIT", "HNONBOOTING", "HENCRDUMP", - "HPOSTPROCESS", "HVERIFY", "HSECUREDEBUG", "HREAD", "HVERIFYKDF", - "HDUMP", "HDUMPDIR", "HOVLCDO", "H_BIF_INIT", "H_BIF_UDFBH", "H_BIF_AES", - "H_BIF_PPK", "H_BIF_PSK", "H_BIF_SPK", "H_BIF_SSK", "H_BIF_SPKSIGN", - "H_BIF_HIVEC", "H_BIF_HDRSIGN", "H_BIF_BOOTIMAGE", "H_BIF_BL", - "H_BIF_PID", "H_BIF_ENCR", "H_BIF_AUTH", "H_BIF_CHKSM", - "H_BIF_ELYHNDOFF", "H_BIF_BHSIGN", "H_BIF_POWNER", "H_BIF_PRESIGN", - "H_BIF_UDF", "H_BIF_XIP", "H_BIF_ALIGN", "H_BIF_OFFSET", "H_BIF_RES", - "H_BIF_LOAD", "H_BIF_TZ", "H_BIF_STARTUP", "H_BIF_KEYSRC", - "H_BIF_FSBLCFG", "H_BIF_BOOTDEV", "H_BIF_DESTCPU", "H_BIF_DESTDEV", - "H_BIF_EL", "H_SPLIT", "H_BIF_AUTHPARAM", "H_BIF_BHKEY", "H_BIF_PFW", - "H_BIF_BLOCKS", "H_BIF_METAL", "H_BIF_BHIV", "H_BIF_BOOTVEC", - "H_BIF_PUFDATA", "H_BIF_PTYPE", "H_BIF_IMAGECFG", "H_BIF_PMCCONFIG", - "H_BIF_AARCH32", "H_BIF_BIGENDIAN", "H_BIF_BOOTCONFIG", "H_BIF_COPY", - "H_BIF_CORE", "H_BIF_DELAY_HANDOFF", "H_BIF_DELAY_LOAD", "H_BIF_FILE", - "H_BIF_ID", "H_BIF_IMAGE", "H_BIF_METAHDR", "H_BIF_NAME", - "H_BIF_PARTITION", "H_BIF_SLR", "H_BIF_TYPE", "H_BIF_KEYSRCENCR", - "H_BIF_PARENTID", "H_DPACM_ENABLE", "H_BIF_USERKEYS", "$accept", "top", - "option_list", "option", "filename", "memsplit", "filloption", - "helpoption", "bifhelpoption", "wopt", "loglevel", "keysource", - "startcbc", "key0", "hmac", "keyfile", "number", "bitfile_type", - "qpsi_mode", "opsi_mode", "qspi_size", "ospi_size", "archOptions", - "key_type", "auth_key_options", "auth_type", "authJtagOptions", - "authJtagType", "verifyImageOptions", "readImageOptions", "readType", - "dumpOptions", "encrDumpOptions", YY_NULL + "ZYNQMP", "VERSAL", "_R", "FPGA", "VERSALNET", "_DUAL_QSPI_MODE", + "_DUAL_OSPI_MODE", "PARALLEL", "STACKED", "_W", "ON", "OFF", + "_NOAUTHBLOCKS", "_ZYNQMPES1", "_OVERLAYCDO", "_EFUSEPPKBITS", + "_GENERATE_HASHES", "_PADIMAGEHEADER", "_SPKSIGNATURE", "_GENERATE_KEYS", + "PEM", "RSA", "ECDSAP521", "AUTH", "GREY", "METAL", "_SECUREDEBUG", + "ECDSA", "_AUTHJTAG", "_ENCRYPT", "BBRAM", "EFUSE", "_P_TOK", + "_INTERFACE", "SMAPx8", "SMAPx16", "SMAPx32", "SPI", "BPIx8", "BPIx16", + "_READ", "READ_BH", "READ_IHT", "READ_IH", "READ_PHT", "READ_AC", + "_VERIFY", "_VERIFYKDF", "_ZYNQMPENCRDUMP", "HEXVALUE", "IDENTIFIER", + "FILENAME", "QFILENAME", "HEXSTRING", "EQUALS", "HMAC", "STARTCBC", + "KEY0", "COMMA", "HBIFHELP", "HARCH", "HIMAGE", "HFILL", "HO", "HP", + "HW", "HEFUSEPPKBITS", "HGENHASHES", "HLEGACY", "HPADHDR", "H_SPKSIGN", + "HPACKAGE", "HENCRYPT", "HGENKEYS", "HDQSPI", "HLOG", "HZYNQMPES1", + "HPROCESSBIT", "HNONBOOTING", "HENCRDUMP", "HPOSTPROCESS", "HVERIFY", + "HSECUREDEBUG", "HREAD", "HVERIFYKDF", "HDUMP", "HDUMPDIR", "HOVLCDO", + "H_BIF_INIT", "H_BIF_UDFBH", "H_BIF_AES", "H_BIF_PPK", "H_BIF_PSK", + "H_BIF_SPK", "H_BIF_SSK", "H_BIF_SPKSIGN", "H_BIF_HIVEC", + "H_BIF_HDRSIGN", "H_BIF_BOOTIMAGE", "H_BIF_BL", "H_BIF_PID", + "H_BIF_ENCR", "H_BIF_AUTH", "H_BIF_CHKSM", "H_BIF_ELYHNDOFF", + "H_BIF_BHSIGN", "H_BIF_POWNER", "H_BIF_PRESIGN", "H_BIF_UDF", + "H_BIF_XIP", "H_BIF_ALIGN", "H_BIF_OFFSET", "H_BIF_RES", "H_BIF_LOAD", + "H_BIF_TZ", "H_BIF_STARTUP", "H_BIF_KEYSRC", "H_BIF_FSBLCFG", + "H_BIF_BOOTDEV", "H_BIF_DESTCPU", "H_BIF_DESTDEV", "H_BIF_EL", "H_SPLIT", + "H_BIF_AUTHPARAM", "H_BIF_BHKEY", "H_BIF_PFW", "H_BIF_BLOCKS", + "H_BIF_METAL", "H_BIF_BHIV", "H_BIF_BOOTVEC", "H_BIF_PUFDATA", + "H_BIF_PTYPE", "H_BIF_IMAGECFG", "H_BIF_PMCCONFIG", "H_BIF_AARCH32", + "H_BIF_BIGENDIAN", "H_BIF_BOOTCONFIG", "H_BIF_COPY", "H_BIF_CORE", + "H_BIF_DELAY_HANDOFF", "H_BIF_DELAY_LOAD", "H_BIF_FILE", "H_BIF_ID", + "H_BIF_IMAGE", "H_BIF_METAHDR", "H_BIF_NAME", "H_BIF_PARTITION", + "H_BIF_SLR", "H_BIF_TYPE", "H_BIF_KEYSRCENCR", "H_BIF_PARENTID", + "H_DPACM_ENABLE", "H_BIF_USERKEYS", "$accept", "top", "option_list", + "option", "filename", "memsplit", "filloption", "helpoption", + "bifhelpoption", "wopt", "loglevel", "keysource", "startcbc", "key0", + "hmac", "keyfile", "number", "bitfile_type", "qpsi_mode", "opsi_mode", + "qspi_size", "ospi_size", "archOptions", "key_type", "auth_key_options", + "auth_type", "authJtagOptions", "authJtagType", "verifyImageOptions", + "readImageOptions", "readType", "dumpOptions", "encrDumpOptions", YY_NULL }; @@ -2050,53 +2056,53 @@ const BisonParser::rhs_number_type BisonParser::yyrhs_[] = { - 184, 0, -1, 185, -1, -1, 185, 186, -1, 3, - 187, -1, 19, 188, -1, 189, -1, 5, 6, 187, - -1, 5, 187, -1, 62, 80, -1, 39, 192, -1, - 13, 193, -1, 7, 190, -1, 12, 191, -1, 59, - 194, 195, 196, 197, 198, -1, 45, 187, -1, 46, - -1, 10, -1, 9, -1, 47, -1, 47, 84, 83, - -1, 47, 83, -1, 20, 200, -1, 35, 201, -1, - 36, 202, -1, 48, 187, -1, 11, 80, -1, 29, - 205, -1, 33, -1, 42, -1, 49, 206, -1, 8, - -1, 78, 215, -1, 43, -1, 56, 208, -1, 58, - 209, -1, 70, 212, -1, 76, 211, -1, 23, 214, - -1, 27, 81, -1, 77, 187, -1, 44, 187, -1, - 83, -1, 80, -1, 81, -1, 82, -1, 21, -1, - 22, -1, 4, -1, 4, 199, -1, -1, 89, -1, - 90, -1, 91, -1, 92, -1, 152, -1, 93, -1, - 94, -1, 95, -1, 96, -1, 97, -1, 98, -1, - 99, -1, 100, -1, 101, -1, 102, -1, 103, -1, - 104, -1, 105, -1, 106, -1, 107, -1, 108, -1, - 109, -1, 111, -1, 114, -1, 113, -1, 112, -1, - 115, -1, 116, -1, 117, -1, -1, 118, -1, 119, - -1, 120, -1, 121, -1, 122, -1, 123, -1, 124, - -1, 125, -1, 127, -1, 128, -1, 129, -1, 131, - -1, 130, -1, 132, -1, 133, -1, 136, -1, 137, - -1, 138, -1, 139, -1, 140, -1, 141, -1, 142, - -1, 143, -1, 145, -1, 146, -1, 147, -1, 148, - -1, 149, -1, 150, -1, 151, -1, 144, -1, 153, - -1, 154, -1, 155, -1, 156, -1, 158, -1, 157, - -1, 134, -1, 126, -1, 135, -1, 152, -1, 100, - -1, 159, -1, 160, -1, 164, -1, 165, -1, 166, - -1, 167, -1, 168, -1, 169, -1, 170, -1, 171, - -1, 172, -1, 173, -1, 174, -1, 175, -1, 180, - -1, 176, -1, 177, -1, 178, -1, 179, -1, 181, - -1, 182, -1, -1, 40, -1, 41, -1, -1, 14, - -1, 15, -1, 16, -1, 17, -1, 18, -1, 60, - -1, 61, -1, -1, 86, 84, 83, -1, -1, 87, - 84, 83, -1, -1, 85, 84, 83, -1, -1, 187, - -1, 79, -1, 21, -1, 22, -1, 37, -1, 38, - 203, -1, 37, -1, 38, 204, -1, 79, -1, 83, - -1, 79, -1, 83, -1, 30, -1, 31, -1, 32, - -1, 34, -1, 53, 207, -1, 54, -1, 55, -1, - 50, -1, 51, -1, 57, -1, 52, -1, 50, -1, - 51, -1, 57, -1, 51, -1, 210, 187, -1, 210, - -1, 57, -1, 51, -1, 187, -1, 187, -1, 187, - 213, -1, 71, -1, 72, -1, 73, -1, 74, -1, - 75, -1, 71, -1, 187, 71, -1, 71, 187, -1, - 187, -1, 187, 24, -1, 187, 25, -1, 187, 26, - -1, 28, -1, -1, 187, -1 + 185, 0, -1, 186, -1, -1, 186, 187, -1, 3, + 188, -1, 19, 189, -1, 190, -1, 5, 6, 188, + -1, 5, 188, -1, 63, 81, -1, 40, 193, -1, + 13, 194, -1, 7, 191, -1, 12, 192, -1, 60, + 195, 196, 197, 198, 199, -1, 46, 188, -1, 47, + -1, 10, -1, 9, -1, 48, -1, 48, 85, 84, + -1, 48, 84, -1, 20, 201, -1, 36, 202, -1, + 37, 203, -1, 49, 188, -1, 11, 81, -1, 29, + 206, -1, 33, -1, 43, -1, 50, 207, -1, 8, + -1, 79, 216, -1, 44, -1, 57, 209, -1, 59, + 210, -1, 71, 213, -1, 77, 212, -1, 23, 215, + -1, 27, 188, -1, 78, 188, -1, 45, 188, -1, + 84, -1, 81, -1, 82, -1, 83, -1, 21, -1, + 22, -1, 4, -1, 4, 200, -1, -1, 90, -1, + 91, -1, 92, -1, 93, -1, 153, -1, 94, -1, + 95, -1, 96, -1, 97, -1, 98, -1, 99, -1, + 100, -1, 101, -1, 102, -1, 103, -1, 104, -1, + 105, -1, 106, -1, 107, -1, 108, -1, 109, -1, + 110, -1, 112, -1, 115, -1, 114, -1, 113, -1, + 116, -1, 117, -1, 118, -1, -1, 119, -1, 120, + -1, 121, -1, 122, -1, 123, -1, 124, -1, 125, + -1, 126, -1, 128, -1, 129, -1, 130, -1, 132, + -1, 131, -1, 133, -1, 134, -1, 137, -1, 138, + -1, 139, -1, 140, -1, 141, -1, 142, -1, 143, + -1, 144, -1, 146, -1, 147, -1, 148, -1, 149, + -1, 150, -1, 151, -1, 152, -1, 145, -1, 154, + -1, 155, -1, 156, -1, 157, -1, 159, -1, 158, + -1, 135, -1, 127, -1, 136, -1, 153, -1, 101, + -1, 160, -1, 161, -1, 165, -1, 166, -1, 167, + -1, 168, -1, 169, -1, 170, -1, 171, -1, 172, + -1, 173, -1, 174, -1, 175, -1, 176, -1, 181, + -1, 177, -1, 178, -1, 179, -1, 180, -1, 182, + -1, 183, -1, -1, 41, -1, 42, -1, -1, 14, + -1, 15, -1, 16, -1, 17, -1, 18, -1, 61, + -1, 62, -1, -1, 87, 85, 84, -1, -1, 88, + 85, 84, -1, -1, 86, 85, 84, -1, -1, 188, + -1, 80, -1, 21, -1, 22, -1, 38, -1, 39, + 204, -1, 38, -1, 39, 205, -1, 80, -1, 84, + -1, 80, -1, 84, -1, 30, -1, 31, -1, 32, + -1, 34, -1, 35, -1, 54, 208, -1, 55, -1, + 56, -1, 51, -1, 52, -1, 58, -1, 53, -1, + 51, -1, 52, -1, 58, -1, 52, -1, 211, 188, + -1, 211, -1, 58, -1, 52, -1, 188, -1, 188, + -1, 188, 214, -1, 72, -1, 73, -1, 74, -1, + 75, -1, 76, -1, 72, -1, 188, 72, -1, 72, + 188, -1, 188, -1, 188, 24, -1, 188, 25, -1, + 188, 26, -1, 28, -1, -1, 188, -1 }; /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in @@ -2122,10 +2128,10 @@ 331, 333, 335, 337, 339, 341, 343, 344, 348, 349, 353, 354, 358, 359, 361, 363, 365, 367, 369, 372, 374, 377, 379, 381, 383, 385, 387, 389, 391, 393, - 396, 398, 400, 402, 404, 406, 408, 410, 412, 414, - 416, 419, 421, 423, 425, 427, 429, 432, 434, 436, - 438, 440, 442, 444, 447, 450, 452, 455, 458, 461, - 463, 464 + 395, 398, 400, 402, 404, 406, 408, 410, 412, 414, + 416, 418, 421, 423, 425, 427, 429, 431, 434, 436, + 438, 440, 442, 444, 446, 449, 452, 454, 457, 460, + 463, 465, 466 }; /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ @@ -2149,11 +2155,11 @@ 257, 258, 259, 260, 261, 264, 265, 266, 269, 270, 271, 272, 273, 274, 277, 278, 281, 281, 282, 282, 283, 283, 284, 284, 286, 288, 289, 292, 293, 296, - 297, 300, 301, 304, 305, 308, 309, 310, 311, 314, - 315, 316, 317, 318, 319, 320, 323, 324, 327, 329, - 332, 333, 335, 337, 341, 344, 346, 349, 350, 351, - 352, 353, 356, 357, 359, 361, 363, 365, 367, 369, - 372, 373 + 297, 300, 301, 304, 305, 308, 309, 310, 311, 312, + 315, 316, 317, 318, 319, 320, 321, 324, 325, 328, + 330, 333, 334, 336, 338, 342, 345, 347, 350, 351, + 352, 353, 354, 357, 358, 360, 362, 364, 366, 368, + 370, 373, 374 }; // Print the state stack on the debug stream. @@ -2236,7 +2242,7 @@ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182 + 175, 176, 177, 178, 179, 180, 181, 182, 183 }; if ((unsigned int) t <= yyuser_token_number_max_) return translate_table[t]; @@ -2245,24 +2251,24 @@ } const int BisonParser::yyeof_ = 0; - const int BisonParser::yylast_ = 256; + const int BisonParser::yylast_ = 254; const int BisonParser::yynnts_ = 33; const int BisonParser::yyempty_ = -2; const int BisonParser::yyfinal_ = 3; const int BisonParser::yyterror_ = 1; const int BisonParser::yyerrcode_ = 256; - const int BisonParser::yyntokens_ = 183; + const int BisonParser::yyntokens_ = 184; - const unsigned int BisonParser::yyuser_token_number_max_ = 437; + const unsigned int BisonParser::yyuser_token_number_max_ = 438; const BisonParser::token_number_type BisonParser::yyundef_token_ = 2; /* Line 1141 of lalr1.cc */ #line 23 "../../s/cmdoptions.y" } // CO /* Line 1141 of lalr1.cc */ -#line 2264 "cmdoptions.tab.cpp" +#line 2270 "cmdoptions.tab.cpp" /* Line 1142 of lalr1.cc */ -#line 376 "../../s/cmdoptions.y" +#line 377 "../../s/cmdoptions.y" diff -Nru xilinx-bootgen-2022.1/cmdoptions.tab.hpp xilinx-bootgen-2022.2/cmdoptions.tab.hpp --- xilinx-bootgen-2022.1/cmdoptions.tab.hpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cmdoptions.tab.hpp 2022-09-26 06:24:42.000000000 +0000 @@ -134,154 +134,155 @@ VERSAL = 287, _R = 288, FPGA = 289, - _DUAL_QSPI_MODE = 290, - _DUAL_OSPI_MODE = 291, - PARALLEL = 292, - STACKED = 293, - _W = 294, - ON = 295, - OFF = 296, - _NOAUTHBLOCKS = 297, - _ZYNQMPES1 = 298, - _OVERLAYCDO = 299, - _EFUSEPPKBITS = 300, - _GENERATE_HASHES = 301, - _PADIMAGEHEADER = 302, - _SPKSIGNATURE = 303, - _GENERATE_KEYS = 304, - PEM = 305, - RSA = 306, - ECDSAP521 = 307, - AUTH = 308, - GREY = 309, - METAL = 310, - _SECUREDEBUG = 311, - ECDSA = 312, - _AUTHJTAG = 313, - _ENCRYPT = 314, - BBRAM = 315, - EFUSE = 316, - _P_TOK = 317, - _INTERFACE = 318, - SMAPx8 = 319, - SMAPx16 = 320, - SMAPx32 = 321, - SPI = 322, - BPIx8 = 323, - BPIx16 = 324, - _READ = 325, - READ_BH = 326, - READ_IHT = 327, - READ_IH = 328, - READ_PHT = 329, - READ_AC = 330, - _VERIFY = 331, - _VERIFYKDF = 332, - _ZYNQMPENCRDUMP = 333, - HEXVALUE = 334, - IDENTIFIER = 335, - FILENAME = 336, - QFILENAME = 337, - HEXSTRING = 338, - EQUALS = 339, - HMAC = 340, - STARTCBC = 341, - KEY0 = 342, - COMMA = 343, - HBIFHELP = 344, - HARCH = 345, - HIMAGE = 346, - HFILL = 347, - HO = 348, - HP = 349, - HW = 350, - HEFUSEPPKBITS = 351, - HGENHASHES = 352, - HLEGACY = 353, - HPADHDR = 354, - H_SPKSIGN = 355, - HPACKAGE = 356, - HENCRYPT = 357, - HGENKEYS = 358, - HDQSPI = 359, - HLOG = 360, - HZYNQMPES1 = 361, - HPROCESSBIT = 362, - HNONBOOTING = 363, - HENCRDUMP = 364, - HPOSTPROCESS = 365, - HVERIFY = 366, - HSECUREDEBUG = 367, - HREAD = 368, - HVERIFYKDF = 369, - HDUMP = 370, - HDUMPDIR = 371, - HOVLCDO = 372, - H_BIF_INIT = 373, - H_BIF_UDFBH = 374, - H_BIF_AES = 375, - H_BIF_PPK = 376, - H_BIF_PSK = 377, - H_BIF_SPK = 378, - H_BIF_SSK = 379, - H_BIF_SPKSIGN = 380, - H_BIF_HIVEC = 381, - H_BIF_HDRSIGN = 382, - H_BIF_BOOTIMAGE = 383, - H_BIF_BL = 384, - H_BIF_PID = 385, - H_BIF_ENCR = 386, - H_BIF_AUTH = 387, - H_BIF_CHKSM = 388, - H_BIF_ELYHNDOFF = 389, - H_BIF_BHSIGN = 390, - H_BIF_POWNER = 391, - H_BIF_PRESIGN = 392, - H_BIF_UDF = 393, - H_BIF_XIP = 394, - H_BIF_ALIGN = 395, - H_BIF_OFFSET = 396, - H_BIF_RES = 397, - H_BIF_LOAD = 398, - H_BIF_TZ = 399, - H_BIF_STARTUP = 400, - H_BIF_KEYSRC = 401, - H_BIF_FSBLCFG = 402, - H_BIF_BOOTDEV = 403, - H_BIF_DESTCPU = 404, - H_BIF_DESTDEV = 405, - H_BIF_EL = 406, - H_SPLIT = 407, - H_BIF_AUTHPARAM = 408, - H_BIF_BHKEY = 409, - H_BIF_PFW = 410, - H_BIF_BLOCKS = 411, - H_BIF_METAL = 412, - H_BIF_BHIV = 413, - H_BIF_BOOTVEC = 414, - H_BIF_PUFDATA = 415, - H_BIF_PTYPE = 416, - H_BIF_IMAGECFG = 417, - H_BIF_PMCCONFIG = 418, - H_BIF_AARCH32 = 419, - H_BIF_BIGENDIAN = 420, - H_BIF_BOOTCONFIG = 421, - H_BIF_COPY = 422, - H_BIF_CORE = 423, - H_BIF_DELAY_HANDOFF = 424, - H_BIF_DELAY_LOAD = 425, - H_BIF_FILE = 426, - H_BIF_ID = 427, - H_BIF_IMAGE = 428, - H_BIF_METAHDR = 429, - H_BIF_NAME = 430, - H_BIF_PARTITION = 431, - H_BIF_SLR = 432, - H_BIF_TYPE = 433, - H_BIF_KEYSRCENCR = 434, - H_BIF_PARENTID = 435, - H_DPACM_ENABLE = 436, - H_BIF_USERKEYS = 437 + VERSALNET = 290, + _DUAL_QSPI_MODE = 291, + _DUAL_OSPI_MODE = 292, + PARALLEL = 293, + STACKED = 294, + _W = 295, + ON = 296, + OFF = 297, + _NOAUTHBLOCKS = 298, + _ZYNQMPES1 = 299, + _OVERLAYCDO = 300, + _EFUSEPPKBITS = 301, + _GENERATE_HASHES = 302, + _PADIMAGEHEADER = 303, + _SPKSIGNATURE = 304, + _GENERATE_KEYS = 305, + PEM = 306, + RSA = 307, + ECDSAP521 = 308, + AUTH = 309, + GREY = 310, + METAL = 311, + _SECUREDEBUG = 312, + ECDSA = 313, + _AUTHJTAG = 314, + _ENCRYPT = 315, + BBRAM = 316, + EFUSE = 317, + _P_TOK = 318, + _INTERFACE = 319, + SMAPx8 = 320, + SMAPx16 = 321, + SMAPx32 = 322, + SPI = 323, + BPIx8 = 324, + BPIx16 = 325, + _READ = 326, + READ_BH = 327, + READ_IHT = 328, + READ_IH = 329, + READ_PHT = 330, + READ_AC = 331, + _VERIFY = 332, + _VERIFYKDF = 333, + _ZYNQMPENCRDUMP = 334, + HEXVALUE = 335, + IDENTIFIER = 336, + FILENAME = 337, + QFILENAME = 338, + HEXSTRING = 339, + EQUALS = 340, + HMAC = 341, + STARTCBC = 342, + KEY0 = 343, + COMMA = 344, + HBIFHELP = 345, + HARCH = 346, + HIMAGE = 347, + HFILL = 348, + HO = 349, + HP = 350, + HW = 351, + HEFUSEPPKBITS = 352, + HGENHASHES = 353, + HLEGACY = 354, + HPADHDR = 355, + H_SPKSIGN = 356, + HPACKAGE = 357, + HENCRYPT = 358, + HGENKEYS = 359, + HDQSPI = 360, + HLOG = 361, + HZYNQMPES1 = 362, + HPROCESSBIT = 363, + HNONBOOTING = 364, + HENCRDUMP = 365, + HPOSTPROCESS = 366, + HVERIFY = 367, + HSECUREDEBUG = 368, + HREAD = 369, + HVERIFYKDF = 370, + HDUMP = 371, + HDUMPDIR = 372, + HOVLCDO = 373, + H_BIF_INIT = 374, + H_BIF_UDFBH = 375, + H_BIF_AES = 376, + H_BIF_PPK = 377, + H_BIF_PSK = 378, + H_BIF_SPK = 379, + H_BIF_SSK = 380, + H_BIF_SPKSIGN = 381, + H_BIF_HIVEC = 382, + H_BIF_HDRSIGN = 383, + H_BIF_BOOTIMAGE = 384, + H_BIF_BL = 385, + H_BIF_PID = 386, + H_BIF_ENCR = 387, + H_BIF_AUTH = 388, + H_BIF_CHKSM = 389, + H_BIF_ELYHNDOFF = 390, + H_BIF_BHSIGN = 391, + H_BIF_POWNER = 392, + H_BIF_PRESIGN = 393, + H_BIF_UDF = 394, + H_BIF_XIP = 395, + H_BIF_ALIGN = 396, + H_BIF_OFFSET = 397, + H_BIF_RES = 398, + H_BIF_LOAD = 399, + H_BIF_TZ = 400, + H_BIF_STARTUP = 401, + H_BIF_KEYSRC = 402, + H_BIF_FSBLCFG = 403, + H_BIF_BOOTDEV = 404, + H_BIF_DESTCPU = 405, + H_BIF_DESTDEV = 406, + H_BIF_EL = 407, + H_SPLIT = 408, + H_BIF_AUTHPARAM = 409, + H_BIF_BHKEY = 410, + H_BIF_PFW = 411, + H_BIF_BLOCKS = 412, + H_BIF_METAL = 413, + H_BIF_BHIV = 414, + H_BIF_BOOTVEC = 415, + H_BIF_PUFDATA = 416, + H_BIF_PTYPE = 417, + H_BIF_IMAGECFG = 418, + H_BIF_PMCCONFIG = 419, + H_BIF_AARCH32 = 420, + H_BIF_BIGENDIAN = 421, + H_BIF_BOOTCONFIG = 422, + H_BIF_COPY = 423, + H_BIF_CORE = 424, + H_BIF_DELAY_HANDOFF = 425, + H_BIF_DELAY_LOAD = 426, + H_BIF_FILE = 427, + H_BIF_ID = 428, + H_BIF_IMAGE = 429, + H_BIF_METAHDR = 430, + H_BIF_NAME = 431, + H_BIF_PARTITION = 432, + H_BIF_SLR = 433, + H_BIF_TYPE = 434, + H_BIF_KEYSRCENCR = 435, + H_BIF_PARENTID = 436, + H_DPACM_ENABLE = 437, + H_BIF_USERKEYS = 438 }; }; @@ -458,7 +459,7 @@ #line 23 "../../s/cmdoptions.y" } // CO /* Line 33 of lalr1.cc */ -#line 462 "cmdoptions.tab.hpp" +#line 463 "cmdoptions.tab.hpp" diff -Nru xilinx-bootgen-2022.1/cmdoptions.y xilinx-bootgen-2022.2/cmdoptions.y --- xilinx-bootgen-2022.1/cmdoptions.y 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cmdoptions.y 2022-09-26 06:24:42.000000000 +0000 @@ -70,7 +70,7 @@ %token _LOG ERROR WARNING INFO DEBUG TRACE %token _SPLIT _PROCESS_BITSTREAM MCS BIN %token _DUMP DUMP_PLM DUMP_PMC_CDO DUMP_BOOT_FILES _DUMP_DIR DUMP_SLAVE_PDIS -%token _ARCH ZYNQ ZYNQMP VERSAL _R FPGA +%token _ARCH ZYNQ ZYNQMP VERSAL _R FPGA VERSALNET %token _DUAL_QSPI_MODE _DUAL_OSPI_MODE PARALLEL STACKED %token _W ON OFF %token _NOAUTHBLOCKS _ZYNQMPES1 _OVERLAYCDO @@ -142,7 +142,7 @@ | _READ readImageOptions | _VERIFY verifyImageOptions | _DUMP dumpOptions - | _DUMP_DIR FILENAME { options.SetDumpDirectory($2); } + | _DUMP_DIR filename { options.SetDumpDirectory($2); } | _VERIFYKDF filename { options.SetKDFTestVectorFile($2); } | _OVERLAYCDO filename { options.SetOverlayCDOFileName($2); } ; @@ -309,6 +309,7 @@ | ZYNQMP { options.SetArchType(Arch::ZYNQMP); } | VERSAL { options.SetArchType(Arch::VERSAL); } | FPGA { options.SetArchType(Arch::FPGA); } + | VERSALNET { options.SetArchType(Arch::VERSALNET); } ; key_type : AUTH auth_key_options diff -Nru xilinx-bootgen-2022.1/cmdoptions.yy.cpp xilinx-bootgen-2022.2/cmdoptions.yy.cpp --- xilinx-bootgen-2022.1/cmdoptions.yy.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/cmdoptions.yy.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -406,8 +406,8 @@ (yy_c_buf_p) = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 182 -#define YY_END_OF_BUFFER 183 +#define YY_NUM_RULES 183 +#define YY_END_OF_BUFFER 184 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -415,120 +415,121 @@ flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[1020] = +static yyconst flex_int16_t yy_accept[1023] = { 0, - 0, 0, 183, 181, 179, 180, 177, 181, 37, 176, - 176, 177, 175, 175, 36, 175, 176, 176, 176, 176, - 175, 175, 175, 175, 175, 175, 176, 176, 7, 176, - 176, 176, 176, 87, 88, 176, 176, 176, 176, 176, - 89, 176, 176, 179, 180, 177, 0, 0, 176, 176, - 176, 176, 176, 176, 176, 176, 81, 176, 176, 176, - 6, 8, 68, 176, 176, 9, 176, 1, 177, 175, - 176, 0, 176, 176, 176, 175, 74, 175, 176, 176, - 176, 175, 70, 176, 176, 176, 176, 176, 175, 176, - 176, 175, 175, 175, 176, 176, 176, 175, 176, 176, - - 176, 176, 176, 176, 176, 120, 72, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 10, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 178, 0, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 0, 2, 177, 3, 0, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 31, 176, - 176, 176, 176, 176, 175, 176, 176, 176, 176, 176, - - 176, 175, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 71, 176, 176, 176, 176, 176, - 176, 99, 30, 176, 176, 176, 176, 11, 176, 176, - 176, 176, 176, 53, 73, 141, 40, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 54, 176, 176, 126, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 0, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 12, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 22, 26, 176, 176, 176, 176, 84, 52, 176, 176, - - 176, 176, 176, 176, 176, 176, 115, 116, 176, 176, - 176, 176, 176, 109, 176, 176, 176, 176, 176, 176, - 176, 119, 86, 67, 176, 176, 176, 176, 23, 176, - 15, 129, 27, 176, 176, 152, 176, 123, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 108, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 127, 176, 176, - 176, 176, 176, 176, 64, 63, 176, 176, 176, 176, - 39, 176, 176, 5, 176, 82, 176, 176, 176, 176, - 176, 176, 176, 176, 69, 176, 176, 176, 176, 176, - - 176, 176, 176, 176, 176, 176, 20, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 16, 176, 176, - 176, 176, 176, 176, 57, 21, 176, 13, 176, 176, - 176, 176, 176, 168, 85, 176, 176, 176, 176, 176, - 176, 176, 144, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 170, 176, 176, 176, 17, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 38, 176, 176, 176, - 176, 176, 4, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 28, 176, 176, 176, 176, 176, 176, 176, - - 176, 176, 176, 176, 176, 164, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 128, 92, 176, - 176, 176, 150, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 130, 176, 176, 104, - 66, 176, 176, 65, 176, 176, 176, 176, 176, 176, - 176, 176, 45, 176, 176, 176, 176, 176, 176, 176, - 176, 76, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 96, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 41, 176, 132, 146, - 176, 133, 176, 151, 176, 176, 134, 176, 135, 35, - 176, 153, 176, 176, 176, 176, 14, 176, 176, 176, - 176, 176, 176, 176, 176, 19, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 24, 176, 176, - 176, 176, 176, 176, 176, 176, 83, 176, 176, 176, - 176, 176, 176, 176, 143, 176, 176, 176, 176, 176, - 110, 176, 176, 176, 176, 176, 176, 176, 176, 176, - - 176, 176, 176, 176, 176, 176, 176, 176, 34, 176, - 176, 176, 176, 172, 176, 176, 176, 25, 176, 147, - 174, 176, 148, 176, 176, 18, 176, 176, 44, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 149, 176, 176, 165, 176, 176, - 176, 176, 176, 176, 138, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 56, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 125, - 124, 176, 176, 176, 176, 176, 160, 176, 100, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - - 176, 176, 176, 176, 79, 176, 131, 176, 176, 162, - 176, 113, 176, 176, 42, 139, 176, 176, 118, 176, - 176, 176, 176, 58, 59, 176, 140, 176, 176, 176, - 176, 176, 176, 122, 102, 176, 176, 176, 176, 176, - 176, 176, 176, 43, 176, 105, 176, 176, 176, 176, - 176, 176, 176, 176, 60, 176, 176, 176, 176, 176, - 176, 75, 176, 161, 176, 169, 114, 156, 171, 176, - 176, 176, 176, 176, 176, 176, 176, 155, 176, 176, - 176, 176, 176, 111, 95, 176, 176, 163, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 80, - - 62, 176, 176, 176, 176, 112, 176, 176, 176, 176, - 173, 176, 176, 90, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 94, 176, 176, 176, 47, - 176, 176, 176, 78, 176, 176, 176, 61, 176, 176, - 117, 176, 176, 176, 167, 176, 176, 176, 97, 176, - 176, 55, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 51, 176, 176, 176, 176, 142, 176, 176, 98, - 176, 176, 176, 176, 176, 93, 176, 176, 176, 176, - 33, 32, 176, 176, 46, 176, 176, 176, 157, 176, - 103, 159, 91, 137, 176, 145, 176, 176, 176, 77, - - 48, 176, 176, 176, 176, 176, 176, 106, 176, 176, - 49, 107, 176, 154, 101, 50, 29, 158, 0 + 0, 0, 184, 182, 180, 181, 178, 182, 37, 177, + 177, 178, 176, 176, 36, 176, 177, 177, 177, 177, + 176, 176, 176, 176, 176, 176, 177, 177, 7, 177, + 177, 177, 177, 88, 89, 177, 177, 177, 177, 177, + 90, 177, 177, 180, 181, 178, 0, 0, 177, 177, + 177, 177, 177, 177, 177, 177, 82, 177, 177, 177, + 6, 8, 69, 177, 177, 9, 177, 1, 178, 176, + 177, 0, 177, 177, 177, 176, 75, 176, 177, 177, + 177, 176, 71, 177, 177, 177, 177, 177, 176, 177, + 177, 176, 176, 176, 177, 177, 177, 176, 177, 177, + + 177, 177, 177, 177, 177, 121, 73, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 10, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 179, 0, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 0, 2, 178, 3, 0, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 31, 177, + 177, 177, 177, 177, 176, 177, 177, 177, 177, 177, + + 177, 176, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 72, 177, 177, 177, 177, 177, + 177, 100, 30, 177, 177, 177, 177, 11, 177, 177, + 177, 177, 177, 53, 74, 142, 40, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 54, 177, 177, 127, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 0, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 12, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 22, 26, 177, 177, 177, 177, 85, 52, 177, 177, + + 177, 177, 177, 177, 177, 177, 116, 117, 177, 177, + 177, 177, 177, 110, 177, 177, 177, 177, 177, 177, + 177, 120, 87, 67, 177, 177, 177, 177, 23, 177, + 15, 130, 27, 177, 177, 153, 177, 124, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 109, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 128, 177, 177, + 177, 177, 177, 177, 64, 63, 177, 177, 177, 177, + 39, 177, 177, 5, 177, 83, 177, 177, 177, 177, + 177, 177, 177, 177, 70, 177, 177, 177, 177, 177, + + 177, 177, 177, 177, 177, 177, 20, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 16, 177, 177, + 177, 177, 177, 177, 57, 21, 177, 13, 177, 177, + 177, 177, 177, 169, 86, 177, 177, 177, 177, 177, + 177, 177, 145, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 171, 177, 177, 177, 17, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 38, 177, 177, 177, + 177, 177, 4, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 28, 177, 177, 177, 177, 177, 177, 177, + + 177, 177, 177, 177, 177, 165, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 129, 93, 177, + 177, 177, 151, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 131, 177, 177, 105, + 66, 177, 177, 65, 177, 177, 177, 177, 177, 177, + 177, 177, 45, 177, 177, 177, 177, 177, 177, 177, + 177, 77, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 97, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 41, 177, 133, 147, + 177, 134, 177, 152, 177, 177, 135, 177, 136, 35, + 177, 154, 177, 177, 177, 177, 177, 14, 177, 177, + 177, 177, 177, 177, 177, 177, 19, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 24, 177, + 177, 177, 177, 177, 177, 177, 177, 84, 177, 177, + 177, 177, 177, 177, 177, 144, 177, 177, 177, 177, + 177, 111, 177, 177, 177, 177, 177, 177, 177, 177, + + 177, 177, 177, 177, 177, 177, 177, 177, 177, 34, + 177, 177, 177, 177, 173, 177, 177, 177, 25, 177, + 148, 175, 177, 177, 149, 177, 177, 18, 177, 177, + 44, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 150, 177, 177, 166, + 177, 177, 177, 177, 177, 177, 139, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 56, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 126, 125, 177, 177, 177, 177, 177, 161, 177, + 68, 101, 177, 177, 177, 177, 177, 177, 177, 177, + + 177, 177, 177, 177, 177, 177, 177, 80, 177, 132, + 177, 177, 163, 177, 114, 177, 177, 42, 140, 177, + 177, 119, 177, 177, 177, 177, 58, 59, 177, 141, + 177, 177, 177, 177, 177, 177, 123, 103, 177, 177, + 177, 177, 177, 177, 177, 177, 43, 177, 106, 177, + 177, 177, 177, 177, 177, 177, 177, 60, 177, 177, + 177, 177, 177, 177, 76, 177, 162, 177, 170, 115, + 157, 172, 177, 177, 177, 177, 177, 177, 177, 177, + 156, 177, 177, 177, 177, 177, 112, 96, 177, 177, + 164, 177, 177, 177, 177, 177, 177, 177, 177, 177, + + 177, 177, 81, 62, 177, 177, 177, 177, 113, 177, + 177, 177, 177, 174, 177, 177, 91, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 95, 177, + 177, 177, 47, 177, 177, 177, 79, 177, 177, 177, + 61, 177, 177, 118, 177, 177, 177, 168, 177, 177, + 177, 98, 177, 177, 55, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 51, 177, 177, 177, 177, 143, + 177, 177, 99, 177, 177, 177, 177, 177, 94, 177, + 177, 177, 177, 33, 32, 177, 177, 46, 177, 177, + 177, 158, 177, 104, 160, 92, 138, 177, 146, 177, + + 177, 177, 78, 48, 177, 177, 177, 177, 177, 177, + 107, 177, 177, 49, 108, 177, 155, 102, 50, 29, + 159, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -573,133 +574,133 @@ 6, 6, 6, 6, 6, 6, 6, 6, 6 } ; -static yyconst flex_int16_t yy_base[1026] = +static yyconst flex_int16_t yy_base[1029] = { 0, - 0, 0, 1244, 1245, 58, 1240, 0, 59, 0, 88, - 114, 54, 162, 51, 1245, 137, 1222, 59, 46, 130, + 0, 0, 1247, 1248, 58, 1243, 0, 59, 0, 88, + 114, 54, 162, 51, 1248, 137, 1225, 59, 46, 130, 200, 182, 184, 172, 213, 235, 47, 170, 226, 144, 202, 169, 61, 239, 276, 223, 259, 242, 228, 168, - 60, 248, 151, 85, 1238, 0, 1234, 152, 0, 0, - 32, 1197, 157, 242, 1196, 1199, 1198, 1189, 180, 1186, - 1178, 237, 1194, 204, 1193, 0, 1172, 1245, 330, 225, - 340, 203, 1207, 1170, 1193, 252, 245, 267, 1184, 1189, - 1171, 284, 268, 266, 1175, 1174, 1183, 291, 335, 1186, - 314, 292, 336, 314, 1183, 1167, 1181, 315, 1171, 1175, - - 1179, 1166, 1178, 1156, 1176, 0, 1156, 1174, 287, 1149, - 1166, 251, 1153, 1151, 1157, 1155, 1162, 1161, 0, 1161, - 1151, 345, 1151, 1143, 1158, 1148, 347, 1149, 346, 1148, - 1152, 351, 1156, 1153, 265, 344, 1144, 1153, 352, 1137, - 1146, 1146, 1132, 1131, 1132, 1133, 1245, 226, 1143, 1125, - 1138, 1141, 356, 1121, 1138, 1128, 1125, 1126, 1136, 1129, - 1128, 357, 1129, 361, 1118, 1131, 1128, 355, 1112, 1115, - 1158, 1245, 406, 0, 0, 1136, 1147, 1107, 1121, 1112, - 1115, 1113, 1112, 1118, 1107, 1108, 1116, 1115, 0, 1111, - 1093, 1109, 1086, 1105, 364, 1108, 1088, 1104, 1094, 1089, - - 1092, 380, 1084, 1084, 1086, 1095, 1090, 122, 1097, 1085, - 1091, 1091, 1089, 1090, 0, 1085, 1076, 1070, 295, 1088, - 1084, 0, 0, 1086, 1081, 1083, 1063, 1064, 1064, 1076, - 1069, 1070, 381, 0, 0, 0, 0, 1078, 1071, 1070, - 1056, 1071, 1067, 1072, 1067, 1065, 0, 1048, 1046, 0, - 377, 1058, 1060, 369, 1062, 1045, 1058, 1062, 1043, 381, - 1046, 1059, 1041, 1084, 1048, 1047, 1054, 1032, 1040, 1035, - 1031, 1031, 1036, 1042, 1030, 1038, 1043, 0, 1022, 1040, - 1023, 1029, 1030, 1035, 1033, 1015, 1016, 1025, 1024, 1015, - 0, 0, 1011, 1022, 1024, 1014, 0, 306, 1014, 1021, - - 1018, 1016, 1018, 1011, 397, 1010, 0, 0, 1013, 994, - 1009, 1004, 1016, 1015, 989, 1012, 1007, 986, 992, 993, - 996, 0, 0, 0, 1007, 988, 1000, 1001, 0, 998, - 0, 0, 0, 984, 998, 0, 992, 0, 984, 979, - 992, 984, 977, 993, 980, 980, 977, 981, 986, 965, - 978, 977, 980, 975, 977, 0, 964, 963, 975, 970, - 969, 957, 967, 964, 954, 968, 952, 0, 387, 960, - 964, 968, 959, 954, 953, 0, 960, 956, 956, 962, - 961, 955, 934, 0, 940, 0, 952, 953, 935, 939, - 941, 951, 938, 945, 0, 931, 939, 927, 940, 932, - - 953, 961, 917, 928, 924, 925, 0, 913, 923, 931, - 921, 915, 399, 920, 917, 926, 911, 0, 929, 914, - 927, 909, 921, 924, 947, 906, 905, 0, 900, 894, - 915, 916, 898, 0, 0, 912, 889, 908, 897, 908, - 890, 908, 0, 901, 906, 894, 885, 884, 899, 902, - 889, 893, 880, 886, 888, 874, 890, 894, 881, 885, - 0, 879, 885, 389, 0, 863, 880, 886, 881, 860, - 872, 869, 867, 865, 866, 874, 0, 396, 874, 861, - 860, 874, 0, 849, 865, 857, 870, 863, 868, 849, - 862, 859, 0, 840, 848, 873, 881, 855, 855, 858, - - 838, 408, 856, 844, 851, 0, 839, 848, 843, 850, - 849, 846, 827, 404, 846, 841, 826, 835, 835, 826, - 825, 820, 830, 827, 822, 816, 816, 834, 0, 832, - 812, 830, 0, 805, 824, 821, 822, 826, 816, 809, - 814, 817, 807, 801, 814, 806, 812, 812, 799, 809, - 799, 807, 807, 808, 793, 793, 0, 787, 781, 805, - 0, 797, 799, 797, 781, 788, 780, 779, 788, 780, - 775, 774, 0, 791, 772, 766, 785, 782, 769, 783, - 772, 785, 779, 792, 782, 772, 766, 761, 769, 768, - 767, 755, 758, 764, 758, 749, 758, 762, 764, 747, - - 753, 764, 749, 743, 748, 745, 742, 758, 433, 747, - 748, 741, 750, 740, 748, 743, 746, 746, 740, 728, - 747, 732, 740, 732, 734, 727, 0, 728, 0, 0, - 740, 0, 734, 0, 733, 733, 0, 735, 0, 0, - 732, 0, 720, 732, 713, 720, 0, 725, 710, 719, - 711, 710, 709, 706, 712, 713, 716, 708, 710, 718, - 690, 692, 696, 687, 690, 46, 139, 0, 323, 372, - 375, 397, 404, 396, 408, 400, 0, 421, 417, 415, - 420, 421, 422, 413, 0, 415, 429, 422, 431, 424, - 0, 420, 449, 455, 435, 423, 425, 415, 435, 442, - - 436, 430, 440, 432, 442, 445, 448, 442, 0, 447, - 438, 452, 452, 0, 453, 447, 437, 0, 453, 0, - 0, 455, 0, 480, 458, 0, 453, 454, 0, 462, - 450, 466, 452, 454, 466, 469, 463, 470, 471, 454, - 471, 496, 462, 473, 0, 466, 479, 0, 476, 464, - 469, 475, 482, 467, 0, 469, 470, 485, 486, 476, - 490, 493, 490, 512, 516, 488, 484, 499, 0, 491, - 493, 488, 500, 487, 499, 503, 504, 496, 505, 0, - 511, 505, 504, 493, 496, 495, 0, 511, 0, 517, - 519, 520, 512, 508, 515, 521, 518, 523, 515, 524, - - 521, 510, 511, 527, 0, 530, 0, 516, 516, 0, - 532, 0, 531, 534, 0, 0, 521, 526, 0, 528, - 531, 531, 530, 0, 0, 526, 547, 536, 542, 549, - 546, 551, 535, 0, 0, 543, 540, 551, 556, 543, - 554, 540, 554, 0, 544, 0, 543, 551, 552, 546, - 567, 567, 564, 559, 0, 556, 567, 572, 554, 568, - 558, 0, 572, 0, 573, 0, 0, 0, 0, 573, - 580, 576, 568, 578, 566, 582, 582, 0, 569, 564, - 570, 566, 587, 0, 0, 589, 571, 0, 576, 587, - 592, 593, 584, 585, 582, 598, 584, 579, 586, 0, - - 0, 602, 588, 599, 604, 0, 606, 596, 606, 610, - 0, 611, 610, 0, 596, 596, 611, 601, 600, 606, - 598, 619, 611, 606, 614, 0, 624, 625, 626, 0, - 610, 624, 614, 0, 629, 615, 623, 0, 627, 624, - 0, 623, 635, 636, 0, 629, 638, 639, 0, 627, - 626, 0, 629, 643, 631, 649, 641, 647, 648, 641, - 650, 0, 638, 639, 657, 639, 0, 639, 639, 0, - 646, 651, 645, 660, 657, 0, 649, 663, 662, 650, - 0, 0, 655, 653, 0, 668, 667, 674, 0, 667, - 0, 0, 0, 0, 662, 0, 677, 674, 679, 0, - - 0, 680, 677, 676, 681, 671, 673, 0, 680, 675, - 0, 0, 684, 0, 0, 0, 0, 0, 1245, 720, - 725, 727, 732, 738, 744 + 60, 248, 151, 85, 1241, 0, 1237, 152, 0, 0, + 32, 1200, 157, 242, 1199, 1202, 1201, 1192, 180, 1189, + 1181, 237, 1197, 204, 1196, 0, 1175, 1248, 330, 225, + 340, 203, 1210, 1173, 1196, 252, 245, 267, 1187, 1192, + 1174, 284, 268, 266, 1178, 1177, 1186, 291, 335, 1189, + 314, 292, 336, 314, 1186, 1170, 1184, 315, 1174, 1178, + + 1182, 1169, 1181, 1159, 1179, 0, 1159, 1177, 287, 1152, + 1169, 251, 1156, 1154, 1160, 1158, 1165, 1164, 0, 1164, + 1154, 345, 1154, 1146, 1161, 1151, 347, 1152, 346, 1151, + 1155, 351, 1159, 1156, 265, 344, 1147, 1156, 352, 1140, + 1149, 1149, 1135, 1134, 1135, 1136, 1248, 226, 1146, 1128, + 1141, 1144, 356, 1124, 1141, 1131, 1128, 1129, 1139, 1132, + 1131, 357, 1132, 361, 1121, 1134, 1131, 355, 1115, 1118, + 1161, 1248, 406, 0, 0, 1139, 1150, 1110, 1124, 1115, + 1118, 1116, 1115, 1121, 1110, 1111, 1119, 1118, 0, 1114, + 1096, 1112, 1089, 1108, 364, 1111, 1091, 1107, 1097, 1092, + + 1095, 380, 1087, 1087, 1089, 1098, 1093, 122, 1100, 1088, + 1094, 1094, 1092, 1093, 0, 1088, 1079, 1073, 295, 1091, + 1087, 0, 0, 1089, 1084, 1086, 1066, 1067, 1067, 1079, + 1072, 1073, 381, 0, 0, 0, 0, 1081, 1074, 1073, + 1059, 1074, 1070, 1075, 1070, 1068, 0, 1051, 1049, 0, + 377, 1061, 1063, 369, 1065, 1048, 1061, 1065, 1046, 381, + 1049, 1062, 1044, 1087, 1051, 1050, 1057, 1035, 1043, 1038, + 1034, 1034, 1039, 1045, 1033, 1041, 1046, 0, 1025, 1043, + 1026, 1032, 1033, 1038, 1036, 1018, 1019, 1028, 1027, 1018, + 0, 0, 1014, 1025, 1027, 1017, 0, 306, 1017, 1024, + + 1021, 1019, 1021, 1014, 397, 1013, 0, 0, 1016, 997, + 1012, 1007, 1019, 1018, 992, 1015, 1010, 989, 995, 996, + 999, 0, 0, 0, 1010, 991, 1003, 1004, 0, 1001, + 0, 0, 0, 987, 1001, 0, 995, 0, 987, 982, + 995, 987, 980, 996, 983, 983, 980, 984, 989, 968, + 981, 980, 983, 978, 980, 0, 967, 966, 978, 973, + 972, 960, 970, 967, 957, 971, 955, 0, 387, 963, + 967, 971, 962, 957, 956, 0, 963, 959, 959, 965, + 964, 958, 937, 0, 943, 0, 955, 956, 938, 942, + 944, 954, 941, 948, 0, 934, 942, 930, 943, 935, + + 956, 964, 920, 931, 927, 928, 0, 916, 926, 934, + 924, 918, 399, 923, 920, 929, 914, 0, 932, 917, + 930, 912, 924, 927, 950, 909, 908, 0, 903, 897, + 918, 919, 901, 0, 0, 915, 892, 911, 900, 911, + 893, 911, 0, 904, 909, 897, 888, 887, 902, 905, + 892, 896, 883, 889, 891, 877, 893, 897, 884, 888, + 0, 882, 888, 389, 0, 866, 883, 889, 884, 863, + 875, 872, 870, 868, 869, 877, 0, 396, 877, 864, + 863, 877, 0, 852, 868, 860, 873, 866, 871, 852, + 865, 862, 0, 843, 851, 876, 884, 858, 858, 861, + + 841, 408, 859, 847, 854, 0, 842, 851, 846, 853, + 852, 849, 830, 404, 849, 844, 829, 838, 838, 829, + 828, 823, 833, 830, 825, 819, 819, 837, 0, 835, + 815, 833, 0, 808, 827, 824, 825, 829, 819, 812, + 817, 820, 810, 804, 817, 809, 815, 815, 802, 812, + 802, 810, 810, 811, 796, 796, 0, 790, 784, 808, + 793, 799, 801, 799, 783, 790, 782, 781, 790, 782, + 777, 776, 0, 793, 774, 768, 787, 784, 771, 785, + 774, 787, 781, 794, 784, 774, 768, 763, 771, 770, + 769, 757, 760, 766, 760, 751, 760, 764, 766, 749, + + 755, 766, 751, 745, 750, 747, 744, 760, 433, 749, + 750, 743, 752, 742, 750, 745, 748, 748, 742, 730, + 749, 734, 742, 734, 736, 729, 0, 730, 0, 0, + 742, 0, 736, 0, 735, 735, 0, 737, 0, 0, + 734, 0, 722, 734, 715, 722, 727, 0, 726, 711, + 720, 712, 711, 710, 707, 713, 714, 717, 709, 698, + 700, 685, 690, 694, 52, 157, 325, 365, 0, 382, + 386, 387, 417, 417, 399, 410, 402, 0, 423, 419, + 417, 422, 423, 424, 415, 0, 417, 431, 424, 433, + 426, 0, 422, 451, 457, 437, 425, 427, 417, 437, + + 444, 438, 432, 442, 434, 444, 447, 450, 444, 0, + 449, 440, 454, 454, 0, 455, 449, 439, 0, 455, + 0, 0, 457, 442, 0, 483, 461, 0, 456, 457, + 0, 465, 453, 469, 455, 457, 469, 472, 466, 473, + 474, 457, 474, 499, 465, 476, 0, 469, 482, 0, + 479, 467, 472, 478, 485, 470, 0, 472, 473, 488, + 489, 479, 493, 496, 493, 515, 519, 491, 487, 502, + 0, 494, 496, 491, 503, 490, 502, 506, 507, 499, + 508, 0, 514, 508, 507, 496, 499, 498, 0, 514, + 0, 0, 520, 522, 523, 515, 511, 518, 524, 521, + + 526, 518, 527, 524, 513, 514, 530, 0, 533, 0, + 519, 519, 0, 535, 0, 534, 537, 0, 0, 524, + 529, 0, 531, 534, 534, 533, 0, 0, 529, 550, + 539, 545, 552, 549, 554, 538, 0, 0, 546, 543, + 554, 559, 546, 557, 543, 557, 0, 547, 0, 546, + 554, 555, 549, 570, 570, 567, 562, 0, 559, 570, + 575, 557, 571, 561, 0, 575, 0, 576, 0, 0, + 0, 0, 576, 583, 579, 571, 581, 569, 585, 585, + 0, 572, 567, 573, 569, 590, 0, 0, 592, 574, + 0, 579, 590, 595, 596, 587, 588, 585, 601, 587, + + 582, 589, 0, 0, 605, 591, 602, 607, 0, 609, + 599, 609, 613, 0, 614, 613, 0, 599, 599, 614, + 604, 603, 609, 601, 622, 614, 609, 617, 0, 627, + 628, 629, 0, 613, 627, 617, 0, 632, 618, 626, + 0, 630, 627, 0, 626, 638, 639, 0, 632, 641, + 642, 0, 630, 629, 0, 632, 646, 634, 652, 644, + 650, 651, 644, 653, 0, 641, 642, 660, 642, 0, + 642, 642, 0, 649, 654, 648, 663, 660, 0, 652, + 666, 665, 653, 0, 0, 658, 656, 0, 671, 670, + 677, 0, 670, 0, 0, 0, 0, 665, 0, 680, + + 677, 682, 0, 0, 683, 680, 679, 684, 674, 676, + 0, 683, 678, 0, 0, 687, 0, 0, 0, 0, + 0, 1248, 723, 728, 730, 735, 741, 747 } ; -static yyconst flex_int16_t yy_def[1026] = +static yyconst flex_int16_t yy_def[1029] = { 0, - 1019, 1, 1019, 1019, 1019, 1019, 1020, 1021, 1022, 1019, - 10, 1020, 11, 13, 1019, 13, 11, 11, 11, 11, + 1022, 1, 1022, 1022, 1022, 1022, 1023, 1024, 1025, 1022, + 10, 1023, 11, 13, 1022, 13, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 1019, 1019, 1020, 1023, 1023, 1022, 11, + 11, 11, 11, 1022, 1022, 1023, 1026, 1026, 1025, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 1019, 1024, 13, - 11, 1019, 11, 11, 11, 13, 13, 13, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 1022, 1027, 13, + 11, 1022, 11, 11, 11, 13, 13, 13, 11, 11, 11, 13, 11, 11, 11, 11, 11, 11, 13, 11, 11, 13, 13, 13, 11, 11, 11, 13, 11, 11, @@ -707,10 +708,10 @@ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 1019, 1019, 11, 11, + 11, 11, 11, 11, 11, 11, 1022, 1022, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 1025, 1019, 1024, 71, 1020, 11, 11, 11, 11, 11, + 1028, 1022, 1027, 71, 1023, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 11, 11, 11, 11, 11, @@ -720,7 +721,7 @@ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 1023, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 1026, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, @@ -803,11 +804,11 @@ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 0, 1019, - 1019, 1019, 1019, 1019, 1019 + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 0, 1022, 1022, 1022, 1022, 1022, 1022 } ; -static yyconst flex_int16_t yy_nxt[1305] = +static yyconst flex_int16_t yy_nxt[1308] = { 0, 4, 5, 6, 5, 7, 8, 4, 9, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 4, @@ -857,7 +858,7 @@ 50, 171, 171, 171, 346, 360, 744, 309, 347, 365, 50, 467, 371, 468, 554, 171, 171, 745, 361, 413, 746, 316, 372, 348, 507, 508, 50, 509, 414, 747, - 590, 415, 555, 567, 602, 568, 591, 693, 603, 694, + 590, 415, 555, 567, 602, 568, 591, 694, 603, 695, 748, 416, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, @@ -867,16 +868,16 @@ 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, - 827, 828, 829, 830, 832, 833, 831, 834, 835, 836, + 827, 828, 829, 830, 831, 832, 833, 835, 836, 834, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, - 847, 848, 849, 850, 851, 852, 854, 855, 853, 856, - 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, + 847, 848, 849, 850, 851, 852, 853, 854, 855, 857, + 858, 856, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, - 907, 909, 910, 911, 908, 912, 913, 914, 915, 916, + 907, 908, 909, 910, 912, 913, 914, 911, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, @@ -888,74 +889,74 @@ 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, - 1017, 1018, 46, 740, 739, 46, 48, 48, 738, 737, - 48, 49, 49, 47, 47, 47, 736, 47, 173, 173, - 173, 173, 173, 173, 171, 171, 171, 171, 171, 171, - 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, - 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, - 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, - 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, - 695, 692, 691, 690, 689, 688, 687, 686, 685, 684, - - 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, - 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, - 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, - 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, - 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, - 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, - 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, - 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, - 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, - 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, - - 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, - 569, 566, 565, 564, 563, 562, 561, 560, 559, 558, - 557, 556, 553, 552, 551, 550, 549, 548, 547, 546, - 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, - 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, - 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, - 515, 514, 513, 512, 511, 510, 506, 505, 504, 503, - 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, - 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, - 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, - - 472, 471, 470, 469, 466, 465, 464, 463, 462, 461, - 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, - 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, - 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, - 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, - 420, 419, 418, 417, 412, 411, 410, 409, 408, 407, - 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, - 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, - 384, 383, 382, 381, 380, 379, 378, 377, 376, 1019, - 375, 374, 373, 370, 369, 368, 367, 366, 363, 362, - - 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, - 349, 345, 344, 343, 342, 341, 340, 339, 338, 337, - 336, 335, 332, 331, 330, 329, 328, 327, 326, 325, - 324, 321, 320, 319, 318, 317, 315, 314, 313, 312, - 311, 310, 308, 307, 306, 305, 304, 303, 302, 301, - 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, - 172, 290, 289, 286, 285, 284, 281, 278, 277, 276, - 275, 274, 273, 272, 271, 268, 267, 266, 265, 263, - 262, 261, 260, 259, 258, 257, 254, 253, 248, 247, - 244, 243, 240, 237, 236, 235, 234, 230, 229, 228, - - 227, 226, 225, 224, 223, 220, 219, 216, 215, 214, - 213, 212, 211, 210, 209, 208, 206, 205, 204, 198, - 192, 191, 190, 183, 182, 181, 178, 177, 176, 170, - 169, 166, 163, 162, 159, 158, 157, 156, 151, 147, - 45, 72, 45, 1019, 3, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, + 1017, 1018, 1019, 1020, 1021, 46, 740, 739, 46, 48, + 48, 738, 737, 48, 49, 49, 47, 47, 47, 736, + 47, 173, 173, 173, 173, 173, 173, 171, 171, 171, + 171, 171, 171, 735, 734, 733, 732, 731, 730, 729, + 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, + 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, + 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, + 698, 697, 696, 693, 692, 691, 690, 689, 688, 687, + + 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, + 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, + 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, + 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, + 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, + 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, + 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, + 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, + 606, 605, 604, 601, 600, 599, 598, 597, 596, 595, + 594, 593, 592, 589, 588, 587, 586, 585, 584, 583, + + 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, + 572, 571, 570, 569, 566, 565, 564, 563, 562, 561, + 560, 559, 558, 557, 556, 553, 552, 551, 550, 549, + 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, + 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, + 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, + 518, 517, 516, 515, 514, 513, 512, 511, 510, 506, + 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, + 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, + 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, + + 475, 474, 473, 472, 471, 470, 469, 466, 465, 464, + 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, + 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, + 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, + 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, + 423, 422, 421, 420, 419, 418, 417, 412, 411, 410, + 409, 408, 407, 404, 403, 402, 401, 400, 399, 398, + 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, + 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, + 377, 376, 1022, 375, 374, 373, 370, 369, 368, 367, + + 366, 363, 362, 359, 358, 357, 356, 355, 354, 353, + 352, 351, 350, 349, 345, 344, 343, 342, 341, 340, + 339, 338, 337, 336, 335, 332, 331, 330, 329, 328, + 327, 326, 325, 324, 321, 320, 319, 318, 317, 315, + 314, 313, 312, 311, 310, 308, 307, 306, 305, 304, + 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, + 293, 292, 291, 172, 290, 289, 286, 285, 284, 281, + 278, 277, 276, 275, 274, 273, 272, 271, 268, 267, + 266, 265, 263, 262, 261, 260, 259, 258, 257, 254, + 253, 248, 247, 244, 243, 240, 237, 236, 235, 234, + + 230, 229, 228, 227, 226, 225, 224, 223, 220, 219, + 216, 215, 214, 213, 212, 211, 210, 209, 208, 206, + 205, 204, 198, 192, 191, 190, 183, 182, 181, 178, + 177, 176, 170, 169, 166, 163, 162, 159, 158, 157, + 156, 151, 147, 45, 72, 45, 1022, 3, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, - 1019, 1019, 1019, 1019 + 1022, 1022, 1022, 1022, 1022, 1022, 1022 } ; -static yyconst flex_int16_t yy_chk[1305] = +static yyconst flex_int16_t yy_chk[1308] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -965,7 +966,7 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 12, 5, 8, 8, 12, 19, 27, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 18, 41, - 33, 14, 51, 19, 27, 51, 44, 18, 44, 666, + 33, 14, 51, 19, 27, 51, 44, 18, 44, 665, 8, 8, 10, 41, 33, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 14, 33, 10, @@ -977,7 +978,7 @@ 11, 11, 11, 30, 11, 11, 208, 16, 11, 11, 43, 48, 11, 13, 13, 13, 13, 13, 13, 13, 13, 30, 20, 13, 13, 13, 13, 40, 32, 28, - 667, 24, 13, 16, 53, 13, 13, 13, 13, 13, + 666, 24, 13, 16, 53, 13, 13, 13, 13, 13, 13, 22, 24, 23, 32, 40, 32, 28, 43, 24, 53, 28, 22, 72, 23, 28, 22, 59, 13, 21, @@ -996,114 +997,114 @@ 69, 69, 69, 69, 82, 69, 69, 69, 298, 88, 82, 88, 92, 298, 94, 98, 219, 91, 92, 69, 69, 71, 71, 71, 71, 71, 71, 71, 71, 91, - 98, 71, 71, 71, 71, 89, 93, 94, 669, 89, + 98, 71, 71, 71, 71, 89, 93, 94, 667, 89, 94, 98, 93, 71, 71, 71, 71, 71, 71, 89, 122, 122, 127, 129, 132, 139, 89, 136, 136, 153, 162, 89, 93, 129, 195, 122, 164, 164, 168, 168, 127, 153, 132, 162, 254, 139, 173, 173, 173, 173, - 202, 173, 173, 173, 233, 251, 670, 195, 233, 254, - 195, 369, 260, 369, 464, 173, 173, 671, 251, 305, - 672, 202, 260, 233, 413, 413, 202, 413, 305, 673, + 202, 173, 173, 173, 233, 251, 668, 195, 233, 254, + 195, 369, 260, 369, 464, 173, 173, 670, 251, 305, + 671, 202, 260, 233, 413, 413, 202, 413, 305, 672, 502, 305, 464, 478, 514, 478, 502, 609, 514, 609, - 674, 305, 675, 676, 678, 679, 680, 681, 682, 683, - 684, 686, 687, 688, 689, 690, 692, 693, 694, 695, - 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, - 706, 707, 708, 710, 711, 712, 713, 715, 716, 717, - 719, 722, 724, 725, 727, 728, 730, 731, 732, 733, + 673, 305, 674, 675, 676, 677, 679, 680, 681, 682, + 683, 684, 685, 687, 688, 689, 690, 691, 693, 694, + 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, + 705, 706, 707, 708, 709, 711, 712, 713, 714, 716, + 717, 718, 720, 723, 724, 726, 727, 729, 730, 732, + + 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, + 743, 744, 745, 746, 748, 749, 751, 752, 753, 754, + 755, 756, 758, 759, 760, 761, 762, 763, 764, 765, + 766, 767, 768, 769, 770, 772, 773, 774, 775, 773, + 776, 777, 778, 779, 780, 781, 783, 784, 785, 786, + 787, 788, 790, 793, 794, 795, 796, 797, 798, 799, + 800, 798, 801, 802, 803, 804, 805, 806, 807, 809, + 811, 812, 814, 816, 817, 820, 821, 823, 824, 825, + 826, 829, 830, 831, 832, 833, 834, 835, 836, 839, + 840, 841, 842, 843, 844, 845, 846, 848, 850, 851, + + 852, 853, 854, 855, 856, 857, 859, 860, 861, 862, + 863, 864, 866, 868, 873, 874, 875, 868, 876, 877, + 878, 879, 880, 882, 883, 884, 885, 886, 889, 890, + 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, + 902, 905, 906, 907, 908, 910, 911, 912, 913, 913, + 915, 916, 918, 919, 920, 921, 922, 923, 924, 925, + 926, 927, 928, 930, 931, 932, 934, 935, 936, 938, + 939, 940, 942, 943, 945, 946, 947, 949, 950, 951, + 953, 954, 956, 957, 958, 959, 960, 961, 962, 963, + 964, 966, 967, 968, 969, 971, 972, 974, 975, 976, + + 977, 978, 980, 981, 982, 983, 986, 987, 989, 990, + 991, 993, 998, 1000, 1001, 1002, 1005, 1006, 1007, 1008, + 1009, 1010, 1012, 1013, 1016, 1023, 664, 663, 1023, 1024, + 1024, 662, 661, 1024, 1025, 1025, 1026, 1026, 1026, 660, + 1026, 1027, 1027, 1027, 1027, 1027, 1027, 1028, 1028, 1028, + 1028, 1028, 1028, 659, 658, 657, 656, 655, 654, 653, + 652, 651, 650, 649, 647, 646, 645, 644, 643, 641, + 638, 636, 635, 633, 631, 628, 626, 625, 624, 623, + 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, + 612, 611, 610, 608, 607, 606, 605, 604, 603, 602, - 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, - 744, 746, 747, 749, 750, 751, 752, 753, 754, 756, - 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, - 767, 768, 770, 771, 772, 773, 771, 774, 775, 776, - 777, 778, 779, 781, 782, 783, 784, 785, 786, 788, - 790, 791, 792, 793, 794, 795, 796, 797, 795, 798, - 799, 800, 801, 802, 803, 804, 806, 808, 809, 811, - 813, 814, 817, 818, 820, 821, 822, 823, 826, 827, - 828, 829, 830, 831, 832, 833, 836, 837, 838, 839, - 840, 841, 842, 843, 845, 847, 848, 849, 850, 851, - - 852, 853, 854, 856, 857, 858, 859, 860, 861, 863, - 865, 870, 871, 872, 865, 873, 874, 875, 876, 877, - 879, 880, 881, 882, 883, 886, 887, 889, 890, 891, - 892, 893, 894, 895, 896, 897, 898, 899, 902, 903, - 904, 905, 907, 908, 909, 910, 910, 912, 913, 915, - 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, - 927, 928, 929, 931, 932, 933, 935, 936, 937, 939, - 940, 942, 943, 944, 946, 947, 948, 950, 951, 953, - 954, 955, 956, 957, 958, 959, 960, 961, 963, 964, - 965, 966, 968, 969, 971, 972, 973, 974, 975, 977, - - 978, 979, 980, 983, 984, 986, 987, 988, 990, 995, - 997, 998, 999, 1002, 1003, 1004, 1005, 1006, 1007, 1009, - 1010, 1013, 1020, 665, 664, 1020, 1021, 1021, 663, 662, - 1021, 1022, 1022, 1023, 1023, 1023, 661, 1023, 1024, 1024, - 1024, 1024, 1024, 1024, 1025, 1025, 1025, 1025, 1025, 1025, - 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, - 650, 649, 648, 646, 645, 644, 643, 641, 638, 636, - 635, 633, 631, 628, 626, 625, 624, 623, 622, 621, - 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, - 610, 608, 607, 606, 605, 604, 603, 602, 601, 600, - - 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, - 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, - 579, 578, 577, 576, 575, 574, 572, 571, 570, 569, - 568, 567, 566, 565, 564, 563, 562, 560, 559, 558, - 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, - 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, - 536, 535, 534, 532, 531, 530, 528, 527, 526, 525, - 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, - 513, 512, 511, 510, 509, 508, 507, 505, 504, 503, - 501, 500, 499, 498, 497, 496, 495, 494, 492, 491, - - 490, 489, 488, 487, 486, 485, 484, 482, 481, 480, - 479, 476, 475, 474, 473, 472, 471, 470, 469, 468, - 467, 466, 463, 462, 460, 459, 458, 457, 456, 455, - 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, - 444, 442, 441, 440, 439, 438, 437, 436, 433, 432, - 431, 430, 429, 427, 426, 425, 424, 423, 422, 421, - 420, 419, 417, 416, 415, 414, 412, 411, 410, 409, - 408, 406, 405, 404, 403, 402, 401, 400, 399, 398, - 397, 396, 394, 393, 392, 391, 390, 389, 388, 387, - 385, 383, 382, 381, 380, 379, 378, 377, 375, 374, - - 373, 372, 371, 370, 367, 366, 365, 364, 363, 362, - 361, 360, 359, 358, 357, 355, 354, 353, 352, 351, - 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, - 340, 339, 337, 335, 334, 330, 328, 327, 326, 325, - 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, - 311, 310, 309, 306, 304, 303, 302, 301, 300, 299, - 296, 295, 294, 293, 290, 289, 288, 287, 286, 285, - 284, 283, 282, 281, 280, 279, 277, 276, 275, 274, - 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, - 263, 262, 261, 259, 258, 257, 256, 255, 253, 252, - - 249, 248, 246, 245, 244, 243, 242, 241, 240, 239, - 238, 232, 231, 230, 229, 228, 227, 226, 225, 224, - 221, 220, 218, 217, 216, 214, 213, 212, 211, 210, - 209, 207, 206, 205, 204, 203, 201, 200, 199, 198, - 197, 196, 194, 193, 192, 191, 190, 188, 187, 186, - 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, - 171, 170, 169, 167, 166, 165, 163, 161, 160, 159, - 158, 157, 156, 155, 154, 152, 151, 150, 149, 146, - 145, 144, 143, 142, 141, 140, 138, 137, 134, 133, - 131, 130, 128, 126, 125, 124, 123, 121, 120, 118, - - 117, 116, 115, 114, 113, 111, 110, 108, 107, 105, - 104, 103, 102, 101, 100, 99, 97, 96, 95, 90, - 87, 86, 85, 81, 80, 79, 75, 74, 73, 67, - 65, 63, 61, 60, 58, 57, 56, 55, 52, 47, - 45, 17, 6, 3, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, + 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, + 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, + 581, 580, 579, 578, 577, 576, 575, 574, 572, 571, + 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, + 560, 559, 558, 556, 555, 554, 553, 552, 551, 550, + 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, + 539, 538, 537, 536, 535, 534, 532, 531, 530, 528, + 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, + 517, 516, 515, 513, 512, 511, 510, 509, 508, 507, + 505, 504, 503, 501, 500, 499, 498, 497, 496, 495, + + 494, 492, 491, 490, 489, 488, 487, 486, 485, 484, + 482, 481, 480, 479, 476, 475, 474, 473, 472, 471, + 470, 469, 468, 467, 466, 463, 462, 460, 459, 458, + 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, + 447, 446, 445, 444, 442, 441, 440, 439, 438, 437, + 436, 433, 432, 431, 430, 429, 427, 426, 425, 424, + 423, 422, 421, 420, 419, 417, 416, 415, 414, 412, + 411, 410, 409, 408, 406, 405, 404, 403, 402, 401, + 400, 399, 398, 397, 396, 394, 393, 392, 391, 390, + 389, 388, 387, 385, 383, 382, 381, 380, 379, 378, + + 377, 375, 374, 373, 372, 371, 370, 367, 366, 365, + 364, 363, 362, 361, 360, 359, 358, 357, 355, 354, + 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, + 343, 342, 341, 340, 339, 337, 335, 334, 330, 328, + 327, 326, 325, 321, 320, 319, 318, 317, 316, 315, + 314, 313, 312, 311, 310, 309, 306, 304, 303, 302, + 301, 300, 299, 296, 295, 294, 293, 290, 289, 288, + 287, 286, 285, 284, 283, 282, 281, 280, 279, 277, + 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, + 266, 265, 264, 263, 262, 261, 259, 258, 257, 256, + + 255, 253, 252, 249, 248, 246, 245, 244, 243, 242, + 241, 240, 239, 238, 232, 231, 230, 229, 228, 227, + 226, 225, 224, 221, 220, 218, 217, 216, 214, 213, + 212, 211, 210, 209, 207, 206, 205, 204, 203, 201, + 200, 199, 198, 197, 196, 194, 193, 192, 191, 190, + 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, + 178, 177, 176, 171, 170, 169, 167, 166, 165, 163, + 161, 160, 159, 158, 157, 156, 155, 154, 152, 151, + 150, 149, 146, 145, 144, 143, 142, 141, 140, 138, + 137, 134, 133, 131, 130, 128, 126, 125, 124, 123, + + 121, 120, 118, 117, 116, 115, 114, 113, 111, 110, + 108, 107, 105, 104, 103, 102, 101, 100, 99, 97, + 96, 95, 90, 87, 86, 85, 81, 80, 79, 75, + 74, 73, 67, 65, 63, 61, 60, 58, 57, 56, + 55, 52, 47, 45, 17, 6, 3, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, + 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, - 1019, 1019, 1019, 1019 + 1022, 1022, 1022, 1022, 1022, 1022, 1022 } ; -static yyconst flex_int16_t yy_rule_linenum[182] = +static yyconst flex_int16_t yy_rule_linenum[183] = { 0, 42, 43, 45, 48, 49, 50, 51, 52, 54, 55, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, @@ -1111,20 +1112,20 @@ 80, 82, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 114, - 115, 116, 118, 119, 120, 121, 122, 124, 126, 127, - 128, 129, 130, 131, 133, 134, 135, 136, 137, 138, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 115, 116, 118, 119, 120, 121, 122, 123, 125, 127, + 128, 129, 130, 131, 132, 134, 135, 136, 137, 138, + 139, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 170, 171, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 238, 239, 240, 241, 244, 245, - 246 + 231, 232, 233, 234, 235, 239, 240, 241, 242, 245, + 246, 247 } ; /* The intent behind this definition is that it'll catch @@ -1160,7 +1161,7 @@ typedef CO::BisonParser::token tok; #line 31 "../s/cmdoptions.l" # define YY_USER_ACTION yylloc->columns (yyleng); -#line 1164 "../bisonflex/cmdoptions.yy.cpp" +#line 1165 "../bisonflex/cmdoptions.yy.cpp" #define INITIAL 0 @@ -1326,7 +1327,7 @@ -#line 1330 "../bisonflex/cmdoptions.yy.cpp" +#line 1331 "../bisonflex/cmdoptions.yy.cpp" if ( !(yy_init) ) { @@ -1389,13 +1390,13 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1020 ) + if ( yy_current_state >= 1023 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 1019 ); + while ( yy_current_state != 1022 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1414,12 +1415,12 @@ { if ( yy_act == 0 ) std::cerr << "--scanner backing up\n"; - else if ( yy_act < 182 ) + else if ( yy_act < 183 ) std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << "(\"" << yytext << "\")\n"; - else if ( yy_act == 182 ) - std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; else if ( yy_act == 183 ) + std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; + else if ( yy_act == 184 ) std::cerr << "--(end of buffer or a NUL)\n"; else std::cerr << "--EOF (start condition " << YY_START << ")\n"; @@ -1773,73 +1774,73 @@ YY_BREAK case 68: YY_RULE_SETUP -#line 124 "../s/cmdoptions.l" -return tok::_R; +#line 123 "../s/cmdoptions.l" +return tok::VERSALNET; YY_BREAK case 69: YY_RULE_SETUP -#line 126 "../s/cmdoptions.l" -return tok::_READ; +#line 125 "../s/cmdoptions.l" +return tok::_R; YY_BREAK case 70: YY_RULE_SETUP #line 127 "../s/cmdoptions.l" -return tok::READ_BH; +return tok::_READ; YY_BREAK case 71: YY_RULE_SETUP #line 128 "../s/cmdoptions.l" -return tok::READ_IHT; +return tok::READ_BH; YY_BREAK case 72: YY_RULE_SETUP #line 129 "../s/cmdoptions.l" -return tok::READ_IH; +return tok::READ_IHT; YY_BREAK case 73: YY_RULE_SETUP #line 130 "../s/cmdoptions.l" -return tok::READ_PHT; +return tok::READ_IH; YY_BREAK case 74: YY_RULE_SETUP #line 131 "../s/cmdoptions.l" -return tok::READ_AC; +return tok::READ_PHT; YY_BREAK case 75: YY_RULE_SETUP -#line 133 "../s/cmdoptions.l" -return tok::_VERIFYKDF; +#line 132 "../s/cmdoptions.l" +return tok::READ_AC; YY_BREAK case 76: YY_RULE_SETUP #line 134 "../s/cmdoptions.l" -return tok::_VERIFY; +return tok::_VERIFYKDF; YY_BREAK case 77: YY_RULE_SETUP #line 135 "../s/cmdoptions.l" -return tok::_ZYNQMPENCRDUMP; +return tok::_VERIFY; YY_BREAK case 78: YY_RULE_SETUP #line 136 "../s/cmdoptions.l" -return tok::_NOAUTHBLOCKS; +return tok::_ZYNQMPENCRDUMP; YY_BREAK case 79: YY_RULE_SETUP #line 137 "../s/cmdoptions.l" -return tok::_ZYNQMPES1; +return tok::_NOAUTHBLOCKS; YY_BREAK case 80: YY_RULE_SETUP #line 138 "../s/cmdoptions.l" -return tok::_OVERLAYCDO; +return tok::_ZYNQMPES1; YY_BREAK case 81: YY_RULE_SETUP -#line 140 "../s/cmdoptions.l" -return tok::_H; +#line 139 "../s/cmdoptions.l" +return tok::_OVERLAYCDO; YY_BREAK case 82: YY_RULE_SETUP @@ -1849,122 +1850,122 @@ case 83: YY_RULE_SETUP #line 142 "../s/cmdoptions.l" -return tok::HBIFHELP; +return tok::_H; YY_BREAK case 84: YY_RULE_SETUP #line 143 "../s/cmdoptions.l" -return tok::HARCH; +return tok::HBIFHELP; YY_BREAK case 85: YY_RULE_SETUP #line 144 "../s/cmdoptions.l" -return tok::HIMAGE; +return tok::HARCH; YY_BREAK case 86: YY_RULE_SETUP #line 145 "../s/cmdoptions.l" -return tok::HFILL; +return tok::HIMAGE; YY_BREAK case 87: YY_RULE_SETUP #line 146 "../s/cmdoptions.l" -return tok::HO; +return tok::HFILL; YY_BREAK case 88: YY_RULE_SETUP #line 147 "../s/cmdoptions.l" -return tok::HP; +return tok::HO; YY_BREAK case 89: YY_RULE_SETUP #line 148 "../s/cmdoptions.l" -return tok::HW; +return tok::HP; YY_BREAK case 90: YY_RULE_SETUP #line 149 "../s/cmdoptions.l" -return tok::HEFUSEPPKBITS; +return tok::HW; YY_BREAK case 91: YY_RULE_SETUP #line 150 "../s/cmdoptions.l" -return tok::HGENHASHES; +return tok::HEFUSEPPKBITS; YY_BREAK case 92: YY_RULE_SETUP #line 151 "../s/cmdoptions.l" -return tok::HLEGACY; +return tok::HGENHASHES; YY_BREAK case 93: YY_RULE_SETUP #line 152 "../s/cmdoptions.l" -return tok::HPADHDR; +return tok::HLEGACY; YY_BREAK case 94: YY_RULE_SETUP #line 153 "../s/cmdoptions.l" -return tok::H_SPKSIGN; +return tok::HPADHDR; YY_BREAK case 95: YY_RULE_SETUP #line 154 "../s/cmdoptions.l" -return tok::HPACKAGE; +return tok::H_SPKSIGN; YY_BREAK case 96: YY_RULE_SETUP #line 155 "../s/cmdoptions.l" -return tok::HENCRYPT; +return tok::HPACKAGE; YY_BREAK case 97: YY_RULE_SETUP #line 156 "../s/cmdoptions.l" -return tok::HGENKEYS; +return tok::HENCRYPT; YY_BREAK case 98: YY_RULE_SETUP #line 157 "../s/cmdoptions.l" -return tok::HDQSPI; +return tok::HGENKEYS; YY_BREAK case 99: YY_RULE_SETUP #line 158 "../s/cmdoptions.l" -return tok::HLOG; +return tok::HDQSPI; YY_BREAK case 100: YY_RULE_SETUP #line 159 "../s/cmdoptions.l" -return tok::HZYNQMPES1; +return tok::HLOG; YY_BREAK case 101: YY_RULE_SETUP #line 160 "../s/cmdoptions.l" -return tok::HPROCESSBIT; +return tok::HZYNQMPES1; YY_BREAK case 102: YY_RULE_SETUP #line 161 "../s/cmdoptions.l" -return tok::HNONBOOTING; +return tok::HPROCESSBIT; YY_BREAK case 103: YY_RULE_SETUP #line 162 "../s/cmdoptions.l" -return tok::HENCRDUMP; +return tok::HNONBOOTING; YY_BREAK case 104: YY_RULE_SETUP #line 163 "../s/cmdoptions.l" -return tok::HVERIFY; +return tok::HENCRDUMP; YY_BREAK case 105: YY_RULE_SETUP #line 164 "../s/cmdoptions.l" -return tok::HVERIFYKDF; +return tok::HVERIFY; YY_BREAK case 106: YY_RULE_SETUP #line 165 "../s/cmdoptions.l" -return tok::HSECUREDEBUG; +return tok::HVERIFYKDF; YY_BREAK case 107: YY_RULE_SETUP @@ -1974,187 +1975,187 @@ case 108: YY_RULE_SETUP #line 167 "../s/cmdoptions.l" -return tok::HREAD; +return tok::HSECUREDEBUG; YY_BREAK case 109: YY_RULE_SETUP #line 168 "../s/cmdoptions.l" -return tok::HDUMP; +return tok::HREAD; YY_BREAK case 110: YY_RULE_SETUP #line 169 "../s/cmdoptions.l" -return tok::HDUMPDIR; +return tok::HDUMP; YY_BREAK case 111: YY_RULE_SETUP #line 170 "../s/cmdoptions.l" -return tok::HOVLCDO; +return tok::HDUMPDIR; YY_BREAK case 112: YY_RULE_SETUP -#line 172 "../s/cmdoptions.l" -return tok::H_BIF_AARCH32; +#line 171 "../s/cmdoptions.l" +return tok::HOVLCDO; YY_BREAK case 113: YY_RULE_SETUP #line 173 "../s/cmdoptions.l" -return tok::H_BIF_BIGENDIAN; +return tok::H_BIF_AARCH32; YY_BREAK case 114: YY_RULE_SETUP #line 174 "../s/cmdoptions.l" -return tok::H_BIF_BOOTCONFIG; +return tok::H_BIF_BIGENDIAN; YY_BREAK case 115: YY_RULE_SETUP #line 175 "../s/cmdoptions.l" -return tok::H_BIF_COPY; +return tok::H_BIF_BOOTCONFIG; YY_BREAK case 116: YY_RULE_SETUP #line 176 "../s/cmdoptions.l" -return tok::H_BIF_CORE; +return tok::H_BIF_COPY; YY_BREAK case 117: YY_RULE_SETUP #line 177 "../s/cmdoptions.l" -return tok::H_BIF_DELAY_HANDOFF; +return tok::H_BIF_CORE; YY_BREAK case 118: YY_RULE_SETUP #line 178 "../s/cmdoptions.l" -return tok::H_BIF_DELAY_LOAD; +return tok::H_BIF_DELAY_HANDOFF; YY_BREAK case 119: YY_RULE_SETUP #line 179 "../s/cmdoptions.l" -return tok::H_BIF_FILE; +return tok::H_BIF_DELAY_LOAD; YY_BREAK case 120: YY_RULE_SETUP #line 180 "../s/cmdoptions.l" -return tok::H_BIF_ID; +return tok::H_BIF_FILE; YY_BREAK case 121: YY_RULE_SETUP #line 181 "../s/cmdoptions.l" -return tok::H_BIF_IMAGE; +return tok::H_BIF_ID; YY_BREAK case 122: YY_RULE_SETUP #line 182 "../s/cmdoptions.l" -return tok::H_BIF_METAHDR; +return tok::H_BIF_IMAGE; YY_BREAK case 123: YY_RULE_SETUP #line 183 "../s/cmdoptions.l" -return tok::H_BIF_NAME; +return tok::H_BIF_METAHDR; YY_BREAK case 124: YY_RULE_SETUP #line 184 "../s/cmdoptions.l" -return tok::H_BIF_PARTITION; +return tok::H_BIF_NAME; YY_BREAK case 125: YY_RULE_SETUP #line 185 "../s/cmdoptions.l" -return tok::H_BIF_PARENTID; +return tok::H_BIF_PARTITION; YY_BREAK case 126: YY_RULE_SETUP #line 186 "../s/cmdoptions.l" -return tok::H_BIF_SLR; +return tok::H_BIF_PARENTID; YY_BREAK case 127: YY_RULE_SETUP #line 187 "../s/cmdoptions.l" -return tok::H_BIF_TYPE; +return tok::H_BIF_SLR; YY_BREAK case 128: YY_RULE_SETUP #line 188 "../s/cmdoptions.l" -return tok::H_BIF_KEYSRC; +return tok::H_BIF_TYPE; YY_BREAK case 129: YY_RULE_SETUP #line 189 "../s/cmdoptions.l" -return tok::H_BIF_INIT; +return tok::H_BIF_KEYSRC; YY_BREAK case 130: YY_RULE_SETUP #line 190 "../s/cmdoptions.l" -return tok::H_BIF_UDFBH; +return tok::H_BIF_INIT; YY_BREAK case 131: YY_RULE_SETUP #line 191 "../s/cmdoptions.l" -return tok::H_BIF_AES; +return tok::H_BIF_UDFBH; YY_BREAK case 132: YY_RULE_SETUP #line 192 "../s/cmdoptions.l" -return tok::H_BIF_PPK; +return tok::H_BIF_AES; YY_BREAK case 133: YY_RULE_SETUP #line 193 "../s/cmdoptions.l" -return tok::H_BIF_PSK; +return tok::H_BIF_PPK; YY_BREAK case 134: YY_RULE_SETUP #line 194 "../s/cmdoptions.l" -return tok::H_BIF_SPK; +return tok::H_BIF_PSK; YY_BREAK case 135: YY_RULE_SETUP #line 195 "../s/cmdoptions.l" -return tok::H_BIF_SSK; +return tok::H_BIF_SPK; YY_BREAK case 136: YY_RULE_SETUP #line 196 "../s/cmdoptions.l" -return tok::H_BIF_SPKSIGN; +return tok::H_BIF_SSK; YY_BREAK case 137: YY_RULE_SETUP #line 197 "../s/cmdoptions.l" -return tok::H_BIF_HDRSIGN; +return tok::H_BIF_SPKSIGN; YY_BREAK case 138: YY_RULE_SETUP #line 198 "../s/cmdoptions.l" -return tok::H_BIF_BOOTIMAGE; +return tok::H_BIF_HDRSIGN; YY_BREAK case 139: YY_RULE_SETUP #line 199 "../s/cmdoptions.l" -return tok::H_BIF_BL; +return tok::H_BIF_BOOTIMAGE; YY_BREAK case 140: YY_RULE_SETUP #line 200 "../s/cmdoptions.l" -return tok::H_BIF_ENCR; +return tok::H_BIF_BL; YY_BREAK case 141: YY_RULE_SETUP #line 201 "../s/cmdoptions.l" -return tok::H_BIF_PID; +return tok::H_BIF_ENCR; YY_BREAK case 142: YY_RULE_SETUP #line 202 "../s/cmdoptions.l" -return tok::H_BIF_AUTH; +return tok::H_BIF_PID; YY_BREAK case 143: YY_RULE_SETUP #line 203 "../s/cmdoptions.l" -return tok::H_BIF_CHKSM; +return tok::H_BIF_AUTH; YY_BREAK case 144: YY_RULE_SETUP #line 204 "../s/cmdoptions.l" -return tok::H_BIF_POWNER; +return tok::H_BIF_CHKSM; YY_BREAK case 145: YY_RULE_SETUP @@ -2164,190 +2165,195 @@ case 146: YY_RULE_SETUP #line 206 "../s/cmdoptions.l" -return tok::H_BIF_PRESIGN; +return tok::H_BIF_POWNER; YY_BREAK case 147: YY_RULE_SETUP #line 207 "../s/cmdoptions.l" -return tok::H_BIF_UDF; +return tok::H_BIF_PRESIGN; YY_BREAK case 148: YY_RULE_SETUP #line 208 "../s/cmdoptions.l" -return tok::H_BIF_XIP; +return tok::H_BIF_UDF; YY_BREAK case 149: YY_RULE_SETUP #line 209 "../s/cmdoptions.l" -return tok::H_BIF_ALIGN; +return tok::H_BIF_XIP; YY_BREAK case 150: YY_RULE_SETUP #line 210 "../s/cmdoptions.l" -return tok::H_BIF_OFFSET; +return tok::H_BIF_ALIGN; YY_BREAK case 151: YY_RULE_SETUP #line 211 "../s/cmdoptions.l" -return tok::H_BIF_RES; +return tok::H_BIF_OFFSET; YY_BREAK case 152: YY_RULE_SETUP #line 212 "../s/cmdoptions.l" -return tok::H_BIF_LOAD; +return tok::H_BIF_RES; YY_BREAK case 153: YY_RULE_SETUP #line 213 "../s/cmdoptions.l" -return tok::H_BIF_STARTUP; +return tok::H_BIF_LOAD; YY_BREAK case 154: YY_RULE_SETUP #line 214 "../s/cmdoptions.l" -return tok::H_BIF_KEYSRCENCR; +return tok::H_BIF_STARTUP; YY_BREAK case 155: YY_RULE_SETUP #line 215 "../s/cmdoptions.l" -return tok::H_BIF_FSBLCFG; +return tok::H_BIF_KEYSRCENCR; YY_BREAK case 156: YY_RULE_SETUP #line 216 "../s/cmdoptions.l" -return tok::H_BIF_BOOTDEV; +return tok::H_BIF_FSBLCFG; YY_BREAK case 157: YY_RULE_SETUP #line 217 "../s/cmdoptions.l" -return tok::H_BIF_DESTCPU; +return tok::H_BIF_BOOTDEV; YY_BREAK case 158: YY_RULE_SETUP #line 218 "../s/cmdoptions.l" -return tok::H_BIF_DESTDEV; +return tok::H_BIF_DESTCPU; YY_BREAK case 159: YY_RULE_SETUP #line 219 "../s/cmdoptions.l" -return tok::H_BIF_EL; +return tok::H_BIF_DESTDEV; YY_BREAK case 160: YY_RULE_SETUP #line 220 "../s/cmdoptions.l" -return tok::H_BIF_TZ; +return tok::H_BIF_EL; YY_BREAK case 161: YY_RULE_SETUP #line 221 "../s/cmdoptions.l" -return tok::H_BIF_AUTHPARAM; +return tok::H_BIF_TZ; YY_BREAK case 162: YY_RULE_SETUP #line 222 "../s/cmdoptions.l" -return tok::H_BIF_BHKEY; +return tok::H_BIF_AUTHPARAM; YY_BREAK case 163: YY_RULE_SETUP #line 223 "../s/cmdoptions.l" -return tok::H_BIF_PFW; +return tok::H_BIF_BHKEY; YY_BREAK case 164: YY_RULE_SETUP #line 224 "../s/cmdoptions.l" -return tok::H_BIF_BLOCKS; +return tok::H_BIF_PFW; YY_BREAK case 165: YY_RULE_SETUP #line 225 "../s/cmdoptions.l" -return tok::H_BIF_BHIV; +return tok::H_BIF_BLOCKS; YY_BREAK case 166: YY_RULE_SETUP #line 226 "../s/cmdoptions.l" -return tok::H_BIF_METAL; +return tok::H_BIF_BHIV; YY_BREAK case 167: YY_RULE_SETUP #line 227 "../s/cmdoptions.l" -return tok::H_BIF_ELYHNDOFF; +return tok::H_BIF_METAL; YY_BREAK case 168: YY_RULE_SETUP #line 228 "../s/cmdoptions.l" -return tok::H_BIF_HIVEC; +return tok::H_BIF_ELYHNDOFF; YY_BREAK case 169: YY_RULE_SETUP #line 229 "../s/cmdoptions.l" -return tok::H_BIF_BHSIGN; +return tok::H_BIF_HIVEC; YY_BREAK case 170: YY_RULE_SETUP #line 230 "../s/cmdoptions.l" -return tok::H_SPLIT; +return tok::H_BIF_BHSIGN; YY_BREAK case 171: YY_RULE_SETUP #line 231 "../s/cmdoptions.l" -return tok::H_BIF_BOOTVEC; +return tok::H_SPLIT; YY_BREAK case 172: YY_RULE_SETUP #line 232 "../s/cmdoptions.l" -return tok::H_BIF_PUFDATA; +return tok::H_BIF_BOOTVEC; YY_BREAK case 173: YY_RULE_SETUP #line 233 "../s/cmdoptions.l" -return tok::H_DPACM_ENABLE; +return tok::H_BIF_PUFDATA; YY_BREAK case 174: YY_RULE_SETUP #line 234 "../s/cmdoptions.l" -return tok::H_BIF_USERKEYS; +return tok::H_DPACM_ENABLE; YY_BREAK case 175: YY_RULE_SETUP -#line 238 "../s/cmdoptions.l" -yylval->cstring=strdup(yytext); return tok::HEXSTRING; +#line 235 "../s/cmdoptions.l" +return tok::H_BIF_USERKEYS; YY_BREAK case 176: YY_RULE_SETUP #line 239 "../s/cmdoptions.l" -yylval->cstring=strdup(yytext); return tok::IDENTIFIER; +yylval->cstring=strdup(yytext); return tok::HEXSTRING; YY_BREAK case 177: YY_RULE_SETUP #line 240 "../s/cmdoptions.l" -yylval->cstring=strdup(yytext); return tok::FILENAME; +yylval->cstring=strdup(yytext); return tok::IDENTIFIER; YY_BREAK case 178: YY_RULE_SETUP #line 241 "../s/cmdoptions.l" -yylval->cstring=strdup(yytext+1); yylval->cstring[strlen(yytext)-2]=0; return tok::QFILENAME; +yylval->cstring=strdup(yytext); return tok::FILENAME; YY_BREAK case 179: YY_RULE_SETUP -#line 244 "../s/cmdoptions.l" -yylloc->step (); +#line 242 "../s/cmdoptions.l" +yylval->cstring=strdup(yytext+1); yylval->cstring[strlen(yytext)-2]=0; return tok::QFILENAME; YY_BREAK case 180: -/* rule 180 can match eol */ YY_RULE_SETUP #line 245 "../s/cmdoptions.l" -yylloc->lines (yyleng); yylloc->step (); +yylloc->step (); YY_BREAK case 181: +/* rule 181 can match eol */ YY_RULE_SETUP #line 246 "../s/cmdoptions.l" -LOG_ERROR("Unknown option on command line: %s\n",yytext); +yylloc->lines (yyleng); yylloc->step (); YY_BREAK case 182: YY_RULE_SETUP #line 247 "../s/cmdoptions.l" +LOG_ERROR("Unknown option on command line: %s\n",yytext); + YY_BREAK +case 183: +YY_RULE_SETUP +#line 248 "../s/cmdoptions.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2351 "../bisonflex/cmdoptions.yy.cpp" +#line 2357 "../bisonflex/cmdoptions.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2749,7 +2755,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1020 ) + if ( yy_current_state >= 1023 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2782,11 +2788,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1020 ) + if ( yy_current_state >= 1023 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 1019); + yy_is_jam = (yy_current_state == 1022); return yy_is_jam ? 0 : yy_current_state; } @@ -3396,7 +3402,7 @@ /* %ok-for-header */ -#line 247 "../s/cmdoptions.l" +#line 248 "../s/cmdoptions.l" diff -Nru xilinx-bootgen-2022.1/debian/changelog xilinx-bootgen-2022.2/debian/changelog --- xilinx-bootgen-2022.1/debian/changelog 2022-06-01 05:12:44.000000000 +0000 +++ xilinx-bootgen-2022.2/debian/changelog 2023-02-07 10:06:59.000000000 +0000 @@ -1,3 +1,32 @@ +xilinx-bootgen (2022.2-2ubuntu1~22.10) kinetic; urgency=medium + + * Backport to kinetic (LP: #1998732) + + -- Ethan Hsieh Tue, 07 Feb 2023 10:06:59 +0000 + +xilinx-bootgen (2022.2-2ubuntu1) lunar; urgency=medium + + * d/rules, d/control: Place Breaks, Replaces in d/control and add + transitional definition for xlnx-bootgen. This delta can be removed after + lunar's release (LP: #1998728, LP: #2000774) + + -- Dave Jones Thu, 12 Jan 2023 17:45:38 +0000 + +xilinx-bootgen (2022.2-2) unstable; urgency=medium + + * d/rules: Add bootgen-xlnx to Breaks, Replaces and Provides in the case + of Ubuntu. (Closes: LP: 2000774) + + -- Nobuhiro Iwamatsu Thu, 12 Jan 2023 11:25:15 +0900 + +xilinx-bootgen (2022.2-1) unstable; urgency=medium + + * New upstream release. + * d/control: Update standards version to 4.6.1, no changes needed. + * d/copyright: Update copyright year. + + -- Nobuhiro Iwamatsu Sat, 07 Jan 2023 19:27:07 +0900 + xilinx-bootgen (2022.1-1) unstable; urgency=medium * New upstream release. diff -Nru xilinx-bootgen-2022.1/debian/control xilinx-bootgen-2022.2/debian/control --- xilinx-bootgen-2022.1/debian/control 2022-06-01 05:12:44.000000000 +0000 +++ xilinx-bootgen-2022.2/debian/control 2023-01-12 17:45:38.000000000 +0000 @@ -1,11 +1,12 @@ Source: xilinx-bootgen -Maintainer: Debian Xilinx Package Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Xilinx Package Maintainers Uploaders: Punit Agrawal , Nobuhiro Iwamatsu Priority: optional Section: devel Build-Depends: debhelper-compat (= 13), libssl-dev -Standards-Version: 4.6.0.1 +Standards-Version: 4.6.1 Rules-Requires-Root: no Homepage: https://github.com/Xilinx/bootgen Vcs-Browser: https://salsa.debian.org/xilinx-packages-team/xilinx-bootgen @@ -14,8 +15,17 @@ Package: xilinx-bootgen Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: bootgen-xlnx (<< 2022.2-1~) +Breaks: bootgen-xlnx (<< 2022.2-1~) Description: boot image converter for Xilinx ARM SoCs xilinx-bootgen provides tools to generate a boot image (BOOT.BIN) for Xilinx ARM SoC (Zynq-7000, Zynq UltraScale + MPSoC, etc) devices. This also provides features such as boot authentication and OpenSSL-based encryption. + +Package: bootgen-xlnx +Architecture: any +Depends: xilinx-bootgen, ${misc:Depends} +Section: oldlibs +Description: transitional package + This is a transitional package. It can be safely removed. diff -Nru xilinx-bootgen-2022.1/debian/copyright xilinx-bootgen-2022.2/debian/copyright --- xilinx-bootgen-2022.1/debian/copyright 2022-06-01 05:12:44.000000000 +0000 +++ xilinx-bootgen-2022.2/debian/copyright 2023-01-12 16:04:20.000000000 +0000 @@ -47,7 +47,7 @@ License: OpenSSL Files: debian/* -Copyright: 2021-2022, Nobuhiro Iwamatsu +Copyright: 2021-2023, Nobuhiro Iwamatsu License: Apache-2.0 License: Apache-2.0 diff -Nru xilinx-bootgen-2022.1/elftools.cpp xilinx-bootgen-2022.2/elftools.cpp --- xilinx-bootgen-2022.1/elftools.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/elftools.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -29,12 +29,25 @@ static bool gEndianessInitialized = false; - /* ------------------------------------------------------------------------------- ***************************************************** F U N C T I O N S *** ------------------------------------------------------------------------------- */ + +uint32_t ComputeWordChecksum(void* firstWordPtr, size_t length) +{ + uint32_t checksum = 0; + size_t numChecksumedWords = length / sizeof(uint32_t); + for (size_t i = 0; i< numChecksumedWords; i++) + { + checksum += ((uint32_t*)firstWordPtr)[i]; + } + /* Invert the Checksum value */ + checksum ^= 0xFFFFFFFF; + return checksum; +} + /******************************************************************************/ Endianness::Type EndianMachine( void ) { @@ -166,9 +179,49 @@ /* Index from the beginning of the ELF file with the offset index in the String Table Section. */ stringTableSection = (StringTableSectionTbl *)(start+ sectionHdrTbl[header.e_shstrndx].sh_offset); - stringTableSectionSize = sectionHdrTbl[header.e_shstrndx].sh_size; } + + for (unsigned int index = 0; index < sectionHdrEntryCount; index++) + { + stringTableSection = (StringTableSectionTbl *)(start + sectionHdrTbl[header.e_shstrndx].sh_offset); + std::string sectn_name = (char*)stringTableSection + sectionHdrTbl[index].sh_name; + if (sectn_name == ".struct_info" || sectn_name == ".xplm_modules") + { + uint32_t sectn_size_id = 0; + /* Optional Data Header + Optional Data Actual size + Checksum */ + uint16_t sectn_length = sizeof(uint32_t) + sectionHdrTbl[index].sh_size + sizeof(uint32_t); + + if (sectn_name == ".xplm_modules") + { + sectn_size_id = (uint32_t)((sectn_length / 4) << 16) | DATA_ID_XPLM_MODULES; + + xplm_modules_data_size = sectionHdrTbl[index].sh_size; + xplm_modules_data = (uint32_t*)malloc(xplm_modules_data_size); + memcpy(xplm_modules_data, start + sectionHdrTbl[index].sh_offset, xplm_modules_data_size); + } + if (sectn_name == ".struct_info") + { + sectn_size_id = (uint32_t)((sectn_length / 4) << 16) | DATA_ID_STRUCT_INFO; + } + + iht_optional_data = (uint32_t*) realloc(iht_optional_data, iht_optional_data_size + sectn_length); + memcpy(iht_optional_data + (iht_optional_data_size / 4), §n_size_id, sizeof(uint32_t)); + memcpy(iht_optional_data + (iht_optional_data_size / 4) + sizeof(uint32_t)/4, (start + sectionHdrTbl[index].sh_offset), (sectionHdrTbl[index].sh_size)); + + uint32_t checksum = ComputeWordChecksum(iht_optional_data + (iht_optional_data_size / 4), sectn_length - sizeof(uint32_t)); + memcpy(iht_optional_data + (iht_optional_data_size / 4) + (sectn_length - sizeof(uint32_t)) / 4, &checksum, sizeof(uint32_t)); + + iht_optional_data_size += sectn_length; + } + } + if (iht_optional_data_size != 0) + { + uint32_t padLength = (iht_optional_data_size % 64 != 0) ? 64 - (iht_optional_data_size % 64) : 0; + iht_optional_data = (uint32_t*)realloc(iht_optional_data, iht_optional_data_size + padLength); + memset(iht_optional_data + (iht_optional_data_size / 4), 0xFF, padLength); + iht_optional_data_size += padLength; + } } /* If a Program header is defined, get its pointer and its record size diff -Nru xilinx-bootgen-2022.1/elftools.h xilinx-bootgen-2022.2/elftools.h --- xilinx-bootgen-2022.1/elftools.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/elftools.h 2022-09-26 06:24:42.000000000 +0000 @@ -40,6 +40,9 @@ class Elf64SectionHdr_t; class Elf64Symbol_t; +#define DATA_ID_STRUCT_INFO 2 +#define DATA_ID_XPLM_MODULES 1 + /* ------------------------------------------------------------------------------- *************************************************** S T R U C T U R E S *** @@ -235,6 +238,10 @@ , atf_handoff_params_offset(0) , atf_handoff_params_prg_hdr_count(0) , atf_handoff_params_found(false) + , iht_optional_data_size(0) + , iht_optional_data(NULL) + , xplm_modules_data(NULL) + , xplm_modules_data_size(0) { }; ~ElfFormat() {}; @@ -260,11 +267,38 @@ uint64_t lowestProgramAddress; uint64_t highestProgramAddress; + uint32_t* iht_optional_data; + uint32_t* xplm_modules_data; + uint32_t xplm_modules_data_size; + uint16_t iht_optional_data_size; + uint64_t atf_handoff_params_offset; uint64_t atf_handoff_params_prg_hdr_count; bool atf_handoff_params_found; }; +/*************************************************************************************/ +class Elf32Symbol_t +{ +public: + Elf32Symbol_t() {} + Elf32Symbol_t(Elf32Symbol_t* sym_t) + { + st_name = sym_t->st_name; + st_info = sym_t->st_info; + st_other = sym_t->st_other; + st_shndx = sym_t->st_shndx; + st_value = sym_t->st_value; + st_size = sym_t->st_size; + } + Elf32_Word st_name; + unsigned char st_info; + unsigned char st_other; + Elf32_Half st_shndx; + Elf32_Addr st_value; + Elf32_Xword st_size; +}; + /******************************************************************************/ class ElfFormat32 : public ElfFormat { @@ -280,9 +314,10 @@ uint8_t* GetProgramHeaderData(uint8_t index); uint32_t ELFHdrEntrySize() { return header.e_ehsize;} + Elf32_Ehdr header; std::vector programHeaders; Elf32SectionHdr_t* sectionHdrTbl; - Elf32_Ehdr header; + Elf32Symbol_t* symbolTableSection; private: void TrimUnwantedELFHeaders( Elf32ProgramHeader& prgHeader, uint8_t* elfStart ); void DeendianELFHdr(uint8_t*); diff -Nru xilinx-bootgen-2022.1/elftypes.h xilinx-bootgen-2022.2/elftypes.h --- xilinx-bootgen-2022.1/elftypes.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/elftypes.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2019 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ typedef uint16_t Elf32_Half; typedef uint32_t Elf32_Off; typedef int32_t Elf32_Sword; +typedef uint32_t Elf32_Xword; typedef uint32_t Elf32_Word; /* ELF 64-bit */ diff -Nru xilinx-bootgen-2022.1/encryption-versal.cpp xilinx-bootgen-2022.2/encryption-versal.cpp --- xilinx-bootgen-2022.1/encryption-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/encryption-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -527,12 +527,14 @@ if (GetAesSeed() == NULL) { aesSeed = new uint32_t[WORDS_PER_AES_KEY]; + memset(aesSeed, 0, WORDS_PER_AES_KEY); GenerateAesSeed(); } if (GetFixedInputData() == NULL) { fixedInputData = new uint32_t[WORDS_PER_FID]; + memset(fixedInputData, 0, WORDS_PER_FID); GenerateAesFixedInputData(); } @@ -822,8 +824,8 @@ /* Note that the last block will always be based on the partition length.*/ std::vector secureChunkEncrBlocks; - uint32_t actualSecureChunkSize = VersalPartition::GetSecureChunkSize() - overhead; - if (partHdr->imageHeader->GetAuthenticationType() == Authentication::None) + uint32_t actualSecureChunkSize = bi.GetSecureChunkSize(partHdr->IsBootloader()) - overhead; + if (partHdr->imageHeader->GetAuthenticationType() == Authentication::None && !partHdr->imageHeader->GetDelayAuthFlag()) { actualSecureChunkSize += SHA3_LENGTH_BYTES; } @@ -1053,6 +1055,8 @@ { aesKey = aesIv = aesSeed = NULL; fixedInputData = NULL; + aesSeedexits = false; + fixedInputDataExits = false; SetAesFileName(options.bifOptions->pmcDataAesFile); LOG_INFO("Key file - %s", aesFilename.c_str()); std::ifstream keyFile(aesFilename); @@ -1362,7 +1366,7 @@ dataBuffer, (uint32_t)size, bi.imageHeaderTable->section->Data, - sizeof(VersalImageHeaderTableStructure), + sizeof(VersalImageHeaderTableStructure) + bi.imageHeaderTable->iht_optional_data_length, encryptedDataBuffer /* out*/, encryptedLength /* out */); diff -Nru xilinx-bootgen-2022.1/encryption-versal.h xilinx-bootgen-2022.2/encryption-versal.h --- xilinx-bootgen-2022.1/encryption-versal.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/encryption-versal.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,6 +55,11 @@ void Process(BootImage& bi, PartitionHeader* partition); void Process(BootImage& bi); + //VersalNet defines + uint32_t ConfigureEncryptionBlocksforPmcData(BootImage& bi, PartitionHeader * partHdr); + uint32_t ConfigureEncryptionBlocksforPartition(BootImage & bi, PartitionHeader * partHdr); + void ChunkifyAndProcess(BootImage & bi, PartitionHeader * partHdr); + void SetAesSeedString(const std::string & key); void SetAesSeed(const uint8_t * key); const uint32_t* GetAesSeed(void); diff -Nru xilinx-bootgen-2022.1/encryption-versalnet.cpp xilinx-bootgen-2022.2/encryption-versalnet.cpp --- xilinx-bootgen-2022.1/encryption-versalnet.cpp 1970-01-01 00:00:00.000000000 +0000 +++ xilinx-bootgen-2022.2/encryption-versalnet.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -0,0 +1,863 @@ + +/****************************************************************************** +* Copyright 2015-2022 Xilinx, Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +******************************************************************************/ + +/* +------------------------------------------------------------------------------- +*********************************************** H E A D E R F I L E S *** +------------------------------------------------------------------------------- +*/ +#include "encryption-versal.h" +#include "bootimage.h" +#include "encryptutils.h" +#include "options.h" +#include "imageheadertable-versal.h" +#include "bootheader-versal.h" +#include "partitionheadertable-versal.h" +#include + +/* +------------------------------------------------------------------------------- +***************************************************** F U N C T I O N S *** +------------------------------------------------------------------------------- +*/ + +uint32_t VersalEncryptionContext::ConfigureEncryptionBlocksforPmcData(BootImage& bi, PartitionHeader* partHdr) +{ + uint32_t totalencrBlocks = 0; + Binary::Length_t lastBlock = 0; + std::vector encrBlocks = partHdr->imageHeader->GetEncrBlocksList(); + + totalencrBlocks = encrBlocks.size(); + uint32_t overhead = (totalencrBlocks) * (SECURE_HDR_SZ + AES_GCM_TAG_SZ); + + /* Due to encryption over head, the actual default size on which the partition needs to be Key rolled is always less than 64KB. + So first calculate the default key roll data size by substracting the overhead. */ + /* Then calculate the number of such blocks possible on a given partition. */ + /* Note that the last block will always be based on the partition length.*/ + + std::vector secureChunkEncrBlocks; + uint32_t actualSecureChunkSize = bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader()) - overhead; + if (partHdr->imageHeader->GetAuthenticationType() == Authentication::None && !partHdr->imageHeader->GetDelayAuthFlag()) + { + actualSecureChunkSize += SHA3_LENGTH_BYTES; + } + + uint32_t totalKeyRollencrBlocks = GetTotalEncryptionBlocks(partHdr->imageHeader->GetTotalPmcFwSizeIh(), secureChunkEncrBlocks, actualSecureChunkSize, &lastBlock); + secureChunkEncrBlocks.clear(); + + for (uint32_t itr = 0; itr < totalKeyRollencrBlocks; itr++) + { + if ((itr == totalKeyRollencrBlocks - 1) && (lastBlock != 0)) + { + secureChunkEncrBlocks.push_back(lastBlock); + lastBlock = 0; + } + else + { + secureChunkEncrBlocks.push_back(actualSecureChunkSize); + } + } + + /* Now chunk each default key roll data size, based on user encryption blocks. + Note that the last block will always be based on the partition length.*/ + //std::vector blocks; + for (uint32_t itr1 = 0; itr1 < totalKeyRollencrBlocks; itr1++) + { + if ((itr1 == totalKeyRollencrBlocks - 1) && (secureChunkEncrBlocks[itr1] != actualSecureChunkSize)) + { + Binary::Length_t encrBlocksSize = 0; + for (uint32_t itr = 0; itr < encrBlocks.size(); itr++) + { + encrBlocksSize += encrBlocks[itr]; + if (secureChunkEncrBlocks[itr1] > encrBlocksSize) + { + bi.options.bifOptions->pmcdataBlocks.push_back(encrBlocks[itr]); + } + else + { + bi.options.bifOptions->pmcdataBlocks.push_back(secureChunkEncrBlocks[itr1] - (encrBlocksSize - encrBlocks[itr])); + break; + } + } + } + else + { + for (uint32_t itr = 0; itr < encrBlocks.size(); itr++) + { + bi.options.bifOptions->pmcdataBlocks.push_back(encrBlocks[itr]); + } + } + } + totalencrBlocks = bi.options.bifOptions->pmcdataBlocks.size(); + return totalencrBlocks; +} + +uint32_t VersalEncryptionContext::ConfigureEncryptionBlocksforPartition(BootImage& bi, PartitionHeader* partHdr) +{ + Options& options = bi.options; + uint32_t totalencrBlocks = 0; + Binary::Length_t lastBlock = 0; + std::vector encrBlocks = partHdr->imageHeader->GetEncrBlocksList(); + + totalencrBlocks = encrBlocks.size(); + uint32_t overhead = (totalencrBlocks) * (SECURE_HDR_SZ + AES_GCM_TAG_SZ); + + /* Due to encryption over head, the actual default size on which the partition needs to be Key rolled is always less than 64KB. + So first calculate the default key roll data size by substracting the overhead. */ + /* Then calculate the number of such blocks possible on a given partition. */ + /* Note that the last block will always be based on the partition length.*/ + + std::vector secureChunkEncrBlocks; + uint32_t actualSecureChunkSize = bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader()) - overhead; + if (partHdr->imageHeader->GetAuthenticationType() == Authentication::None && !partHdr->imageHeader->GetDelayAuthFlag()) + { + actualSecureChunkSize += SHA3_LENGTH_BYTES; + } + + uint32_t totalKeyRollencrBlocks = 0; + if (partHdr->imageHeader->IsBootloader()) + { + totalKeyRollencrBlocks = GetTotalEncryptionBlocks(partHdr->imageHeader->GetFsblFwSizeIh(), secureChunkEncrBlocks, actualSecureChunkSize, &lastBlock); + } + else + { + totalKeyRollencrBlocks = GetTotalEncryptionBlocks(partHdr->partition->section->Length, secureChunkEncrBlocks, actualSecureChunkSize, &lastBlock); + } + + secureChunkEncrBlocks.clear(); + + for (uint32_t itr = 0; itr < totalKeyRollencrBlocks; itr++) + { + if ((itr == totalKeyRollencrBlocks - 1) && (lastBlock != 0)) + { + secureChunkEncrBlocks.push_back(lastBlock); + lastBlock = 0; + } + else + { + secureChunkEncrBlocks.push_back(actualSecureChunkSize); + } + } + + /* Now chunk each default key roll data size, based on user encryption blocks. + Note that the last block will always be based on the partition length.*/ + options.bifOptions->GetEncryptionBlocksList().clear(); + for (uint32_t itr1 = 0; itr1 < totalKeyRollencrBlocks; itr1++) + { + if ((itr1 == totalKeyRollencrBlocks - 1) && (secureChunkEncrBlocks[itr1] != actualSecureChunkSize)) + { + Binary::Length_t encrBlocksSize = 0; + for (uint32_t itr = 0; itr < encrBlocks.size(); itr++) + { + encrBlocksSize += encrBlocks[itr]; + if (secureChunkEncrBlocks[itr1] > encrBlocksSize) + { + options.bifOptions->InsertEncryptionBlock(encrBlocks[itr]); + } + else + { + options.bifOptions->InsertEncryptionBlock(secureChunkEncrBlocks[itr1] - (encrBlocksSize - encrBlocks[itr])); + break; + } + } + } + else + { + for (uint32_t itr = 0; itr < encrBlocks.size(); itr++) + { + options.bifOptions->InsertEncryptionBlock(encrBlocks[itr]); + } + } + } + totalencrBlocks = options.bifOptions->GetEncryptionBlocksList().size(); + return totalencrBlocks; +} + +/******************************************************************************/ +static std::string ReadIV0(const std::string& inputFileName) +{ + std::ifstream keyFile(inputFileName.c_str()); + int aesKeyNum = 0; + int aesIvNum = 0; + + if (!keyFile) + { + LOG_ERROR("Failure reading AES key file - %s", inputFileName.c_str()); + } + + while (keyFile) + { + std::string word; + keyFile >> word; + if (word == "") + { + return ""; + } + + char c = ' '; + if (word == "Device") + { + word = ""; + keyFile >> word; + c = word[word.size() - 1]; + word.erase(word.size() - 1); + } + else if (word == "Key") + { + keyFile >> word; + if (word == "Opt") + { + LOG_ERROR("The key word 'Key Opt' is not supported in VERSAL architecture"); + } + if (word != "" && isalnum(word[0])) + { + /* Second Word is "0" or "1" or "2" ...*/ + int index = std::stoi(word); + if (aesKeyNum != index) + { + LOG_DEBUG(DEBUG_STAMP, "Key order incorrect."); + LOG_ERROR("Error parsing AES key file - %s.", inputFileName.c_str()); + } + aesKeyNum++; + word = ""; + while ((keyFile >> c) && isalnum(c)) + { + word.push_back(c); + } + } + else + { + /* Second Word other than "0", - throw error */ + LOG_DEBUG(DEBUG_STAMP, "Unknown key type - '%s' in %s", word.c_str(), inputFileName.c_str()); + LOG_ERROR("Error parsing AES key file - %s", inputFileName.c_str()); + } + } + else if (word == "IV") + { + keyFile >> word; + if (word != "") + { + if (word.size() == ((BYTES_PER_IV * 2) + 1)) + { + c = word[word.size() - 1]; + word.erase(word.size() - 1); + return word; + } + else + { + int index = std::stoi(word); + if (aesIvNum != index) + { + LOG_DEBUG(DEBUG_STAMP, "Iv order incorrect."); + LOG_ERROR("Error parsing AES key file - %s.", inputFileName.c_str()); + } + aesIvNum++; + word = ""; + while ((keyFile >> c) && isalnum(c)) + { + word.push_back(c); + } + if (index == 0) + { + return word; + } + } + } + } + else if (word == "Seed") + { + word = ""; + while ((keyFile >> c) && isalnum(c)) + { + word.push_back(c); + } + } + else if (word == "Label") + { + word = ""; + while ((keyFile >> c) && isalnum(c)) + { + word.push_back(c); + } + } + else if (word == "Context") + { + word = ""; + while ((keyFile >> c) && isalnum(c)) + { + word.push_back(c); + } + } + else if (word == "FixedInputData") + { + word = ""; + while ((keyFile >> c) && isalnum(c)) + { + word.push_back(c); + } + } + else + { + /* If the word is neither of the above */ + LOG_DEBUG(DEBUG_STAMP, "'Key' or 'Device' identifier expected, '%s' found instead", word.c_str()); + LOG_ERROR("Error parsing AES key file - %s", inputFileName.c_str()); + } + if (c != ';') + { + /* Semicolons expected at end of every line */ + while ((keyFile >> c) && isspace(c)) + { + word.push_back(c); + } + } + if (c != ';') + { + LOG_DEBUG(DEBUG_STAMP, "Terminating ';' expected. Last word read was '%s'", word.c_str()); + LOG_ERROR("Error parsing AES key file - %s", inputFileName.c_str()); + } + } + return ""; +} + + +/******************************************************************************/ +void VersalEncryptionContext::ChunkifyAndProcess(BootImage& bi, PartitionHeader* partHdr) +{ + Options& options = bi.options; + + LOG_INFO("Encrypting the partition - %s", partHdr->partition->section->Name.c_str()); + + WarnforDPACMImpactonBootTime(partHdr->imageHeader->GetEncrBlocksList().size() != 0, partHdr->imageHeader->GetDpacm() == DpaCM::DpaCMEnable); + + uint32_t totalencrBlocks = ConfigureEncryptionBlocksforPartition(bi, partHdr); + LOG_TRACE("Total no. of Key/IV pairs needed to encrypt - %d", totalencrBlocks + 1); + + /* Get the key file */ + SetAesFileName(partHdr->partitionAesKeyFile); + LOG_INFO("Key file - %s", aesFilename.c_str()); + if (partHdr->generateAesKeyFile) + { + std::ifstream keyFile(aesFilename); + bool fileExists = keyFile.good(); + if (!fileExists) + { + if (bi.aesKeyandKeySrc.size() != 0) + { + for (uint32_t i = 0; i < bi.aesKeyandKeySrc.size(); i++) + { + if (partHdr->imageHeader->GetEncryptionKeySrc() == bi.aesKeyandKeySrc[i].first) + { + aesKey = new uint32_t[AES_GCM_KEY_SZ / 4]; + memcpy(aesKey, bi.aesKeyandKeySrc[i].second, AES_GCM_KEY_SZ); + break; + } + } + } + GenerateEncryptionKeyFile(aesFilename, options); + } + else + { + LOG_ERROR("Key Generation Error !!!\n File - %s already exists.", aesFilename.c_str()); + } + } + + bi.InsertEncryptionKeyFile(aesFilename); + CheckForSameAesKeyFiles(bi.GetEncryptionKeyFileVec()); + + ReadEncryptionKeyFile(aesFilename); + + std::pair asesKeyandKeySrcPair(partHdr->imageHeader->GetEncryptionKeySrc(), aesKey); + bi.aesKeyandKeySrc.push_back(asesKeyandKeySrcPair); + bi.bifOptions->CheckForBadKeyandKeySrcPair(bi.aesKeyandKeySrc, aesFilename); + + options.SetDevicePartName(deviceName); + + CheckForExtraKeyIVPairs(totalencrBlocks, partHdr->partition->section->Name); + + if (!aesSeedexits && aesKeyVec.size() != 1) + { + if (totalencrBlocks + 1 > aesKeyVec.size()) + { + LOG_ERROR("AES Key file has less keys than the number of blocks to be encrypted in %s.", partHdr->partition->section->Name.c_str()); + } + if (totalencrBlocks + 1 > aesIvVec.size()) + { + LOG_ERROR("AES Key file has less IVs than the number of blocks to be encrypted in %s.", partHdr->partition->section->Name.c_str()); + } + } + else + { + if (bi.aesKeyandKeySrc.size() != 0) + { + for (uint32_t i = 0; i < bi.aesKeyandKeySrc.size(); i++) + { + if (partHdr->imageHeader->GetEncryptionKeySrc() == bi.aesKeyandKeySrc[i].first) + { + if (aesKey == NULL) + { + aesKey = new uint32_t[AES_GCM_KEY_SZ / 4]; + memcpy(aesKey, bi.aesKeyandKeySrc[i].second, AES_GCM_KEY_SZ); + } + if (aesKeyVec.size() == 0) + { + aesKeyVec.push_back(ConvertKeyIvToString((uint8_t *)aesKey, AES_GCM_KEY_SZ).c_str()); + } + break; + } + } + } + GenerateRemainingKeys(options); + } + + CheckForRepeatedKeyIVPairs(bi.GetEncryptionKeyFileVec(), false); + if (bi.aesKeyandKeySrc.size() != 0) + { + for (uint32_t i = 0; i < bi.aesKeyandKeySrc.size(); i++) + { + if (partHdr->imageHeader->GetEncryptionKeySrc() == bi.aesKeyandKeySrc[i].first) + { + if (aesKey != NULL) + { + memcpy(aesKey, bi.aesKeyandKeySrc[i].second, AES_GCM_KEY_SZ); + } + break; + } + } + } + + // For copying SCR HDR IV into Boot Header + const uint32_t* tmpIv = GetIv(); + if (tmpIv != NULL) + { + if (partHdr->IsBootloader()) + { + if (options.secHdrIv == NULL) + { + options.secHdrIv = (uint8_t*)malloc(BYTES_PER_IV); + } + memcpy_be(options.secHdrIv, tmpIv, BYTES_PER_IV); + } + if (partHdr->partitionSecHdrIv == NULL) + { + partHdr->partitionSecHdrIv = (uint8_t*)malloc(BYTES_PER_IV); + } + memcpy_be(partHdr->partitionSecHdrIv, tmpIv, BYTES_PER_IV); + } + + uint32_t totalBlocksOverhead = (totalencrBlocks + 1) * 64; //64 = AES_GCM_IV_SZ+AES_GCM_KEY_SZ+NUM_BYTES_PER_WORD+AES_GCM_TAG_SZ + + if (!Binary::CheckAddress(partHdr->partition->section->Length)) + { + LOG_ERROR("Partition too large to encrypt"); + } + + isBootloader = partHdr->imageHeader->IsBootloader(); + if (options.GetEncryptionDumpFlag()) + { + bi.options.aesLogFile.open(bi.options.aesLogFilename, std::fstream::app); + VERBOSE_OUT << std::endl << "------------------------------------"; + VERBOSE_OUT << std::endl << " Partition Name : " << partHdr->partition->section->Name; + VERBOSE_OUT << std::endl << " Key file : " << StringUtils::BaseName(aesFilename); + VERBOSE_OUT << std::endl << "------------------------------------"; + } + + /* Encrypt the stream */ + if (isBootloader && partHdr->imageHeader->GetPmcFwSizeIh() != 0) + { + // BootLoader Encryption + uint32_t encrFsblByteLength; + uint32_t estimatedEncrFsblLength = partHdr->imageHeader->GetFsblFwSizeIh() + totalBlocksOverhead; + uint32_t estimatedTotalFsblLength = estimatedEncrFsblLength; + uint8_t* encrFsblDataBuffer = new uint8_t[estimatedEncrFsblLength]; + + uint32_t totalpmcdataencrBlocks = ConfigureEncryptionBlocksforPmcData(bi, partHdr); + uint32_t estimatedtotalPmcCdoLength = partHdr->imageHeader->GetTotalPmcFwSizeIh() + (totalpmcdataencrBlocks + 1) * 64; + + LOG_INFO("Encrypting Bootloader"); + + if (partHdr->imageHeader->GetAuthenticationType() != Authentication::None) + { + Binary::Length_t dataChunksCount = 0; + // PLM + dataChunksCount = ((estimatedEncrFsblLength - (SECURE_HDR_SZ + AES_GCM_TAG_SZ)) / bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader())) + + ((((estimatedEncrFsblLength - (SECURE_HDR_SZ + AES_GCM_TAG_SZ)) % bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader())) == 0 ? 0 : 1)); + // If PMC CDO present, need to calculate the hash, so include hash + if (partHdr->imageHeader->GetTotalPmcFwSizeIh()) + { + estimatedTotalFsblLength += SHA3_LENGTH_BYTES; + } + + if (dataChunksCount != 1) + { + for (uint32_t itr = 0; itr < dataChunksCount - 1; itr++) + { + estimatedTotalFsblLength += SHA3_LENGTH_BYTES; + } + } + + // PMC DATA + dataChunksCount = 0; + + dataChunksCount = ((estimatedtotalPmcCdoLength - (SECURE_HDR_SZ + AES_GCM_TAG_SZ)) / bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader())) + + ((((estimatedtotalPmcCdoLength - (SECURE_HDR_SZ + AES_GCM_TAG_SZ)) % bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader())) == 0 ? 0 : 1)); + + if (dataChunksCount != 1) + { + for (uint32_t itr = 0; itr < dataChunksCount - 1; itr++) + { + estimatedtotalPmcCdoLength += SHA3_LENGTH_BYTES; + } + } + } + + uint32_t* tmpIvPMCDATA = new uint32_t[WORDS_PER_IV]; + memset(tmpIvPMCDATA, 0, WORDS_PER_IV); + // PMC Data Encryption + if (options.bifOptions->pmcDataAesFile != "") + { + //aesKey = NULL; + aesSeedexits = false; + fixedInputDataExits = false; + SetAesFileName(options.bifOptions->pmcDataAesFile); + LOG_INFO("Key file - %s", aesFilename.c_str()); + std::ifstream keyFile(aesFilename); + bool fileExists = keyFile.good(); + if (!fileExists) + { + if (bi.aesKeyandKeySrc.size() != 0) + { + for (uint32_t i = 0; i < bi.aesKeyandKeySrc.size(); i++) + { + if (partHdr->imageHeader->GetEncryptionKeySrc() == bi.aesKeyandKeySrc[i].first) + { + aesKey = new uint32_t[AES_GCM_KEY_SZ / 4]; + memcpy(aesKey, bi.aesKeyandKeySrc[i].second, AES_GCM_KEY_SZ); + break; + } + } + } + + std::vector blocks = options.bifOptions->GetEncryptionBlocksList(); + options.bifOptions->GetEncryptionBlocksList().clear(); + for (uint32_t itr = 0; itr < options.bifOptions->pmcdataBlocks.size(); itr++) + { + options.bifOptions->InsertEncryptionBlock(options.bifOptions->pmcdataBlocks[itr]); + } + + GenerateEncryptionKeyFile(aesFilename, options); + + options.bifOptions->GetEncryptionBlocksList().clear(); + for (uint32_t itr = 0; itr < blocks.size(); itr++) + { + options.bifOptions->InsertEncryptionBlock(blocks[itr]); + } + blocks.clear(); + } + + std::string iv0 = ReadIV0(aesFilename); + uint8_t hexData[256]; + + if (iv0.size() != (BYTES_PER_IV * 2)) + { + LOG_DEBUG(DEBUG_STAMP, "IV = %s, IV Size = %d", iv0.c_str(), iv0.size()); + LOG_ERROR("Encryption Error !!!\n An IV key must be 12 bytes long"); + } + PackHex(iv0, hexData); + + const uint8_t* iv = hexData; + for (uint32_t index = 0; index < WORDS_PER_IV; index++) + { + tmpIvPMCDATA[index] = ReadBigEndian32(iv); + iv += sizeof(uint32_t); + } + } + else + { + LOG_ERROR("Key Generation Error !!!\n Key File doesnot exist to encrypt PMC CDO "); + } + + VersalBootHeaderStructure* bh = (VersalBootHeaderStructure*)bi.bootHeader->section->Data; + bh->plmLength = partHdr->imageHeader->GetFsblFwSizeIh(); + bh->pmcCdoLength = partHdr->imageHeader->GetTotalPmcFwSizeIh(); + bh->totalPlmLength = estimatedTotalFsblLength + partHdr->imageHeader->GetAuthContext()->GetCertificateSize(); + bh->totalPmcCdoLength = estimatedtotalPmcCdoLength; + + memcpy_be((uint8_t*)bh->plmSecureHdrIv, tmpIv, BYTES_PER_IV); + memcpy_be((uint8_t*)bh->pmcCdoSecureHdrIv, tmpIvPMCDATA, BYTES_PER_IV); + + if (bi.imageList.size() != 0) + { + uint8_t cksumType = 0; + cksumType = bi.partitionHeaderList.front()->imageHeader->GetChecksumContext()->Type(); + + bh->bhAttributes = bi.partitionHeaderList.front()->imageHeader->GetPufHdLocation() << PUF_HD_BIT_SHIFT; + bh->bhAttributes |= cksumType << BI_HASH_BIT_SHIFT; + bh->bhAttributes |= bi.partitionHeaderList.front()->imageHeader->GetDpacm() << DPA_CM_BIT_SHIFT; + bh->bhAttributes |= bi.bifOptions->GetBhRsa() << BH_RSA_BIT_SHIFT; + bh->bhAttributes |= bi.bifOptions->GetPufMode() << BH_PUF_MODE_BIT_SHIFT; + + if (bi.partitionHeaderList.front()->imageHeader->GetAuthenticationType() != Authentication::None) + { + bh->bhAttributes |= BH_RSA_SINGED_BIT_MASK << BH_RSA_SINGED_BIT_SHIFT; + } + bh->bhAttributes |= bi.bifOptions->GetDice() << BH_DICE_BIT_SHIFT; + } + + bh->sourceOffset = sizeof(VersalBootHeaderStructure) + partHdr->imageHeader->GetAuthContext()->GetCertificateSize(); + bh->imageHeaderByteOffset = sizeof(VersalBootHeaderStructure) + bh->totalPlmLength + bh->totalPmcCdoLength; + bh->headerChecksum = bi.bootHeader->ComputeWordChecksum(&bh->widthDetectionWord, 3872); + + ChunkifyAndEncrypt(options, + partHdr->partition->section->Data, + partHdr->imageHeader->GetFsblFwSizeIh(), + (uint8_t*)bh + sizeof(VersalSmapWidthTable), + sizeof(VersalBootHeaderStructure) - sizeof(VersalSmapWidthTable), + encrFsblDataBuffer /* out*/, + encrFsblByteLength /* out */); + + if (estimatedEncrFsblLength < encrFsblByteLength) + { + LOG_ERROR("Encryption Error!!! - PmcFw Buffer overflow"); + } + + // PMC Data Encryption + totalencrBlocks = totalpmcdataencrBlocks; + totalBlocksOverhead = (totalencrBlocks + 1) * 64; //64 = AES_GCM_IV_SZ+AES_GCM_KEY_SZ+NUM_BYTES_PER_WORD+AES_GCM_TAG_SZ + + options.bifOptions->GetEncryptionBlocksList().clear(); + for (uint32_t itr = 0; itr < options.bifOptions->pmcdataBlocks.size(); itr++) + { + options.bifOptions->InsertEncryptionBlock(options.bifOptions->pmcdataBlocks[itr]); + } + + if (options.bifOptions->pmcDataAesFile != "") + { + aesKey = aesIv = aesSeed = NULL; + fixedInputData = NULL; + SetAesFileName(options.bifOptions->pmcDataAesFile); + LOG_INFO("Key file - %s", aesFilename.c_str()); + std::ifstream keyFile(aesFilename); + bool fileExists = keyFile.good(); + if (!fileExists) + { + if (bi.aesKeyandKeySrc.size() != 0) + { + for (uint32_t i = 0; i < bi.aesKeyandKeySrc.size(); i++) + { + if (partHdr->imageHeader->GetEncryptionKeySrc() == bi.aesKeyandKeySrc[i].first) + { + aesKey = new uint32_t[AES_GCM_KEY_SZ / 4]; + memcpy(aesKey, bi.aesKeyandKeySrc[i].second, AES_GCM_KEY_SZ); + break; + } + } + } + GenerateEncryptionKeyFile(aesFilename, options); + } + + bi.InsertEncryptionKeyFile(aesFilename); + CheckForSameAesKeyFiles(bi.GetEncryptionKeyFileVec()); + + ReadEncryptionKeyFile(aesFilename); + + std::pair asesKeyandKeySrcPair(partHdr->imageHeader->GetEncryptionKeySrc(), aesKey); + bi.aesKeyandKeySrc.push_back(asesKeyandKeySrcPair); + bi.bifOptions->CheckForBadKeyandKeySrcPair(bi.aesKeyandKeySrc, aesFilename); + + options.SetDevicePartName(deviceName); + CheckForExtraKeyIVPairs(totalencrBlocks, partHdr->partition->section->Name); + + if (!aesSeedexits && aesKeyVec.size() != 1) + { + if (totalencrBlocks + 1 > aesKeyVec.size()) + { + LOG_ERROR("AES Key file has less keys than the number of blocks to be encrypted in %s.", partHdr->partition->section->Name.c_str()); + } + if (totalencrBlocks + 1 > aesIvVec.size()) + { + LOG_ERROR("AES Key file has less IVs than the number of blocks to be encrypted in %s.", partHdr->partition->section->Name.c_str()); + } + } + else + { + if (bi.aesKeyandKeySrc.size() != 0) + { + for (uint32_t i = 0; i < bi.aesKeyandKeySrc.size(); i++) + { + if (partHdr->imageHeader->GetEncryptionKeySrc() == bi.aesKeyandKeySrc[i].first) + { + if (aesKey == NULL) + { + aesKey = new uint32_t[AES_GCM_KEY_SZ / 4]; + memcpy(aesKey, bi.aesKeyandKeySrc[i].second, AES_GCM_KEY_SZ); + } + if (aesKeyVec.size() == 0) + { + aesKeyVec.push_back(ConvertKeyIvToString((uint8_t *)aesKey, AES_GCM_KEY_SZ).c_str()); + } + break; + } + } + } + GenerateRemainingKeys(options); + } + + tmpIv = GetIv(); + if (tmpIv != NULL) + { + if (options.secHdrIvPmcData == NULL) + { + options.secHdrIvPmcData = (uint8_t*)malloc(BYTES_PER_IV); + } + memcpy_be(options.secHdrIvPmcData, tmpIv, BYTES_PER_IV); + } + } + else + { + LOG_ERROR("Key Generation Error !!!\n Key File doesnot exist to encrypt PMC CDO "); + } + + CheckForRepeatedKeyIVPairs(bi.GetEncryptionKeyFileVec(), false); + isPmcData = true; + uint32_t encrPmcByteLength; + uint32_t estimatedEncrPmcLength = partHdr->imageHeader->GetTotalPmcFwSizeIh() + totalBlocksOverhead; + uint8_t* encrPmcDataBuffer = new uint8_t[estimatedEncrPmcLength]; + LOG_INFO("Encrypting the PMC Data"); + + ChunkifyAndEncrypt(options, + partHdr->partition->section->Data + partHdr->imageHeader->GetFsblFwSizeIh(), + partHdr->imageHeader->GetTotalPmcFwSizeIh(), + NULL, 0, + encrPmcDataBuffer /* out*/, + encrPmcByteLength /* out */); + + if (estimatedEncrPmcLength < encrPmcByteLength) + { + LOG_ERROR("Encryption Error!!! - PMC Buffer overflow"); + } + + partHdr->partition->section->IncreaseLengthAndPadTo(encrFsblByteLength + encrPmcByteLength, 0x0); + memset(partHdr->partition->section->Data, 0, encrFsblByteLength + encrPmcByteLength); + memcpy(partHdr->partition->section->Data, encrFsblDataBuffer, encrFsblByteLength); + memcpy(partHdr->partition->section->Data + encrFsblByteLength, encrPmcDataBuffer, encrPmcByteLength); + + partHdr->imageHeader->SetTotalPmcFwSizeIh(encrPmcByteLength); + partHdr->imageHeader->SetTotalFsblFwSizeIh(encrFsblByteLength); + partHdr->partition->section->Length = encrFsblByteLength + encrPmcByteLength; + + LOG_INFO("Encrypted the partition - %s", partHdr->partition->section->Name.c_str()); + bi.options.CloseEncryptionDumpFile(); + delete[] encrFsblDataBuffer; + delete[] encrPmcDataBuffer; + return; + } + else if(isBootloader && partHdr->imageHeader->GetPmcFwSizeIh() == 0) + { + uint32_t encryptedLength; + uint32_t estimatedEncrLength = partHdr->partition->section->Length + totalBlocksOverhead; + uint8_t* encryptedDataBuffer = new uint8_t[estimatedEncrLength]; + + + uint32_t estimatedTotalFsblLength = estimatedEncrLength; + if (partHdr->imageHeader->GetAuthenticationType() != Authentication::None) + { + Binary::Length_t dataChunksCount = 0; + + dataChunksCount = ((estimatedEncrLength - (SECURE_HDR_SZ + AES_GCM_TAG_SZ)) / bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader())) + + ((((estimatedEncrLength - (SECURE_HDR_SZ + AES_GCM_TAG_SZ)) % bi.GetSecureChunkSize(partHdr->imageHeader->IsBootloader())) == 0 ? 0 : 1)); + + if (dataChunksCount != 1) + { + for (uint32_t itr = 0; itr < dataChunksCount - 1; itr++) + { + estimatedTotalFsblLength += SHA3_LENGTH_BYTES; + } + } + } + + VersalBootHeaderStructure* bh = (VersalBootHeaderStructure*)bi.bootHeader->section->Data; + bh->plmLength = partHdr->imageHeader->GetFsblFwSizeIh(); + bh->pmcCdoLength = 0; + bh->totalPlmLength = estimatedTotalFsblLength + partHdr->imageHeader->GetAuthContext()->GetCertificateSize(); + bh->totalPmcCdoLength = 0; + + memcpy_be((uint8_t*)bh->plmSecureHdrIv, tmpIv, BYTES_PER_IV); + memset((uint8_t*)bh->pmcCdoSecureHdrIv, 0, BYTES_PER_IV); + + if (bi.imageList.size() != 0) + { + uint8_t cksumType = 0; + cksumType = bi.partitionHeaderList.front()->imageHeader->GetChecksumContext()->Type(); + + bh->bhAttributes = bi.partitionHeaderList.front()->imageHeader->GetPufHdLocation() << PUF_HD_BIT_SHIFT; + bh->bhAttributes |= cksumType << BI_HASH_BIT_SHIFT; + bh->bhAttributes |= bi.partitionHeaderList.front()->imageHeader->GetDpacm() << DPA_CM_BIT_SHIFT; + bh->bhAttributes |= bi.bifOptions->GetBhRsa() << BH_RSA_BIT_SHIFT; + bh->bhAttributes |= bi.bifOptions->GetPufMode() << BH_PUF_MODE_BIT_SHIFT; + + if (bi.partitionHeaderList.front()->imageHeader->GetAuthenticationType() != Authentication::None) + { + bh->bhAttributes |= BH_RSA_SINGED_BIT_MASK << BH_RSA_SINGED_BIT_SHIFT; + } + bh->bhAttributes |= bi.bifOptions->GetDice() << BH_DICE_BIT_SHIFT; + } + bh->sourceOffset = sizeof(VersalBootHeaderStructure) + partHdr->imageHeader->GetAuthContext()->GetCertificateSize(); + bh->imageHeaderByteOffset = sizeof(VersalBootHeaderStructure) + bh->totalPlmLength + bh->totalPmcCdoLength; + bh->headerChecksum = bi.bootHeader->ComputeWordChecksum(&bh->widthDetectionWord, 3872); + + ChunkifyAndEncrypt(options, + partHdr->partition->section->Data, + partHdr->imageHeader->GetFsblFwSizeIh(), + bi.bootHeader->section->Data + sizeof(VersalSmapWidthTable), + sizeof(VersalBootHeaderStructure) - sizeof(VersalSmapWidthTable), + encryptedDataBuffer /* out*/, + encryptedLength /* out */); + + partHdr->partition->section->IncreaseLengthAndPadTo(encryptedLength, 0x0); + memcpy(partHdr->partition->section->Data, encryptedDataBuffer, encryptedLength); + partHdr->partition->section->Length = encryptedLength; + partHdr->imageHeader->SetTotalFsblFwSizeIh(encryptedLength); + + LOG_INFO("Encrypted the partition - %s", partHdr->partition->section->Name.c_str()); + bi.options.CloseEncryptionDumpFile(); + delete[] encryptedDataBuffer; + return; + } + else + { + uint32_t encryptedLength; + uint32_t estimatedEncrLength = partHdr->partition->section->Length + totalBlocksOverhead; + uint8_t* encryptedDataBuffer = new uint8_t[estimatedEncrLength]; + + ChunkifyAndEncrypt(options, + partHdr->partition->section->Data, + (uint32_t)partHdr->partition->section->Length, + NULL, 0, + encryptedDataBuffer /* out*/, + encryptedLength /* out */); + + partHdr->partition->section->IncreaseLengthAndPadTo(encryptedLength, 0x0); + memcpy(partHdr->partition->section->Data, encryptedDataBuffer, encryptedLength); + partHdr->partition->section->Length = encryptedLength; + partHdr->imageHeader->SetTotalFsblFwSizeIh(encryptedLength); + + LOG_INFO("Encrypted the partition - %s", partHdr->partition->section->Name.c_str()); + bi.options.CloseEncryptionDumpFile(); + delete[] encryptedDataBuffer; + return; + } +} \ No newline at end of file diff -Nru xilinx-bootgen-2022.1/encryption-zynqmp.cpp xilinx-bootgen-2022.2/encryption-zynqmp.cpp --- xilinx-bootgen-2022.1/encryption-zynqmp.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/encryption-zynqmp.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -700,12 +700,14 @@ if (GetAesSeed() == NULL) { aesSeed = new uint32_t[WORDS_PER_AES_KEY]; + memset(aesSeed, 0, WORDS_PER_AES_KEY); GenerateAesSeed(); } if (GetFixedInputData() == NULL) { fixedInputData = new uint32_t[WORDS_PER_FID]; + memset(fixedInputData, 0, WORDS_PER_FID); GenerateAesFixedInputData(); } diff -Nru xilinx-bootgen-2022.1/encryption.cpp xilinx-bootgen-2022.2/encryption.cpp --- xilinx-bootgen-2022.1/encryption.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/encryption.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -39,8 +39,8 @@ static bool kdfVersion = false; if (!kdfVersion) { - LOG_TRACE("KDF Version : 0x%X", kdf->GetVersion()); - kdfVersion = true; + LOG_INFO("KDF Version : %s", kdf->GetVersion().c_str()); + kdfVersion = true; } LOG_TRACE("Generating the AES key file"); std::string devicePartName = options.GetDevicePartName(); @@ -56,12 +56,14 @@ if (GetAesSeed() == NULL) { aesSeed = new uint32_t[WORDS_PER_AES_KEY]; + memset(aesSeed, 0, WORDS_PER_AES_KEY); } GenerateAesSeed(); if (GetFixedInputData() == NULL) { fixedInputData = new uint32_t[WORDS_PER_FID]; + memset(fixedInputData, 0, WORDS_PER_FID); } GenerateAesFixedInputData(); diff -Nru xilinx-bootgen-2022.1/encryption.h xilinx-bootgen-2022.2/encryption.h --- xilinx-bootgen-2022.1/encryption.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/encryption.h 2022-09-26 06:24:42.000000000 +0000 @@ -112,6 +112,7 @@ return Encryption::None; } virtual void Process(BootImage& bi, PartitionHeader* partition) {}; + virtual void ChunkifyAndProcess(BootImage & bi, PartitionHeader * partHdr) {}; virtual void Process(BootImage& bi) {}; virtual void WriteEncryptionKeyFile(const std::string& baseFileName, bool useOptionalKey, uint32_t blocks) {}; virtual void ReadEncryptionKeyFile(const std::string& keyFileName) {}; diff -Nru xilinx-bootgen-2022.1/imageheadertable-versal.cpp xilinx-bootgen-2022.2/imageheadertable-versal.cpp --- xilinx-bootgen-2022.1/imageheadertable-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/imageheadertable-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -70,6 +70,20 @@ } /******************************************************************************/ +CdoCommandNop* CdoCmdNoOperation2(size_t size) +{ + CdoCommandNop* cdoCmd = new CdoCommandNop; + uint32_t length = size - CDO_CMD_NOP_SIZE - 4; /* consider the NOP command header and length as 2 NOPs */ + cdoCmd->header.reserved = 0x00; + cdoCmd->header.length = 0xff; + cdoCmd->header.handler_id = 1; + cdoCmd->header.cmd_id = CdoCmds::NOP; + cdoCmd->length = (length / CDO_CMD_NOP_SIZE); + LOG_TRACE(" CDO_CMD_NOP - %d", cdoCmd->length + 2); + return cdoCmd; +} + +/******************************************************************************/ VersalImageHeaderTable::VersalImageHeaderTable() : kekIvMust(false) , bootDevice(0) @@ -337,6 +351,7 @@ SetMetaHdrGreyOrBlackIv(kekIvFile); SetImageHeaderTableAttributes(); SetReservedFields(); + SetOptionalDataSize(); SetChecksum(); } @@ -594,6 +609,40 @@ } /******************************************************************************/ +void VersalImageHeaderTable::SetOptionalDataSize() +{ + iHTable->optionalDataSize = iht_optional_data_length / 4; +} + +/******************************************************************************/ +void VersalImageHeaderTable::SetXplmModulesData(BootImage& bi, uint32_t * data, uint32_t size) +{ + if (size != 0) + { + bi.xplm_modules_data_length = size; + bi.xplm_modules_data = (uint32_t*)malloc(bi.xplm_modules_data_length); + memcpy(bi.xplm_modules_data, data, bi.xplm_modules_data_length); + } +} + +/******************************************************************************/ +void VersalImageHeaderTable::SetOptionalData(uint32_t * data, uint32_t size) +{ + iht_optional_data_length = size; + if (size != 0) + { + iht_optional_data = (uint32_t*)malloc(iht_optional_data_length); + memcpy(iht_optional_data, data, iht_optional_data_length); + + section->IncreaseLengthAndPadTo(sizeof(VersalImageHeaderTableStructure) + iht_optional_data_length, 0); + memcpy(section->Data + sizeof(VersalImageHeaderTableStructure), iht_optional_data, iht_optional_data_length); + + iHTable = (VersalImageHeaderTableStructure*)section->Data; + } + iHTable->optionalDataSize = iht_optional_data_length / 4; +} + +/******************************************************************************/ void VersalImageHeaderTable::RealignSectionDataPtr(void) { iHTable = (VersalImageHeaderTableStructure*)section->Data; @@ -732,10 +781,16 @@ section = new Section("ImageHeader " + Name, size); imageHeader = (VersalImageHeaderStructure*)section->Data; ifs.read((char*)imageHeader, size); - long count = imageHeader->dataSectionCount; - long offset = imageHeader->partitionHeaderWordOffset * sizeof(uint32_t); - for (uint8_t index = 0; indexdataSectionCount < 32) + { + count = imageHeader->dataSectionCount; + } + + uint32_t offset = imageHeader->partitionHeaderWordOffset * sizeof(uint32_t); + + for (uint8_t index = 0; index < count; index++) { Bootloader = IsBootloader; @@ -791,15 +846,21 @@ imageHeader = (VersalImageHeaderStructure*)section->Data; memcpy(imageHeader, importedIH, size); - long offset = (imageHeader->partitionHeaderWordOffset * sizeof(uint32_t)) + (img_index * sizeof(VersalPartitionHeaderTableStructure)); + uint32_t offset = (imageHeader->partitionHeaderWordOffset * sizeof(uint32_t)) + (img_index * sizeof(VersalPartitionHeaderTableStructure)); VersalPartitionHeaderTableStructure* tempPHT = new VersalPartitionHeaderTableStructure; ifs.seekg(offset); ifs.read((char*)tempPHT, sizeof(VersalPartitionHeaderTableStructure)); - uint32_t count = tempPHT->dataSectionCount; + + uint32_t count = 0; + if (imageHeader->dataSectionCount < 32) + { + count = tempPHT->dataSectionCount; + } + delete tempPHT; - for (uint8_t index = 0; index 0) { - ParseCdos(bi, filelist, &buffer, &size, false); + if ((bi.bifOptions->pdiType == PartitionType::SLR_SLAVE_CONFIG) && (getenv("BOOTGEN_PROCESS_NOC_MARKERS") != NULL)) + { + ParseSlaveSlrConfigCdos(bi, filelist, &buffer, &size, false); + } + else + { + ParseCdos(bi, filelist, &buffer, &size, false); + } } SetPartitionType(PartitionType::CONFIG_DATA_OBJ); PartitionHeader* hdr = new VersalPartitionHeader(this, 0); @@ -1646,6 +1714,9 @@ /* For bootloader, all the sections are combined by padding the gaps to create only partition */ if (Bootloader) { + bi.imageHeaderTable->SetOptionalData(elf->iht_optional_data, elf->iht_optional_data_size); + bi.imageHeaderTable->SetXplmModulesData(bi, elf->xplm_modules_data, elf->xplm_modules_data_size); + /* Only loadable sections with non-size are considered */ if ((elf->GetProgramHeaderType(iprog) == xPT_LOAD) && (size > 0)) { @@ -1806,12 +1877,178 @@ } /******************************************************************************/ +void VersalImageHeader::ParseSlaveSlrConfigCdos(BootImage& bi, std::vector filelist, uint8_t** cdo_data, size_t* cdo_size, bool add_ssit_sync_master) +{ + uint8_t* total_cdo_data = NULL; + uint8_t* cdo_padded_buffer = NULL; + size_t cdo_padded_buffer_length = 0; + uint64_t total_cdo_length = 0; + + uint32_t* start_marker_offsets = NULL; + uint8_t num_start_markers = 0; + uint32_t* end_marker_offsets = NULL; + uint8_t num_end_markers = 0; + + if (filelist.size() > 0) + { + /* Offset and length are set to CDO header size, to take into account the addition of + merged CDO header which will be added at the end */ + uint64_t offset = sizeof(VersalCdoHeader); + total_cdo_length = sizeof(VersalCdoHeader); + + for (uint8_t idx = 0; idx != filelist.size(); idx++) + { + void* cdo_data = NULL; + size_t cdo_length = 0; + uint64_t actual_cdo_size = 0; + const char* cdo_filename = filelist.at(idx).c_str(); + CdoSequence * cdo_seq; + CdoSequence * cdo_seq1; + if (add_ssit_sync_master) + { + /* Add SSIT Sync Master command */ + cdo_seq1 = cdoseq_load_cdo(cdo_filename); + if (cdo_seq1 == NULL) + { + LOG_ERROR("Error parsing CDO file"); + } + cdo_seq = cdocmd_create_sequence(); + cdocmd_add_ssit_sync_master(cdo_seq); + cdocmd_concat_seq(cdo_seq, cdo_seq1); + add_ssit_sync_master = false; + } + else + { + cdo_seq = cdoseq_load_cdo(cdo_filename); + if (cdo_seq == NULL) + { + LOG_ERROR("Error parsing CDO file"); + } + } + + if (bi.overlayCDO && cdooverlay_apply(cdo_seq, (CdoOverlayInfo *)(bi.overlayCDO))) + { + LOG_ERROR("Error applying overlay CDO file"); + } + + /* Enable the search for sync points - only needs to be done for SSIT devices */ + search_for_sync_points(); + cdo_data = cdoseq_to_binary(cdo_seq, &cdo_length, 0); + CheckIdsInCdo(cdo_seq); + + if (cdo_length != 0) + { + actual_cdo_size = cdo_length - sizeof(VersalCdoHeader); + } + else + { + LOG_ERROR("Incorrect CDO length read from : %s", cdo_filename); + } + + total_cdo_length += (actual_cdo_size); + total_cdo_data = (uint8_t*)realloc(total_cdo_data, total_cdo_length); + memcpy(total_cdo_data + offset, (uint8_t*)cdo_data + sizeof(VersalCdoHeader), actual_cdo_size); + offset += actual_cdo_size; + //delete cdo_data; + } + + num_start_markers = get_num_start_markers(); + start_marker_offsets = get_slr_start_marker_offsets(); + num_end_markers = get_num_end_markers(); + end_marker_offsets = get_slr_end_marker_offsets(); + + if (num_start_markers != num_end_markers) + { + LOG_ERROR("Number of start and end markers for NoC startup sequence is not same."); + } + + if (num_start_markers > 0) + { + size_t size = 0, prev_start = 0; + size_t start = 0, end = 0; + uint32_t p_offset = 0; + size_t copied_offset = 0; + size_t pad_bytes = 0; + LOG_TRACE(" markers found at offsets -"); + for (int i = 0; i < num_start_markers; i++) + { + start = *(start_marker_offsets + i) * 4; + end = *(end_marker_offsets + i) * 4; + /* Create a new chunk at start only if start and end are not in same 32K data */ + if (start / SSIT_CHUNK_SIZE != end / SSIT_CHUNK_SIZE) + { + size = start - prev_start; + + pad_bytes = SSIT_CHUNK_SIZE - (size % SSIT_CHUNK_SIZE); + cdo_padded_buffer_length += (size + pad_bytes); + + cdo_padded_buffer = (uint8_t*)realloc(cdo_padded_buffer, cdo_padded_buffer_length); + memcpy(cdo_padded_buffer + p_offset, total_cdo_data + copied_offset, size); + p_offset += size; + copied_offset += size; + + if (pad_bytes != 0) + { + CdoCommandNop* cdoCmd = CdoCmdNoOperation2(pad_bytes); + memcpy(cdo_padded_buffer + p_offset, cdoCmd, CDO_CMD_NOP_SIZE + 4); + p_offset += (CDO_CMD_NOP_SIZE + 4); + if (cdoCmd->length > 0) + { + memset(cdo_padded_buffer + p_offset, 0, cdoCmd->length * sizeof(uint32_t)); + p_offset += (cdoCmd->length * sizeof(uint32_t)); + } + } + + prev_start = start; + LOG_TRACE(" offset = 0x%lx, end = 0x%lx", start, end); + } + else + { + LOG_TRACE(" skipping marker at 0x%lx since end marker (0x%lx) is in same chunk", start, end); + } + } + /* Remaining data after last marker */ + size = total_cdo_length - prev_start; + cdo_padded_buffer_length += size; + cdo_padded_buffer = (uint8_t*)realloc(cdo_padded_buffer, cdo_padded_buffer_length); + memcpy(cdo_padded_buffer + p_offset, total_cdo_data + copied_offset, size); + + delete start_marker_offsets; + if (end_marker_offsets) delete end_marker_offsets; + + total_cdo_length = (cdo_padded_buffer_length); + total_cdo_data = (uint8_t*)realloc(total_cdo_data, total_cdo_length); + memcpy(total_cdo_data, cdo_padded_buffer, total_cdo_length); + delete cdo_padded_buffer; + } + + VersalCdoHeader* cdo_header = new VersalCdoHeader; + cdo_header->remaining_words = 0x04; + cdo_header->id_word = 0x004f4443; /* CDO */ + cdo_header->version = 0x00000200; /* Version - 2.0 */ + cdo_header->length = (total_cdo_length - sizeof(VersalCdoHeader)) / 4; + cdo_header->checksum = ~(cdo_header->remaining_words + cdo_header->id_word + cdo_header->version + cdo_header->length); + memcpy(total_cdo_data, cdo_header, sizeof(VersalCdoHeader)); + delete cdo_header; + } + + *cdo_size = total_cdo_length; + *cdo_data = total_cdo_data; +} + +/******************************************************************************/ void VersalImageHeader::ParseCdos(BootImage& bi, std::vector filelist, uint8_t** cdo_data, size_t* cdo_size, bool add_ssit_sync_master) { uint8_t* total_cdo_data = NULL; uint64_t total_cdo_length = 0; void *cdo_data_pp = NULL; size_t cdo_data_pp_length = 0; + char slrid_from_source = 0; + char slrid_from_binary = 0; + char input_ch_souce = 0; + char input_ch_binary = 0; + bool is_source_cdo = false; + bool is_binary_cdo = false; if (filelist.size() > 0) { @@ -1849,19 +2086,60 @@ LOG_ERROR("Error parsing CDO file"); } } + + slrid_from_source = slr_id_from_source(input_ch_souce); + if (slrid_from_source != 0) + { + if (bi.globalSlrId != 0) + { + is_source_cdo = (bi.globalSlrId == slrid_from_source); + if (is_source_cdo == false) + { + LOG_WARNING("Mismatch between SLR ID of %s and rest of the CDOs. This may cause runtime issues. \n Please ensure that all the CDOs used for creating the pdi are for the same SLR/device", cdo_filename); + } + bi.globalSlrId = 0; + } + bi.globalSlrId = slrid_from_source; + } + else + { + slrid_from_binary = slr_id_from_binary(input_ch_binary); + if (slrid_from_binary != 0) + { + if (bi.globalSlrId != 0) + { + is_binary_cdo = (bi.globalSlrId == slrid_from_binary); + if (is_binary_cdo == false) + { + LOG_WARNING("Mismatch between SLR ID of %s and rest of the CDOs. This may cause runtime issues. \n Please ensure that all the CDOs used for creating the pdi are for the same SLR/device", cdo_filename); + } + bi.globalSlrId = 0; + } + else + { + bi.globalSlrId = slrid_from_binary; + } + } + } if (bi.overlayCDO && cdooverlay_apply(cdo_seq, (CdoOverlayInfo *)(bi.overlayCDO))) { LOG_ERROR("Error applying overlay CDO file"); } cdo_data = cdoseq_to_binary(cdo_seq, &cdo_length, 0); CheckIdsInCdo(cdo_seq); + // TODO: Call this only for v2 + const char * env = getenv("BOOTGEN_CHECK_CDO_COMMANDS"); + if (env && *env != '\0') { + if (check_cdo_commands(cdo_data, cdo_length, bi.xplm_modules_data, bi.xplm_modules_data_length) < 0) { + LOG_WARNING("Invalid PLM cdo command is found in input cdo file"); + } + } //cdocmd_delete_sequence(cdo_seq); if (cdocmd_post_process_cdo(cdo_data, cdo_length, &cdo_data_pp, &cdo_data_pp_length)) { LOG_ERROR("PMC CDO post process error"); } - if (cdo_data_pp != NULL) { //delete cdo_data; @@ -1869,7 +2147,15 @@ cdo_length = cdo_data_pp_length; } - actual_cdo_size = cdo_length - sizeof(VersalCdoHeader); + if (cdo_length > sizeof(VersalCdoHeader)) + { + actual_cdo_size = cdo_length - sizeof(VersalCdoHeader); + } + else + { + LOG_ERROR("Incorrect cdo length read from : %s", cdo_filename); + } + total_cdo_length += (actual_cdo_size); total_cdo_data = (uint8_t*)realloc(total_cdo_data, total_cdo_length); memcpy(total_cdo_data + offset, (uint8_t*)cdo_data + sizeof(VersalCdoHeader), actual_cdo_size); @@ -2643,9 +2929,16 @@ //cdocmd_delete_sequence(golden_cdo_seq); const size_t header_size = 20; - if (user_cdo_size == golden_cdo_size && memcmp(user_cdo_buffer + header_size, golden_cdo_buffer + header_size, golden_cdo_size - header_size) == 0) + if (golden_cdo_size != 0) { - return true; + if (user_cdo_size == golden_cdo_size && memcmp(user_cdo_buffer + header_size, golden_cdo_buffer + header_size, golden_cdo_size - header_size) == 0) + { + return true; + } + } + else + { + LOG_ERROR("Incorrect length read from : %s", golden_cdo_filename.c_str()); } return false; @@ -2816,7 +3109,7 @@ if (do_ssit_check != NULL) { switch (bi.bifOptions->idCode) { - case 0x04d14093: /* h50 */ + case 0x04d14093: device_name = "xcvp1802"; break; default: @@ -2827,8 +3120,8 @@ /* Add CDO Write Keyhole commands */ for (std::list::iterator slr_id = slrBootPdiInfo.begin(); slr_id != slrBootPdiInfo.end(); slr_id++) { - uint32_t file_size; - uint32_t pad_size; + uint32_t file_size = 0; + uint32_t pad_size = 0; std::ifstream stream((*slr_id)->file.c_str(), std::ios_base::binary); if (!stream) { @@ -3029,9 +3322,17 @@ uint8_t* cdo_buffer = (uint8_t*)cdoseq_to_binary(cdo_seq, &cdo_size, 0); file_size = cdo_size; - pad_size = file_size + ((4 - (file_size & 3)) & 3); - file_size -= sizeof(VersalCdoHeader); - pad_size -= sizeof(VersalCdoHeader); + if (file_size > sizeof(VersalCdoHeader)) + { + pad_size = file_size + ((4 - (file_size & 3)) & 3); + file_size -= sizeof(VersalCdoHeader); + pad_size -= sizeof(VersalCdoHeader); + } + else + { + LOG_ERROR("Incorrect CDO length read from : %s", cdo_filename); + } + if (IsCdoCmdEndFound(cdo_buffer, file_size)) { file_size -= +sizeof(CdoCommandHeader); @@ -3093,7 +3394,7 @@ size_t num_bytes = 0; static bool chunk_size_info_printed = false; /* Default chunk size - 32KB */ - uint64_t chunk_size = 0x8000; + uint64_t chunk_size = SSIT_CHUNK_SIZE; char * ssit_chunk_size = getenv("BOOTGEN_SSIT_CHUNK_SIZE"); if (ssit_chunk_size != NULL) { @@ -3365,8 +3666,14 @@ CdoCommandNop* cdoCmd = CdoCmdNoOperation(sizeof(VersalCdoHeader)); memcpy(p_buffer + p_offset, cdoCmd, CDO_CMD_NOP_SIZE); memset(p_buffer + p_offset + CDO_CMD_NOP_SIZE, 0, sizeof(VersalCdoHeader) - CDO_CMD_NOP_SIZE); - memcpy(p_buffer + p_offset + sizeof(VersalCdoHeader), part_data + sizeof(VersalCdoHeader), part_size - sizeof(VersalCdoHeader)); - + if (part_size > sizeof(VersalCdoHeader)) + { + memcpy(p_buffer + p_offset + sizeof(VersalCdoHeader), part_data + sizeof(VersalCdoHeader), part_size - sizeof(VersalCdoHeader)); + } + else + { + LOG_ERROR("Incorrect CDO length read from : %s", cdo_filename); + } p_offset += (master_chunk_size); (*slr_info)->offset += (master_chunk_size); master_file_size += master_chunk_size; @@ -3440,16 +3747,63 @@ bool info_display = true; VersalImageHeaderTableStructure* iHT = (VersalImageHeaderTableStructure*)data; size_t offset = iHT->firstPartitionHeaderWordOffset * 4; - slr_info->partition_sizes.push_back(sizeof(VersalImageHeaderTableStructure) + (iHT->totalMetaHdrLength * 4)); + slr_info->partition_sizes.push_back(sizeof(VersalImageHeaderTableStructure) + (iHT->optionalDataSize * 4) + (iHT->totalMetaHdrLength * 4)); + for (uint8_t index = 0; index < iHT->partitionTotalCount; index++) { VersalPartitionHeaderTableStructure* pHT = (VersalPartitionHeaderTableStructure*)(data + offset); - slr_info->partition_sizes.push_back(pHT->totalPartitionLength * 4); + /* TotalPartitionLength includes AC + partition + hashes if authenticated.*/ + if (pHT->checksumWordOffset != 0) + { + slr_info->partition_sizes.push_back((pHT->totalPartitionLength * 4) + SHA3_LENGTH_BYTES); + } + else + { + slr_info->partition_sizes.push_back(pHT->totalPartitionLength * 4); + } + offset += sizeof(VersalPartitionHeaderTableStructure); if (((pHT->partitionAttributes >> vphtPartitionTypeShift) & vphtPartitionTypeMask) == PartitionType::CONFIG_DATA_OBJ) { CdoSequence * cdo_seq; - cdo_seq = decode_cdo_binary(data + pHT->partitionWordOffset*4, pHT->totalPartitionLength*4); + if (pHT->checksumWordOffset != 0 || pHT->authCertificateOffset != 0) + { + uint8_t* partition_data = NULL; + uint32_t partition_length = pHT->encryptedPartitionLength * 4; + uint64_t data_chunk = SECURE_32K_CHUNK - SHA3_LENGTH_BYTES; + uint32_t partition_data_offset = (pHT->partitionWordOffset * 4); + + partition_data = (uint8_t*)malloc(partition_length); + memset(partition_data, 0x00, partition_length); + + if (partition_length <= data_chunk) + { + memcpy(partition_data, data + partition_data_offset, partition_length); + } + else + { + int num_secure_chunks = partition_length / data_chunk; + if (partition_length % data_chunk != 0) + { + num_secure_chunks++; + } + uint32_t lastChunkSize = partition_length - ((num_secure_chunks - 1) * data_chunk); + + for (int i = 1; i < num_secure_chunks; i++) + { + memcpy(partition_data + ((i - 1) * data_chunk), data + partition_data_offset, data_chunk); + partition_data_offset += (data_chunk + SHA3_LENGTH_BYTES); + } + + memcpy(partition_data + ((num_secure_chunks - 1) * data_chunk), data + partition_data_offset, lastChunkSize); + } + cdo_seq = decode_cdo_binary(partition_data, partition_length); + } + else + { + cdo_seq = decode_cdo_binary(data + pHT->partitionWordOffset * 4, pHT->totalPartitionLength * 4); + } + if (cdo_seq == NULL) { LOG_ERROR("decode_cdo_binary failed - %s", slr_info->file.c_str()); @@ -3993,7 +4347,13 @@ /* Find the no. of image headers to be created */ num_of_images = 0; uint32_t num_of_sections = 0; - uint32_t p_count = subSysImageHeaderTable->dataSectionCount; + + uint32_t p_count = 0; + if (subSysImageHeaderTable->dataSectionCount < 32) + { + p_count = subSysImageHeaderTable->dataSectionCount; + } + uint32_t p_offset = subSysImageHeaderTable->partitionHeaderWordOffset * sizeof(uint32_t); p_offset += 0x28; for (uint32_t i = 0; i < p_count; i++) diff -Nru xilinx-bootgen-2022.1/imageheadertable-versal.h xilinx-bootgen-2022.2/imageheadertable-versal.h --- xilinx-bootgen-2022.1/imageheadertable-versal.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/imageheadertable-versal.h 2022-09-26 06:24:42.000000000 +0000 @@ -38,14 +38,15 @@ ********************************************* P R E P R O C E S S O R S *** ------------------------------------------------------------------------------- */ -#define MAX_NUM_PARTITIONS_VERSAL 32 +#define MAX_NUM_PARTITIONS_VERSAL 20 +#define MAX_NUM_IMAGES_VERSAL 10 /* 128MB Linear QSPI range */ #define LQSPI_BASE_ADDR_VERSAL (0xC0000000) #define LQSPI_SIZE_VERSAL (0x8000000) #define LQSPI_RANGE_MASK_VERSAL (0x7FFFFFF) -#define MAX_IHT_RESERVED_VERSAL 9 +#define MAX_IHT_RESERVED_VERSAL 8 #define MAX_SLAVE_SLRS 3 #define CDO_COMMAND_SIZE 16 @@ -63,6 +64,8 @@ #define SBI_KEYHOLE_SIZE 0x10000 #define AIE_BASE_ADDR 0x20000000000 +#define SSIT_CHUNK_SIZE 0x8000 + typedef enum { vihImageOwnerShift = 3, @@ -148,9 +151,10 @@ uint32_t extendedIdCode; // 0x44 uint32_t headerAuthCertificateWordOffset; // 0x48 uint32_t metaHdrGreyOrBlackIV[IV_LENGTH]; // 0x4C - uint32_t reserved[MAX_IHT_RESERVED_VERSAL]; // Reserved + uint32_t optionalDataSize; // 0x58 + uint32_t reserved[MAX_IHT_RESERVED_VERSAL]; // 0x5C - 0x78 uint32_t ihtChecksum; // 0x7C -}VersalImageHeaderTableStructure; +} VersalImageHeaderTableStructure; typedef struct { @@ -228,6 +232,7 @@ typedef struct { CdoCommandHeader header; + uint32_t length; } CdoCommandNop; #define CDO_CMD_NOP_SIZE 4 @@ -324,6 +329,9 @@ void SetHeaderAuthCertificateOffset(uint32_t offset); void SetReservedFields(void); void SetChecksum(void); + void SetOptionalDataSize(void); + void SetOptionalData(uint32_t*, uint32_t); + void SetXplmModulesData(BootImage& bi, uint32_t*, uint32_t); uint32_t GetImageHeaderTableVersion(void); uint32_t GetPartitionCount(void); @@ -388,6 +396,7 @@ void CreateSlrBootPartition(BootImage& bi); void CreateSlrConfigPartition(BootImage& bi); void ParseCdos(BootImage& bi, std::vector filelist, uint8_t**, size_t*, bool); + void ParseSlaveSlrConfigCdos(BootImage & bi, std::vector filelist, uint8_t **, size_t *, bool); //post-processing bool PostProcessCdo(const uint8_t* cdo_data, Binary::Length_t cdo_size); bool PostProcessCfi(const uint8_t* cdo_data, Binary::Length_t cdo_size); diff -Nru xilinx-bootgen-2022.1/imageheadertable-zynqmp.cpp xilinx-bootgen-2022.2/imageheadertable-zynqmp.cpp --- xilinx-bootgen-2022.1/imageheadertable-zynqmp.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/imageheadertable-zynqmp.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -276,7 +276,7 @@ /* Override the exec and load address, if startup & load are set through BIF attributes */ Startup.IsSet() ? (exec_addr = Startup.Value()) : (exec_addr = elf->GetStartUpAddress()); - if (Load.IsSet()) + if (Load.IsSet() && iprog == 0) { load_addr = Load.Value(); } @@ -459,20 +459,6 @@ { hdr->execState = A53ExecState::AARCH32; } - if(updateReserveInPh == true) - { - if(Reserve.IsSet()) - { - if(data.len > Reserve.Value()) - { - LOG_WARNING("Total Partition length is more than Reserve Length. Hence reserve attribute is ignored."); - } - else - { - data.len = Reserve.Value(); - } - } - } if (Bootloader) { @@ -498,6 +484,20 @@ hdr->execAddress = Load.Value(); } + if (updateReserveInPh == true) + { + if(Reserve.IsSet()) + { + if(data.len > Reserve.Value()) + { + LOG_WARNING("Total Partition length is more than Reserve Length. Hence reserve attribute is ignored."); + } + else + { + data.len = Reserve.Value(); + } + } + } hdr->partition = new Partition(hdr, data.bytes, data.len); hdr->partitionSize = data.len; partitionHeaderList.push_back(hdr); diff -Nru xilinx-bootgen-2022.1/imageheadertable.cpp xilinx-bootgen-2022.2/imageheadertable.cpp --- xilinx-bootgen-2022.1/imageheadertable.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/imageheadertable.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ cache.Sections.push_back(section); } - SetImageHeaderTableVersion(0x01020000); + SetImageHeaderTableVersion(VERSION_ZYNQ_ZYNQMP); for(std::list::iterator image = bi.imageList.begin(); image != bi.imageList.end(); image++) @@ -216,6 +216,9 @@ , isIhLowPowerDomain(false) , isIhPLPowerDomain(false) , isIhSystemPowerDomain(false) + , lockstep(false) + , cluster(0) + , delayAuth(false) { } /******************************************************************************/ @@ -284,6 +287,9 @@ , isIhLowPowerDomain(false) , isIhPLPowerDomain(false) , isIhSystemPowerDomain(false) + , lockstep(false) + , cluster(0) + , delayAuth(false) { } /******************************************************************************/ @@ -352,6 +358,9 @@ , isIhLowPowerDomain(false) , isIhPLPowerDomain(false) , isIhSystemPowerDomain(false) + , lockstep(false) + , cluster(0) + , delayAuth(false) { } diff -Nru xilinx-bootgen-2022.1/imageheadertable.h xilinx-bootgen-2022.2/imageheadertable.h --- xilinx-bootgen-2022.1/imageheadertable.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/imageheadertable.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,9 @@ #ifndef _IMAGEHEADERTABLE_H_ #define _IMAGEHEADERTABLE_H_ +/* Zynq/ZynqMp Version Updates */ +#define VERSION_ZYNQ_ZYNQMP 0x01020000 + /* ------------------------------------------------------------------------------- *********************************************** H E A D E R F I L E S *** @@ -143,6 +146,9 @@ virtual void SetA32ExecMode(bool) { }; virtual void SetDpacm(DpaCM::Type) { }; virtual void SetPufHdLocation(PufHdLoc::Type type) { }; + virtual void SetClusterNum(uint8_t num) { cluster = num; } + virtual void SetLockStepFlag(bool flag) { lockstep = flag; } + virtual void SetDelayAuthFlag (bool flag) { delayAuth = flag; } virtual void SetEncryptionKeySrc(KeySource::Type type) { }; virtual void SetPartitionRevocationId(uint32_t id) { }; @@ -200,6 +206,9 @@ virtual std::string GetKekIV() { return ""; } virtual PufHdLoc::Type GetPufHdLocation(void) { return PufHdLoc::PUFinEFuse; } std::vector GetFileList(void) { return filelist; } + virtual uint8_t GetClusterNum(void) { return cluster; } + virtual bool GetLockStepFlag(void) { return lockstep; } + virtual bool GetDelayAuthFlag(void) { return delayAuth; } // For multiple key files and auth parameters void SetAesKeyFile(std::string filename) { aesKeyFile = filename; } @@ -274,6 +283,8 @@ bool xipMode; bool early_handoff; bool hivec; + bool lockstep; + uint32_t cluster; uint32_t pmuFwSize; uint32_t pmcdataSize; uint32_t fsblFwSize; @@ -304,6 +315,7 @@ uint32_t spkSelect; uint32_t spkId; + bool delayAuth; Authentication::Type authType; AuthenticationContext* Auth; EncryptionContext* Encrypt; @@ -371,6 +383,8 @@ , metaHdrSecHdrIv(NULL) , metaHdrKeySrc(KeySource::None) , encrypt(NULL) + , iht_optional_data(NULL) + , iht_optional_data_length(0) { } virtual ~ImageHeaderTable() {} @@ -396,6 +410,8 @@ virtual void SetBootDevice(BootDevice::Type type) {}; virtual void SetBootDeviceAddress(uint32_t address) {}; virtual void ValidateSecurityCombinations(Authentication::Type, Encryption::Type, Checksum::Type) = 0; + virtual void SetOptionalData(uint32_t*, uint32_t) {}; + virtual void SetXplmModulesData(BootImage& bi, uint32_t*, uint32_t) {}; virtual uint32_t GetImageHeaderTableVersion(void) { return 0; } virtual uint32_t GetPartitionCount(void) { return 0; } @@ -412,6 +428,8 @@ uint32_t metaHeaderLength; KeySource::Type metaHdrKeySrc; uint8_t* metaHdrSecHdrIv; + uint32_t* iht_optional_data; + uint32_t iht_optional_data_length; protected: bool slaveBootSplitMode; diff -Nru xilinx-bootgen-2022.1/kdf.cpp xilinx-bootgen-2022.2/kdf.cpp --- xilinx-bootgen-2022.1/kdf.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/kdf.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,4 +1,3 @@ -// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -580,7 +579,7 @@ } /******************************************************************************/ -uint32_t Kdf::GetVersion(void) +std::string Kdf::GetVersion(void) { return VERSION; } @@ -754,7 +753,6 @@ return ret_value; } - bool verified = false; std::cout << "Generating Ko using Counter-Mode KDF..." << std::endl; std::cout << "KO = "; uint32_t number_of_Ko_bytes = key_out_length / 8; @@ -772,23 +770,17 @@ if (memcmp(key_out, verify_ko, number_of_Ko_bytes) == 0) { std::cout << "Verified with given Ko" << std::endl; - verified = true; + return 0; } else { std::cout << "Failed to verify with given Ko" << std::endl; + return KDF_CAVP_VERIFY_KO_FAILED; } } std::cout << std::endl; - if (verified) - { - return 0; - } - else - { - return KDF_CAVP_VERIFY_KO_FAILED; - } + return 0; } /******************************************************************************/ diff -Nru xilinx-bootgen-2022.1/kdf.h xilinx-bootgen-2022.2/kdf.h --- xilinx-bootgen-2022.1/kdf.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/kdf.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,4 +1,3 @@ -// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -39,7 +38,7 @@ #include #include -#define VERSION 0x00010000 +#define VERSION "v1.0" #define BYTES_PER_AES_SEED 32 #define KDF_COUNTER_BYTES 4 @@ -95,7 +94,7 @@ void SetKdfLogFilename(std::string filename); std::string GetKdfLogFilename(void); - uint32_t GetVersion(void); + std::string GetVersion(void); private: uint8_t* key_out; diff -Nru xilinx-bootgen-2022.1/options.cpp xilinx-bootgen-2022.2/options.cpp --- xilinx-bootgen-2022.1/options.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/options.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,7 +91,7 @@ else { Kdf* kdfCtx = new Kdf; - LOG_TRACE("KDF Version : 0x%X", kdfCtx->GetVersion()); + LOG_INFO("KDF Version : %s", kdfCtx->GetVersion().c_str()); uint32_t ret_value = kdfCtx->CAVPonCounterModeKDF(GetKDFTestVectorFile()); delete kdfCtx; if (ret_value != 0) @@ -322,6 +322,11 @@ void Options::SetArchType(Arch::Type type) { archType = type; + if (archType == Arch::VERSALNET) + { + archType = Arch::VERSAL; + versalNetSeries = true; + } } /******************************************************************************/ @@ -714,4 +719,19 @@ std::string Options::GetOverlayCDOFileName(void) { return overlayCDOFile; -} \ No newline at end of file +} + +/******************************************************************************/ +bool Options::IsSsitBif() +{ + bool ssit_bif = false; + for (std::vector::iterator bifoptions = bifOptionsList.begin(); bifoptions != bifOptionsList.end(); bifoptions++) + { + if ((*bifoptions)->slrBootCnt != 0 || (*bifoptions)->slrConfigCnt != 0) + { + ssit_bif = true; + break; + } + } + return ssit_bif; +} diff -Nru xilinx-bootgen-2022.1/options.h xilinx-bootgen-2022.2/options.h --- xilinx-bootgen-2022.1/options.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/options.h 2022-09-26 06:24:42.000000000 +0000 @@ -50,6 +50,7 @@ ZYNQMP, FPGA, VERSAL, + VERSALNET } Type; }; @@ -114,6 +115,7 @@ , dumpOption(DumpOption::NONE) , dumpPath("") , deviceKeyStored(false) + , versalNetSeries(false) { cmdEncryptOptions = new CommndLineEncryptOptions(); }; @@ -230,6 +232,8 @@ Authentication::Type GetSecureDebugAuthType(void); std::string GetSecureDebugImageFile(void); std::string GetOverlayCDOFileName (void); + bool IsSsitBif(void); + bool IsVersalNetSeries(void) { return versalNetSeries; } uint32_t totalHeadersSize; uint32_t bootheaderSize; @@ -280,10 +284,13 @@ CommndLineEncryptOptions *cmdEncryptOptions; BifOptions* bifOptions; std::vector bifOptionsList; + std::list includeBifOptionsList; std::string fsblFilename; Authentication::Type secureDebugAuthType; std::string secureDebugImageFilename; std::string overlayCDOFile; +private: + bool versalNetSeries; }; #endif diff -Nru xilinx-bootgen-2022.1/partition-versal.cpp xilinx-bootgen-2022.2/partition-versal.cpp --- xilinx-bootgen-2022.1/partition-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/partition-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,8 @@ : Partition(header0, section0) , header(header0) , firstChunkSize(0) + , versalNetSeries(false) + , secureChunkSize(SECURE_32K_CHUNK) { section = section0; @@ -54,6 +56,8 @@ : Partition(header0, data, length) , header(header0) , firstChunkSize(0) + , versalNetSeries(false) + , secureChunkSize(SECURE_32K_CHUNK) { std::string partition_name = ""; for (size_t i = 0; i < header->imageHeader->GetFileList().size(); i++) @@ -95,15 +99,15 @@ { chunkOnlength -= (SECURE_HDR_SZ + AES_GCM_TAG_SZ); } - dataChunksCount = (chunkOnlength / GetSecureChunkSize()) + (((chunkOnlength % GetSecureChunkSize()) == 0 ? 0 : 1)); + dataChunksCount = (chunkOnlength / secureChunkSize) + (((chunkOnlength % secureChunkSize) == 0 ? 0 : 1)); - if (chunkOnlength % GetSecureChunkSize() != 0) + if (chunkOnlength % secureChunkSize != 0) { - dataChunks.push_back(((chunkOnlength)-((dataChunksCount - 1) * GetSecureChunkSize()))); + dataChunks.push_back(((chunkOnlength)-((dataChunksCount - 1) * secureChunkSize))); } else { - dataChunks.push_back(GetSecureChunkSize()); + dataChunks.push_back(secureChunkSize); } for (uint32_t itr = 0; itr < dataChunksCount - 1; itr++) @@ -114,21 +118,209 @@ { if (encryptionFlag) { - dataChunks.push_back(GetSecureChunkSize() + SECURE_HDR_SZ + AES_GCM_TAG_SZ); - firstChunkSize = GetSecureChunkSize() + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + dataChunks.push_back(secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ; } else { - dataChunks.push_back(GetSecureChunkSize()); - firstChunkSize = GetSecureChunkSize(); + dataChunks.push_back(secureChunkSize); + firstChunkSize = secureChunkSize; } } else { - dataChunks.push_back(GetSecureChunkSize()); + dataChunks.push_back(secureChunkSize); } } + return newSectionLength; +} + +/******************************************************************************/ +size_t VersalPartition::GetBootloaderTotalDataChunks(Binary::Length_t partitionSize, std::vector& dataChunks, bool encryptionFlag) +{ + size_t newSectionLength = partitionSize; + size_t chunkOnlength = 0; + Binary::Length_t dataChunksCount = 0; + + //PMC DATA + if (header->imageHeader->GetTotalPmcFwSizeIh() != 0) + { + chunkOnlength = header->imageHeader->GetTotalPmcFwSizeIh(); + if (encryptionFlag) + { + chunkOnlength -= (SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + dataChunksCount = (chunkOnlength / secureChunkSize) + (((chunkOnlength % secureChunkSize) == 0 ? 0 : 1)); + if (dataChunksCount == 1) + { + if (chunkOnlength % secureChunkSize != 0) + { + size_t singleChunklength = (chunkOnlength)-((dataChunksCount - 1) * secureChunkSize); + if (encryptionFlag) + { + dataChunks.push_back(singleChunklength + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = singleChunklength + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + LOG_TRACE("length of pmc data remaining length 0x%X:", singleChunklength + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + else + { + dataChunks.push_back(singleChunklength); + firstChunkSize = singleChunklength; + LOG_TRACE("length of pmc data remaining length 0x%X:", singleChunklength); + } + } + else + { + if (encryptionFlag) + { + dataChunks.push_back(secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + LOG_TRACE("length of pmc data remaining length 0x%X:", secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + else + { + dataChunks.push_back(secureChunkSize); + firstChunkSize = secureChunkSize; + LOG_TRACE("length of pmc data remaining length 0x%X:", secureChunkSize); + } + } + } + else + { + if (chunkOnlength % secureChunkSize != 0) + { + dataChunks.push_back(((chunkOnlength)-((dataChunksCount - 1) * secureChunkSize))); + LOG_TRACE("length of pmc data remaining length %d:", ((chunkOnlength)-((dataChunksCount - 1) * secureChunkSize))); + } + else + { + dataChunks.push_back(secureChunkSize); + LOG_TRACE("length of pmc data remaining length %d:", secureChunkSize); + } + for (uint32_t itr = 0; itr < dataChunksCount - 1; itr++) + { + dataChunks.push_back(SHA3_LENGTH_BYTES); + newSectionLength += SHA3_LENGTH_BYTES; + header->imageHeader->SetTotalPmcFwSizeIh(header->imageHeader->GetTotalPmcFwSizeIh() + SHA3_LENGTH_BYTES); + if (itr == dataChunksCount - 2) + { + if (encryptionFlag) + { + dataChunks.push_back(secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + } + else + { + dataChunks.push_back(secureChunkSize); + firstChunkSize = secureChunkSize; + } + } + else + { + dataChunks.push_back(secureChunkSize); + } + } + } + } + + //PLM + chunkOnlength = header->imageHeader->GetTotalFsblFwSizeIh(); + if (encryptionFlag) + { + chunkOnlength -= (SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + dataChunksCount = (chunkOnlength / secureChunkSize) + (((chunkOnlength % secureChunkSize) == 0 ? 0 : 1)); + if (dataChunksCount == 1) + { + // If PMC CDO present, need to calculate the hash, so include hash + if (header->imageHeader->GetTotalPmcFwSizeIh()) + { + dataChunks.push_back(SHA3_LENGTH_BYTES); + newSectionLength += SHA3_LENGTH_BYTES; + header->imageHeader->SetTotalFsblFwSizeIh(header->imageHeader->GetTotalFsblFwSizeIh() + SHA3_LENGTH_BYTES); + } + if (chunkOnlength % secureChunkSize != 0) + { + size_t singleChunklength = (chunkOnlength) - ((dataChunksCount - 1) * secureChunkSize); + if (encryptionFlag) + { + dataChunks.push_back(singleChunklength + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = singleChunklength + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + LOG_TRACE("length of plm data remaining length 0x%X:", singleChunklength + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + else + { + dataChunks.push_back(singleChunklength); + firstChunkSize = singleChunklength; + LOG_TRACE("length of plm data remaining length 0x%X:", singleChunklength); + } + } + else + { + if (encryptionFlag) + { + dataChunks.push_back(secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + LOG_TRACE("length of plm data remaining length 0x%X:", secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + else + { + dataChunks.push_back(secureChunkSize); + firstChunkSize = secureChunkSize; + LOG_TRACE("length of plm data remaining length 0x%X:", secureChunkSize); + } + } + } + else + { + // If PMC CDO present, need to calculate the hash, so include hash + if (header->imageHeader->GetTotalPmcFwSizeIh()) + { + dataChunks.push_back(SHA3_LENGTH_BYTES); + newSectionLength += SHA3_LENGTH_BYTES; + header->imageHeader->SetTotalFsblFwSizeIh(header->imageHeader->GetTotalFsblFwSizeIh() + SHA3_LENGTH_BYTES); + } + if (chunkOnlength % secureChunkSize != 0) + { + dataChunks.push_back(((chunkOnlength)-((dataChunksCount - 1) * secureChunkSize))); + LOG_TRACE("length of plm data remaining length 0x%X:", ((chunkOnlength)-((dataChunksCount - 1) * secureChunkSize))); + } + else + { + dataChunks.push_back(secureChunkSize); + LOG_TRACE("length of plm data remaining length 0x%X:", secureChunkSize); + } + + for (uint32_t itr = 0; itr < dataChunksCount - 1; itr++) + { + dataChunks.push_back(SHA3_LENGTH_BYTES); + newSectionLength += SHA3_LENGTH_BYTES; + header->imageHeader->SetTotalFsblFwSizeIh(header->imageHeader->GetTotalFsblFwSizeIh() + SHA3_LENGTH_BYTES); + if (itr == dataChunksCount - 2) + { + if (encryptionFlag) + { + dataChunks.push_back(secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ); + firstChunkSize = secureChunkSize + SECURE_HDR_SZ + AES_GCM_TAG_SZ; + } + else + { + dataChunks.push_back(secureChunkSize); + firstChunkSize = secureChunkSize; + } + } + else + { + dataChunks.push_back(secureChunkSize); + } + } + } + if ((header->imageHeader->GetChecksumContext()->Type() != Checksum::None)) + { + newSectionLength += SHA3_LENGTH_BYTES; + header->imageHeader->SetTotalFsblFwSizeIh(header->imageHeader->GetTotalFsblFwSizeIh() + SHA3_LENGTH_BYTES); + } return newSectionLength; } @@ -141,7 +333,23 @@ int tempBufferSize = 0; /* Get the number/size data chunks and claculate the new section length*/ size_t length = section->Length; - size_t newLength = GetTotalDataChunks(length, dataChunks, encryptionFlag); + size_t newLength = 0; + bool checksum_bootloader = false; + + if (section->isBootloader && versalNetSeries) + { + if (header->imageHeader->GetChecksumContext()->Type() != Checksum::None) + { + /* If checksum is enabled for VersalNet bootloader, then add the final checksum here only. + VersalChecksumTable::Build & VersalChecksumTable::Link will not process anything for bootloader checksum */ + checksum_bootloader = true; + } + newLength = GetBootloaderTotalDataChunks(length, dataChunks, encryptionFlag); + } + else + { + newLength = GetTotalDataChunks(length, dataChunks, encryptionFlag); + } int itr = (dataChunks.size() - 3); @@ -225,6 +433,18 @@ delete[] tempBuffer; /*-------------------------------CHUNK 1------------------------------------*/ + if (checksum_bootloader) + { + /* Calculate hash of top chunk and previous hash */ + shaHash = new uint8_t[SHA3_LENGTH_BYTES]; + Versalcrypto_hash(shaHash, newDataPtr, tempBufferSize + SHA3_LENGTH_BYTES, true); + + /* Place the final hash at the start of PLM partition */ + newDataPtr -= SHA3_LENGTH_BYTES; + memcpy(newDataPtr, shaHash, SHA3_LENGTH_BYTES); + delete[] shaHash; + } + delete[] dataPtr; delete[] section->Data; @@ -237,6 +457,8 @@ /******************************************************************************/ void VersalPartition::Build(BootImage& bi, Binary& cache) { + versalNetSeries = bi.options.IsVersalNetSeries(); + secureChunkSize = bi.GetSecureChunkSize(this->header->imageHeader->IsBootloader()); /* Get the image header from this partition header */ ImageHeader& imageHeader(*this->header->imageHeader); /* Get the contexts for Authentication & Encryption */ @@ -304,7 +526,14 @@ { LOG_ERROR("Cannot reencrypt a partition that is already encrypted for %s", section->Name.c_str()); } - encryptCtx->Process(bi, header); + if (versalNetSeries) + { + encryptCtx->ChunkifyAndProcess(bi, header); + } + else + { + encryptCtx->Process(bi, header); + } uint32_t padLength = 0; @@ -323,7 +552,7 @@ if ((imageHeader.GetChecksumContext()->Type() == Checksum::SHA3) || (currentAuthCtx->authAlgorithm->Type() != Authentication::None)) { /* No chunking on bootloader for versal - Data should be alligned to 104 bytes before calculating the hash */ - if (imageHeader.IsBootloader()) + if (imageHeader.IsBootloader() && !(versalNetSeries)) { Binary::Length_t shaPadOnLength = header->partition->section->Length; if (currentAuthCtx->authAlgorithm->Type() != Authentication::None) @@ -353,7 +582,73 @@ header->transferSize = section->Length - imageHeader.GetChecksumContext()->Size(); /* Checksum length is added to the partition length, in case of bootloader. Partiton length should not include checksum length, so substarct*/ - + } + else if (imageHeader.IsBootloader() && versalNetSeries) + { + if (header->imageHeader->GetTotalPmcFwSizeIh() != 0) + { + ChunkifyAndHash(section, (encryptCtx->Type() != Encryption::None || header->preencrypted)); + currentAuthCtx->SetFirstChunkSize(firstChunkSize); + header->firstChunkSize = currentAuthCtx->GetFirstChunkSize(); + header->partition->section->firstChunkSize = header->firstChunkSize; + } + else + { + Binary::Length_t chunkOnLength = header->partition->section->Length; + if (encryptCtx->Type() != Encryption::None || header->preencrypted) + { + chunkOnLength -= (SECURE_HDR_SZ + AES_GCM_TAG_SZ); + } + else if (imageHeader.GetChecksumContext()->Type() != Checksum::None) + { + /* Checksum length is not added to the partition length, in case of bootloader for VersalNet. + Hence don't substract the checksum length, since it should not be included in hash calculation */ + //chunkOnLength -= imageHeader.GetChecksumContext()->Size(); + } + Binary::Length_t dataChunksCount = (chunkOnLength / secureChunkSize) + ((((chunkOnLength) % secureChunkSize) == 0 ? 0 : 1)); + if (dataChunksCount != 1) + { + ChunkifyAndHash(section, (encryptCtx->Type() != Encryption::None || header->preencrypted)); + currentAuthCtx->SetFirstChunkSize(firstChunkSize); + header->firstChunkSize = currentAuthCtx->GetFirstChunkSize(); + header->partition->section->firstChunkSize = header->firstChunkSize; + } + else if (dataChunksCount == 1 && imageHeader.GetChecksumContext()->Type() != Checksum::None) + { + size_t newLength = section->Length + SHA3_LENGTH_BYTES; + uint8_t* newDataPtr = new uint8_t[newLength]; + memset(newDataPtr, 0, newLength); + newDataPtr += SHA3_LENGTH_BYTES; + memcpy(newDataPtr, section->Data, section->Length); + + /* Calculate hash */ + uint8_t* shaHash; + shaHash = new uint8_t[SHA3_LENGTH_BYTES]; + Versalcrypto_hash(shaHash, newDataPtr, section->Length, true); + + /* Place the final hash at the start of PLM partition */ + newDataPtr -= SHA3_LENGTH_BYTES; + memcpy(newDataPtr, shaHash, SHA3_LENGTH_BYTES); + header->imageHeader->SetTotalFsblFwSizeIh(header->imageHeader->GetTotalFsblFwSizeIh() + SHA3_LENGTH_BYTES); + + delete[] shaHash; + delete[] section->Data; + section->Data = newDataPtr; + section->Length = newLength; + } + } + + if (bi.bifOptions->GetPmcdataFile() == "") + { + //imageHeader.SetTotalFsblFwSizeIh(section->Length); + } + else + { + //imageHeader.SetTotalPmcFwSizeIh(imageHeader.GetTotalPmcFwSizeIh() + shaPadLength); + } + header->transferSize = section->Length - imageHeader.GetChecksumContext()->Size(); + /* Checksum length is added to the partition length, in case of bootloader. + Partiton length should not include checksum length, so substarct*/ } /* Chunk the data into fixed 64KB/32KB */ else @@ -363,7 +658,7 @@ { chunkOnLength -= (SECURE_HDR_SZ + AES_GCM_TAG_SZ); } - Binary::Length_t dataChunksCount = (chunkOnLength / GetSecureChunkSize()) + ((((chunkOnLength) % GetSecureChunkSize()) == 0 ? 0 : 1)); + Binary::Length_t dataChunksCount = (chunkOnLength / secureChunkSize) + ((((chunkOnLength) % secureChunkSize) == 0 ? 0 : 1)); if (dataChunksCount != 1) { ChunkifyAndHash(section, (encryptCtx->Type() != Encryption::None || header->preencrypted)); @@ -376,7 +671,11 @@ if((imageHeader.IsBootloader() && imageHeader.GetChecksumContext()->Type() != Checksum::None)) { - padLength = imageHeader.GetChecksumContext()->Size(); + if (!versalNetSeries) + { + padLength = imageHeader.GetChecksumContext()->Size(); + } + /* Don't add checksum length here, as the checksum calculation and insertion happen in ChunkifyAndHash() for VersalNet */ } else { @@ -459,8 +758,3 @@ } } -/******************************************************************************/ -uint64_t VersalPartition::GetSecureChunkSize() -{ - return SECURE_32K_CHUNK - SHA3_LENGTH_BYTES; -} diff -Nru xilinx-bootgen-2022.1/partitionheadertable-versal.cpp xilinx-bootgen-2022.2/partitionheadertable-versal.cpp --- xilinx-bootgen-2022.1/partitionheadertable-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/partitionheadertable-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -60,6 +61,8 @@ , dpaCM(DpaCM::DpaCMDisable) , pufHdLoc(PufHdLoc::PUFinEFuse) , kekIvFile("") + , lockstep(Lockstep::LockstepDisable) + , cluster(0) { std::string name; slr = 0; @@ -534,6 +537,11 @@ authBlock = imageHeader->GetAuthBlock(); dpaCM = imageHeader->GetDpacm(); pufHdLoc = imageHeader->GetPufHdLocation(); + cluster = imageHeader->GetClusterNum(); + if (imageHeader->GetLockStepFlag() == true) + { + lockstep = Lockstep::LockstepEnable; + } if (hivec) { @@ -600,7 +608,9 @@ (endian << vphtEndiannessShift) | (partitionType << vphtPartitionTypeShift) | (hivec << vphtHivecShift) | - (dpaCM << vphtDpaCMShift) ; + (dpaCM << vphtDpaCMShift) | + (cluster << vNetphtClusterShift) | + (lockstep << vNetphtlockStepShift); } /******************************************************************************/ @@ -905,6 +915,25 @@ { LOG_INFO("Building the Partition Header Table"); + if (!bi.options.IsVersalNetSeries()) + { + if (getenv("BOOTGEN_SKIP_MAX_PARTITIONS_CHECK") == NULL) + { + if (bi.subSysImageList.size() > MAX_NUM_IMAGES_VERSAL) + { + LOG_ERROR("The maximum number of images supported for Versal is %d.\n No. of images found : %d", MAX_NUM_IMAGES_VERSAL, bi.imageList.size()); + } + if (bi.partitionHeaderList.size() > MAX_NUM_PARTITIONS_VERSAL) + { + LOG_ERROR("The maximum number of partitions supported for Versal is %d.\n No. of partitions found : %d", MAX_NUM_PARTITIONS_VERSAL, bi.partitionHeaderList.size()); + } + } + else + { + LOG_WARNING("The ENV BOOTGEN_SKIP_MAX_PARTITIONS_CHECK is set. Skipping check for maximum number of partitions/images."); + } + } + for (std::list::iterator partHdr = bi.partitionHeaderList.begin(); partHdr != bi.partitionHeaderList.end(); partHdr++) { (*partHdr)->Build(bi, cache); @@ -962,7 +991,7 @@ int32_t defaultEncrBlockSize = bi.options.bifOptions->metaHdrAttributes.defEncrBlockSize; Binary::Length_t encrBlocksSize = 0; Binary::Length_t encrOverhead = 0; - Binary::Length_t secureChunkSize = VersalPartition::GetSecureChunkSize(); + Binary::Length_t secureChunkSize = bi.GetSecureChunkSize(true); bi.options.bifOptions->metaHdrAttributes.encrBlocks.clear(); @@ -1042,7 +1071,7 @@ /* Note that the last block will always be based on the partition length.*/ std::vector secureChunkEncrBlocks; - uint32_t actualSecureChunkSize = VersalPartition::GetSecureChunkSize() - overhead; + uint32_t actualSecureChunkSize = bi.GetSecureChunkSize(true) - overhead; uint32_t totalKeyRollencrBlocks = EncryptionContext::GetTotalEncryptionBlocks(bi.imageHeaderTable->metaHeaderLength, secureChunkEncrBlocks, actualSecureChunkSize, &lastBlock); secureChunkEncrBlocks.clear(); @@ -1196,7 +1225,11 @@ void VersalPartitionHeaderTable::UpdateAtfHandoffParams(BootImage & bi) { memset(&atf_handoff_params, 0, sizeof(atf_handoff_params_struct)); - strncpy((char*)atf_handoff_params.magic, "XLNX",4); + atf_handoff_params.magic[0] = 'X'; + atf_handoff_params.magic[1] = 'L'; + atf_handoff_params.magic[2] = 'N'; + atf_handoff_params.magic[3] = 'X'; + atf_handoff_params.num_entries = 0; for (std::list::iterator partHdr = bi.partitionHeaderList.begin(); partHdr != bi.partitionHeaderList.end(); partHdr++) diff -Nru xilinx-bootgen-2022.1/partitionheadertable-versal.h xilinx-bootgen-2022.2/partitionheadertable-versal.h --- xilinx-bootgen-2022.1/partitionheadertable-versal.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/partitionheadertable-versal.h 2022-09-26 06:24:42.000000000 +0000 @@ -55,6 +55,12 @@ vphtExecStateShift = 3, vphtExecStateMask = 0x1, + vNetphtlockStepShift = 4, + vNetphtlockStepMask = 0x3, + + vNetphtClusterShift = 6, + vNetphtClusterMask = 0x3, + vphtDestCpuShift = 8, vphtDestCpuMask = 0xF, @@ -99,6 +105,7 @@ #define EFUSE_USER_BLK_KEY1 0xC3A5C5A5 #define EFUSE_USER_GRY_KEY1 0xC3A5C5A7 +#define SECURE_16K_CHUNK 0x4000 #define SECURE_32K_CHUNK 0x8000 /* 32 KB = 32*1024 B */ #define SECURE_64K_CHUNK 0x10000 /* 64 KB = 64*1024 B */ @@ -207,6 +214,8 @@ private: uint8_t partitionEncrypted; uint8_t slr; + uint8_t cluster; + Lockstep::Type lockstep; uint32_t partitionUid; KeySource::Type partitionKeySrc; bool kekIvMust; @@ -234,13 +243,15 @@ VersalPartition(PartitionHeader* hdr, Section* section0); VersalPartition(PartitionHeader* hdr, const uint8_t* data, Binary::Length_t length); size_t GetTotalDataChunks(Binary::Length_t partitionSize, std::vector& dataChunks, bool encryptionFlag); + size_t GetBootloaderTotalDataChunks(Binary::Length_t partitionSize, std::vector& dataChunks, bool encryptionFlag); void ChunkifyAndHash(Section * section, bool encryptionFlag); void Build(BootImage& bi, Binary& cache); void Link(BootImage& bi); - static uint64_t GetSecureChunkSize(void); private: PartitionHeader* header; uint64_t firstChunkSize; + bool versalNetSeries; + uint64_t secureChunkSize; }; #endif diff -Nru xilinx-bootgen-2022.1/partitionheadertable.cpp xilinx-bootgen-2022.2/partitionheadertable.cpp --- xilinx-bootgen-2022.1/partitionheadertable.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/partitionheadertable.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -243,6 +243,10 @@ uint8_t currCpu = (*partHdr)->GetDestinationCpu(); uint64_t currStrtAddr = (*partHdr)->GetLoadAddress(); uint64_t currEndAddr = currStrtAddr + (*partHdr)->GetPartitionSize(); + if((*partHdr)->imageHeader->IsBootloader()) + { + currEndAddr = currStrtAddr + (*partHdr)->imageHeader->GetTotalFsblFwSizeIh(); + } bool currCpuR5 = (currCpu == DestinationCPU :: R5_0 || currCpu == DestinationCPU :: R5_1 || currCpu == DestinationCPU :: R5_lockstep); bool isCurrPartitionOnTcm = false; @@ -253,6 +257,10 @@ uint8_t nxtCpu = (*nextPartHdr)->GetDestinationCpu(); uint64_t nxtStrtAddr = (*nextPartHdr)->GetLoadAddress(); uint64_t nxtEndAddr = nxtStrtAddr + (*nextPartHdr)->GetPartitionSize(); + if((*nextPartHdr)->imageHeader->IsBootloader()) + { + nxtEndAddr = nxtStrtAddr + (*nextPartHdr)->imageHeader->GetTotalFsblFwSizeIh(); + } bool nxtCpuR5 = (nxtCpu == DestinationCPU :: R5_0 || nxtCpu == DestinationCPU :: R5_1 || nxtCpu == DestinationCPU :: R5_lockstep); bool isNxtPartitionOnTcm = false; @@ -267,7 +275,7 @@ } } - if ((nxtEndAddr >= currStrtAddr) && (nxtStrtAddr <= currEndAddr)) + if ((nxtEndAddr >= currStrtAddr) && (nxtStrtAddr < currEndAddr)) { LOG_WARNING("Partition %s range is overlapped with partition %s memory range", (*partHdr)->partition->section->Name.c_str(), (*nextPartHdr)->partition->section->Name.c_str()); LOG_TRACE("Current Partition %s Start Address is %X and End Address is %X ,Next Partition %s Start Address is %X and End Address %X",(*partHdr)->partition->section->Name.c_str(), currStrtAddr, currEndAddr, (*nextPartHdr)->partition->section->Name.c_str(),nxtStrtAddr, nxtEndAddr); diff -Nru xilinx-bootgen-2022.1/partitionheadertable.h xilinx-bootgen-2022.2/partitionheadertable.h --- xilinx-bootgen-2022.1/partitionheadertable.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/partitionheadertable.h 2022-09-26 06:24:42.000000000 +0000 @@ -210,4 +210,3 @@ #endif -// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 diff -Nru xilinx-bootgen-2022.1/readimage-versal.cpp xilinx-bootgen-2022.2/readimage-versal.cpp --- xilinx-bootgen-2022.1/readimage-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/readimage-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -252,7 +253,7 @@ } if (!((iHT->partitionTotalCount > 0) && (iHT->partitionTotalCount < 0xFF))) { - LOG_ERROR("Number of partitions read from PDI is more than number of supported partiiton count."); + LOG_ERROR("Number of partitions read from PDI is more than number of supported partititon count."); } } else @@ -498,6 +499,9 @@ DisplayIV("plm_sec_hdr_iv (0x64) : ", bH->plmSecureHdrIv); DisplayValue("puf_shutter (0x70) : ", bH->shutterValue); DisplayIV("pmccdo_sec_hdr_iv (0x74) : ", bH->pmcCdoSecureHdrIv); + //VersalNet + DisplayValue("puf_ro_swap (0x80) : ", bH->pufRoSwapConfigVal); + DisplayValue("revoke_id (0x84) : ", bH->revokeId); DisplayValue("metahdr_offset (0xc4) : ", bH->imageHeaderByteOffset); DisplayKey("puf_data (0x928) : ", bH->puf); DisplayValue("checksum (0xf30) : ", bH->headerChecksum); @@ -558,8 +562,9 @@ DisplayValue("hdr_sizes (0x2C) : ", iHT->headerSizes, "mhdr_total_length (0x30) : ", iHT->totalMetaHdrLength); DisplayIV("mhdr_sec_hdr_iv (0x34) : ", iHT->metaHdrSecureHdrIv); DisplayValue("mhdr_encrkey_store (0x40) : ", iHT->metaHdrKeySource, "extended_id_code (0x44) : ", iHT->extendedIdCode); - DisplayValue("hdr_ac (0x48) : ", iHT->headerAuthCertificateWordOffset, "checksum (0x7c) : ", iHT->ihtChecksum); + DisplayValue("hdr_ac (0x48) : ", iHT->headerAuthCertificateWordOffset); DisplayIV("grey/black_iv (0x4C) : ", iHT->metaHdrGreyOrBlackIV); + DisplayValue("optional_data_size (0x58) : ", iHT->optionalDataSize, "checksum(0x7c) : ", iHT->ihtChecksum); std::cout << " attribute list - " << std::endl; DisplayIhtAttributes(iHT->imageHeaderTableAttributes); } @@ -786,6 +791,21 @@ default: val = "[invalid]"; break; } DisplayAttributes("bh_auth ", val1, "puf_mode ", val); + + //VersalNet + switch ((value >> BH_RSA_SINGED_BIT_SHIFT) & BH_RSA_SINGED_BIT_MASK) + { + case 3: val = "[yes]"; break; + default: val = "[no]"; break; + } + val1 = val; + + switch ((value >> BH_DICE_BIT_SHIFT) & BH_DICE_BIT_MASK) + { + case 3: val = "[enabled]"; break; + default: val = "[disabled]"; break; + } + DisplayAttributes("rsa_signed ", val1, "dice ", val); } /*********************************************************************************/ @@ -973,6 +993,25 @@ DisplayAttributes("exec_state ", val1, "core ", val); + //VersalNet + switch ((value >> vNetphtlockStepShift) & vNetphtlockStepMask) + { + case 0: val = "[disabled]"; break; + case 3: val = "[enabled]"; break; + default: val = "[invalid]"; break; + } + val1 = val; + switch ((value >> vNetphtClusterShift) & vNetphtClusterMask) + { + case 0: val = "[0]"; break; + case 1: val = "[1]"; break; + case 2: val = "[2]"; break; + case 3: val = "[3]"; break; + default: val = "[invalid]"; break; + } + + DisplayAttributes("lockstep ", val1, "cluster", val); + switch ((value >> vphtChecksumTypeShift) & vphtChecksumTypeMask) { case 0: val = "[none]"; break; diff -Nru xilinx-bootgen-2022.1/readimage-zynq.cpp xilinx-bootgen-2022.2/readimage-zynq.cpp --- xilinx-bootgen-2022.1/readimage-zynq.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/readimage-zynq.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -85,9 +86,13 @@ { LOG_ERROR("Error reading Image header table"); } + if ((iHT->version != VERSION_ZYNQ_ZYNQMP)) + { + LOG_ERROR("Improper version (0x%.8x) read from Image Header Table of the boot image file.", iHT->version); + } if (!((iHT->partitionTotalCount > 0) && (iHT->partitionTotalCount < 0xFF))) { - LOG_ERROR("Number of partitions read is more than number of supported partiiton count."); + LOG_ERROR("Number of partitions read is more than number of supported partititon count."); } } else @@ -252,7 +257,6 @@ Separator(); DisplayValue("next_ih(W) (0x00) : ", (*iH)->nextImageHeaderWordOffset); DisplayValue("next_pht(W) (0x04) : ", (*iH)->partitionHeaderWordOffset); - DisplayValue("total_partitions (0x08) : ", (*iH)->dataSectionCount); DisplayValue("total_partitions (0x0c) : ", (*iH)->imageNameLength); DisplayAscii("name (0x10) : ", *name); } diff -Nru xilinx-bootgen-2022.1/readimage-zynq.h xilinx-bootgen-2022.2/readimage-zynq.h --- xilinx-bootgen-2022.1/readimage-zynq.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/readimage-zynq.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2020 Xilinx, Inc. * @@ -45,6 +46,8 @@ { bH = NULL; iHT = NULL; + iH = NULL; + pHT = NULL; iHs.clear(); pHTs.clear(); } diff -Nru xilinx-bootgen-2022.1/readimage-zynqmp.cpp xilinx-bootgen-2022.2/readimage-zynqmp.cpp --- xilinx-bootgen-2022.1/readimage-zynqmp.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/readimage-zynqmp.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -87,6 +88,10 @@ { LOG_ERROR("Error reading Image header table"); } + if ((iHT->version != VERSION_ZYNQ_ZYNQMP)) + { + LOG_ERROR("Improper version (0x%.8x) read from Image Header Table of the boot image file.", iHT->version); + } if (!((iHT->partitionTotalCount > 0) && (iHT->partitionTotalCount < 0xFF))) { LOG_ERROR("Number of partitions read is more than number of supported partiiton count."); @@ -291,7 +296,6 @@ Separator(); DisplayValue("next_ih(W) (0x00) : ", (*iH)->nextImageHeaderWordOffset); DisplayValue("next_pht(W) (0x04) : ", (*iH)->partitionHeaderWordOffset); - DisplayValue("total_partitions (0x08) : ", (*iH)->dataSectionCount); DisplayValue("total_partitions (0x0c) : ", (*iH)->imageNameLength); DisplayAscii("name (0x10) : ", *name); } diff -Nru xilinx-bootgen-2022.1/readimage-zynqmp.h xilinx-bootgen-2022.2/readimage-zynqmp.h --- xilinx-bootgen-2022.1/readimage-zynqmp.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/readimage-zynqmp.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2021 Xilinx, Inc. * @@ -48,6 +49,8 @@ { bH = NULL; iHT = NULL; + iH = NULL; + pHT = NULL; iHs.clear(); pHTs.clear(); authenticationVerified = true; diff -Nru xilinx-bootgen-2022.1/regdefs.h xilinx-bootgen-2022.2/regdefs.h --- xilinx-bootgen-2022.1/regdefs.h 1970-01-01 00:00:00.000000000 +0000 +++ xilinx-bootgen-2022.2/regdefs.h 2022-09-26 06:24:42.000000000 +0000 @@ -0,0 +1,233 @@ +/* +####################################################################### +# Copyright (c) 2022 AMD, Inc. All rights reserved. +# +# This document contains proprietary information which is +# protected by copyright. All rights are reserved. No part of +# this document may be photocopied, reproduced or translated to +# another program language without prior written consent of +# XILINX Inc., San Jose, CA. 95124 +# +# Xilinx, Inc. +# XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A +# COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS +# ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR +# STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION +# IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE +# FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION. +# XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO +# THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO +# ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE +# FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY +# AND FITNESS FOR A PARTICULAR PURPOSE. +# +####################################################################### +*/ +#include "bootheader.h" +#define MAX_REG_GROUPS 202 + + +RegisterInitAddressRange VersalAddressRanges[] = { +{ 0xffa80000, 0x00000200 }, +{ 0xffa90000, 0x00000200 }, +{ 0xffaa0000, 0x00000200 }, +{ 0xffab0000, 0x00000200 }, +{ 0xffac0000, 0x00000200 }, +{ 0xffad0000, 0x00000200 }, +{ 0xffae0000, 0x00000200 }, +{ 0xffaf0000, 0x00000200 }, +{ 0xf11e0000, 0x00000220 }, +{ 0xf9040000, 0x00001000 }, +{ 0xf9060000, 0x00001000 }, +{ 0xf9050000, 0x0000010c }, +{ 0xf9000000, 0x0000fffc }, +{ 0xf9010000, 0x00000058 }, +{ 0xf9020000, 0x0000fffc }, +{ 0xf9030000, 0x00000040 }, +{ 0xf9080000, 0x0000fffc }, +{ 0xf90a0000, 0x0000fffc }, +{ 0xf9090000, 0x0000c080 }, +{ 0xf90b0000, 0x0000c080 }, +{ 0xff9c0000, 0x00000110 }, +{ 0xf11f0000, 0x0000004c }, +{ 0xff060000, 0x0000418c }, +{ 0xff070000, 0x0000418c }, +{ 0xf12d0000, 0x00000250 }, +{ 0xf12e4000, 0x00000250 }, +{ 0xf12e6000, 0x00000250 }, +{ 0xf12e8000, 0x00000250 }, +{ 0xf12ea000, 0x00000250 }, +{ 0xf12ec000, 0x00000250 }, +{ 0xf12d2000, 0x00000250 }, +{ 0xf12d4000, 0x00000250 }, +{ 0xf12d6000, 0x00000250 }, +{ 0xf12d8000, 0x00000250 }, +{ 0xf12da000, 0x00000250 }, +{ 0xf12dc000, 0x00000250 }, +{ 0xf12de000, 0x00000250 }, +{ 0xf12e0000, 0x00000250 }, +{ 0xf12e2000, 0x00000250 }, +{ 0xf12ee000, 0x00000250 }, +{ 0xf12b0000, 0x0000011c }, +{ 0xfcf30000, 0x000000e4 }, +{ 0xfc000000, 0x00968e48 }, +{ 0xfca00000, 0x00000328 }, +{ 0xfcb00000, 0x0000207c }, +{ 0xfcd00000, 0x000061e0 }, +{ 0xfcff0000, 0x0000000c }, +{ 0xfca10000, 0x000003e8 }, +{ 0xfca20000, 0x00000430 }, +{ 0xfd1a0000, 0x00000318 }, +{ 0xff5e0000, 0x00000370 }, +{ 0xf1260000, 0x000005cc }, +{ 0xf0d10000, 0x00000ffc }, +{ 0xf0d00000, 0x00000ffc }, +{ 0xf0d30000, 0x00000ffc }, +{ 0xf0d20000, 0x00000ffc }, +{ 0xf0d50000, 0x00000ffc }, +{ 0xf0d40000, 0x00000ffc }, +{ 0xf0d70000, 0x00000ffc }, +{ 0xf0d60000, 0x00000ffc }, +{ 0xf0ca0000, 0x00000ffc }, +{ 0xf0c60000, 0x00000ffc }, +{ 0xf0c30000, 0x00000ffc }, +{ 0xf0c20000, 0x00000ffc }, +{ 0xf0fa0000, 0x00000ffc }, +{ 0xf0fd0000, 0x00000ffc }, +{ 0xf0f40000, 0x00000ffc }, +{ 0xf0f50000, 0x00000ffc }, +{ 0xf0f60000, 0x00000ffc }, +{ 0xf0f70000, 0x00000ffc }, +{ 0xf0f20000, 0x00000ffc }, +{ 0xf0f00000, 0x00000ffc }, +{ 0xf0bb0000, 0x00000ffc }, +{ 0xf0bc0000, 0x00000ffc }, +{ 0xf0bd0000, 0x00000ffc }, +{ 0xf0b30000, 0x00000ffc }, +{ 0xf0b50000, 0x00000ffc }, +{ 0xf0b20000, 0x00000ffc }, +{ 0xf0b10000, 0x00000ffc }, +{ 0xf0b40000, 0x00000ffc }, +{ 0xf0b00000, 0x00000ffc }, +{ 0xf0b70000, 0x00000ffc }, +{ 0xf0b60000, 0x00000ffc }, +{ 0xf09d0000, 0x00000ffc }, +{ 0xf0920000, 0x00000ffc }, +{ 0xf0910000, 0x00000ffc }, +{ 0xf0900000, 0x00000ffc }, +{ 0xf0990000, 0x00000ffc }, +{ 0xf08d0000, 0x00000ffc }, +{ 0xf0810000, 0x00000ffc }, +{ 0xf0800000, 0x00000ffc }, +{ 0xf0a10000, 0x00000ffc }, +{ 0xf0a00000, 0x00000ffc }, +{ 0xf0a30000, 0x00000ffc }, +{ 0xf0a50000, 0x00000ffc }, +{ 0xf0a40000, 0x00000ffc }, +{ 0xf0a70000, 0x00000ffc }, +{ 0xf1200000, 0x00000058 }, +{ 0xf1250000, 0x00000bfc }, +{ 0xf1240000, 0x00000060 }, +{ 0xfd360000, 0x00000f0c }, +{ 0xfd380000, 0x00000f0c }, +{ 0xfd5c0000, 0x00000094 }, +{ 0xfd5e0000, 0x00000040 }, +{ 0xfd700000, 0x000025fc }, +{ 0xfd000000, 0x00090118 }, +{ 0xfd390000, 0x00000284 }, +{ 0xfd610000, 0x00005000 }, +{ 0xfd690000, 0x00000ff8 }, +{ 0xfd5f0000, 0x00000060 }, +{ 0xfd800000, 0x0003ffb8 }, +{ 0xfd4d0000, 0x00002fd0 }, +{ 0xff0c0000, 0x00000b80 }, +{ 0xff0d0000, 0x00000b80 }, +{ 0xfe5f0000, 0x0000013c }, +{ 0xfcb40000, 0x00130000 }, +{ 0xfd370000, 0x0000009c }, +{ 0xfe600000, 0x001f0000 }, +{ 0xf1330000, 0x00240000 }, +{ 0xffc9f000, 0x000002fc }, +{ 0xff130000, 0x00000004 }, +{ 0xff140000, 0x00000020 }, +{ 0xff300000, 0x000a001c }, +{ 0xff9b0000, 0x00000f0c }, +{ 0xfe400000, 0x00001dfc }, +{ 0xfe000000, 0x0000017c }, +{ 0xff0a0000, 0x0000007c }, +{ 0xff080000, 0x00000728 }, +{ 0xff410000, 0x0000a040 }, +{ 0xff510000, 0x00000080 }, +{ 0xff990000, 0x00001640 }, +{ 0xff960000, 0x00000ff8 }, +{ 0xff980000, 0x00000284 }, +{ 0xf1010000, 0x00001ffc }, +{ 0xfca50000, 0x00000e9c }, +{ 0xfca60000, 0x00000e9c }, +{ 0xfca70000, 0x00000e08 }, +{ 0xfcfb0000, 0x00001db8 }, +{ 0xfcfc0000, 0x00001db8 }, +{ 0xf9000000, 0x00001ffc }, +{ 0xf1160000, 0x00020254 }, +{ 0xf11c0000, 0x00000ff8 }, +{ 0xf11d0000, 0x00000ff8 }, +{ 0xf1110000, 0x00040034 }, +{ 0xf1020000, 0x00000324 }, +{ 0xf1000000, 0x00000030 }, +{ 0xf1080000, 0x0000027c }, +{ 0xf1070000, 0x0000006c }, +{ 0xf1060000, 0x00000828 }, +{ 0xf1320000, 0x000019fc }, +{ 0xf1100000, 0x00000ff8 }, +{ 0xf1270000, 0x0002060c }, +{ 0xf11a0000, 0x00010034 }, +{ 0xf12f0000, 0x00000284 }, +{ 0xf1310000, 0x00001640 }, +{ 0xf1300000, 0x00001640 }, +{ 0xf0080000, 0x00000078 }, +{ 0xf0110000, 0x00005980 }, +{ 0xf0081000, 0x00000380 }, +{ 0xf0083000, 0x00000008 }, +{ 0xf0082000, 0x00000028 }, +{ 0xf0100000, 0x00000010 }, +{ 0xf0280000, 0x00000078 }, +{ 0xf0310000, 0x00005980 }, +{ 0xf0282000, 0x00000380 }, +{ 0xf0281000, 0x00000380 }, +{ 0xf0284000, 0x00000008 }, +{ 0xf0283000, 0x00000028 }, +{ 0xf0300000, 0x00000010 }, +{ 0xffc90000, 0x0000304c }, +{ 0xffc80000, 0x00000078 }, +{ 0xffc88000, 0x00000804 }, +{ 0xffcf0000, 0x00005980 }, +{ 0xffcb0000, 0x00000380 }, +{ 0xffca0000, 0x00000380 }, +{ 0xffcd0000, 0x00000008 }, +{ 0xffcc0000, 0x00000028 }, +{ 0xffce0000, 0x00000010 }, +{ 0xff0b0000, 0x000002e4 }, +{ 0xff020000, 0x00000030 }, +{ 0xff030000, 0x00000030 }, +{ 0xf0050000, 0x000003c4 }, +{ 0xf1030000, 0x00000828 }, +{ 0xff9a0000, 0x00000228 }, +{ 0xf12a0000, 0x00000050 }, +{ 0xf1040000, 0x0000f0fc }, +{ 0xf1050000, 0x0000f0fc }, +{ 0xf1210000, 0x00000050 }, +{ 0xf1220000, 0x0000030c }, +{ 0xff040000, 0x000000fc }, +{ 0xff050000, 0x000000fc }, +{ 0xf1230000, 0x000000f0 }, +{ 0xff0e0000, 0x00000080 }, +{ 0xff0f0000, 0x00000080 }, +{ 0xff100000, 0x00000080 }, +{ 0xff110000, 0x00000080 }, +{ 0xff000000, 0x00000ffc }, +{ 0xff010000, 0x00000ffc }, +{ 0xff9d0000, 0x00000070 }, +{ 0xfe200000, 0x0000cc28 }, +{ 0xff120000, 0x00002fd0 }, +{ 0xe1000000, 0x00006028 }, +{ 0x00000000, 0x00000000 }}; \ No newline at end of file diff -Nru xilinx-bootgen-2022.1/reginit.cpp xilinx-bootgen-2022.2/reginit.cpp --- xilinx-bootgen-2022.1/reginit.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/reginit.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,6 @@ + /****************************************************************************** -* Copyright 2015-2020 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +26,7 @@ #include "reginitscanner.h" #include "options.h" #include "bifoptions.h" +#include "regdefs.h" /* @@ -48,20 +50,28 @@ std::ifstream s(filename.c_str()); if (!s) { - LOG_ERROR("Cannot read file - %s", filename.c_str());; + LOG_ERROR("Cannot read file - %s", filename.c_str()); } scanner.switch_streams(&s); parser.parse(); - + fileParseEnd = true; LOG_INFO("Done RE parsing : %s. Added %d regiter pairs", filename.c_str(), count); } + if (invalidAddr.size() != 0) + { + LOG_MSG("[WARNING]: Given ini file has the below invalid Addresses : %s", filename.c_str()); + for (size_t itr = 0; itr < invalidAddr.size(); itr++) + { + LOG_MSG("\t 0x%x", invalidAddr[itr]); + } + } + /* Fill the remainder of the area with NOPs. */ while(count < MAX_REGISTER_INITS) { - Add(options, INVALID_REGISTER_ADDRESS,0); + Add(options, INVALID_REGISTER_ADDRESS, 0); } - } /******************************************************************************/ @@ -71,9 +81,29 @@ { LOG_ERROR("Too many register init pairs in %s", filename.c_str()); } - if (address != 0xFFFFFFFF) + + if (fileParseEnd != true) + { + bool isvalidAddress = false; + for (int j = 0; j < MAX_REG_GROUPS; j++) + { + if ((address <= (VersalAddressRanges[j].baseaddr + VersalAddressRanges[j].size)) && + (address >= (VersalAddressRanges[j].baseaddr))) + { + isvalidAddress = true; + break; + } + } + + if (!isvalidAddress) + { + invalidAddr.push_back(address); + } + } + + if (address != 0xFFFFFFFF) { - LOG_INFO("count [0x%8x], value = %d", address, value); + LOG_INFO("\t address [0x%8x], value = 0x%x", address, value); } regtab->registerInitialization[count ].address = address; diff -Nru xilinx-bootgen-2022.1/verifyimage-versal.cpp xilinx-bootgen-2022.2/verifyimage-versal.cpp --- xilinx-bootgen-2022.1/verifyimage-versal.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/verifyimage-versal.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,6 @@ + /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -256,6 +257,7 @@ /* Verifying IHT Signature */ uint32_t iHTLength = sizeof(VersalImageHeaderTableStructure); uint8_t* tempIHBuffer = new uint8_t[iHTLength]; + memset(tempIHBuffer, 0, iHTLength); bool signatureVerified = false; bH = new VersalBootHeaderStructure; result = fread(bH, 1, sizeof(VersalBootHeaderStructure), binFile); @@ -293,6 +295,10 @@ LOG_ERROR("Error reading signature"); } } + else + { + LOG_ERROR("Error parsing Headers from BootImage file %s", binFilename.c_str()); + } if ((*(*auth_cert) & 0xF3) == 0x02) { @@ -326,7 +332,7 @@ size_t headersSize = (iHT->totalMetaHdrLength * 4) - SIGN_LENGTH_VERSAL; size_t headersAcDataSize = sizeof(AuthCertificate4096Sha3PaddingStructure) - SIGN_LENGTH_VERSAL; uint8_t* tempBuffer = new uint8_t[headersSize]; - + memset(tempBuffer, 0, headersSize); if(bH != NULL) { offset = bH->imageHeaderByteOffset + sizeof(VersalImageHeaderTableStructure); @@ -350,6 +356,10 @@ LOG_ERROR("Error reading signature"); } } + else + { + LOG_ERROR("Error parsing Headers from BootImage file %s", binFilename.c_str()); + } offset = iHT->firstImageHeaderWordOffset * 4; if (!(fseek(binFile, offset, SEEK_SET))) @@ -360,10 +370,14 @@ LOG_ERROR("Error reading signature"); } } + else + { + LOG_ERROR("Error parsing Headers from BootImage file %s", binFilename.c_str()); + } if ((*(*auth_cert) & 0xF3) == 0x02) { - signatureVerified = VerifyECDSASignature(true,tempBuffer,headersSize, (ACKeyECDSA *)(*auth_cert + AC_SPK_KEY_OFFSET), *auth_cert + AC_PARTITION_SIGN_OFFSET); + signatureVerified = VerifyECDSASignature(true, tempBuffer, headersSize, (ACKeyECDSA *)(*auth_cert + AC_SPK_KEY_OFFSET), *auth_cert + AC_PARTITION_SIGN_OFFSET); } else if((*(*auth_cert) & 0xF3) == 0x22) { @@ -477,6 +491,10 @@ LOG_ERROR("Error reading boot header while verifying "); } } + else + { + LOG_ERROR("Error parsing Boot Header from BootImage file %s", binFilename.c_str()); + } if ((*(*auth_cert) & 0xF3) == 0x02) { @@ -517,6 +535,7 @@ uint32_t dataBufferLength = ((*partitionHdr)->totalPartitionLength * 4) - SIGN_LENGTH_VERSAL; uint32_t acBufferLength = sizeof(AuthCertificate4096Sha3PaddingStructure) - SIGN_LENGTH_VERSAL; uint8_t* tempBuffer = new uint8_t[dataBufferLength]; + memset(tempBuffer, 0, dataBufferLength); offset = (*partitionHdr)->authCertificateOffset * 4; if (!(fseek(binFile, offset, SEEK_SET))) diff -Nru xilinx-bootgen-2022.1/verifyimage-zynqmp.cpp xilinx-bootgen-2022.2/verifyimage-zynqmp.cpp --- xilinx-bootgen-2022.1/verifyimage-zynqmp.cpp 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/verifyimage-zynqmp.cpp 2022-09-26 06:24:42.000000000 +0000 @@ -1,5 +1,6 @@ + /****************************************************************************** -* Copyright 2015-2021 Xilinx, Inc. +* Copyright 2015-2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -179,8 +180,9 @@ headersSize = (pHT->partitionWordOffset * 4) - bH->imageHeaderByteOffset - RSA_4096_KEY_LENGTH; } uint8_t* tempBuffer = new uint8_t[headersSize]; - + memset(tempBuffer, 0, headersSize); offset = bH->imageHeaderByteOffset; + if (!(fseek(binFile, offset, SEEK_SET))) { result = fread(tempBuffer, 1, headersSize, binFile); @@ -189,6 +191,10 @@ LOG_ERROR("Error reading signature"); } } + else + { + LOG_ERROR("Error parsing Headers from BootImage file %s", binFilename.c_str()); + } bool signatureVerified = VerifySignature(true, tempBuffer, headersSize, &auth_cert->acSpk, (unsigned char*)(&auth_cert->acPartitionSignature)); if (signatureVerified) @@ -295,7 +301,6 @@ authenticationVerified = false; LOG_ERROR("Authentication verification failed on bootimage %s", binFilename.c_str()); } - delete[] tempBHBuffer; } @@ -307,30 +312,31 @@ bool signatureVerified = false; if (((((*partitionHdr)->partitionAttributes) >> PH_DEST_DEVICE_SHIFT_ZYNQMP) & PH_DEST_DEVICE_MASK_ZYNQMP) == 2) { - bufferLength = ((*partitionHdr)->totalPartitionLength * 4); + bufferLength = ((*partitionHdr)->totalPartitionLength * 4); } uint8_t* tempBuffer = new uint8_t[bufferLength]; + memset(tempBuffer, 0, bufferLength); + offset = (*partitionHdr)->partitionWordOffset * 4; if (!(fseek(binFile, offset, SEEK_SET))) { - result = fread(tempBuffer, 1, bufferLength, binFile); - if (result != bufferLength) - { - LOG_ERROR("Error reading partition for hash calculation"); - } + result = fread(tempBuffer, 1, bufferLength, binFile); + if (result != bufferLength) + { + LOG_ERROR("Error reading partition for hash calculation"); + } } else { - LOG_ERROR("Error parsing Partitions from BootImage file %s",binFilename.c_str()); + LOG_ERROR("Error parsing Partitions from BootImage file %s",binFilename.c_str()); } - if (((((*partitionHdr)->partitionAttributes) >> PH_DEST_DEVICE_SHIFT_ZYNQMP) & PH_DEST_DEVICE_MASK_ZYNQMP) == 2) { uint32_t blockSize = BITSTREAM_AUTH_CHUNK_SIZE; uint32_t lastBlockSize = ((*partitionHdr)->totalPartitionLength * 4) - (sizeof(AuthCertificate4096Structure) * plAcCount) - (BITSTREAM_AUTH_CHUNK_SIZE * (plAcCount - 1)); - + for(int i = 0; iacSpk, (unsigned char*)(&cert->acPartitionSignature)); if(!signatureVerified) { - LOG_MSG(" Partition Signature Verification Failed"); - authenticationVerified = false; - LOG_ERROR("Authentication verification failed on bootimage %s", binFilename.c_str()); + LOG_MSG(" Partition Signature Verification Failed"); + authenticationVerified = false; + LOG_ERROR("Authentication verification failed on bootimage %s", binFilename.c_str()); } - delete[] buffer; } } else { - signatureVerified = VerifySignature(!isItBootloader, tempBuffer, bufferLength, &auth_cert->acSpk, (unsigned char*)(&auth_cert->acPartitionSignature)); + signatureVerified = VerifySignature(!isItBootloader, tempBuffer, bufferLength, &auth_cert->acSpk, (unsigned char*)(&auth_cert->acPartitionSignature)); } if (signatureVerified) { @@ -370,9 +375,8 @@ authenticationVerified = false; LOG_ERROR("Authentication verification failed on bootimage %s", binFilename.c_str()); } - - delete[] tempBuffer; - } + delete[] tempBuffer; + } else { //EXIT diff -Nru xilinx-bootgen-2022.1/version.h xilinx-bootgen-2022.2/version.h --- xilinx-bootgen-2022.1/version.h 2022-03-30 09:29:13.000000000 +0000 +++ xilinx-bootgen-2022.2/version.h 2022-09-26 06:24:42.000000000 +0000 @@ -1,3 +1,4 @@ + /****************************************************************************** * Copyright 2015-2022 Xilinx, Inc. * @@ -15,7 +16,7 @@ ******************************************************************************/ #ifndef RDI_VERSION -#define RDI_VERSION "2022.1" +#define RDI_VERSION "2022.2" #endif #define PROGRAMNAME "Xilinx Bootgen"