Lines Matching defs:bios

27 #include <subdev/bios.h>
28 #include <subdev/bios/image.h>
39 shadow_fetch(struct nvkm_bios *bios, struct shadow *mthd, u32 upto)
42 const u32 start = bios->size;
44 if (nvbios_extend(bios, limit) > 0) {
45 u32 read = mthd->func->read(data, start, limit - start, bios);
46 bios->size = start + read;
48 return bios->size >= upto;
52 shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)
54 struct nvkm_subdev *subdev = &bios->subdev;
64 if (!shadow_fetch(bios, mthd, offset + 0x1000)) {
70 if (!nvbios_image(bios, idx, &image)) {
78 if (!shadow_fetch(bios, mthd, image.base + image.size)) {
86 nvbios_checksum(&bios->data[image.base], image.size)) {
105 score += shadow_image(bios, idx + 1, offset + image.size, mthd);
110 shadow_method(struct nvkm_bios *bios, struct shadow *mthd, const char *name)
113 struct nvkm_subdev *subdev = &bios->subdev;
117 mthd->data = func->init(bios, name);
123 mthd->score = shadow_image(bios, 0, 0, mthd);
127 mthd->data = bios->data;
128 mthd->size = bios->size;
129 bios->data = NULL;
130 bios->size = 0;
136 shadow_fw_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios)
140 memcpy(bios->data + offset, fw->data + offset, length);
147 shadow_fw_init(struct nvkm_bios *bios, const char *name)
149 struct device *dev = bios->subdev.device->dev;
173 nvbios_shadow(struct nvkm_bios *bios)
175 struct nvkm_subdev *subdev = &bios->subdev;
191 /* handle user-specified bios source */
200 if (shadow_method(bios, mthd, NULL))
208 shadow_method(bios, mthd, source);
219 /* scan all potential bios sources, looking for best image */
223 if (shadow_method(bios, mthd, NULL)) {
244 bios->data = best->data;
245 bios->size = best->size;