-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathbif.tab.cpp
2577 lines (2279 loc) · 109 KB
/
bif.tab.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
104
105
106
107
108
109
110
111
112
113
114
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
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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
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
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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
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
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
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
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
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
908
909
910
911
912
913
914
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
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* A Bison parser, made by GNU Bison 2.7. */
/* Skeleton implementation for Bison LALR(1) parsers in C++
Copyright (C) 2002-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* First part of user declarations. */
/* Line 279 of lalr1.cc */
#line 53 "../s/bif.y"
#include <stdio.h>
#include "bootimage.h"
#include "authentication.h"
#include "encryption.h"
#include "checksum.h"
#include "bifscanner.h"
#include "parsing.h"
#include "imageheadertable-versal.h"
BifOptions* currentBifOptions;
PartitionBifOptions* currentPartitionBifOptions ;
ImageBifOptions* currentImageBifOptions;
/* Line 279 of lalr1.cc */
#line 53 "../bisonflex/bif.tab.cpp"
#include "bif.tab.hpp"
/* User implementation prologue. */
/* Line 285 of lalr1.cc */
#line 61 "../bisonflex/bif.tab.cpp"
/* Unqualified %code blocks. */
/* Line 286 of lalr1.cc */
#line 47 "../s/bif.y"
static int yylex(BIF::BisonParser::semantic_type * yylval, BIF::BisonParser::location_type* loc, BIF::FlexScanner &scanner);
#include "options.h"
/* Line 286 of lalr1.cc */
#line 71 "../bisonflex/bif.tab.cpp"
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr
# else
# define YY_NULL 0
# endif
# endif
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# endif
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
# ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (N) \
{ \
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
(Current).end = YYRHSLOC (Rhs, N).end; \
} \
else \
{ \
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
} \
while (/*CONSTCOND*/ false)
# endif
/* Suppress unused-variable warnings by "using" E. */
#define YYUSE(e) ((void) (e))
/* Enable debugging if requested. */
#if YYDEBUG
/* A pseudo ostream that takes yydebug_ into account. */
# define YYCDEBUG if (yydebug_) (*yycdebug_)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug_) \
{ \
*yycdebug_ << Title << ' '; \
yy_symbol_print_ ((Type), (Value), (Location)); \
*yycdebug_ << std::endl; \
} \
} while (false)
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug_) \
yy_reduce_print_ (Rule); \
} while (false)
# define YY_STACK_PRINT() \
do { \
if (yydebug_) \
yystack_print_ (); \
} while (false)
#else /* !YYDEBUG */
# define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) YYUSE(Type)
# define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
# define YY_STACK_PRINT() static_cast<void>(0)
#endif /* !YYDEBUG */
#define yyerrok (yyerrstatus_ = 0)
#define yyclearin (yychar = yyempty_)
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus_)
/* Line 353 of lalr1.cc */
#line 24 "../s/bif.y"
namespace BIF {
/* Line 353 of lalr1.cc */
#line 167 "../bisonflex/bif.tab.cpp"
/// Build a parser object.
BisonParser::BisonParser (BIF::FlexScanner& scanner_yyarg, Options& options_yyarg)
:
#if YYDEBUG
yydebug_ (false),
yycdebug_ (&std::cerr),
#endif
scanner (scanner_yyarg),
options (options_yyarg)
{
}
BisonParser::~BisonParser ()
{
}
#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
inline void
BisonParser::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep, const location_type* yylocationp)
{
YYUSE (yylocationp);
YYUSE (yyvaluep);
std::ostream& yyo = debug_stream ();
std::ostream& yyoutput = yyo;
YYUSE (yyoutput);
switch (yytype)
{
default:
break;
}
}
void
BisonParser::yy_symbol_print_ (int yytype,
const semantic_type* yyvaluep, const location_type* yylocationp)
{
*yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
<< ' ' << yytname_[yytype] << " ("
<< *yylocationp << ": ";
yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
*yycdebug_ << ')';
}
#endif
void
BisonParser::yydestruct_ (const char* yymsg,
int yytype, semantic_type* yyvaluep, location_type* yylocationp)
{
YYUSE (yylocationp);
YYUSE (yymsg);
YYUSE (yyvaluep);
if (yymsg)
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
break;
}
}
void
BisonParser::yypop_ (unsigned int n)
{
yystate_stack_.pop (n);
yysemantic_stack_.pop (n);
yylocation_stack_.pop (n);
}
#if YYDEBUG
std::ostream&
BisonParser::debug_stream () const
{
return *yycdebug_;
}
void
BisonParser::set_debug_stream (std::ostream& o)
{
yycdebug_ = &o;
}
BisonParser::debug_level_type
BisonParser::debug_level () const
{
return yydebug_;
}
void
BisonParser::set_debug_level (debug_level_type l)
{
yydebug_ = l;
}
#endif
inline bool
BisonParser::yy_pact_value_is_default_ (int yyvalue)
{
return yyvalue == yypact_ninf_;
}
inline bool
BisonParser::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == yytable_ninf_;
}
int
BisonParser::parse ()
{
/// Lookahead and lookahead in internal form.
int yychar = yyempty_;
int yytoken = 0;
// State.
int yyn;
int yylen = 0;
int yystate = 0;
// Error handling.
int yynerrs_ = 0;
int yyerrstatus_ = 0;
/// Semantic value of the lookahead.
static semantic_type yyval_default;
semantic_type yylval = yyval_default;
/// Location of the lookahead.
location_type yylloc;
/// The locations where the error started and ended.
location_type yyerror_range[3];
/// $$.
semantic_type yyval;
/// @$.
location_type yyloc;
int yyresult;
// FIXME: This shoud be completely indented. It is not yet to
// avoid gratuitous conflicts when merging into the master branch.
try
{
YYCDEBUG << "Starting parse" << std::endl;
/* User initialization code. */
/* Line 545 of lalr1.cc */
#line 31 "../s/bif.y"
{
// Initialize the initial location.
yylloc.begin.filename = yylloc.end.filename = &scanner.filename;
}
/* Line 545 of lalr1.cc */
#line 331 "../bisonflex/bif.tab.cpp"
/* Initialize the stacks. The initial state will be pushed in
yynewstate, since the latter expects the semantical and the
location values to have been already stored, initialize these
stacks with a primary value. */
yystate_stack_ = state_stack_type (0);
yysemantic_stack_ = semantic_stack_type (0);
yylocation_stack_ = location_stack_type (0);
yysemantic_stack_.push (yylval);
yylocation_stack_.push (yylloc);
/* New state. */
yynewstate:
yystate_stack_.push (yystate);
YYCDEBUG << "Entering state " << yystate << std::endl;
/* Accept? */
if (yystate == yyfinal_)
goto yyacceptlab;
goto yybackup;
/* Backup. */
yybackup:
/* Try to take a decision without lookahead. */
yyn = yypact_[yystate];
if (yy_pact_value_is_default_ (yyn))
goto yydefault;
/* Read a lookahead token. */
if (yychar == yyempty_)
{
YYCDEBUG << "Reading a token: ";
yychar = yylex (&yylval, &yylloc, scanner);
}
/* Convert token to internal form. */
if (yychar <= yyeof_)
{
yychar = yytoken = yyeof_;
YYCDEBUG << "Now at end of input." << std::endl;
}
else
{
yytoken = yytranslate_ (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
goto yydefault;
/* Reduce or error. */
yyn = yytable_[yyn];
if (yyn <= 0)
{
if (yy_table_value_is_error_ (yyn))
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted. */
yychar = yyempty_;
yysemantic_stack_.push (yylval);
yylocation_stack_.push (yylloc);
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus_)
--yyerrstatus_;
yystate = yyn;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact_[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
yylen = yyr2_[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'. Otherwise, use the top of the stack.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. */
if (yylen)
yyval = yysemantic_stack_[yylen - 1];
else
yyval = yysemantic_stack_[0];
// Compute the default @$.
{
slice<location_type, location_stack_type> slice (yylocation_stack_, yylen);
YYLLOC_DEFAULT (yyloc, slice, yylen);
}
// Perform the reduction.
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 5:
/* Line 670 of lalr1.cc */
#line 204 "../s/bif.y"
{ options.includeBifOptionsList.push_back((yysemantic_stack_[(3) - (3)].string)); }
break;
case 6:
/* Line 670 of lalr1.cc */
#line 205 "../s/bif.y"
{ currentBifOptions = new BifOptions(options.GetArchType(),(yysemantic_stack_[(1) - (1)].string)); }
break;
case 7:
/* Line 670 of lalr1.cc */
#line 207 "../s/bif.y"
{ options.bifOptions = currentBifOptions;
options.bifOptionsList.push_back(currentBifOptions); }
break;
case 16:
/* Line 670 of lalr1.cc */
#line 221 "../s/bif.y"
{ currentPartitionBifOptions = new PartitionBifOptions();
currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); }
break;
case 22:
/* Line 670 of lalr1.cc */
#line 232 "../s/bif.y"
{ currentBifOptions->SetMetaHeaderEncryptType((yysemantic_stack_[(3) - (3)].encrvalue_t)); }
break;
case 23:
/* Line 670 of lalr1.cc */
#line 233 "../s/bif.y"
{ currentBifOptions->SetMetaHeaderEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t), options.IsVersalNetSeries()); }
break;
case 24:
/* Line 670 of lalr1.cc */
#line 234 "../s/bif.y"
{ currentBifOptions->SetMetaHeaderEncryptionKeyFile((yysemantic_stack_[(3) - (3)].string)); }
break;
case 25:
/* Line 670 of lalr1.cc */
#line 235 "../s/bif.y"
{ currentBifOptions->SetMetaHeaderAuthType((yysemantic_stack_[(3) - (3)].authvalue_t)); }
break;
case 26:
/* Line 670 of lalr1.cc */
#line 236 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.ppk = (yysemantic_stack_[(3) - (3)].string); }
break;
case 27:
/* Line 670 of lalr1.cc */
#line 237 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.psk = (yysemantic_stack_[(3) - (3)].string); }
break;
case 28:
/* Line 670 of lalr1.cc */
#line 238 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.spk = (yysemantic_stack_[(3) - (3)].string); }
break;
case 29:
/* Line 670 of lalr1.cc */
#line 239 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.ssk = (yysemantic_stack_[(3) - (3)].string); }
break;
case 30:
/* Line 670 of lalr1.cc */
#line 240 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.spkSignature = (yysemantic_stack_[(3) - (3)].string); }
break;
case 31:
/* Line 670 of lalr1.cc */
#line 241 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.presign = (yysemantic_stack_[(3) - (3)].string); }
break;
case 32:
/* Line 670 of lalr1.cc */
#line 242 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.revokeId = (yysemantic_stack_[(3) - (3)].number); }
break;
case 33:
/* Line 670 of lalr1.cc */
#line 243 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.checksum = (yysemantic_stack_[(3) - (3)].checksumvalue_t); }
break;
case 34:
/* Line 670 of lalr1.cc */
#line 244 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.dpaCM = DpaCM::DpaCMEnable; }
break;
case 36:
/* Line 670 of lalr1.cc */
#line 246 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.pufHdLoc = PufHdLoc::PUFinBH;
currentBifOptions->SetPufHdinBHFlag();}
break;
case 39:
/* Line 670 of lalr1.cc */
#line 254 "../s/bif.y"
{ currentBifOptions->metaHdrAttributes.ihtOptionalDataInfo.push_back(std::pair<std::string, uint32_t>((yysemantic_stack_[(5) - (1)].string), (yysemantic_stack_[(5) - (5)].number))); }
break;
case 43:
/* Line 670 of lalr1.cc */
#line 261 "../s/bif.y"
{ currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(1) - (1)].number));
currentBifOptions->metaHdrAttributes.encrBlocks = currentPartitionBifOptions->GetEncryptionBlocks(); }
break;
case 44:
/* Line 670 of lalr1.cc */
#line 263 "../s/bif.y"
{ currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(4) - (1)].number), (yysemantic_stack_[(4) - (3)].number));
currentBifOptions->metaHdrAttributes.encrBlocks = currentPartitionBifOptions->GetEncryptionBlocks(); }
break;
case 45:
/* Line 670 of lalr1.cc */
#line 265 "../s/bif.y"
{ currentPartitionBifOptions->SetEncryptionBlocks((yysemantic_stack_[(4) - (1)].number), 0);
currentBifOptions->metaHdrAttributes.defEncrBlockSize = (yysemantic_stack_[(4) - (1)].number); }
break;
case 46:
/* Line 670 of lalr1.cc */
#line 269 "../s/bif.y"
{ currentBifOptions->SetPdiId((yysemantic_stack_[(3) - (3)].number)); }
break;
case 47:
/* Line 670 of lalr1.cc */
#line 270 "../s/bif.y"
{ currentBifOptions->SetParentId((yysemantic_stack_[(3) - (3)].number)); }
break;
case 48:
/* Line 670 of lalr1.cc */
#line 271 "../s/bif.y"
{ currentBifOptions->SetIdCode((yysemantic_stack_[(3) - (3)].number)); }
break;
case 49:
/* Line 670 of lalr1.cc */
#line 272 "../s/bif.y"
{ currentBifOptions->SetExtendedIdCode((yysemantic_stack_[(3) - (3)].number)); }
break;
case 50:
/* Line 670 of lalr1.cc */
#line 273 "../s/bif.y"
{ currentBifOptions->AddFiles((yysemantic_stack_[(3) - (1)].number), (yysemantic_stack_[(3) - (3)].string)); }
break;
case 51:
/* Line 670 of lalr1.cc */
#line 274 "../s/bif.y"
{ currentBifOptions->SetEncryptionKeySource((yysemantic_stack_[(3) - (3)].encrkeysrc_t)); }
break;
case 52:
/* Line 670 of lalr1.cc */
#line 275 "../s/bif.y"
{ currentBifOptions->SetPdiType((yysemantic_stack_[(3) - (3)].ptype_t)); }
break;
case 53:
/* Line 670 of lalr1.cc */
#line 276 "../s/bif.y"
{ currentBifOptions->SetRevokeId((yysemantic_stack_[(3) - (3)].number));}
break;
case 56:
/* Line 670 of lalr1.cc */
#line 283 "../s/bif.y"
{ currentImageBifOptions = new ImageBifOptions(); }
break;
case 57:
/* Line 670 of lalr1.cc */
#line 284 "../s/bif.y"
{ currentBifOptions->imageBifOptionList.push_back(currentImageBifOptions); }
break;
case 65:
/* Line 670 of lalr1.cc */
#line 298 "../s/bif.y"
{ currentImageBifOptions->SetImageId((yysemantic_stack_[(3) - (3)].number)); }
break;
case 66:
/* Line 670 of lalr1.cc */
#line 299 "../s/bif.y"
{ currentImageBifOptions->SetImageName((yysemantic_stack_[(3) - (3)].string)); }
break;
case 67:
/* Line 670 of lalr1.cc */
#line 300 "../s/bif.y"
{ currentImageBifOptions->SetDelayHandoff(true); }
break;
case 68:
/* Line 670 of lalr1.cc */
#line 301 "../s/bif.y"
{ currentImageBifOptions->SetDelayLoad(true); }
break;
case 69:
/* Line 670 of lalr1.cc */
#line 302 "../s/bif.y"
{ LOG_ERROR("BIF attribute error !!!\n\t This usage of 'init' is not supported. See 'bootgen -bif_help init' for usage details."); }
break;
case 70:
/* Line 670 of lalr1.cc */
#line 303 "../s/bif.y"
{ LOG_ERROR("Copy to Memory feature with the attribute 'copy' is no more supported.\n\t This can be duplicated with the option 'imagestore'. Please refer UG1283 for more details.");
currentImageBifOptions->SetMemCopyAddress((yysemantic_stack_[(3) - (3)].number)); }
break;
case 71:
/* Line 670 of lalr1.cc */
#line 305 "../s/bif.y"
{ currentImageBifOptions->SetImageType((yysemantic_stack_[(3) - (3)].ptype_t)); }
break;
case 72:
/* Line 670 of lalr1.cc */
#line 306 "../s/bif.y"
{ currentImageBifOptions->SetUniqueId((yysemantic_stack_[(3) - (3)].number)); }
break;
case 73:
/* Line 670 of lalr1.cc */
#line 307 "../s/bif.y"
{ currentImageBifOptions->SetParentUniqueId((yysemantic_stack_[(3) - (3)].number)); }
break;
case 74:
/* Line 670 of lalr1.cc */
#line 308 "../s/bif.y"
{ currentImageBifOptions->SetFunctionId((yysemantic_stack_[(3) - (3)].number)); }
break;
case 75:
/* Line 670 of lalr1.cc */
#line 309 "../s/bif.y"
{ if(!options.IsVersalNetSeries())
LOG_ERROR("BIF attribute error !!!\n\t 'pcr' is supported only for VERSAL NET architecture");
currentImageBifOptions->SetPcrNumber((yysemantic_stack_[(3) - (3)].number)); }
break;
case 76:
/* Line 670 of lalr1.cc */
#line 312 "../s/bif.y"
{ if(!options.IsVersalNetSeries())
LOG_ERROR("BIF attribute error !!!\n\t 'pcr_mid' is supported only for VERSAL NET architecture");
currentImageBifOptions->SetPcrMeasurementIndex((yysemantic_stack_[(3) - (3)].number)); }
break;
case 82:
/* Line 670 of lalr1.cc */
#line 326 "../s/bif.y"
{ if(options.GetArchType() == Arch::VERSAL)
LOG_WARNING("BIF attribute error !!! [keysrc_encryption] not supported in VERSAL architecture.\n\t Please see 'bootgen -arch versal -bif_help keysrc'");
currentBifOptions->SetEncryptionKeySource((yysemantic_stack_[(4) - (4)].encrkeysrc_t)); options.SetEncryptedKeySource((yysemantic_stack_[(4) - (4)].encrkeysrc_t)); }
break;
case 83:
/* Line 670 of lalr1.cc */
#line 329 "../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 87:
/* Line 670 of lalr1.cc */
#line 334 "../s/bif.y"
{ if(options.GetArchType() == Arch::ZYNQ)
LOG_ERROR("BIF attribute error !!!\n\t\t[bootdevice] not supported in ZYNQ architecture");
if(options.GetArchType() == Arch::VERSAL)
LOG_ERROR("This usage of boot_device is no more supported.\n\t Please see 'bootgen -arch versal -bif_help boot_device'");
currentBifOptions->SetBootDevice((yysemantic_stack_[(4) - (4)].bootdevice_t)); }
break;
case 88:
/* Line 670 of lalr1.cc */
#line 339 "../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 96:
/* Line 670 of lalr1.cc */
#line 351 "../s/bif.y"
{ currentBifOptions->SetBootDevice((yysemantic_stack_[(1) - (1)].bootdevice_t)); }
break;
case 97:
/* Line 670 of lalr1.cc */
#line 352 "../s/bif.y"
{ currentBifOptions->SetBootDevice(BootDevice::IMAGESTORE); }
break;
case 98:
/* Line 670 of lalr1.cc */
#line 353 "../s/bif.y"
{ currentBifOptions->SetBootDeviceAddress((yysemantic_stack_[(3) - (3)].number)); }
break;
case 104:
/* Line 670 of lalr1.cc */
#line 365 "../s/bif.y"
{ currentBifOptions->SetAuthJtagRevokeID((yysemantic_stack_[(3) - (3)].number)); }
break;
case 105:
/* Line 670 of lalr1.cc */
#line 366 "../s/bif.y"
{ currentBifOptions->SetAuthJtagDeviceDna((yysemantic_stack_[(3) - (3)].string)); }
break;
case 106:
/* Line 670 of lalr1.cc */
#line 367 "../s/bif.y"
{ currentBifOptions->SetAuthJtagTimeOut((yysemantic_stack_[(3) - (3)].number)); }
break;
case 107:
/* Line 670 of lalr1.cc */
#line 370 "../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 108:
/* Line 670 of lalr1.cc */
#line 373 "../s/bif.y"
{ if(options.GetArchType() == Arch::VERSAL && options.IsVersalNetSeries())
LOG_ERROR("BIF attribute error !!! 'bh_auth_enable' is not supported with '-arch versalnet'.\n\t Bootheader or eFuse authentication will be chosen based on eFuse bits.");
else
currentBifOptions->SetBhRsa((yysemantic_stack_[(1) - (1)].bhrsa_t));
}
break;
case 109:
/* Line 670 of lalr1.cc */
#line 379 "../s/bif.y"
{ LOG_ERROR("Authentication using SHA2 is no more supported."); }
break;
case 110:
/* Line 670 of lalr1.cc */
#line 381 "../s/bif.y"
{ LOG_ERROR("[fsbl_config] bi_integrity_sha3 is no more supported. Use 'checksum' attribute of bootloader partition"); }
break;
case 111:
/* Line 670 of lalr1.cc */
#line 383 "../s/bif.y"
{ currentBifOptions->SetPufHdLoc((yysemantic_stack_[(1) - (1)].pufhdloc_t)); }
break;
case 112:
/* Line 670 of lalr1.cc */
#line 385 "../s/bif.y"
{ currentBifOptions->SetAuthOnly((yysemantic_stack_[(1) - (1)].authonly_t)); }
break;
case 113:
/* Line 670 of lalr1.cc */
#line 387 "../s/bif.y"
{ currentBifOptions->SetOptKey((yysemantic_stack_[(1) - (1)].optkey_t)); }
break;
case 114:
/* Line 670 of lalr1.cc */
#line 389 "../s/bif.y"
{ currentBifOptions->SetPufMode(PufMode::PUF4K); }
break;
case 115:
/* Line 670 of lalr1.cc */
#line 391 "../s/bif.y"
{ currentBifOptions->SetShutterValue((yysemantic_stack_[(3) - (3)].number)); }
break;
case 116:
/* Line 670 of lalr1.cc */
#line 393 "../s/bif.y"
{ if(options.GetArchType() != Arch::VERSAL)
LOG_ERROR("BIF attribute error !!!\n\t\t'dpacm_enable' is supported only in VERSAL architecture");
if(options.GetArchType() == Arch::VERSAL)
LOG_WARNING("boot_config { dpacm_enable } will be deprecated. 'dpacm_enable' should be specified along with the partition. \n See 'bootgen -bif_help dpacm_enable' for more info.");
currentBifOptions->SetDpaCM((yysemantic_stack_[(1) - (1)].dpacm_t));
}
break;
case 117:
/* Line 670 of lalr1.cc */
#line 399 "../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))
LOG_ERROR("Invalid smap_width value in BIF. Valid values are 8, 16 and 32");
currentBifOptions->SetSmapWidth((yysemantic_stack_[(3) - (3)].number));
}
break;
case 118:
/* Line 670 of lalr1.cc */
#line 403 "../s/bif.y"
{ currentBifOptions->SetBypassIdcodeFlag(true); }
break;
case 119:
/* Line 670 of lalr1.cc */
#line 404 "../s/bif.y"
{ currentBifOptions->SetAHwRoTFlag(true); }
break;
case 120:
/* Line 670 of lalr1.cc */
#line 405 "../s/bif.y"
{ currentBifOptions->SetSHwRoTFlag(true); }
break;
case 121:
/* Line 670 of lalr1.cc */
#line 406 "../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 122:
/* Line 670 of lalr1.cc */
#line 411 "../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 123:
/* Line 670 of lalr1.cc */
#line 418 "../s/bif.y"
{ currentPartitionBifOptions = new PartitionBifOptions();
currentPartitionBifOptions->SetArchType(options.GetArchType(),options.IsVersalNetSeries()); }
break;
case 124:
/* Line 670 of lalr1.cc */
#line 421 "../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 125:
/* Line 670 of lalr1.cc */
#line 425 "../s/bif.y"
{ currentPartitionBifOptions = new PartitionBifOptions();
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 126:
/* Line 670 of lalr1.cc */
#line 431 "../s/bif.y"
{ currentPartitionBifOptions = new PartitionBifOptions();
currentPartitionBifOptions->SetArchType(options.GetArchType(), options.IsVersalNetSeries()); }
break;
case 134:
/* Line 670 of lalr1.cc */
#line 445 "../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 135:
/* Line 670 of lalr1.cc */
#line 448 "../s/bif.y"
{ currentPartitionBifOptions->partitionId = (yysemantic_stack_[(3) - (3)].number); }
break;
case 136:
/* Line 670 of lalr1.cc */
#line 449 "../s/bif.y"
{ currentPartitionBifOptions->imageStoreId = (yysemantic_stack_[(3) - (3)].number);
currentPartitionBifOptions->SetPartitionType(PartitionType::IMAGE_STORE_PDI); }
break;
case 138:
/* Line 670 of lalr1.cc */
#line 452 "../s/bif.y"
{ currentPartitionBifOptions->fileType = (yysemantic_stack_[(3) - (3)].number); }
break;
case 139:
/* Line 670 of lalr1.cc */
#line 453 "../s/bif.y"
{ currentPartitionBifOptions->bifSection = (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 153:
/* Line 670 of lalr1.cc */
#line 481 "../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 154:
/* Line 670 of lalr1.cc */
#line 486 "../s/bif.y"
{ currentPartitionBifOptions->SetAuthBlockAttr((yysemantic_stack_[(1) - (1)].number)); }
break;
case 155:
/* Line 670 of lalr1.cc */
#line 488 "../s/bif.y"
{ currentPartitionBifOptions->bootloader = true;}
break;
case 156:
/* Line 670 of lalr1.cc */
#line 489 "../s/bif.y"
{ currentPartitionBifOptions->boot = true;}
break;