@@ -477,31 +477,30 @@ typedef struct _ATOM_PPLIB_STATE_V2
477
477
} ATOM_PPLIB_STATE_V2 ;
478
478
479
479
typedef struct _StateArray {
480
- //how many states we have
481
- UCHAR ucNumEntries ;
482
-
483
- ATOM_PPLIB_STATE_V2 states [1 ] ;
480
+ //how many states we have
481
+ UCHAR ucNumEntries ;
482
+
483
+ ATOM_PPLIB_STATE_V2 states [] /* __counted_by(ucNumEntries) */ ;
484
484
}StateArray ;
485
485
486
486
487
487
typedef struct _ClockInfoArray {
488
- //how many clock levels we have
489
- UCHAR ucNumEntries ;
490
-
491
- //sizeof(ATOM_PPLIB_CLOCK_INFO)
492
- UCHAR ucEntrySize ;
493
-
494
- UCHAR clockInfo [];
488
+ //how many clock levels we have
489
+ UCHAR ucNumEntries ;
490
+
491
+ //sizeof(ATOM_PPLIB_CLOCK_INFO)
492
+ UCHAR ucEntrySize ;
493
+
494
+ UCHAR clockInfo [];
495
495
}ClockInfoArray ;
496
496
497
497
typedef struct _NonClockInfoArray {
498
+ //how many non-clock levels we have. normally should be same as number of states
499
+ UCHAR ucNumEntries ;
500
+ //sizeof(ATOM_PPLIB_NONCLOCK_INFO)
501
+ UCHAR ucEntrySize ;
498
502
499
- //how many non-clock levels we have. normally should be same as number of states
500
- UCHAR ucNumEntries ;
501
- //sizeof(ATOM_PPLIB_NONCLOCK_INFO)
502
- UCHAR ucEntrySize ;
503
-
504
- ATOM_PPLIB_NONCLOCK_INFO nonClockInfo [];
503
+ ATOM_PPLIB_NONCLOCK_INFO nonClockInfo [] __counted_by (ucNumEntries );
505
504
}NonClockInfoArray ;
506
505
507
506
typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record
@@ -513,8 +512,10 @@ typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record
513
512
514
513
typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table
515
514
{
516
- UCHAR ucNumEntries ; // Number of entries.
517
- ATOM_PPLIB_Clock_Voltage_Dependency_Record entries [1 ]; // Dynamically allocate entries.
515
+ // Number of entries.
516
+ UCHAR ucNumEntries ;
517
+ // Dynamically allocate entries.
518
+ ATOM_PPLIB_Clock_Voltage_Dependency_Record entries [] __counted_by (ucNumEntries );
518
519
}ATOM_PPLIB_Clock_Voltage_Dependency_Table ;
519
520
520
521
typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record
@@ -529,8 +530,10 @@ typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record
529
530
530
531
typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table
531
532
{
532
- UCHAR ucNumEntries ; // Number of entries.
533
- ATOM_PPLIB_Clock_Voltage_Limit_Record entries [1 ]; // Dynamically allocate entries.
533
+ // Number of entries.
534
+ UCHAR ucNumEntries ;
535
+ // Dynamically allocate entries.
536
+ ATOM_PPLIB_Clock_Voltage_Limit_Record entries [] __counted_by (ucNumEntries );
534
537
}ATOM_PPLIB_Clock_Voltage_Limit_Table ;
535
538
536
539
union _ATOM_PPLIB_CAC_Leakage_Record
@@ -553,8 +556,10 @@ typedef union _ATOM_PPLIB_CAC_Leakage_Record ATOM_PPLIB_CAC_Leakage_Record;
553
556
554
557
typedef struct _ATOM_PPLIB_CAC_Leakage_Table
555
558
{
556
- UCHAR ucNumEntries ; // Number of entries.
557
- ATOM_PPLIB_CAC_Leakage_Record entries [1 ]; // Dynamically allocate entries.
559
+ // Number of entries.
560
+ UCHAR ucNumEntries ;
561
+ // Dynamically allocate entries.
562
+ ATOM_PPLIB_CAC_Leakage_Record entries [] __counted_by (ucNumEntries );
558
563
}ATOM_PPLIB_CAC_Leakage_Table ;
559
564
560
565
typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Record
@@ -568,8 +573,10 @@ typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Record
568
573
569
574
typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Table
570
575
{
571
- UCHAR ucNumEntries ; // Number of entries.
572
- ATOM_PPLIB_PhaseSheddingLimits_Record entries [1 ]; // Dynamically allocate entries.
576
+ // Number of entries.
577
+ UCHAR ucNumEntries ;
578
+ // Dynamically allocate entries.
579
+ ATOM_PPLIB_PhaseSheddingLimits_Record entries [] __counted_by (ucNumEntries );
573
580
}ATOM_PPLIB_PhaseSheddingLimits_Table ;
574
581
575
582
typedef struct _VCEClockInfo {
@@ -580,8 +587,8 @@ typedef struct _VCEClockInfo{
580
587
}VCEClockInfo ;
581
588
582
589
typedef struct _VCEClockInfoArray {
583
- UCHAR ucNumEntries ;
584
- VCEClockInfo entries [1 ] ;
590
+ UCHAR ucNumEntries ;
591
+ VCEClockInfo entries [] __counted_by ( ucNumEntries ) ;
585
592
}VCEClockInfoArray ;
586
593
587
594
typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
@@ -592,8 +599,8 @@ typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
592
599
593
600
typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table
594
601
{
595
- UCHAR numEntries ;
596
- ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record entries [1 ] ;
602
+ UCHAR numEntries ;
603
+ ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record entries [] __counted_by ( numEntries ) ;
597
604
}ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table ;
598
605
599
606
typedef struct _ATOM_PPLIB_VCE_State_Record
@@ -604,8 +611,8 @@ typedef struct _ATOM_PPLIB_VCE_State_Record
604
611
605
612
typedef struct _ATOM_PPLIB_VCE_State_Table
606
613
{
607
- UCHAR numEntries ;
608
- ATOM_PPLIB_VCE_State_Record entries [1 ] ;
614
+ UCHAR numEntries ;
615
+ ATOM_PPLIB_VCE_State_Record entries [] __counted_by ( numEntries ) ;
609
616
}ATOM_PPLIB_VCE_State_Table ;
610
617
611
618
@@ -626,8 +633,8 @@ typedef struct _UVDClockInfo{
626
633
}UVDClockInfo ;
627
634
628
635
typedef struct _UVDClockInfoArray {
629
- UCHAR ucNumEntries ;
630
- UVDClockInfo entries [1 ] ;
636
+ UCHAR ucNumEntries ;
637
+ UVDClockInfo entries [] __counted_by ( ucNumEntries ) ;
631
638
}UVDClockInfoArray ;
632
639
633
640
typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record
@@ -638,8 +645,8 @@ typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record
638
645
639
646
typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table
640
647
{
641
- UCHAR numEntries ;
642
- ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record entries [1 ] ;
648
+ UCHAR numEntries ;
649
+ ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record entries [] __counted_by ( numEntries ) ;
643
650
}ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table ;
644
651
645
652
typedef struct _ATOM_PPLIB_UVD_Table
@@ -657,8 +664,8 @@ typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Record
657
664
}ATOM_PPLIB_SAMClk_Voltage_Limit_Record ;
658
665
659
666
typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Table {
660
- UCHAR numEntries ;
661
- ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries [];
667
+ UCHAR numEntries ;
668
+ ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries [] __counted_by ( numEntries ) ;
662
669
}ATOM_PPLIB_SAMClk_Voltage_Limit_Table ;
663
670
664
671
typedef struct _ATOM_PPLIB_SAMU_Table
@@ -675,8 +682,8 @@ typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Record
675
682
}ATOM_PPLIB_ACPClk_Voltage_Limit_Record ;
676
683
677
684
typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Table {
678
- UCHAR numEntries ;
679
- ATOM_PPLIB_ACPClk_Voltage_Limit_Record entries [1 ] ;
685
+ UCHAR numEntries ;
686
+ ATOM_PPLIB_ACPClk_Voltage_Limit_Record entries [] __counted_by ( numEntries ) ;
680
687
}ATOM_PPLIB_ACPClk_Voltage_Limit_Table ;
681
688
682
689
typedef struct _ATOM_PPLIB_ACP_Table
@@ -743,9 +750,9 @@ typedef struct ATOM_PPLIB_VQ_Budgeting_Record{
743
750
} ATOM_PPLIB_VQ_Budgeting_Record ;
744
751
745
752
typedef struct ATOM_PPLIB_VQ_Budgeting_Table {
746
- UCHAR revid ;
747
- UCHAR numEntries ;
748
- ATOM_PPLIB_VQ_Budgeting_Record entries [1 ] ;
753
+ UCHAR revid ;
754
+ UCHAR numEntries ;
755
+ ATOM_PPLIB_VQ_Budgeting_Record entries [] __counted_by ( numEntries ) ;
749
756
} ATOM_PPLIB_VQ_Budgeting_Table ;
750
757
751
758
#pragma pack()
0 commit comments