1 /* $NetBSD: priv.h,v 1.3 2021/12/18 23:45:38 riastradh Exp $ */ 2 3 /* SPDX-License-Identifier: MIT */ 4 #ifndef __NVKM_BIOS_PRIV_H__ 5 #define __NVKM_BIOS_PRIV_H__ 6 #define nvkm_bios(p) container_of((p), struct nvkm_bios, subdev) 7 #include <subdev/bios.h> 8 9 struct nvbios_source { 10 const char *name; 11 void *(*init)(struct nvkm_bios *, const char *); 12 void (*fini)(void *); 13 u32 (*read)(void *, u32 offset, u32 length, struct nvkm_bios *); 14 u32 (*size)(void *); 15 bool rw; 16 bool ignore_checksum; 17 bool no_pcir; 18 bool require_checksum; 19 }; 20 21 int nvbios_extend(struct nvkm_bios *, u32 length); 22 int nvbios_shadow(struct nvkm_bios *); 23 24 extern const struct nvbios_source nvbios_rom; 25 extern const struct nvbios_source nvbios_ramin; 26 extern const struct nvbios_source nvbios_acpi_fast; 27 extern const struct nvbios_source nvbios_acpi_slow; 28 extern const struct nvbios_source nvbios_pcirom; 29 extern const struct nvbios_source nvbios_platform; 30 extern const struct nvbios_source nvbios_of; 31 #endif 32