1 #ifndef __ODY_CSRS_RNM_H__ 2 #define __ODY_CSRS_RNM_H__ 3 /* This file is auto-generated. Do not edit */ 4 5 /***********************license start*********************************** 6 * Copyright (C) 2021-2026 Marvell. 7 * SPDX-License-Identifier: BSD-3-Clause 8 * https://spdx.org/licenses 9 ***********************license end**************************************/ 10 11 12 /** 13 * @file 14 * 15 * Configuration and status register (CSR) address and type definitions for 16 * RNM. 17 * 18 * This file is auto generated. Do not edit. 19 * 20 */ 21 22 /** 23 * Enumeration rnm_bar_e 24 * 25 * RNM Base Address Register Enumeration 26 * Enumerates the base address registers. 27 */ 28 #define ODY_RNM_BAR_E_RNM_PF_BAR0 (0x87e00f000000ll) 29 #define ODY_RNM_BAR_E_RNM_PF_BAR0_SIZE 0x100000ull 30 #define ODY_RNM_BAR_E_RNM_VF_BAR0 (0x80f000800000ll) 31 #define ODY_RNM_BAR_E_RNM_VF_BAR0_SIZE 0x100000ull 32 33 /** 34 * Register (RSL) rnm_active_pc 35 * 36 * RNM Conditional Clock Counter Register 37 */ 38 union ody_rnm_active_pc { 39 uint64_t u; 40 struct ody_rnm_active_pc_s { 41 uint64_t count : 64; 42 } s; 43 /* struct ody_rnm_active_pc_s cn; */ 44 }; 45 typedef union ody_rnm_active_pc ody_rnm_active_pc_t; 46 47 #define ODY_RNM_ACTIVE_PC ODY_RNM_ACTIVE_PC_FUNC() 48 static inline uint64_t ODY_RNM_ACTIVE_PC_FUNC(void) __attribute__ ((pure, always_inline)); 49 static inline uint64_t ODY_RNM_ACTIVE_PC_FUNC(void) 50 { 51 return 0x87e00f000010ll; 52 } 53 54 #define typedef_ODY_RNM_ACTIVE_PC ody_rnm_active_pc_t 55 #define bustype_ODY_RNM_ACTIVE_PC CSR_TYPE_RSL 56 #define basename_ODY_RNM_ACTIVE_PC "RNM_ACTIVE_PC" 57 #define device_bar_ODY_RNM_ACTIVE_PC 0x0 /* PF_BAR0 */ 58 #define busnum_ODY_RNM_ACTIVE_PC 0 59 #define arguments_ODY_RNM_ACTIVE_PC -1, -1, -1, -1 60 61 /** 62 * Register (RSL) rnm_ctl_status 63 * 64 * RNM Control and Status Register 65 * This register is the RNM control register. 66 * This register is secure only to prevent the nonsecure world from affecting 67 * secure-world clients using true random numbers. 68 */ 69 union ody_rnm_ctl_status { 70 uint64_t u; 71 struct ody_rnm_ctl_status_s { 72 uint64_t force_clk : 1; 73 uint64_t ebg_ctl_lock : 1; 74 uint64_t ebg_poll_en : 1; 75 uint64_t ebg_poll_delay : 10; 76 uint64_t drbg_en : 1; 77 uint64_t drbg_ent_disable : 1; 78 uint64_t reserved_15_63 : 49; 79 } s; 80 /* struct ody_rnm_ctl_status_s cn; */ 81 }; 82 typedef union ody_rnm_ctl_status ody_rnm_ctl_status_t; 83 84 #define ODY_RNM_CTL_STATUS ODY_RNM_CTL_STATUS_FUNC() 85 static inline uint64_t ODY_RNM_CTL_STATUS_FUNC(void) __attribute__ ((pure, always_inline)); 86 static inline uint64_t ODY_RNM_CTL_STATUS_FUNC(void) 87 { 88 return 0x87e00f000000ll; 89 } 90 91 #define typedef_ODY_RNM_CTL_STATUS ody_rnm_ctl_status_t 92 #define bustype_ODY_RNM_CTL_STATUS CSR_TYPE_RSL 93 #define basename_ODY_RNM_CTL_STATUS "RNM_CTL_STATUS" 94 #define device_bar_ODY_RNM_CTL_STATUS 0x0 /* PF_BAR0 */ 95 #define busnum_ODY_RNM_CTL_STATUS 0 96 #define arguments_ODY_RNM_CTL_STATUS -1, -1, -1, -1 97 98 /** 99 * Register (RSL) rnm_drbg_ent_force# 100 * 101 * RNM DRBG Entropy Force Register 102 * Write this register to force the Entropy source of the DRBG to a constant value 103 * for debugging purposes. 104 * 105 * Before writing to this register, RNM_CTL_STATUS[DRBG_ENT_DISABLE] must be zero to turn off the 106 * DRBG engine. 107 * 108 * To use this register in place of the entropy source write 1 to RNM_CTL_STATUS[DRBG_ENT_DISABLE]. 109 */ 110 union ody_rnm_drbg_ent_forcex { 111 uint64_t u; 112 struct ody_rnm_drbg_ent_forcex_s { 113 uint64_t bits : 64; 114 } s; 115 /* struct ody_rnm_drbg_ent_forcex_s cn; */ 116 }; 117 typedef union ody_rnm_drbg_ent_forcex ody_rnm_drbg_ent_forcex_t; 118 119 static inline uint64_t ODY_RNM_DRBG_ENT_FORCEX(uint64_t a) __attribute__ ((pure, always_inline)); 120 static inline uint64_t ODY_RNM_DRBG_ENT_FORCEX(uint64_t a) 121 { 122 if (a <= 3) 123 return 0x87e00f000300ll + 8ll * ((a) & 0x3); 124 __ody_csr_fatal("RNM_DRBG_ENT_FORCEX", 1, a, 0, 0, 0, 0, 0); 125 } 126 127 #define typedef_ODY_RNM_DRBG_ENT_FORCEX(a) ody_rnm_drbg_ent_forcex_t 128 #define bustype_ODY_RNM_DRBG_ENT_FORCEX(a) CSR_TYPE_RSL 129 #define basename_ODY_RNM_DRBG_ENT_FORCEX(a) "RNM_DRBG_ENT_FORCEX" 130 #define device_bar_ODY_RNM_DRBG_ENT_FORCEX(a) 0x0 /* PF_BAR0 */ 131 #define busnum_ODY_RNM_DRBG_ENT_FORCEX(a) (a) 132 #define arguments_ODY_RNM_DRBG_ENT_FORCEX(a) (a), -1, -1, -1 133 134 /** 135 * Register (NCB) rnm_drbg_rndr 136 * 137 * RNM DRBG Random Value Register 138 */ 139 union ody_rnm_drbg_rndr { 140 uint64_t u; 141 struct ody_rnm_drbg_rndr_s { 142 uint64_t dat : 64; 143 } s; 144 /* struct ody_rnm_drbg_rndr_s cn; */ 145 }; 146 typedef union ody_rnm_drbg_rndr ody_rnm_drbg_rndr_t; 147 148 #define ODY_RNM_DRBG_RNDR ODY_RNM_DRBG_RNDR_FUNC() 149 static inline uint64_t ODY_RNM_DRBG_RNDR_FUNC(void) __attribute__ ((pure, always_inline)); 150 static inline uint64_t ODY_RNM_DRBG_RNDR_FUNC(void) 151 { 152 return 0x80f000800020ll; 153 } 154 155 #define typedef_ODY_RNM_DRBG_RNDR ody_rnm_drbg_rndr_t 156 #define bustype_ODY_RNM_DRBG_RNDR CSR_TYPE_NCB 157 #define basename_ODY_RNM_DRBG_RNDR "RNM_DRBG_RNDR" 158 #define device_bar_ODY_RNM_DRBG_RNDR 0x0 /* VF_BAR0 */ 159 #define busnum_ODY_RNM_DRBG_RNDR 0 160 #define arguments_ODY_RNM_DRBG_RNDR -1, -1, -1, -1 161 162 /** 163 * Register (NCB) rnm_drbg_rndr_result 164 * 165 * RNM DRBG Random Result Register 166 */ 167 union ody_rnm_drbg_rndr_result { 168 uint64_t u; 169 struct ody_rnm_drbg_rndr_result_s { 170 uint64_t res : 1; 171 uint64_t reserved_1_63 : 63; 172 } s; 173 /* struct ody_rnm_drbg_rndr_result_s cn; */ 174 }; 175 typedef union ody_rnm_drbg_rndr_result ody_rnm_drbg_rndr_result_t; 176 177 #define ODY_RNM_DRBG_RNDR_RESULT ODY_RNM_DRBG_RNDR_RESULT_FUNC() 178 static inline uint64_t ODY_RNM_DRBG_RNDR_RESULT_FUNC(void) __attribute__ ((pure, always_inline)); 179 static inline uint64_t ODY_RNM_DRBG_RNDR_RESULT_FUNC(void) 180 { 181 return 0x80f000800028ll; 182 } 183 184 #define typedef_ODY_RNM_DRBG_RNDR_RESULT ody_rnm_drbg_rndr_result_t 185 #define bustype_ODY_RNM_DRBG_RNDR_RESULT CSR_TYPE_NCB 186 #define basename_ODY_RNM_DRBG_RNDR_RESULT "RNM_DRBG_RNDR_RESULT" 187 #define device_bar_ODY_RNM_DRBG_RNDR_RESULT 0x0 /* VF_BAR0 */ 188 #define busnum_ODY_RNM_DRBG_RNDR_RESULT 0 189 #define arguments_ODY_RNM_DRBG_RNDR_RESULT -1, -1, -1, -1 190 191 /** 192 * Register (NCB) rnm_drbg_rndrrs 193 * 194 * RNM DRBG Reseeded Random Register 195 */ 196 union ody_rnm_drbg_rndrrs { 197 uint64_t u; 198 struct ody_rnm_drbg_rndrrs_s { 199 uint64_t dat : 64; 200 } s; 201 /* struct ody_rnm_drbg_rndrrs_s cn; */ 202 }; 203 typedef union ody_rnm_drbg_rndrrs ody_rnm_drbg_rndrrs_t; 204 205 #define ODY_RNM_DRBG_RNDRRS ODY_RNM_DRBG_RNDRRS_FUNC() 206 static inline uint64_t ODY_RNM_DRBG_RNDRRS_FUNC(void) __attribute__ ((pure, always_inline)); 207 static inline uint64_t ODY_RNM_DRBG_RNDRRS_FUNC(void) 208 { 209 return 0x80f000800030ll; 210 } 211 212 #define typedef_ODY_RNM_DRBG_RNDRRS ody_rnm_drbg_rndrrs_t 213 #define bustype_ODY_RNM_DRBG_RNDRRS CSR_TYPE_NCB 214 #define basename_ODY_RNM_DRBG_RNDRRS "RNM_DRBG_RNDRRS" 215 #define device_bar_ODY_RNM_DRBG_RNDRRS 0x0 /* VF_BAR0 */ 216 #define busnum_ODY_RNM_DRBG_RNDRRS 0 217 #define arguments_ODY_RNM_DRBG_RNDRRS -1, -1, -1, -1 218 219 /** 220 * Register (NCB) rnm_drbg_rndrrs_result 221 * 222 * RNM DRBG Reseeded Random Result Register 223 */ 224 union ody_rnm_drbg_rndrrs_result { 225 uint64_t u; 226 struct ody_rnm_drbg_rndrrs_result_s { 227 uint64_t res : 1; 228 uint64_t reserved_1_63 : 63; 229 } s; 230 /* struct ody_rnm_drbg_rndrrs_result_s cn; */ 231 }; 232 typedef union ody_rnm_drbg_rndrrs_result ody_rnm_drbg_rndrrs_result_t; 233 234 #define ODY_RNM_DRBG_RNDRRS_RESULT ODY_RNM_DRBG_RNDRRS_RESULT_FUNC() 235 static inline uint64_t ODY_RNM_DRBG_RNDRRS_RESULT_FUNC(void) __attribute__ ((pure, always_inline)); 236 static inline uint64_t ODY_RNM_DRBG_RNDRRS_RESULT_FUNC(void) 237 { 238 return 0x80f000800038ll; 239 } 240 241 #define typedef_ODY_RNM_DRBG_RNDRRS_RESULT ody_rnm_drbg_rndrrs_result_t 242 #define bustype_ODY_RNM_DRBG_RNDRRS_RESULT CSR_TYPE_NCB 243 #define basename_ODY_RNM_DRBG_RNDRRS_RESULT "RNM_DRBG_RNDRRS_RESULT" 244 #define device_bar_ODY_RNM_DRBG_RNDRRS_RESULT 0x0 /* VF_BAR0 */ 245 #define busnum_ODY_RNM_DRBG_RNDRRS_RESULT 0 246 #define arguments_ODY_RNM_DRBG_RNDRRS_RESULT -1, -1, -1, -1 247 248 /** 249 * Register (RSL) rnm_ebg_ctl 250 * 251 * RNM EBG Control Register 252 * This register is used to control the EBG (Entropy Bit Generator), which 253 * serves as the true random entropy source for RNM. 254 */ 255 union ody_rnm_ebg_ctl { 256 uint64_t u; 257 struct ody_rnm_ebg_ctl_s { 258 uint64_t reserved_0_4 : 5; 259 uint64_t rng_pu_bias2 : 1; 260 uint64_t pp_ena : 1; 261 uint64_t rng_slow_osc_ena : 1; 262 uint64_t rng_fast_osc_ena : 1; 263 uint64_t rng_pu_bias : 1; 264 uint64_t rng_rstn : 1; 265 uint64_t rng_clk_sel : 1; 266 uint64_t entropy_req : 1; 267 uint64_t entropy_sel : 2; 268 uint64_t reserved_15 : 1; 269 uint64_t rng_slow_div_val : 8; 270 uint64_t ds_ratio : 8; 271 uint64_t reserved_32_63 : 32; 272 } s; 273 /* struct ody_rnm_ebg_ctl_s cn; */ 274 }; 275 typedef union ody_rnm_ebg_ctl ody_rnm_ebg_ctl_t; 276 277 #define ODY_RNM_EBG_CTL ODY_RNM_EBG_CTL_FUNC() 278 static inline uint64_t ODY_RNM_EBG_CTL_FUNC(void) __attribute__ ((pure, always_inline)); 279 static inline uint64_t ODY_RNM_EBG_CTL_FUNC(void) 280 { 281 return 0x87e00f000040ll; 282 } 283 284 #define typedef_ODY_RNM_EBG_CTL ody_rnm_ebg_ctl_t 285 #define bustype_ODY_RNM_EBG_CTL CSR_TYPE_RSL 286 #define basename_ODY_RNM_EBG_CTL "RNM_EBG_CTL" 287 #define device_bar_ODY_RNM_EBG_CTL 0x0 /* PF_BAR0 */ 288 #define busnum_ODY_RNM_EBG_CTL 0 289 #define arguments_ODY_RNM_EBG_CTL -1, -1, -1, -1 290 291 /** 292 * Register (RSL) rnm_ebg_ent 293 * 294 * RNM EBG Entropy Value Register 295 * This register is used to read true random data from the EBG 296 * (entropy bit generator), which serves as the true random entropy source for RNM. 297 */ 298 union ody_rnm_ebg_ent { 299 uint64_t u; 300 struct ody_rnm_ebg_ent_s { 301 uint64_t dat : 64; 302 } s; 303 /* struct ody_rnm_ebg_ent_s cn; */ 304 }; 305 typedef union ody_rnm_ebg_ent ody_rnm_ebg_ent_t; 306 307 #define ODY_RNM_EBG_ENT ODY_RNM_EBG_ENT_FUNC() 308 static inline uint64_t ODY_RNM_EBG_ENT_FUNC(void) __attribute__ ((pure, always_inline)); 309 static inline uint64_t ODY_RNM_EBG_ENT_FUNC(void) 310 { 311 return 0x87e00f000048ll; 312 } 313 314 #define typedef_ODY_RNM_EBG_ENT ody_rnm_ebg_ent_t 315 #define bustype_ODY_RNM_EBG_ENT CSR_TYPE_RSL 316 #define basename_ODY_RNM_EBG_ENT "RNM_EBG_ENT" 317 #define device_bar_ODY_RNM_EBG_ENT 0x0 /* PF_BAR0 */ 318 #define busnum_ODY_RNM_EBG_ENT 0 319 #define arguments_ODY_RNM_EBG_ENT -1, -1, -1, -1 320 321 /** 322 * Register (RSL) rnm_entropy_rate 323 * 324 * RNM Entropy Consumption Rate Limit Register 325 * Number of microseconds to wait between DRBG Reseeds. 326 */ 327 union ody_rnm_entropy_rate { 328 uint64_t u; 329 struct ody_rnm_entropy_rate_s { 330 uint64_t rndrrs_time : 16; 331 uint64_t reserved_16_63 : 48; 332 } s; 333 /* struct ody_rnm_entropy_rate_s cn; */ 334 }; 335 typedef union ody_rnm_entropy_rate ody_rnm_entropy_rate_t; 336 337 #define ODY_RNM_ENTROPY_RATE ODY_RNM_ENTROPY_RATE_FUNC() 338 static inline uint64_t ODY_RNM_ENTROPY_RATE_FUNC(void) __attribute__ ((pure, always_inline)); 339 static inline uint64_t ODY_RNM_ENTROPY_RATE_FUNC(void) 340 { 341 return 0x87e00f000f10ll; 342 } 343 344 #define typedef_ODY_RNM_ENTROPY_RATE ody_rnm_entropy_rate_t 345 #define bustype_ODY_RNM_ENTROPY_RATE CSR_TYPE_RSL 346 #define basename_ODY_RNM_ENTROPY_RATE "RNM_ENTROPY_RATE" 347 #define device_bar_ODY_RNM_ENTROPY_RATE 0x0 /* PF_BAR0 */ 348 #define busnum_ODY_RNM_ENTROPY_RATE 0 349 #define arguments_ODY_RNM_ENTROPY_RATE -1, -1, -1, -1 350 351 /** 352 * Register (RSL) rnm_entropy_status 353 * 354 * RNM Entropy Pool Status Register 355 * Status of the RNM Entropy Memory. 356 */ 357 union ody_rnm_entropy_status { 358 uint64_t u; 359 struct ody_rnm_entropy_status_s { 360 uint64_t normal_cnt : 7; 361 uint64_t normal_max : 7; 362 uint64_t no_zero_cnt : 7; 363 uint64_t no_zero_max : 7; 364 uint64_t reserved_28_63 : 36; 365 } s; 366 /* struct ody_rnm_entropy_status_s cn; */ 367 }; 368 typedef union ody_rnm_entropy_status ody_rnm_entropy_status_t; 369 370 #define ODY_RNM_ENTROPY_STATUS ODY_RNM_ENTROPY_STATUS_FUNC() 371 static inline uint64_t ODY_RNM_ENTROPY_STATUS_FUNC(void) __attribute__ ((pure, always_inline)); 372 static inline uint64_t ODY_RNM_ENTROPY_STATUS_FUNC(void) 373 { 374 return 0x87e00f000008ll; 375 } 376 377 #define typedef_ODY_RNM_ENTROPY_STATUS ody_rnm_entropy_status_t 378 #define bustype_ODY_RNM_ENTROPY_STATUS CSR_TYPE_RSL 379 #define basename_ODY_RNM_ENTROPY_STATUS "RNM_ENTROPY_STATUS" 380 #define device_bar_ODY_RNM_ENTROPY_STATUS 0x0 /* PF_BAR0 */ 381 #define busnum_ODY_RNM_ENTROPY_STATUS 0 382 #define arguments_ODY_RNM_ENTROPY_STATUS -1, -1, -1, -1 383 384 /** 385 * Register (RSL) rnm_pf_drbg_reseed_ctr 386 * 387 * RNM DRBG Reseed Counter Register 388 * Number of DRBG engine requests serviced since the last reseed. 389 * Read RNM_PF_DRBG_RESEED_INTERVAL for the number of requests before a reseed occurs. 390 * When RNM_PF_DRBG_RESEED_CTR reaches RNM_PF_DRBG_RESEED_INTERVAL the engines will reseed 391 * themselves. 392 */ 393 union ody_rnm_pf_drbg_reseed_ctr { 394 uint64_t u; 395 struct ody_rnm_pf_drbg_reseed_ctr_s { 396 uint64_t ctr : 48; 397 uint64_t reserved_48_63 : 16; 398 } s; 399 /* struct ody_rnm_pf_drbg_reseed_ctr_s cn; */ 400 }; 401 typedef union ody_rnm_pf_drbg_reseed_ctr ody_rnm_pf_drbg_reseed_ctr_t; 402 403 #define ODY_RNM_PF_DRBG_RESEED_CTR ODY_RNM_PF_DRBG_RESEED_CTR_FUNC() 404 static inline uint64_t ODY_RNM_PF_DRBG_RESEED_CTR_FUNC(void) __attribute__ ((pure, always_inline)); 405 static inline uint64_t ODY_RNM_PF_DRBG_RESEED_CTR_FUNC(void) 406 { 407 return 0x87e00f000f08ll; 408 } 409 410 #define typedef_ODY_RNM_PF_DRBG_RESEED_CTR ody_rnm_pf_drbg_reseed_ctr_t 411 #define bustype_ODY_RNM_PF_DRBG_RESEED_CTR CSR_TYPE_RSL 412 #define basename_ODY_RNM_PF_DRBG_RESEED_CTR "RNM_PF_DRBG_RESEED_CTR" 413 #define device_bar_ODY_RNM_PF_DRBG_RESEED_CTR 0x0 /* PF_BAR0 */ 414 #define busnum_ODY_RNM_PF_DRBG_RESEED_CTR 0 415 #define arguments_ODY_RNM_PF_DRBG_RESEED_CTR -1, -1, -1, -1 416 417 /** 418 * Register (RSL) rnm_pf_drbg_reseed_interval 419 * 420 * RNM DRBG Reseed Interval Register 421 * Number of DRBG requests to service before the DRBG engines reseed themselves. 422 * Read RNM_PF_DRBG_RESEED_CTR for the number of requests since the last reseed. 423 * When RNM_PF_DRBG_RESEED_CTR reaches RNM_PF_DRBG_RESEED_INTERVAL the engines will 424 * reseed themselves. 425 */ 426 union ody_rnm_pf_drbg_reseed_interval { 427 uint64_t u; 428 struct ody_rnm_pf_drbg_reseed_interval_s { 429 uint64_t seedlife : 48; 430 uint64_t reserved_48_63 : 16; 431 } s; 432 /* struct ody_rnm_pf_drbg_reseed_interval_s cn; */ 433 }; 434 typedef union ody_rnm_pf_drbg_reseed_interval ody_rnm_pf_drbg_reseed_interval_t; 435 436 #define ODY_RNM_PF_DRBG_RESEED_INTERVAL ODY_RNM_PF_DRBG_RESEED_INTERVAL_FUNC() 437 static inline uint64_t ODY_RNM_PF_DRBG_RESEED_INTERVAL_FUNC(void) __attribute__ ((pure, always_inline)); 438 static inline uint64_t ODY_RNM_PF_DRBG_RESEED_INTERVAL_FUNC(void) 439 { 440 return 0x87e00f000f00ll; 441 } 442 443 #define typedef_ODY_RNM_PF_DRBG_RESEED_INTERVAL ody_rnm_pf_drbg_reseed_interval_t 444 #define bustype_ODY_RNM_PF_DRBG_RESEED_INTERVAL CSR_TYPE_RSL 445 #define basename_ODY_RNM_PF_DRBG_RESEED_INTERVAL "RNM_PF_DRBG_RESEED_INTERVAL" 446 #define device_bar_ODY_RNM_PF_DRBG_RESEED_INTERVAL 0x0 /* PF_BAR0 */ 447 #define busnum_ODY_RNM_PF_DRBG_RESEED_INTERVAL 0 448 #define arguments_ODY_RNM_PF_DRBG_RESEED_INTERVAL -1, -1, -1, -1 449 450 /** 451 * Register (RSL) rnm_pf_ebg_health 452 * 453 * RNM EBG Health Configuration and Status Register 454 * This register is used to configure and check the status of the EBG (Entropy Bit 455 * Generator) Health tests. 456 */ 457 union ody_rnm_pf_ebg_health { 458 uint64_t u; 459 struct ody_rnm_pf_ebg_health_s { 460 uint64_t c_adp : 11; 461 uint64_t c_rep : 9; 462 uint64_t ct_err : 1; 463 uint64_t st_err : 1; 464 uint64_t st_done : 1; 465 uint64_t err_adp : 1; 466 uint64_t err_rep : 1; 467 uint64_t reserved_25_63 : 39; 468 } s; 469 /* struct ody_rnm_pf_ebg_health_s cn; */ 470 }; 471 typedef union ody_rnm_pf_ebg_health ody_rnm_pf_ebg_health_t; 472 473 #define ODY_RNM_PF_EBG_HEALTH ODY_RNM_PF_EBG_HEALTH_FUNC() 474 static inline uint64_t ODY_RNM_PF_EBG_HEALTH_FUNC(void) __attribute__ ((pure, always_inline)); 475 static inline uint64_t ODY_RNM_PF_EBG_HEALTH_FUNC(void) 476 { 477 return 0x87e00f000050ll; 478 } 479 480 #define typedef_ODY_RNM_PF_EBG_HEALTH ody_rnm_pf_ebg_health_t 481 #define bustype_ODY_RNM_PF_EBG_HEALTH CSR_TYPE_RSL 482 #define basename_ODY_RNM_PF_EBG_HEALTH "RNM_PF_EBG_HEALTH" 483 #define device_bar_ODY_RNM_PF_EBG_HEALTH 0x0 /* PF_BAR0 */ 484 #define busnum_ODY_RNM_PF_EBG_HEALTH 0 485 #define arguments_ODY_RNM_PF_EBG_HEALTH -1, -1, -1, -1 486 487 /** 488 * Register (RSL) rnm_pf_trng 489 * 490 * RNM True Random Number Register 491 */ 492 union ody_rnm_pf_trng { 493 uint64_t u; 494 struct ody_rnm_pf_trng_s { 495 uint64_t dat : 64; 496 } s; 497 /* struct ody_rnm_pf_trng_s cn; */ 498 }; 499 typedef union ody_rnm_pf_trng ody_rnm_pf_trng_t; 500 501 #define ODY_RNM_PF_TRNG ODY_RNM_PF_TRNG_FUNC() 502 static inline uint64_t ODY_RNM_PF_TRNG_FUNC(void) __attribute__ ((pure, always_inline)); 503 static inline uint64_t ODY_RNM_PF_TRNG_FUNC(void) 504 { 505 return 0x87e00f000400ll; 506 } 507 508 #define typedef_ODY_RNM_PF_TRNG ody_rnm_pf_trng_t 509 #define bustype_ODY_RNM_PF_TRNG CSR_TYPE_RSL 510 #define basename_ODY_RNM_PF_TRNG "RNM_PF_TRNG" 511 #define device_bar_ODY_RNM_PF_TRNG 0x0 /* PF_BAR0 */ 512 #define busnum_ODY_RNM_PF_TRNG 0 513 #define arguments_ODY_RNM_PF_TRNG -1, -1, -1, -1 514 515 /** 516 * Register (RSL) rnm_pf_trng_dat# 517 * 518 * RNM True Random Number Register 519 */ 520 union ody_rnm_pf_trng_datx { 521 uint64_t u; 522 struct ody_rnm_pf_trng_datx_s { 523 uint64_t dat : 64; 524 } s; 525 /* struct ody_rnm_pf_trng_datx_s cn; */ 526 }; 527 typedef union ody_rnm_pf_trng_datx ody_rnm_pf_trng_datx_t; 528 529 static inline uint64_t ODY_RNM_PF_TRNG_DATX(uint64_t a) __attribute__ ((pure, always_inline)); 530 static inline uint64_t ODY_RNM_PF_TRNG_DATX(uint64_t a) 531 { 532 if (a <= 127) 533 return 0x87e00f001000ll + 0x10ll * ((a) & 0x7f); 534 __ody_csr_fatal("RNM_PF_TRNG_DATX", 1, a, 0, 0, 0, 0, 0); 535 } 536 537 #define typedef_ODY_RNM_PF_TRNG_DATX(a) ody_rnm_pf_trng_datx_t 538 #define bustype_ODY_RNM_PF_TRNG_DATX(a) CSR_TYPE_RSL 539 #define basename_ODY_RNM_PF_TRNG_DATX(a) "RNM_PF_TRNG_DATX" 540 #define device_bar_ODY_RNM_PF_TRNG_DATX(a) 0x0 /* PF_BAR0 */ 541 #define busnum_ODY_RNM_PF_TRNG_DATX(a) (a) 542 #define arguments_ODY_RNM_PF_TRNG_DATX(a) (a), -1, -1, -1 543 544 /** 545 * Register (RSL) rnm_pf_trng_res# 546 * 547 * RNM Random Result Register 548 */ 549 union ody_rnm_pf_trng_resx { 550 uint64_t u; 551 struct ody_rnm_pf_trng_resx_s { 552 uint64_t res : 1; 553 uint64_t reserved_1_63 : 63; 554 } s; 555 /* struct ody_rnm_pf_trng_resx_s cn; */ 556 }; 557 typedef union ody_rnm_pf_trng_resx ody_rnm_pf_trng_resx_t; 558 559 static inline uint64_t ODY_RNM_PF_TRNG_RESX(uint64_t a) __attribute__ ((pure, always_inline)); 560 static inline uint64_t ODY_RNM_PF_TRNG_RESX(uint64_t a) 561 { 562 if (a <= 127) 563 return 0x87e00f001008ll + 0x10ll * ((a) & 0x7f); 564 __ody_csr_fatal("RNM_PF_TRNG_RESX", 1, a, 0, 0, 0, 0, 0); 565 } 566 567 #define typedef_ODY_RNM_PF_TRNG_RESX(a) ody_rnm_pf_trng_resx_t 568 #define bustype_ODY_RNM_PF_TRNG_RESX(a) CSR_TYPE_RSL 569 #define basename_ODY_RNM_PF_TRNG_RESX(a) "RNM_PF_TRNG_RESX" 570 #define device_bar_ODY_RNM_PF_TRNG_RESX(a) 0x0 /* PF_BAR0 */ 571 #define busnum_ODY_RNM_PF_TRNG_RESX(a) (a) 572 #define arguments_ODY_RNM_PF_TRNG_RESX(a) (a), -1, -1, -1 573 574 /** 575 * Register (RSL) rnm_pf_trng_result 576 * 577 * RNM Random Result Register 578 */ 579 union ody_rnm_pf_trng_result { 580 uint64_t u; 581 struct ody_rnm_pf_trng_result_s { 582 uint64_t reserved_0_63 : 64; 583 } s; 584 /* struct ody_rnm_pf_trng_result_s cn; */ 585 }; 586 typedef union ody_rnm_pf_trng_result ody_rnm_pf_trng_result_t; 587 588 #define ODY_RNM_PF_TRNG_RESULT ODY_RNM_PF_TRNG_RESULT_FUNC() 589 static inline uint64_t ODY_RNM_PF_TRNG_RESULT_FUNC(void) __attribute__ ((pure, always_inline)); 590 static inline uint64_t ODY_RNM_PF_TRNG_RESULT_FUNC(void) 591 { 592 return 0x87e00f000408ll; 593 } 594 595 #define typedef_ODY_RNM_PF_TRNG_RESULT ody_rnm_pf_trng_result_t 596 #define bustype_ODY_RNM_PF_TRNG_RESULT CSR_TYPE_RSL 597 #define basename_ODY_RNM_PF_TRNG_RESULT "RNM_PF_TRNG_RESULT" 598 #define device_bar_ODY_RNM_PF_TRNG_RESULT 0x0 /* PF_BAR0 */ 599 #define busnum_ODY_RNM_PF_TRNG_RESULT 0 600 #define arguments_ODY_RNM_PF_TRNG_RESULT -1, -1, -1, -1 601 602 /** 603 * Register (NCB) rnm_trng 604 * 605 * RNM True Random Number Register 606 */ 607 union ody_rnm_trng { 608 uint64_t u; 609 struct ody_rnm_trng_s { 610 uint64_t dat : 64; 611 } s; 612 /* struct ody_rnm_trng_s cn; */ 613 }; 614 typedef union ody_rnm_trng ody_rnm_trng_t; 615 616 #define ODY_RNM_TRNG ODY_RNM_TRNG_FUNC() 617 static inline uint64_t ODY_RNM_TRNG_FUNC(void) __attribute__ ((pure, always_inline)); 618 static inline uint64_t ODY_RNM_TRNG_FUNC(void) 619 { 620 return 0x80f000800010ll; 621 } 622 623 #define typedef_ODY_RNM_TRNG ody_rnm_trng_t 624 #define bustype_ODY_RNM_TRNG CSR_TYPE_NCB 625 #define basename_ODY_RNM_TRNG "RNM_TRNG" 626 #define device_bar_ODY_RNM_TRNG 0x0 /* VF_BAR0 */ 627 #define busnum_ODY_RNM_TRNG 0 628 #define arguments_ODY_RNM_TRNG -1, -1, -1, -1 629 630 /** 631 * Register (NCB) rnm_trng_result 632 * 633 * RNM Random Result Register 634 */ 635 union ody_rnm_trng_result { 636 uint64_t u; 637 struct ody_rnm_trng_result_s { 638 uint64_t reserved_0_63 : 64; 639 } s; 640 /* struct ody_rnm_trng_result_s cn; */ 641 }; 642 typedef union ody_rnm_trng_result ody_rnm_trng_result_t; 643 644 #define ODY_RNM_TRNG_RESULT ODY_RNM_TRNG_RESULT_FUNC() 645 static inline uint64_t ODY_RNM_TRNG_RESULT_FUNC(void) __attribute__ ((pure, always_inline)); 646 static inline uint64_t ODY_RNM_TRNG_RESULT_FUNC(void) 647 { 648 return 0x80f000800018ll; 649 } 650 651 #define typedef_ODY_RNM_TRNG_RESULT ody_rnm_trng_result_t 652 #define bustype_ODY_RNM_TRNG_RESULT CSR_TYPE_NCB 653 #define basename_ODY_RNM_TRNG_RESULT "RNM_TRNG_RESULT" 654 #define device_bar_ODY_RNM_TRNG_RESULT 0x0 /* VF_BAR0 */ 655 #define busnum_ODY_RNM_TRNG_RESULT 0 656 #define arguments_ODY_RNM_TRNG_RESULT -1, -1, -1, -1 657 658 /** 659 * Register (NCB) rnm_vf_drbg_reseed_ctr 660 * 661 * RNM DRBG Reseed Counter Register 662 * Number of DRBG engine requests serviced since the last reseed. 663 * Read RNM_VF_DRBG_RESEED_INTERVAL for the number of requests before a reseed occurs. 664 * When RNM_VF_DRBG_RESEED_CTR reaches RNM_VF_DRBG_RESEED_INTERVAL the engines will reseed 665 * themselves. 666 */ 667 union ody_rnm_vf_drbg_reseed_ctr { 668 uint64_t u; 669 struct ody_rnm_vf_drbg_reseed_ctr_s { 670 uint64_t ctr : 48; 671 uint64_t reserved_48_63 : 16; 672 } s; 673 /* struct ody_rnm_vf_drbg_reseed_ctr_s cn; */ 674 }; 675 typedef union ody_rnm_vf_drbg_reseed_ctr ody_rnm_vf_drbg_reseed_ctr_t; 676 677 #define ODY_RNM_VF_DRBG_RESEED_CTR ODY_RNM_VF_DRBG_RESEED_CTR_FUNC() 678 static inline uint64_t ODY_RNM_VF_DRBG_RESEED_CTR_FUNC(void) __attribute__ ((pure, always_inline)); 679 static inline uint64_t ODY_RNM_VF_DRBG_RESEED_CTR_FUNC(void) 680 { 681 return 0x80f000800058ll; 682 } 683 684 #define typedef_ODY_RNM_VF_DRBG_RESEED_CTR ody_rnm_vf_drbg_reseed_ctr_t 685 #define bustype_ODY_RNM_VF_DRBG_RESEED_CTR CSR_TYPE_NCB 686 #define basename_ODY_RNM_VF_DRBG_RESEED_CTR "RNM_VF_DRBG_RESEED_CTR" 687 #define device_bar_ODY_RNM_VF_DRBG_RESEED_CTR 0x0 /* VF_BAR0 */ 688 #define busnum_ODY_RNM_VF_DRBG_RESEED_CTR 0 689 #define arguments_ODY_RNM_VF_DRBG_RESEED_CTR -1, -1, -1, -1 690 691 /** 692 * Register (NCB) rnm_vf_drbg_reseed_interval 693 * 694 * RNM DRBG Reseed Interval Register 695 * Number of DRBG requests to service before the DRBG engines reseed themselves. 696 * Read RNM_VF_DRBG_RESEED_CTR for the number of requests since the last reseed. 697 * When RNM_VF_DRBG_RESEED_CTR reaches RNM_VF_DRBG_RESEED_INTERVAL the engines will 698 * reseed themselves. 699 */ 700 union ody_rnm_vf_drbg_reseed_interval { 701 uint64_t u; 702 struct ody_rnm_vf_drbg_reseed_interval_s { 703 uint64_t seedlife : 48; 704 uint64_t reserved_48_63 : 16; 705 } s; 706 /* struct ody_rnm_vf_drbg_reseed_interval_s cn; */ 707 }; 708 typedef union ody_rnm_vf_drbg_reseed_interval ody_rnm_vf_drbg_reseed_interval_t; 709 710 #define ODY_RNM_VF_DRBG_RESEED_INTERVAL ODY_RNM_VF_DRBG_RESEED_INTERVAL_FUNC() 711 static inline uint64_t ODY_RNM_VF_DRBG_RESEED_INTERVAL_FUNC(void) __attribute__ ((pure, always_inline)); 712 static inline uint64_t ODY_RNM_VF_DRBG_RESEED_INTERVAL_FUNC(void) 713 { 714 return 0x80f000800050ll; 715 } 716 717 #define typedef_ODY_RNM_VF_DRBG_RESEED_INTERVAL ody_rnm_vf_drbg_reseed_interval_t 718 #define bustype_ODY_RNM_VF_DRBG_RESEED_INTERVAL CSR_TYPE_NCB 719 #define basename_ODY_RNM_VF_DRBG_RESEED_INTERVAL "RNM_VF_DRBG_RESEED_INTERVAL" 720 #define device_bar_ODY_RNM_VF_DRBG_RESEED_INTERVAL 0x0 /* VF_BAR0 */ 721 #define busnum_ODY_RNM_VF_DRBG_RESEED_INTERVAL 0 722 #define arguments_ODY_RNM_VF_DRBG_RESEED_INTERVAL -1, -1, -1, -1 723 724 /** 725 * Register (NCB) rnm_vf_ebg_health 726 * 727 * RNM EBG Health Configuration and Status Register 728 * This register is used to configure and check the status of the EBG (Entropy Bit 729 * Generator) Health tests. 730 */ 731 union ody_rnm_vf_ebg_health { 732 uint64_t u; 733 struct ody_rnm_vf_ebg_health_s { 734 uint64_t reserved_0_19 : 20; 735 uint64_t ct_err : 1; 736 uint64_t st_err : 1; 737 uint64_t st_done : 1; 738 uint64_t err_adp : 1; 739 uint64_t err_rep : 1; 740 uint64_t reserved_25_63 : 39; 741 } s; 742 /* struct ody_rnm_vf_ebg_health_s cn; */ 743 }; 744 typedef union ody_rnm_vf_ebg_health ody_rnm_vf_ebg_health_t; 745 746 #define ODY_RNM_VF_EBG_HEALTH ODY_RNM_VF_EBG_HEALTH_FUNC() 747 static inline uint64_t ODY_RNM_VF_EBG_HEALTH_FUNC(void) __attribute__ ((pure, always_inline)); 748 static inline uint64_t ODY_RNM_VF_EBG_HEALTH_FUNC(void) 749 { 750 return 0x80f000800048ll; 751 } 752 753 #define typedef_ODY_RNM_VF_EBG_HEALTH ody_rnm_vf_ebg_health_t 754 #define bustype_ODY_RNM_VF_EBG_HEALTH CSR_TYPE_NCB 755 #define basename_ODY_RNM_VF_EBG_HEALTH "RNM_VF_EBG_HEALTH" 756 #define device_bar_ODY_RNM_VF_EBG_HEALTH 0x0 /* VF_BAR0 */ 757 #define busnum_ODY_RNM_VF_EBG_HEALTH 0 758 #define arguments_ODY_RNM_VF_EBG_HEALTH -1, -1, -1, -1 759 760 /** 761 * Register (NCB) rnm_vf_trng_dat# 762 * 763 * RNM True Random Number Register 764 */ 765 union ody_rnm_vf_trng_datx { 766 uint64_t u; 767 struct ody_rnm_vf_trng_datx_s { 768 uint64_t dat : 64; 769 } s; 770 /* struct ody_rnm_vf_trng_datx_s cn; */ 771 }; 772 typedef union ody_rnm_vf_trng_datx ody_rnm_vf_trng_datx_t; 773 774 static inline uint64_t ODY_RNM_VF_TRNG_DATX(uint64_t a) __attribute__ ((pure, always_inline)); 775 static inline uint64_t ODY_RNM_VF_TRNG_DATX(uint64_t a) 776 { 777 if (a <= 127) 778 return 0x80f000800800ll + 0x10ll * ((a) & 0x7f); 779 __ody_csr_fatal("RNM_VF_TRNG_DATX", 1, a, 0, 0, 0, 0, 0); 780 } 781 782 #define typedef_ODY_RNM_VF_TRNG_DATX(a) ody_rnm_vf_trng_datx_t 783 #define bustype_ODY_RNM_VF_TRNG_DATX(a) CSR_TYPE_NCB 784 #define basename_ODY_RNM_VF_TRNG_DATX(a) "RNM_VF_TRNG_DATX" 785 #define device_bar_ODY_RNM_VF_TRNG_DATX(a) 0x0 /* VF_BAR0 */ 786 #define busnum_ODY_RNM_VF_TRNG_DATX(a) (a) 787 #define arguments_ODY_RNM_VF_TRNG_DATX(a) (a), -1, -1, -1 788 789 /** 790 * Register (NCB) rnm_vf_trng_res# 791 * 792 * RNM Random Result Register 793 */ 794 union ody_rnm_vf_trng_resx { 795 uint64_t u; 796 struct ody_rnm_vf_trng_resx_s { 797 uint64_t res : 1; 798 uint64_t reserved_1_63 : 63; 799 } s; 800 /* struct ody_rnm_vf_trng_resx_s cn; */ 801 }; 802 typedef union ody_rnm_vf_trng_resx ody_rnm_vf_trng_resx_t; 803 804 static inline uint64_t ODY_RNM_VF_TRNG_RESX(uint64_t a) __attribute__ ((pure, always_inline)); 805 static inline uint64_t ODY_RNM_VF_TRNG_RESX(uint64_t a) 806 { 807 if (a <= 127) 808 return 0x80f000800808ll + 0x10ll * ((a) & 0x7f); 809 __ody_csr_fatal("RNM_VF_TRNG_RESX", 1, a, 0, 0, 0, 0, 0); 810 } 811 812 #define typedef_ODY_RNM_VF_TRNG_RESX(a) ody_rnm_vf_trng_resx_t 813 #define bustype_ODY_RNM_VF_TRNG_RESX(a) CSR_TYPE_NCB 814 #define basename_ODY_RNM_VF_TRNG_RESX(a) "RNM_VF_TRNG_RESX" 815 #define device_bar_ODY_RNM_VF_TRNG_RESX(a) 0x0 /* VF_BAR0 */ 816 #define busnum_ODY_RNM_VF_TRNG_RESX(a) (a) 817 #define arguments_ODY_RNM_VF_TRNG_RESX(a) (a), -1, -1, -1 818 819 #endif /* __ODY_CSRS_RNM_H__ */ 820