2019-06-19 20:13:43 -04:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2014-09-18 09:24:10 +10:00
|
|
|
#ifndef __NVKM_BIOS_PRIV_H__
|
|
|
|
#define __NVKM_BIOS_PRIV_H__
|
2015-08-20 14:54:20 +10:00
|
|
|
#define nvkm_bios(p) container_of((p), struct nvkm_bios, subdev)
|
2014-09-18 09:24:10 +10:00
|
|
|
#include <subdev/bios.h>
|
|
|
|
|
|
|
|
struct nvbios_source {
|
|
|
|
const char *name;
|
2015-01-14 14:40:03 +10:00
|
|
|
void *(*init)(struct nvkm_bios *, const char *);
|
2014-09-18 09:24:10 +10:00
|
|
|
void (*fini)(void *);
|
2015-01-14 14:40:03 +10:00
|
|
|
u32 (*read)(void *, u32 offset, u32 length, struct nvkm_bios *);
|
2015-10-01 23:41:21 -04:00
|
|
|
u32 (*size)(void *);
|
2014-09-18 09:24:10 +10:00
|
|
|
bool rw;
|
2015-10-01 23:41:21 -04:00
|
|
|
bool ignore_checksum;
|
|
|
|
bool no_pcir;
|
2016-10-14 13:16:36 +10:00
|
|
|
bool require_checksum;
|
2014-09-18 09:24:10 +10:00
|
|
|
};
|
|
|
|
|
2015-01-14 14:40:03 +10:00
|
|
|
int nvbios_extend(struct nvkm_bios *, u32 length);
|
|
|
|
int nvbios_shadow(struct nvkm_bios *);
|
2014-09-18 09:24:10 +10:00
|
|
|
|
2022-03-19 11:27:51 +01:00
|
|
|
extern const struct nvbios_source nvbios_prom;
|
2014-09-18 09:24:10 +10:00
|
|
|
extern const struct nvbios_source nvbios_ramin;
|
|
|
|
extern const struct nvbios_source nvbios_acpi_fast;
|
|
|
|
extern const struct nvbios_source nvbios_acpi_slow;
|
|
|
|
extern const struct nvbios_source nvbios_pcirom;
|
|
|
|
extern const struct nvbios_source nvbios_platform;
|
|
|
|
extern const struct nvbios_source nvbios_of;
|
|
|
|
#endif
|