@@ -34,8 +34,10 @@ typedef enum
3434 NV_FIRMWARE_TYPE_GSP ,
3535 NV_FIRMWARE_TYPE_GSP_LOG ,
3636#if defined(NV_VMWARE )
37- NV_FIRMWARE_TYPE_BINDATA
37+ // GR-3428: Merge _BINDATA and _UCODES
38+ NV_FIRMWARE_TYPE_BINDATA ,
3839#endif
40+ NV_FIRMWARE_TYPE_UCODES
3941} nv_firmware_type_t ;
4042
4143typedef enum
@@ -49,6 +51,7 @@ typedef enum
4951 NV_FIRMWARE_CHIP_FAMILY_GH100 = 6 ,
5052 NV_FIRMWARE_CHIP_FAMILY_GB10X = 8 ,
5153 NV_FIRMWARE_CHIP_FAMILY_GB20X = 9 ,
54+ NV_FIRMWARE_CHIP_FAMILY_GR10X = 10 ,
5255 NV_FIRMWARE_CHIP_FAMILY_GB10Y = 11 ,
5356 NV_FIRMWARE_CHIP_FAMILY_GB20Y = 12 ,
5457 NV_FIRMWARE_CHIP_FAMILY_END ,
@@ -59,6 +62,7 @@ static inline const char *nv_firmware_chip_family_to_string(
5962)
6063{
6164 switch (fw_chip_family ) {
65+ case NV_FIRMWARE_CHIP_FAMILY_GR10X : return "gr10x" ;
6266 case NV_FIRMWARE_CHIP_FAMILY_GB10X : return "gb10x" ;
6367 case NV_FIRMWARE_CHIP_FAMILY_GB10Y : return "gb10y" ;
6468 case NV_FIRMWARE_CHIP_FAMILY_GB20Y : return "gb20y" ;
@@ -79,7 +83,7 @@ static inline const char *nv_firmware_chip_family_to_string(
7983
8084// The includer may optionally define
8185// NV_FIRMWARE_FOR_NAME(name)
82- // to return a platform-defined string for a given a gsp_* or gsp_log_* name.
86+ // to return a platform-defined string for a given a firmware base name.
8387//
8488// The function nv_firmware_for_chip_family will then be available.
8589#if defined(NV_FIRMWARE_FOR_NAME )
@@ -88,69 +92,64 @@ static inline const char *nv_firmware_for_chip_family(
8892 nv_firmware_chip_family_t fw_chip_family
8993)
9094{
91- if ( fw_type == NV_FIRMWARE_TYPE_GSP )
95+ switch ( fw_chip_family )
9296 {
93- switch (fw_chip_family )
97+ case NV_FIRMWARE_CHIP_FAMILY_GR10X : // fall through
98+ case NV_FIRMWARE_CHIP_FAMILY_GB10X : // fall through
99+ case NV_FIRMWARE_CHIP_FAMILY_GB10Y : // fall through
100+ case NV_FIRMWARE_CHIP_FAMILY_GB20Y : // fall through
101+ case NV_FIRMWARE_CHIP_FAMILY_GB20X : // fall through
102+ case NV_FIRMWARE_CHIP_FAMILY_GH100 : // fall through
103+ case NV_FIRMWARE_CHIP_FAMILY_AD10X : // fall through
104+ case NV_FIRMWARE_CHIP_FAMILY_GA10X :
94105 {
95- case NV_FIRMWARE_CHIP_FAMILY_GB10X : // fall through
96- case NV_FIRMWARE_CHIP_FAMILY_GB10Y : // fall through
97- case NV_FIRMWARE_CHIP_FAMILY_GB20Y : // fall through
98- case NV_FIRMWARE_CHIP_FAMILY_GB20X : // fall through
99- case NV_FIRMWARE_CHIP_FAMILY_GH100 : // fall through
100- case NV_FIRMWARE_CHIP_FAMILY_AD10X : // fall through
101- case NV_FIRMWARE_CHIP_FAMILY_GA10X :
102- return NV_FIRMWARE_FOR_NAME ("gsp_ga10x" );
103-
104- case NV_FIRMWARE_CHIP_FAMILY_GA100 : // fall through
105- case NV_FIRMWARE_CHIP_FAMILY_TU11X : // fall through
106- case NV_FIRMWARE_CHIP_FAMILY_TU10X :
107- return NV_FIRMWARE_FOR_NAME ("gsp_tu10x" );
108-
109- case NV_FIRMWARE_CHIP_FAMILY_END : // fall through
110- case NV_FIRMWARE_CHIP_FAMILY_NULL :
111- return "" ;
106+ switch (fw_type )
107+ {
108+ case NV_FIRMWARE_TYPE_GSP : return NV_FIRMWARE_FOR_NAME ("gsp_ga10x" );
109+ case NV_FIRMWARE_TYPE_GSP_LOG : return NV_FIRMWARE_FOR_NAME ("gsp_log_ga10x" );
110+ #if defined(NV_VMWARE )
111+ case NV_FIRMWARE_TYPE_BINDATA : return NV_FIRMWARE_FOR_NAME ("bindata_image" );
112+ #endif
113+ case NV_FIRMWARE_TYPE_UCODES : return NV_FIRMWARE_FOR_NAME ("ucodes_ga10x" );
114+ }
115+ return "" ;
112116 }
113- }
114- else if (fw_type == NV_FIRMWARE_TYPE_GSP_LOG )
115- {
116- switch (fw_chip_family )
117- {
118- case NV_FIRMWARE_CHIP_FAMILY_GB10X : // fall through
119- case NV_FIRMWARE_CHIP_FAMILY_GB10Y : // fall through
120- case NV_FIRMWARE_CHIP_FAMILY_GB20Y : // fall through
121- case NV_FIRMWARE_CHIP_FAMILY_GB20X : // fall through
122- case NV_FIRMWARE_CHIP_FAMILY_GH100 : // fall through
123- case NV_FIRMWARE_CHIP_FAMILY_AD10X : // fall through
124- case NV_FIRMWARE_CHIP_FAMILY_GA10X :
125- return NV_FIRMWARE_FOR_NAME ("gsp_log_ga10x" );
126-
127- case NV_FIRMWARE_CHIP_FAMILY_GA100 : // fall through
128- case NV_FIRMWARE_CHIP_FAMILY_TU11X : // fall through
129- case NV_FIRMWARE_CHIP_FAMILY_TU10X :
130- return NV_FIRMWARE_FOR_NAME ("gsp_log_tu10x" );
131117
132- case NV_FIRMWARE_CHIP_FAMILY_END : // fall through
133- case NV_FIRMWARE_CHIP_FAMILY_NULL :
134- return "" ;
135- }
136- }
118+ case NV_FIRMWARE_CHIP_FAMILY_GA100 : // fall through
119+ case NV_FIRMWARE_CHIP_FAMILY_TU11X : // fall through
120+ case NV_FIRMWARE_CHIP_FAMILY_TU10X :
121+ {
122+ switch (fw_type )
123+ {
124+ case NV_FIRMWARE_TYPE_GSP : return NV_FIRMWARE_FOR_NAME ("gsp_tu10x" );
125+ case NV_FIRMWARE_TYPE_GSP_LOG : return NV_FIRMWARE_FOR_NAME ("gsp_log_tu10x" );
137126#if defined(NV_VMWARE )
138- else if (fw_type == NV_FIRMWARE_TYPE_BINDATA )
139- {
140- return NV_FIRMWARE_FOR_NAME ("bindata_image" );
141- }
127+ case NV_FIRMWARE_TYPE_BINDATA : return NV_FIRMWARE_FOR_NAME ("bindata_image" );
142128#endif
129+ case NV_FIRMWARE_TYPE_UCODES : return NV_FIRMWARE_FOR_NAME ("ucodes_tu10x" );
130+ }
131+ return "" ;
132+ }
133+
134+ case NV_FIRMWARE_CHIP_FAMILY_END : // fall through
135+ case NV_FIRMWARE_CHIP_FAMILY_NULL :
136+ return "" ;
137+ }
138+
143139 return "" ;
144140}
145141#endif // defined(NV_FIRMWARE_FOR_NAME)
146142
147143// The includer may optionally define
148144// NV_FIRMWARE_DECLARE_GSP(name)
149145// which will then be invoked (at the top-level) for each
150- // gsp_* (but not gsp_log_*)
146+ // gsp_* and ucodes_* (but not gsp_log_*)
151147#if defined(NV_FIRMWARE_DECLARE_GSP )
152148NV_FIRMWARE_DECLARE_GSP ("gsp_ga10x" )
153149NV_FIRMWARE_DECLARE_GSP ("gsp_tu10x" )
150+ NV_FIRMWARE_DECLARE_GSP ("ucodes_ga10x" )
151+ NV_FIRMWARE_DECLARE_GSP ("ucodes_tu10x" )
154152#endif // defined(NV_FIRMWARE_DECLARE_GSP)
155153
156154#endif // NV_FIRMWARE_DECLARE_GSP
155+
0 commit comments