summaryrefslogtreecommitdiff
path: root/nvkm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-09-22 11:21:57 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-12-02 15:37:18 +1000
commit215059ecbd9e938b2992f68097de15624bb1dadc (patch)
tree23fdaf0e181ad8663db49f7e0ceff6d0d4a8d631 /nvkm
parent1802402b298049e3f4d3c39872a87b2fc31372df (diff)
downloadnouveau-215059ecbd9e938b2992f68097de15624bb1dadc.tar.gz
bios: use NPDE to locate images beyond those defined by PCIR
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nvkm')
-rw-r--r--nvkm/subdev/bios/image.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nvkm/subdev/bios/image.c b/nvkm/subdev/bios/image.c
index dd8fd2f42..df85cc6d0 100644
--- a/nvkm/subdev/bios/image.c
+++ b/nvkm/subdev/bios/image.c
@@ -25,11 +25,13 @@
#include <subdev/bios.h>
#include <subdev/bios/image.h>
#include <subdev/bios/pcir.h>
+#include <subdev/bios/npde.h>
static bool
nvbios_imagen(struct nouveau_bios *bios, struct nvbios_image *image)
{
struct nvbios_pcirT pcir;
+ struct nvbios_npdeT npde;
u8 ver;
u16 hdr;
u32 data;
@@ -48,6 +50,11 @@ nvbios_imagen(struct nouveau_bios *bios, struct nvbios_image *image)
image->size = pcir.image_size;
image->type = pcir.image_type;
image->last = pcir.last;
+
+ if (!(data = nvbios_npdeTp(bios, image->base, &npde)))
+ return true;
+ image->size = npde.image_size;
+ image->last = npde.last;
return true;
}