priv.h 874 B

12345678910111213141516171819202122232425262728
  1. #ifndef __NVKM_BIOS_PRIV_H__
  2. #define __NVKM_BIOS_PRIV_H__
  3. #define nvkm_bios(p) container_of((p), struct nvkm_bios, subdev)
  4. #include <subdev/bios.h>
  5. struct nvbios_source {
  6. const char *name;
  7. void *(*init)(struct nvkm_bios *, const char *);
  8. void (*fini)(void *);
  9. u32 (*read)(void *, u32 offset, u32 length, struct nvkm_bios *);
  10. u32 (*size)(void *);
  11. bool rw;
  12. bool ignore_checksum;
  13. bool no_pcir;
  14. bool require_checksum;
  15. };
  16. int nvbios_extend(struct nvkm_bios *, u32 length);
  17. int nvbios_shadow(struct nvkm_bios *);
  18. extern const struct nvbios_source nvbios_rom;
  19. extern const struct nvbios_source nvbios_ramin;
  20. extern const struct nvbios_source nvbios_acpi_fast;
  21. extern const struct nvbios_source nvbios_acpi_slow;
  22. extern const struct nvbios_source nvbios_pcirom;
  23. extern const struct nvbios_source nvbios_platform;
  24. extern const struct nvbios_source nvbios_of;
  25. #endif