cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

volt.h (781B)


      1/* SPDX-License-Identifier: MIT */
      2#ifndef __NVBIOS_VOLT_H__
      3#define __NVBIOS_VOLT_H__
      4
      5enum nvbios_volt_type {
      6	NVBIOS_VOLT_GPIO = 0,
      7	NVBIOS_VOLT_PWM,
      8};
      9
     10struct nvbios_volt {
     11	enum nvbios_volt_type type;
     12	u32 min;
     13	u32 max;
     14	u32 base;
     15
     16	/* GPIO mode */
     17	bool ranged;
     18	u8   vidmask;
     19	s16  step;
     20
     21	/* PWM mode */
     22	u32 pwm_freq;
     23	u32 pwm_range;
     24};
     25
     26u32 nvbios_volt_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
     27u32 nvbios_volt_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
     28		      struct nvbios_volt *);
     29
     30struct nvbios_volt_entry {
     31	u32 voltage;
     32	u8  vid;
     33};
     34
     35u32 nvbios_volt_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len);
     36u32 nvbios_volt_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len,
     37			    struct nvbios_volt_entry *);
     38#endif