25 Commits

Author SHA1 Message Date
Ville Syrjälä
2155d1eb54 tools/intel_bios_reader: Add MIPI device type
Decode the MIPI [sic] device type.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 16:11:35 +03:00
Ville Syrjälä
d8313c3002 tools/intel_bios_reader: Decode the device type bits
Each bit in the device type is supposed to mean something. Decode their
meaning.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 16:11:35 +03:00
Ville Syrjälä
a02305260e tools/intel_bios_reader: Print the child dev handle
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 16:00:58 +03:00
Ville Syrjälä
b701bb14c6 intel_bios_reader: Don't explode looking for the devid
Check that the offset where expect to find the device id is withing the
BIOS image, instead of accessing whatever (if anything) happens to be
there.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:58:39 +03:00
Ville Syrjälä
b1e756451c intel_bios_reader: Read the child device size from VBT
New stuff has been added to the end of the child device block at various
times, so using a hardcoded size for the block is a bad idea.
Fortunately the size of the block is listed in the VBT just before the
blocks themselves, so grab it from there.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:58:38 +03:00
Imre Deak
7027227ca2 tools/intel_bios_read: fix SSC freq for BXT
On BXT the SSC reference frequency is fixed 100MHz.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-04-08 14:52:37 +03:00
Imre Deak
1dc4884875 tools/intel_bios_reader: fix SSC freq for VLV/CHV
VLV/CHV has a fixed 100MHz SSC reference frequency.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-04-08 14:52:36 +03:00
Gaurav K Singh
ac31f19264 intel_bios_reader: Add support to dump MIPI Sequence block #53
Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-01 17:48:53 +01:00
Gaurav K Singh
525044ba32 intel_bios_reader: Add support to dump MIPI Configuration Block #52
Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-01 17:48:48 +01:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
6cfcd71589 lib: remove uncessary #includes from headers
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.

One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 20:08:13 +01:00
Jani Nikula
a360e3993b intel_bios_reader: dump all sections, including unknown ones
We still need to dump some of the known sections explicitly due to
dependencies on information extracted, such as LFP data pointers and
panel_type.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2013-10-21 09:42:58 -02:00
Jani Nikula
419d053fd6 intel_bios_reader: dump all edp device info structs
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2013-10-21 09:42:50 -02:00
Jani Nikula
a4180df32a intel_bios_reader: prepare for dumping all sections
Dump sections through a table based on the section id.

Hex dump the section. This works also for unknown sections.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2013-10-21 09:42:20 -02:00
Jani Nikula
8596a4b886 intel_bios_reader: add size temp variable as a shorthand for finfo.st_size
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2013-10-21 09:40:50 -02:00
Chris Wilson
1ffe6b0ee8 intel_bios_reader: Sanitize input to ensure all data blocks are within bounds
Running intel_bios_reader upon itself causes the reader to crash and
burn. It obviously finds a VBT signature inside the binary, but then
does not rigorously check that all data blocks are valid before
dereferencing them.

Reported-by: Emanuel Bronshtein
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45205
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-25 10:16:21 +00:00
Daniel Vetter
24a33db7f0 tools/intel_bios_reader: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Adam Jackson
eaaddc794b bios_reader: Allow forcing the device ID with DEVICE=0xNNNN
As a pleasant side effect you can now feed it an opregion dump and it'll
decode without crashing.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-11 18:25:26 -04:00
Chris Wilson
592b1a51ff tools/intel_bios_reader: use correct printf format for size_t
intel_bios_reader.c: In function ‘dump_backlight_info’:
intel_bios_reader.c:192:22: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 11:00:49 +00:00
Chris Wilson
281285ec70 bios: Parse SDVO panel DTDs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-29 16:13:38 +00:00
Jesse Barnes
322563027c tools/bios_reader: try to dump more child device data
Some of our device class defines were incorrect, and we were missing
several recent ones, so fix those up and dump more child device data if
we have it.
2010-12-21 12:06:00 -08:00
Adam Jackson
4f12d8acba bios_reader: Fix to work on non-Intel machines
Actually, fix to work on _any_ machine where the ROM file doesn't match
the GPU.  Just extract the device ID from the ROM itself rather than
look at the running system.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-08 14:39:12 -04:00
Zhenyu Wang
581205db44 bios_reader: Fix SSC frequency parse for Ironlake/Sandybridge
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-06-03 10:31:04 +08:00
Adam Jackson
a52cbcbf56 bios reader: Decode device type from child device table
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-04-22 15:37:49 -04:00
Zhenyu Wang
97ffee66ae Pull bios_reader program from Xorg driver
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2010-01-12 14:04:43 +08:00