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()
102 score += shadow_image(bios, idx + 1, offset + image.size, mthd); in shadow_image()
107 shadow_method(struct nvkm_bios *bios, struct shadow *mthd, const char *name) in shadow_method() argument
110 struct nvkm_subdev *subdev = &bios->subdev; in shadow_method()
114 mthd->data = func->init(bios, name); in shadow_method()
120 mthd->score = shadow_image(bios, 0, 0, mthd); in shadow_method()
124 mthd->data = bios->data; in shadow_method()
125 mthd->size = bios->size; in shadow_method()
126 bios->data = NULL; in shadow_method()
127 bios->size = 0; in shadow_method()
133 shadow_fw_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) in shadow_fw_read() argument
137 memcpy(bios->data + offset, fw->data + offset, length); in shadow_fw_read()
144 shadow_fw_init(struct nvkm_bios *bios, const char *name) in shadow_fw_init() argument
146 struct device *dev = bios->subdev.device->dev; in shadow_fw_init()
164 nvbios_shadow(struct nvkm_bios *bios) in nvbios_shadow() argument
166 struct nvkm_subdev *subdev = &bios->subdev; in nvbios_shadow()
191 if (shadow_method(bios, mthd, NULL)) in nvbios_shadow()
199 shadow_method(bios, mthd, source); in nvbios_shadow()
214 if (shadow_method(bios, mthd, NULL)) { in nvbios_shadow()
235 bios->data = best->data; in nvbios_shadow()
236 bios->size = best->size; in nvbios_shadow()