bios.h 546 Bytes
Newer Older
1 2
#ifndef __NVKM_BIOS_H__
#define __NVKM_BIOS_H__
3 4
#include <core/subdev.h>

5 6
struct nvkm_bios {
	struct nvkm_subdev base;
7 8 9 10 11 12 13 14 15 16 17
	u32 size;
	u8 *data;

	u32 bmp_offset;
	u32 bit_offset;

	struct {
		u8 major;
		u8 chip;
		u8 minor;
		u8 micro;
18
		u8 patch;
19 20 21
	} version;
};

22 23
static inline struct nvkm_bios *
nvkm_bios(void *obj)
24
{
25
	return (void *)nvkm_subdev(obj, NVDEV_SUBDEV_VBIOS);
26 27 28 29 30
}

u8  nvbios_checksum(const u8 *data, int size);
u16 nvbios_findstr(const u8 *data, int size, const char *str, int len);

31
extern struct nvkm_oclass nvkm_bios_oclass;
32
#endif