Lines Matching refs:bios
39 shadow_fetch(struct nvkm_bios *bios, struct shadow *mthd, u32 upto) in shadow_fetch() argument
42 const u32 start = bios->size; in shadow_fetch()
44 if (nvbios_extend(bios, limit) > 0) { in shadow_fetch()
45 u32 read = mthd->func->read(data, start, limit - start, bios); in shadow_fetch()
46 bios->size = start + read; in shadow_fetch()
48 return bios->size >= upto; in shadow_fetch()
52 shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) in shadow_image() argument
54 struct nvkm_subdev *subdev = &bios->subdev; in shadow_image()
64 if (!shadow_fetch(bios, mthd, offset + 0x1000)) { in shadow_image()
70 if (!nvbios_image(bios, idx, &image)) { in shadow_image()
78 if (!shadow_fetch(bios, mthd, image.size)) { in shadow_image()
86 nvbios_checksum(&bios->data[image.base], image.size)) { in shadow_image()
105 score += shadow_image(bios, idx + 1, offset + image.size, mthd); in shadow_image()
110 shadow_method(struct nvkm_bios *bios, struct shadow *mthd, const char *name) in shadow_method() argument
113 struct nvkm_subdev *subdev = &bios->subdev; in shadow_method()
117 mthd->data = func->init(bios, name); in shadow_method()
123 mthd->score = shadow_image(bios, 0, 0, mthd); in shadow_method()
127 mthd->data = bios->data; in shadow_method()
128 mthd->size = bios->size; in shadow_method()
129 bios->data = NULL; in shadow_method()
130 bios->size = 0; in shadow_method()
136 shadow_fw_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) in shadow_fw_read() argument
140 memcpy(bios->data + offset, fw->data + offset, length); in shadow_fw_read()
147 shadow_fw_init(struct nvkm_bios *bios, const char *name) in shadow_fw_init() argument
149 struct device *dev = bios->subdev.device->dev; in shadow_fw_init()
167 nvbios_shadow(struct nvkm_bios *bios) in nvbios_shadow() argument
169 struct nvkm_subdev *subdev = &bios->subdev; in nvbios_shadow()
194 if (shadow_method(bios, mthd, NULL)) in nvbios_shadow()
202 shadow_method(bios, mthd, source); in nvbios_shadow()
217 if (shadow_method(bios, mthd, NULL)) { in nvbios_shadow()
238 bios->data = best->data; in nvbios_shadow()
239 bios->size = best->size; in nvbios_shadow()