smbios: Fix issue finding SMBIOS string

The code that attempted to find a specific SMBIOS table entry by
a hardcoded string index is incorrect as the strings do not need
to be in any specific order.  Instead the string index value from
the table must be used to guarantee finding the right string.

This happens with (recent?) coreboot where the SMBIOS System Version
is stored at string index 3 and not index 2 like mosys was using.

Also fix the probe routine that was assuming the system name would
always be at string index 1.

BUG=chrome-os-partner:33031
BRANCH=samus
TEST=manual:
1) check that 'mosys platform version' returns the correct string
2) check that 'mosys platform vendor' returns the correct string
3) tested on stumpy and samus

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223710
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

(cherry picked from commit 4e209285d00e040677c89e00daa67d2f94c498f4)

Change-Id: I243e942d9cb9ee2d462aeb0d887e45a9576537b7
Reviewed-on: https://chromium-review.googlesource.com/224561
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
2 files changed