David Hendricks [Fri, 17 May 2013 01:47:48 +0000 (18:47 -0700)]
exynos5: fix bug where EXYNOS5 was hardcoded
This fixes an instance where EXYNOS5 was hardcoded instead of using
the generation passed in by the user.
BUG=none
BRANCH=none
TEST=tested on peach_pit and snow
Change-Id: If5f6ffdf0329c445b60e6ff6bee90c43cae8d16e
Reviewed-on: https://gerrit.chromium.org/gerrit/51545
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 10 May 2013 21:26:59 +0000 (14:26 -0700)]
spring: revise DRAM representation
Spring uses two channels, each with 2 512MByte chips with 16 data
lines to each chip.
This patch makes the representation provided by mosys somewhat more
consistent with how the hardware is actually laid out. The chips on
each channel will be represented as a logical DIMM, with a single
bus (16-bits x 2 = 32) and size (512MByte * 2 = 1GByte).
BUG=chrome-os-partner:18934
BRANCH=spring
TEST=manually tested on Spring by forcing each fake SPD to be used.
Example "mosys -k memory spd print geometry" output:
dimm="0" size_mb="1024" ranks="1" width="32"
dimm="1" size_mb="1024" ranks="1" width="32"
Change-Id: I7678b5335ac66aba2cb9f8ee5b953cb196a001a1
Reviewed-on: https://gerrit.chromium.org/gerrit/50890
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Mon, 13 May 2013 22:00:12 +0000 (15:00 -0700)]
daisy: extra paranoia when probing EC chip ID
This adds extra paranoia when the EC chip ID is queried as part of
the platform setup to mitigate the possibility of passing NULL into
strncmp().
BUG=chromium:240463
BRANCH=none
TEST=run on Snow
Change-Id: If6f59a1c3b10e9e8488826faa673cb1a999e1873
Reviewed-on: https://gerrit.chromium.org/gerrit/51036
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Cheng-Yi Chiang [Thu, 25 Apr 2013 08:37:45 +0000 (16:37 +0800)]
HACK: fix mosys dram from 4G to 2G
BRANCH=spring
BUG=chrome-os-partner:18934
TEST=run hwid test
Change-Id: Ica7b8662eec364032909bbe6bdae22830086a030
Reviewed-on: https://gerrit.chromium.org/gerrit/49160
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49203
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Duncan Laurie [Thu, 9 May 2013 19:34:11 +0000 (12:34 -0700)]
Add experimental slippy platform.
BUG=chrome-os-partner:19344
BRANCH=none
TEST=emerge-slippy mosys
Change-Id: I1a7cf4ed01b0bde4bf1cd3d1a18c106cba26636b
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50692
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Thu, 9 May 2013 19:32:46 +0000 (12:32 -0700)]
Add driver for lynxpoint_lp chipset.
This is the actual driver for the LynxPoint-LP chipset
which makes use of the generic LPSS functions.
No existing platforms make use of it.
BUG=chrome-os-partner:19344
BRANCH=none
TEST=emerge-slippy mosys
Change-Id: I58308a00e466201cac364a1aea0a734ed6b128c2
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50691
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Thu, 9 May 2013 19:30:53 +0000 (12:30 -0700)]
Add generic functions for LPSS chipsets.
New "Low Power Subsystem" chipsets have different interface
to GPIOs and the BBS field in the GCS register have changed.
Define new generic functions for dealing with this type of
chipset. These are not used by anything yet.
BUG=chrome-os-partner:19344
BRANCH=none
TEST=emerge-slippy mosys
Change-Id: I2ba55b769a84cb077b49ac461b5c38f18b0df3df
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50690
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Thu, 9 May 2013 19:18:23 +0000 (12:18 -0700)]
Fix compile warnings
- zgb/nvram.c: ifdef out the cmos_write function since the function
that calls it is also ifdef'd out
- battery.c: Fix command argument definition
BUG=chrome-os-partner:19344
BRANCH=none
TEST=emerge-slippy mosys (and check for warnings)
Change-Id: I3b68a4804ab0b03e411705e7f20a349910e22ec0
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50689
Reviewed-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 3 May 2013 05:11:00 +0000 (22:11 -0700)]
elog: use platform's region attributes to find elog
This uses the platform's pre-defined region attributes to find
the region using the fmap. The advantage to this approach is that
the eventlog region's name can be specified on a per-platform basis.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=Used to read the event log on spring with other dependent changes.
Change-Id: I810d5e4e14634cfb140f37849997ed4b4f34ddcb
Reviewed-on: https://gerrit.chromium.org/gerrit/50023
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
David Hendricks [Wed, 8 May 2013 03:38:10 +0000 (20:38 -0700)]
spring: enable eeprom->device->read_by_name()
This adds a wrapper around flashrom_read_by_name() that callers can
use. Its main purpose is to tell flashrom which bus to use.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=ran "mosys eventlog list" on Spring with two firmware images,
one with actual eventlog and one without.
Change-Id: I858b85aff784c383c2e39f1074a04a484569871e
Reviewed-on: https://gerrit.chromium.org/gerrit/50427
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
David Hendricks [Wed, 8 May 2013 03:36:45 +0000 (20:36 -0700)]
flashrom: add flashrom_read_by_name()
This implements the underlying method which will be used to read
specified regions by name.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=ran "mosys eventlog list" on Spring with two firmware images,
one with actual eventlog and one without.
Change-Id: If4cc5a447cab94241ace4ec702baf96586e4b371
Reviewed-on: https://gerrit.chromium.org/gerrit/50426
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
David Hendricks [Wed, 8 May 2013 03:31:53 +0000 (20:31 -0700)]
eeprom: add read_by_name() device method
This adds a method to the eeprom device struct which will allow the
caller to specify a named region (in an fmap, for example) to read.
The implementation will find the region and allocate + fill memory.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=ran "mosys eventlog list" on Spring with two firmware images,
one with actual eventlog and one without.
Change-Id: I58937cd7fcf173dcd563ae69a352980506d5b042
Reviewed-on: https://gerrit.chromium.org/gerrit/50425
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
David Hendricks [Wed, 8 May 2013 03:54:16 +0000 (20:54 -0700)]
flashrom: return -1 if flashrom exit code != 0
flashrom exits with 1 in case of failure, while system() returns
-1 if it failed to actually run the command. So we should really
test if the returned value is != 0.
BUG=none
BRANCH=none
TEST=used flashrom wrapper with an invalid region specified
Change-Id: I1e2ae965acd81acfd7611c298d885319dddfbf33
Reviewed-on: https://gerrit.chromium.org/gerrit/50424
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
David Hendricks [Tue, 7 May 2013 22:25:02 +0000 (15:25 -0700)]
elog: add a missing return statement
This just adds a missing "return -1" in case the fmap area is not
found.
BUG=none
BRANCH=spring
TEST=tested on a machine without an eventlog
Change-Id: If64fee56886fbf6296d6829b53a3846e939fae1a
Reviewed-on: https://gerrit.chromium.org/gerrit/50371
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 3 May 2013 05:03:01 +0000 (22:03 -0700)]
spring: add eventlog region information
This adds eventlog region information for Spring and also sets the
EEPROM_FLAG_FMAP to let the elog library know how to find it.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=Used this information in a later change (also by dhendrix) to read the
event log on spring.
Change-Id: Ic08d442c173de4b64d0276b9025976de8bc9c5f0
Reviewed-on: https://gerrit.chromium.org/gerrit/50022
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
David Hendricks [Fri, 3 May 2013 04:48:53 +0000 (21:48 -0700)]
eeprom: add eeprom_region struct
This adds a struct which can be used to specify region information
known to exist on a particular platform. It will be used for
programatically finding regions of a given type.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=Used this structure members in a later change (also by dhendrix) to read
the event log on spring.
Change-Id: Iff098b739f5a4ec822a199db77a4a27fac0eb35d
Reviewed-on: https://gerrit.chromium.org/gerrit/50021
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Gabe Black [Tue, 23 Apr 2013 10:31:32 +0000 (03:31 -0700)]
spring: Enable the eventlog commands.
This change enables the generic eventlog commands for spring.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: I83ca4b35064ac1044d589ee573029e14609d13e9
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49868
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Gabe Black [Thu, 2 May 2013 04:49:06 +0000 (21:49 -0700)]
elog: Add a fetch method which doesn't use SMBIOS.
On ARM, there aren't any SMBIOS tables to use to find the event log. Instead,
we look in the flash at a particular region as defined by FMAP. This change
adds a function which implements that mechanism.
This implementation isn't particularly efficient since it reads the entire ROM
more than once, but it's necessary to ensure things work correctly with the
current internal API. Flashrom itself would support a more efficient
implementation which read the right section directly and handled the memory
allocation itself. The calling code wouldn't have to know ahead of time how
much data it was expecting to get.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: I23be843cd501b83db9e5be059c03746e03457fd4
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49867
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Gabe Black [Wed, 1 May 2013 11:06:34 +0000 (04:06 -0700)]
elog: Parameterize where the event log comes from.
You might be able to find the event log through the SMBIOS tables, but you
might find it another way, for instance looking for a specific area of the
flash.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: I152930402a32c276228a07a1270235ae3487f576
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49866
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Gabe Black [Wed, 1 May 2013 11:01:20 +0000 (04:01 -0700)]
elog: Explicitly include mosys/platform.h in intf/mmio.h.
The inline functions in intf/mmio.h actually dereference the intf parameter
they take, so there has to be an actual definition for that type, not just a
declaration that it exists.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: Ibccc18a1035f25eeb893f389fab08c8d33278743
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49865
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
David Hendricks [Fri, 3 May 2013 04:52:05 +0000 (21:52 -0700)]
eeprom: add EEPROM_EVENTLOG type and flag
This allows us to identify which EEPROMs in a system are expected to
have an eventlog.
BUG=chrome-os-partner:16132
BRANCH=spring
TEST=Used these structure members in a later change (also by dhendrix) to read
the event log on spring.
Change-Id: Ia5c71259841650571050ca9ac0fca85c431542d6
Reviewed-on: https://gerrit.chromium.org/gerrit/50020
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Gabe Black [Wed, 1 May 2013 10:31:28 +0000 (03:31 -0700)]
elog: Don't verify the SMBIOS event log table in smbios_eventlog_foreach_event.
When iterating over the events in the event log, there won't necessarily be an
SMBIOS table to verify, for instance on ARM. That will have to happen in
whatever code finds the event log through the SMBIOS tables.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: Ibfbd96ed20a2f0c2fc5b18229138c0f8a4900004
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49864
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Gabe Black [Wed, 1 May 2013 08:25:46 +0000 (01:25 -0700)]
elog: Collapse the eventlog info command into the smbios log command.
The eventlog info command is essentially the same as the smbios log command.
Unlike the other subcommands of eventlog, info depends on their being an
SMBIOS table pointing to the event log, and it prints info about the table
rather than the log itself. To get rid of the dependence on SMBIOS, the job of
eventlog info has been delegated to smbios log.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: I74937b4b24fde890a02d1fca10529e1b34596dfd
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49863
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Gabe Black [Wed, 1 May 2013 07:05:50 +0000 (00:05 -0700)]
elog: Separate the eventlog code from the SMBIOS code.
The eventlog data structures originally came from SMBIOS, but it can be used
on its own. The SMBIOS code doesn't call into it so they can be cleanly
separated.
This change doesn't modify any of the code itself, it just moves it to a
different location.
BUG=chrome-os-partner:16132
TEST=With this and other changes, ran mosys eventlog list and mosys smbios
info log on spring. On link, ran mosys eventlog list. Built for parrot, stout,
and butterfly.
BRANCH=spring
Change-Id: I687a8dc1345b35f13521349dd4c1393b39196bef
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/49862
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Doug Anderson [Tue, 30 Apr 2013 21:39:43 +0000 (14:39 -0700)]
i2c: Open i2c bus in force mode
We're removing the special i2c 'pass through' bus on snow which means
that we'll now find the EC on its normal bus. Linux will consider the
device "busy" on this bus. Tell Linux that we know by opening the bus
in force mode. This may not be ideal but isn't any different than
what we were doing before by using the pass through bus.
See a similar change for flashrom:
https://gerrit.chromium.org/gerrit/#/c/49549/
BUG=chrome-os-partner:18941
BRANCH=snow
TEST=On snow with kernel-next and UPSTREAM cros-ec can run
mosys -l ec info
...and see something like:
vendor | stm
name | stm32f100
fw_version | snow_v1.3.139-375eb9f
Change-Id: Iaf3341396903b9fd0966120f106b139fcd597ea1
Reviewed-on: https://gerrit.chromium.org/gerrit/49660
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
bowgotsai [Mon, 8 Apr 2013 10:40:59 +0000 (18:40 +0800)]
Butterfly / Stout: Change the return code of 'mosys storage set phy_speed'.
'mosys storage set phy_speed' is used for SanDisk-U100 PHY tuning.
We add it into factory test but it shows failure for non-SanDisk-U100 SSDs.
Fix the failure by changing the default return code to 0.
TEST=Manual.
1. "mosys storage set phy_speed SATA3 -vvv" commands on Butterfly.
2. "echo $?", it should show 0.
BUG=chrome-os-partner:18647
BRANCH=butterfly, stout.
Change-Id: I62f0ab8cd2f18be1de9bd6e52150d06651b8a6a6
Reviewed-on: https://gerrit.chromium.org/gerrit/47556
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Shawn Nematbakhsh [Mon, 8 Apr 2013 18:28:42 +0000 (11:28 -0700)]
Butterfly: Add alternate SSD model ID.
Butterfly U100 SSDs have an alternate model ID due to custom firmware.
Properly identify such devices as U100s.
BUG=chrome-os-partner:18647
TEST=manual. Verify PHY programming of Butterfly SSDs is successful.
BRANCH=butterfly.
Change-Id: Ia7f9088b544611871969826421562ad1934905a7
Reviewed-on: https://gerrit.chromium.org/gerrit/47571
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
David Hendricks [Wed, 3 Apr 2013 21:10:19 +0000 (14:10 -0700)]
spd: add DDR3-1866 and DDR3-2133 to speed LUT
This adds support for printing speed info for new 933MHz/1067MHz
modules.
BUG=none
BRANCH=none
TEST=locally compiled, but not tested on real hardware
Change-Id: I8a6d21109463dd9aab237889c83ccaf58d8df237
Reviewed-on: https://gerrit.chromium.org/gerrit/47276
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 3 Apr 2013 21:05:38 +0000 (14:05 -0700)]
spring: add fake SPD data
This adds fake SPD data for the modules which meet Spring's spec.
BRANCH=spring
BUG=chrome-os-partner:17814
TEST=tested on Spring (by forcing usage of a given module)
Change-Id: Iec6933b4655563317589e1584dfc68efbdbdb651
Reviewed-on: https://gerrit.chromium.org/gerrit/47275
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Mon, 1 Apr 2013 23:22:54 +0000 (16:22 -0700)]
Butterfly / Stout: Add support for SanDisk U100 SSD storage device.
Add support for model probe and PHY setting probe / set for SanDisk U100
SSD. This is the SSD used for Stout and Butterfly.
TEST=Manual. Verify "mosys storage print/set phy_speed" commands on
Stout and Butterfly.
BUG=chrome-os-partner:17615
BRANCH=butterfly, stout.
Change-Id: I1d322571f5f4a09368157954cff3cff0171c1ce4
Reviewed-on: https://gerrit.chromium.org/gerrit/47070
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Mon, 1 Apr 2013 22:54:47 +0000 (15:54 -0700)]
Add a 'storage' command.
This adds a 'mosys storage' command along with subcommands to probe and
set various parameters related to storage devices.
BRANCH=none.
BUG=chrome-os-partner:17615
TEST=manual, verify storage commands on Stout platform (future commit).
Change-Id: I15bf12daffc901f9102e9591255774f5104c1cdc
Reviewed-on: https://gerrit.chromium.org/gerrit/47065
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 2 Apr 2013 23:33:45 +0000 (16:33 -0700)]
spring: update board revision info
This updates mappings for board revision and updates names of enums
and GPIOs used to more accurately describe the platform and match
up with the datasheet.
BRANCH=spring
BUG=chrome-os-partner:17814
TEST=tested on Spring
Change-Id: I38f302747d20e14a83f9395b5986e82a6c96746b
Reviewed-on: https://gerrit.chromium.org/gerrit/47274
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Tue, 26 Feb 2013 02:31:50 +0000 (18:31 -0800)]
Stout: Fall back to ACPI ports on version read failure.
Sideband ports are not implemented in RO mode on Stout. It creates
problems when trying to read the EC version. Therefore, if version read
fails, assume we are in recovery and attempt to use the regular ACPI ports.
TEST=Manual. "mosys ec info" in recovery / RO mode.
BUG=chrome-os-partner:18004.
BRANCH=Stout.
Change-Id: Iebcf024b9b64823fafefa03a9293a8b1ee9f1188
Reviewed-on: https://gerrit.chromium.org/gerrit/44010
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
David Hendricks [Tue, 12 Feb 2013 22:24:54 +0000 (14:24 -0800)]
move butterfly out of experimental
It's no longer experimental :-)
BRANCH=none
BUG=none
TEST=compiled and ran on butterfly (platform identified correctly)
Change-Id: Ic2f689bb935ff1d570258cc200f00e1edfd76282
Reviewed-on: https://gerrit.chromium.org/gerrit/43132
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 29 Jan 2013 23:21:55 +0000 (15:21 -0800)]
give spring it's own directory and implementation
This gives Spring its own directory. If you squint it kind of looks
like Snow, but more differences will surface as time goes on.
This patch also moves the Spring IDs from daisy's ID list
so that they don't conflict.
TODOs:
- Fill out the board revision ID table
- Add correct memory timing table
BUG=chrome-os-partner:17782,chrome-os-partner:17212
BRANCH=spring
TEST=tested commands on spring (ec, eeprom gpio, memory, nvram,
and platform) and made sure we didn't interfere with snow detection.
Change-Id: I35a9878d67ec07567908cdaf79ae2ef7de457dda
Reviewed-on: https://gerrit.chromium.org/gerrit/43128
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 12 Feb 2013 21:37:02 +0000 (13:37 -0800)]
daisy/snow: remove cmdline parsing
Long ago, the kernel command-line was the only way to distinguish
Daisy and Snow. Now that we have FDT in place this is no longer
needed for platform detection. Also, the command-line contains
"daisy" even for spring, so it can confuse platform detection.
BUG=chrome-os-partner:17212
BRANCH=spring
TEST=tested on snow and spring
Change-Id: Ife60e8718c5350199d7a100e84eff8b7e6fc1cc9
Reviewed-on: https://gerrit.chromium.org/gerrit/43127
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Vincent Palatin [Tue, 5 Feb 2013 22:55:25 +0000 (14:55 -0800)]
add basic Spring board support
Just alias Spring as a Daisy, so the basic stuffs are working in crossystem
until we have full support.
BRANCH=none
BUG=chrome-os-partner:17212
TEST=on Spring, boot and type "crossystem", do not get errors such as
"Unable to auto-detect platform. Limited functionality only".
Change-Id: I44799bba18270d921d57fba47c2117af50628976
Reviewed-on: https://gerrit.chromium.org/gerrit/42661
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
David Hendricks [Wed, 23 Jan 2013 20:55:57 +0000 (12:55 -0800)]
move stout out of platform/experimental/
Stout is no longer experimental :-)
BRANCH=none
BUG=none
TEST=compiled and run on Stout
Change-Id: Ib01ffcbed51a6587073b7dacce1d73e9afcd368a
Reviewed-on: https://gerrit.chromium.org/gerrit/41855
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 8 Jan 2013 22:51:38 +0000 (14:51 -0800)]
Propagate command return codes to the shell
From the dawn of time, mosys has only ever returned EXIT_SUCCESS
or EXIT_FAILURE. However, for testing and automation purposes it's
useful to have more error codes available, particularly ones like
ENOSYS and EINVAL to filter out commands which are not implemented
for a particular platform or require arguments.
This propagates return codes from whatever command is run to the
shell. If errno gets set, it will be used as the argument to exit().
If a generic error occurred without any specific errno to map to,
mosys will exit with -1 which will appear at the shell as an
undefined error (255).
As always, an exit value of 0 indicates success (EXIT_SUCCESS).
BRANCH=none
BUG=chromium-os:35257
TEST=tested using invalid arguments, filenames, etc. and examining $?
Example 1: Supplying invalid command:
localhost ~ # mosys foobar >/dev/null
Command not found
localhost ~ # echo $?
22 <-- EINVAL
Example 2: Command not implemented for current platform
localhost ~ # mosys eeprom enet info
Command not supported on this platform
localhost ~ # echo $?
38 <-- ENOSYS
Example 3: General error
localhost ~ # mosys eeprom map /tmp/foo.bin
unable to find fmap
could not read flash map
localhost ~ # echo $?
255
Change-Id: I3a2d91ced06eae8fdad645fa9b7c8e07c7877d83
Reviewed-on: https://gerrit.chromium.org/gerrit/40707
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 15 Jan 2013 20:15:21 +0000 (12:15 -0800)]
Update return codes coming from commands
This updates return codes from commands and the the main intf/sub-
command handlers so that they correspond with values from errno.h.
Depending on the circumstance, the generic "-1" value was replaced
with more specific values from errno.h or -errno.
BRANCH=none
BUG=chromium-os:35257
TEST=tested in follow-up CL
Change-Id: I790de14aa96b2a3065a9061fc1b8608c811cff41
Reviewed-on: https://gerrit.chromium.org/gerrit/40706
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 15 Jan 2013 20:11:54 +0000 (12:11 -0800)]
Re-factor "mosys eeprom map" command
This attempts to improve "mosys eeprom map":
- Fix return codes used in eeprom_map_cmd_* helper functions; make
eeprom_map_cmd_eeprom() return ENODEV if specified device is not
found.
- Make eeprom_map_cmd() more straightforward in its execution by
handling the three possible cases (no arg, arg is a file, arg
is a device name) more explicitly.
- Make error messages more useful using lperror() to print strerror().
BUG=none
BRANCH=none
TEST=Tested on Stout (see notes below)
The following was done with the follow-up patches applied to
propogate errno to the shell.
Example 1: Normal execution (with output suppressed):
localhost ~ # ./mosys eeprom map >/dev/null
localhost ~ # echo $?
0
Example 2: Bad is neither a file nor a EEPROM
localhost ~ # ./mosys eeprom map foo
Failed to read flashmap from device : No such device
localhost ~ # echo $?
19 <--- ENODEV
Example 3: File exists, but is bad
localhost ~ # touch foo
localhost ~ # ./mosys eeprom map foo
unable to mmap "foo"
Failed to read flashmap from file : Invalid argument
localhost ~ # echo $?
22 <--- EINVAL
Change-Id: I8a7ed61c7edc894c2b735b41f3914e4371843cd6
Reviewed-on: https://gerrit.chromium.org/gerrit/41308
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 15 Jan 2013 22:33:27 +0000 (14:33 -0800)]
use a more sensible limit for line length when printing tree info
This defines a maximum line length to use when recursively adding
command info which we can then use to calculate the maximum number
of bytes remaining on each iteration.
The line length must allow for leading tabs, the type of command,
the entire command, and a string terminator. The longest command
to date uses 43 characters in verbose mode.
BRANCH=none
BUG=none
TEST=run on stout
Change-Id: I0fd2210369301e5555a2c91678c15f50142a3547
Reviewed-on: https://gerrit.chromium.org/gerrit/41311
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 8 Jan 2013 04:00:50 +0000 (20:00 -0800)]
simplify mosys -t -v output
This makes it so that verbose output in the tree command will no
longer keep track of different root:branch:node numbers. The numbers
were never really used AFAIK, and also it turns out that the branch
cannot be accurately represented by a single number due to varying
complexity with different subcommand hierarchies.
This simplification should also make it somewhat easier to parse
for a desired subcommand type.
BRANCH=none
BUG=chromium-os:35257
TEST=tested on stout (see notes below)
Example for verbose output:
"mosys ec" (new format):
[root] mosys ec
[leaf] mosys ec info
Change-Id: I0262e41e1e13c3df83e8efdfd4029cf27759f6a6
Reviewed-on: https://gerrit.chromium.org/gerrit/40631
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Mon, 14 Jan 2013 17:36:07 +0000 (09:36 -0800)]
Fix battery set_fud month parameter.
tm_mon is defined as months since January - [0, 11]. set_fud defines
month on [1, 12], and existing code expects such a value.
BUG=chrome-os-partner:13108.
TEST=manual. "mosys battery set fud" on Stout, confirm month set
correctly.
BRANCH=stout.
Change-Id: I9579bfa63dc88be495ee6c1e8c9359e8c0ed53ea
Original-Change-Id: Ib76455abd2b5c0dc373f2835cc5152336078a686
Reviewed-on: https://gerrit.chromium.org/gerrit/41207
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41425
David Hendricks [Tue, 8 Jan 2013 03:56:33 +0000 (19:56 -0800)]
rename a local variable in tree_subcommand()
This renames "leaf" to "index" to clarify its meaning as an index
number since it can be used for any endpoint (leaf/flur).
BRANCH=none
BUG=none
TEST=tested on stout
Change-Id: I86d401d02904df0971d084b71af1fd884406980b
Reviewed-on: https://gerrit.chromium.org/gerrit/40630
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 8 Jan 2013 01:26:40 +0000 (17:26 -0800)]
Fix verbosity of -t option
Normal verbosity should only display a terse listing of commands,
not the depth level and other stuff.
This patch fixes a bug whereby the verbose tree printing was always
shown. This was likely introduced in the original porting effort but
went unnoticed.
BRANCH=none
BUG=none
TEST=tested on stout
Change-Id: I57e41d8954b716886104de116caa6184dbcca076
Reviewed-on: https://gerrit.chromium.org/gerrit/40629
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 8 Jan 2013 21:51:32 +0000 (13:51 -0800)]
remove a stray comment (trivial)
BRANCH=none
BUG=none
TEST=none
Change-Id: I068c308be4e591a16e02b203c3dc322ef0e29cab
Reviewed-on: https://gerrit.chromium.org/gerrit/40634
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Fri, 4 Jan 2013 03:45:40 +0000 (19:45 -0800)]
Stout: Add battery firmware update command.
Add command for updating battery firmware.
TEST="mosys battery update" on stout platform.
BUG=chrome-os-partner:17046
BRANCH=stout
Change-Id: I9c84ef2c3e89c6091ef5cae9f822e5ea2b40463f
Reviewed-on: https://gerrit.chromium.org/gerrit/40422
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
David Hendricks [Fri, 14 Dec 2012 19:12:36 +0000 (11:12 -0800)]
trivial modifications to some wording in the usage message
This makes minor changes to the descriptions of some options.
BRANCH=none
BUG=none
TEST=ran on stout to make sure I didn't break something...
Change-Id: Ibe80b58965ce10699aedd1ab5d0c061fd339b8d4
Reviewed-on: https://gerrit.chromium.org/gerrit/39720
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 14 Dec 2012 19:02:14 +0000 (11:02 -0800)]
trivial re-formatting of usage menu in source code
This only re-formats the source code to replace leading spaces
with a tab and bring the options leftward.
BRANCH=none
BUG=none
TEST=tested on stout (run with -h and pipe to file, diff to ensure
no changes in output)
Change-Id: Ieda2fbdf3662753ce53ae60065c17b3951767688
Reviewed-on: https://gerrit.chromium.org/gerrit/39719
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Sun, 16 Dec 2012 01:13:51 +0000 (17:13 -0800)]
fix a trailing newline at end of output in -l mode
The long style formatting prints a newline unconditionally at the end
of each line. Since a newline is printed at the end of
kv_pair_print_to_file(), two newlines appear at the end of the output.
This makes long style formatting print a newline only if it's not
at the end of the list. The final newline is inserted at the end
of the function, like with other styles.
BRANCH=none
BUG=none
TEST=ran "mosys -l platform name" and no longer saw a newline at the
end of the output
Change-Id: Ia7781aed871754be04e14e63da432b3994d118c6
Reviewed-on: https://gerrit.chromium.org/gerrit/39751
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Sun, 16 Dec 2012 00:33:32 +0000 (16:33 -0800)]
Re-factor kv_pair_print_to_file() to reduce nesting
kv_pair_print_to_file() iterates over all kv_pairs in the provided
list for all styles, so each case has its own for-loop and
if-statement for sanity checking that a key and value exist.
This flips that around so that there is a single for-loop and
if-statement, reducing duplicate statements and reducing nesting by
1 level.
BRANCH=none
BUG=none
TEST=ran "mosys ec info" on stout with all formatting flags, saw
no change in output format.
Change-Id: I24724e8f6135042ed8ee4deb026bb50dff849316
Reviewed-on: https://gerrit.chromium.org/gerrit/39750
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 14 Dec 2012 20:04:39 +0000 (12:04 -0800)]
add single key=value printing mode
If -s [key] is specified, the key is matched against those in
the list of kv pairs. If a match is found, the raw value is
printed and 0 is returned.
BRANCH=none
BUG=chromium-os:36425
TEST=see notes below
Example of printing a valid single value:
localhost ~ # mosys ec info -s fw_version ; echo $?
0.92
0
Example of printing an invalid single value:
localhost ~ # mosys ec info -s foobar ; echo $?
1
Change-Id: I2fe9ba5bdc393be9f80a1a04d28ba80afeef7326
Reviewed-on: https://gerrit.chromium.org/gerrit/39748
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Sat, 15 Dec 2012 01:17:13 +0000 (17:17 -0800)]
add a return code to kv_pair_print()
This adds a return code to kv_pair_print(). This is in anticipation
of adding a single-value printing mode which can return a failure
code if the key specified by the user is not matched.
Call sites are also updated to take return code into account. This
meant updating some functions to return an int instead of void.
(this also fixes a trivial >80 cols error)
BRANCH=none
BUG=chromium-os:36425
TEST=tested in follow-up CL
Change-Id: Ic5a22c1db018c576d383d39938c76bd2163b6228
Reviewed-on: https://gerrit.chromium.org/gerrit/39749
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 14 Dec 2012 19:23:17 +0000 (11:23 -0800)]
rename -s option to -S
-s is currently used to print supported platforms for a given binary.
It's rarely used AFAIK, so make it -S so that -s can be used by a
formatting flag.
BRANCH=none
BUG=chromium-os:36425
TEST=tested on Stout
Change-Id: I00766723c1c9e085169e3e28b6f39378a7024ae7
Reviewed-on: https://gerrit.chromium.org/gerrit/39747
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Thu, 13 Dec 2012 03:38:34 +0000 (19:38 -0800)]
Stout: Add support for new battery first-use-date commands.
Stout needs the ability to set battery first-use-date. Add
first_use_date print/set commands.
TEST=manual, mosys battery {print,set} fud on Stout.
BUG=chrome-os-partner:13108
BRANCH=none
Change-Id: I3af0c7612c632a937cf328d46e156bb430aff0b0
Reviewed-on: https://gerrit.chromium.org/gerrit/39639
Commit-Ready: Shawn Nematbakhsh_ <shawnn@chromium.org>
Reviewed-by: Shawn Nematbakhsh_ <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh_ <shawnn@chromium.org>
David Hendricks [Tue, 13 Nov 2012 20:02:40 +0000 (12:02 -0800)]
Add a battery command.
This adds a "mosys battery" command along with subcommands to print
and set first use date information (to be implemented in platform
code).
BRANCH=none
BUG=chrome-os-partner:13108
TEST=manual, verify battery fud commands on Stout platform (future commit).
Change-Id: I41ff59291463d7bdb70a0f45e5b956f8b62d230a
Reviewed-on: https://gerrit.chromium.org/gerrit/39694
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: Shawn Nematbakhsh_ <shawnn@chromium.org>
Reviewed-by: Shawn Nematbakhsh_ <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh_ <shawnn@chromium.org>
David Hendricks [Sat, 17 Nov 2012 00:10:15 +0000 (16:10 -0800)]
gec_i2c: only descend up to 2 levels in sysfs when searching for bus
Snow's I2C sysfs hierarchy can get very deep and cause the scanft()
algorithm to slow down substantially. We only need to go 2-deep in
order to find the info we're looking for.
BRANCH=snow
BUG=chrome-os-partner:16152
TEST=tested sysfs parsing for snow i2c passthru device
Change-Id: I8067a4d2a6e21ac6fdfeb3b0f2d1b98e56206e74
Reviewed-on: https://gerrit.chromium.org/gerrit/38252
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
David Hendricks [Sat, 17 Nov 2012 00:03:11 +0000 (16:03 -0800)]
Add a maxdepth argument to scanft()
This allows the user to specify a hard limit for levels in a directory
hierachy to descend into.
It turns out that sysfs paths can get rather deep even if symlink
depth if restricted. Descending too far can cause mosys execution
to slow down noticably (>100ms) which is become noticable in scripts
or programs which call mosys several times.
For now, we'll give all callers a value of -1 (descend indefinitely
for normal directories) to match current behavior.
BRANCH=snow
BUG=chrome-os-partner:16152
TEST=tested sysfs parsing for snow i2c passthru device and regression
tested on mario (forced sysfs lookup for SMBIOS info)
Change-Id: I8ee41ea5096489914dd2760bea00b119107d3bd5
Reviewed-on: https://gerrit.chromium.org/gerrit/38251
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
David Hendricks [Tue, 13 Nov 2012 19:12:29 +0000 (11:12 -0800)]
Link has 2 memory modules, not 1.
Link uses 2 channels for interleaving.
BRANCH=link
BUG=chrome-os-partner:16144
TEST=tested on link
Change-Id: I8da316bcf28449ffe0a483ed4eda7bd560f56429
Reviewed-on: https://gerrit.chromium.org/gerrit/37928
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 13 Nov 2012 01:33:43 +0000 (17:33 -0800)]
update naming and config option schema for older platforms
This moves some of the older platforms around and changes their config
options to be more in tune with newer platforms. This mostly just
means simplifying config option names and renaming the directories
to be the platform codename rather than the marketing name.
BRANCH=none
BUG=none
TEST=compiled and tested on alex, cr48, zgb
Change-Id: I4539669ad275ea3409fed6ce9fe067981da0735e
Reviewed-on: https://gerrit.chromium.org/gerrit/37870
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 13 Nov 2012 00:41:02 +0000 (16:41 -0800)]
Move non-experimental platforms out of platform/experimental/
This moves Lumpy, Stumpy, Daisy, and Parrot out of experimental.
It also introduces a simplified scheme for naming config options
intended to reduce the effort involved with moving platforms later on.
Only the description provided in the Kconfig files should need extra
verbosity/production names.
BRANCH=none
BUG=none
TEST=compiled and run on snow, lumpy, stumpy, and parrot
Change-Id: I32a71dfba410a667b8bfc6a219ec2974fd994646
Reviewed-on: https://gerrit.chromium.org/gerrit/37869
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Tue, 13 Nov 2012 00:06:06 +0000 (16:06 -0800)]
remove unecessary PLATFORM_<vendor> Kconfig options
These are not needed to keep the menu hierarchy in Kconfig. The
platform/Makefile can just use obj-y to visit all subdirectories
and will then visit subdirectories for any specific platform which
is enabled.
BRANCH=none
BUG=none
TEST=compiled and run on zgb, cr48, alex
Change-Id: I0865f1dfa52915418b08b665162dcd1b0ca077ec
Reviewed-on: https://gerrit.chromium.org/gerrit/37868
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 19 Oct 2012 03:55:17 +0000 (20:55 -0700)]
stout: use 0x6c/0x68 to avoid racing with kernel ACPI driver
This uses a sideband port with a slightly modified command set for
reading EC RAM data.
BRANCH=stout
BUG=chrome-os-partner:14480
TEST=tested on stout
Change-Id: Ic5908e6240b044d5901a26ce61b9393d0b6daa04
Reviewed-on: https://gerrit.chromium.org/gerrit/36039
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Shawn Nematbakhsh [Sat, 27 Oct 2012 00:11:31 +0000 (17:11 -0700)]
Stout: Fix EC version reported by mosys.
According to spec, revision 'A' starts at lower nibble = 1, B = 2, etc.
Mosys uses A = 0, B = 1, etc. Fix this, and make value 0 = no revision.
BUG=chrome-os-partner:15698
TEST=mosys ec info, check version number matches expectation.
BRANCH=stout
Change-Id: I51784286c5c27dd9bfabde6663a9cc69c378ba2a
Reviewed-on: https://gerrit.chromium.org/gerrit/36742
Tested-by: Shawn Nematbakhsh <shawnn@google.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: Shawn Nematbakhsh <shawnn@google.com>
David Hendricks [Wed, 26 Sep 2012 19:49:21 +0000 (12:49 -0700)]
snow: put board ID combinations in a table for better readability
This just moves board ID logic from a huge if-else statement to an
easier to read + maintain table.
BRANCH=none
BUG=none
TEST=tested on Snow
Change-Id: I6e12943207ce1b43b2438b49e7abf785d5a2e9e1
Reviewed-on: https://gerrit.chromium.org/gerrit/34146
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 26 Sep 2012 01:16:12 +0000 (18:16 -0700)]
daisy/snow: Fix GPIO table to use correct board ID pins
The table defined GPA0 pins 4 & 5 earlier as the board ID pins.
It should really be looking at GPD0 pins 0 & 1.
BRANCH=snow
BUG=chrome-os-partner:11413
TEST=tested on Snow
Change-Id: I4659905c512e563208cb98bff5e5fba7c4c7daa0
Reviewed-on: https://gerrit.chromium.org/gerrit/34080
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 21 Sep 2012 03:15:35 +0000 (20:15 -0700)]
use generic i8042-style wait functions for ENE platforms
This updates Parrot and Butterfly to use generic i8042-style
wait functions to remove some duplicate code.
BRANCH=none
BUG=none
TEST=Tested 'mosys ec info' command on Parrot and Butterfly
Change-Id: I914be7f6a57e4ce374d38db7f7d2f3f8bb51f12f
Reviewed-on: https://gerrit.chromium.org/gerrit/33750
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 21 Sep 2012 03:19:31 +0000 (20:19 -0700)]
parrot: replace statically-allocated variables with #defines
Since most of the generic ENE EC functionality has been moved
elsewhere, we no longer need to use allocated variables for
constants. The remaining variables are private to the Parrot
platform.
BRANCH=none
BUG=none
TEST=tested "mosys ec info" in Parrot
Change-Id: I771429780f5db1d22bdbf9ae7a312f9e97e5f91a
Reviewed-on: https://gerrit.chromium.org/gerrit/33749
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 21 Sep 2012 00:50:38 +0000 (17:50 -0700)]
Add basic EC support for Stout
This adds enough to get firmware version info.
BRANCH=none
BUG=chrome-os-partner:14400, chrome-os-partner:13133
TEST=Tested on Stout
localhost ~ # ./mosys ec info -k
vendor="ite" name="it8518" fw_version="0.91A"
Change-Id: I0cac718e037f79cd9c1c6fe16b84b1286e0d2090
Reviewed-on: https://gerrit.chromium.org/gerrit/33742
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Fri, 21 Sep 2012 00:44:21 +0000 (17:44 -0700)]
add i8042_wait_* functions for polling IBF/OBF bits
This adds functions for i8042-style IBF/OBF flag polling. It is meant
to be flexible enough so that it can be re-used by ECs which use
i8042-style polling on different ports, e.g. via the ACPI interface or
a configurable sideband interface.
BRANCH=none
BUG=none
TEST=Tested on Stout, Butterfly, and Parrot (see follow-up CLs)
Change-Id: Ie6fcc9e1b625ad5c58c2ba488f7e0a55d3d37870
Reviewed-on: https://gerrit.chromium.org/gerrit/33741
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Thu, 20 Sep 2012 19:57:27 +0000 (12:57 -0700)]
add it8518 SuperIO IDs and it8500-series detection
This adds the chip ID bytes for it8515.
BRANCH=none
BUG=chrome-os-partner:14400
TEST="mosys ec info" command on Stout in follow-up patches
Change-Id: Iff1bce01d7f20608c3d6fd67799a6a1ad917d873
Reviewed-on: https://gerrit.chromium.org/gerrit/33740
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
David Hendricks [Sat, 15 Sep 2012 02:30:53 +0000 (19:30 -0700)]
Consolidate ACPI #defines in include/lib/acpi.h
This adds more ACPI EC register definitions while moving the existing
ones out of chip-specific code and giving them more appropriate names.
BRANCH=None
BUG=None
TEST=compile tested for butterfly
Change-Id: I952396b83df553caa4c61d4aae6c1fe3eefa63af
Reviewed-on: https://gerrit.chromium.org/gerrit/33384
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Thu, 13 Sep 2012 23:05:04 +0000 (16:05 -0700)]
butterfly: add ec command support
This adds EC command support for Butterfly
BRANCH=none
BUG=chrome-os-partner:13716
TEST=tested "mosys ec info" on butterfly
Change-Id: I7d5a10a79b61238fedfe278aa8f4cf5254eaf2d8
Reviewed-on: https://gerrit.chromium.org/gerrit/33243
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
David Hendricks [Thu, 13 Sep 2012 23:04:20 +0000 (16:04 -0700)]
re-factor kb932 for better code sharing between platforms
This is the first CL in a small series intended to share more KB932
code between Butterfly and Parrot:
- Add generic i8042 and ACPI #defines
- Add a private data struct which will be used for passing EC
interface offsets into low-level code.
- Add IBF/OBF polling functions to kb932.c file. These are generic
versions of Parrot's OBF/IBF wait functions.
BRANCH=none
BUG=chrome-os-partner:13716
TEST=Tested "mosys ec info" on Butterfly and Parrot
Change-Id: I4bcbb1bc07c6ccf0bdedfd0818eba4b92ad73246
Reviewed-on: https://gerrit.chromium.org/gerrit/33242
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Che-Liang Chiou [Mon, 10 Sep 2012 23:19:36 +0000 (16:19 -0700)]
daisy: add vbnvcontext read/write command
These commands let you read/write VbNvContext from/to EC's nvram.
BRANCH=snow
BUG=chrome-os-partner:13766
TEST=build for Snow and Link, and run on Snow
mosys nvram vbnvcontext write
0123456789abcdef0123456789ABCDEF
mosys -l nvram vbnvcontext read
vbnvcontext |
0123456789abcdef0123456789abcdef
mosys nvram vbnvcontext write
00000000000000000000000000000000
mosys -l nvram vbnvcontext read
vbnvcontext |
00000000000000000000000000000000
Change-Id: I6748c3efe84334d7036e4472e40e3c222c46d61c
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32825
Che-Liang Chiou [Tue, 11 Sep 2012 04:15:37 +0000 (21:15 -0700)]
gec: add new-style EC commands
New-style EC commands are versioned and have different binary format
than the old-style EC commands.
gec_i2c is implemented now and gec_lpc will be implemented later.
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
BRANCH=snow
BUG=chrome-os-partner:13766
TEST=build okay for Link and Snow, and mosys runs on Snow.
Change-Id: I771cb9aa16479df841710279cc668f92b12db0b9
Reviewed-on: https://gerrit.chromium.org/gerrit/32900
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Duncan Laurie [Thu, 6 Sep 2012 22:04:06 +0000 (15:04 -0700)]
stout: Add basic board support
This is a copy of parrot but without the VPD or EC interfaces
as those are not defined yet for this platform.
BUG=chrome-os-partner:13133
BRANCH=stout
TEST=none
Change-Id: I57c0c65f41183f31fbe1ef777a2f4ac579954fab
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32445
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Thu, 6 Sep 2012 22:03:13 +0000 (15:03 -0700)]
butterfly: Add basic board support
This is a copy of parrot but without the VPD or EC interfaces
as those are not defined yet for this platform.
BUG=chrome-os-partner:13716
BRANCH=butterfly
TEST=none
Change-Id: I474695a7be4f7af7b8df0bcab2fbb32a03aa9460
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32444
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Thu, 6 Sep 2012 22:00:59 +0000 (15:00 -0700)]
ELOG: Add support for printing multiple entries from ME
If the management engine is disabled or reports an error then
a series of 7 bytes are logged into a single event. This can
then be parsed to provide more detail on why the ME reported
a problem.
To handle this the single event is split into multiple entries
in the log output.
BUG=chrome-os-partner:12766
BRANCH=link,parrot,butterfly,stout
TEST=manual
1) Disable the ME with override pin on Parrot device
2) Boot the system and dump the event log
49 | 2012-09-06 14:29:12 | Management Engine | Disabled
50 | 2012-09-06 14:29:12 | ME Working State | Normal
51 | 2012-09-06 14:29:12 | ME Operation State | Bring up
52 | 2012-09-06 14:29:12 | ME Operation Mode | Security Override via Jumper
53 | 2012-09-06 14:29:12 | ME Progress Phase | BUP Phase
54 | 2012-09-06 14:29:12 | ME PM Event | Clean Moff->Mx wake
Change-Id: I915ac4db2cbb2abf3fbfbe2337c6b3d91b19a6d2
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32443
Reviewed-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Thu, 6 Sep 2012 02:58:26 +0000 (19:58 -0700)]
daisy: update board/memory IDs
This updates to the ID table. We no longer care about some of the
earlier board designations, so some of the combinations were
re-used.
This also adds PVT2 designations, and fixes a typo where PVT units
were showing printed as DVT.
BRANCH=snow
BUG=none
TEST=Compiled and run on snow
Change-Id: I8abdbb20b363160d23fd3bbe0dd182ff121b136a
Reviewed-on: https://gerrit.chromium.org/gerrit/32350
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 5 Sep 2012 04:51:41 +0000 (21:51 -0700)]
use ec_commands.h from ec codebase
The earlier #defines were based off an ancient version of
ec_commands.h from the EC codebase. This CL adds a verbatim
copy of the canonical ec_commands.h file.
The only significant code change is now we only display info
for the RO and RW firmware copies since we no longer have RW-A
and RW-B.
BRANCH=snow
BUG=none
TEST=Tested "mosys ec info" command on Snow, compiled for
amd64-generic (with Link support)
Change-Id: If4e36e125a396735d09f5ab5e6111696cd192044
Reviewed-on: https://gerrit.chromium.org/gerrit/32211
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 5 Sep 2012 04:13:59 +0000 (21:13 -0700)]
gec: do not query EC build info
This simply makes it so that mosys does not query EC build info.
This is basically a temporary fix to work around the BUG. We can
re-insert it needed later on.
BRANCH=snow
BUG=chrome-os-partner:11608
TEST="mosys ec info" shows same info for normal usage. Logic
analyzer shows no superfluous reads being done.
Change-Id: I8011b57934b92bc88dd0080668715e9b076a5115
Reviewed-on: https://gerrit.chromium.org/gerrit/32210
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
David Hendricks [Wed, 15 Aug 2012 02:59:29 +0000 (19:59 -0700)]
add gec lock for use by gec_lpc interface
This is basically the same as the big lock, but with a different key.
New accessors were added for the gec-specific stuff.
BRANCH=link
BUG=none
TEST=Tested on link using simultaneous instances of mosys and ectool
Change-Id: Id45537712b9489b8c28eaac98569ab1a2d8138d6
Reviewed-on: https://gerrit.chromium.org/gerrit/30367
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 15 Aug 2012 03:06:05 +0000 (20:06 -0700)]
redefine mosys test lock as 0xffffffff
Give the test key a meaningless generic value since it should never
really be used in production. Also, the GEC key used in Flashrom and
ectool conflicts with the current one...
BUG=none
TEST=compiled only
Change-Id: I781c30b060bc3e58f148df7af7b41c35a9c3d7bf
Reviewed-on: https://gerrit.chromium.org/gerrit/30366
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Wed, 15 Aug 2012 02:39:20 +0000 (19:39 -0700)]
expose ipc_lock interface
GEC now has its own lock. This updates the mosys code so that we can
add it and coexist more peacefully with ectool and flashrom.
BUG=none
TEST=tried running two instances of mosys on snow, big lock still
works as expected.
Change-Id: Ie878f2f94445b07f0e80e92bec4d266d8edc9ebe
Reviewed-on: https://gerrit.chromium.org/gerrit/30365
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Wed, 15 Aug 2012 22:41:53 +0000 (15:41 -0700)]
ELOG: Indicate unknown type value if event is not found
This will aid in determining what event is having troubles.
BUG=none
BRANCH=none
TEST=manual: add unknown event type to the log and decode it
23 | 2000-00-00 00:00:00 | System Reset
24 | 2000-00-00 00:00:00 | Unknown | 0x9b
Change-Id: If7fca84e6c6912f2878d42651e8f05c5e2dce455
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30475
Duncan Laurie [Wed, 15 Aug 2012 22:24:18 +0000 (15:24 -0700)]
ELOG: Fix typo that was hiding RTC reset event
BUG=none
TEST=none
BRANCH=none
Change-Id: I4685f69dfe816168b804fc4e26798e72d66688a9
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30472
Reviewed-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Sat, 11 Aug 2012 02:30:41 +0000 (19:30 -0700)]
make gec_probe_i2c() fall back on default i2c bus
This patch makes gec_probe_i2c() attempt to detect the EC using the
bus provided in the private data if no suitable candidate is found
by scanning thru sysfs, which might not be present in certain
environments (e.g. chrome os recovery image).
BUG=chrome-os-partner:12207
TEST=Worked in recovery image where sysfs info was not available
Change-Id: I8f2d5bda291e53a052d77dd06a28b2d72357ec91
Reviewed-on: https://gerrit.chromium.org/gerrit/29952
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
David Hendricks [Sat, 11 Aug 2012 02:32:44 +0000 (19:32 -0700)]
add a default EC i2c bus for Daisy
This patch adds a default bus number for Daisy to attempt to use in
case the bus number cannot be found in sysfs by gec_probe_i2c().
BUG=chrome-os-partner:12207
TEST=Tested in recovery image where sysfs info is not available
Change-Id: I0087a5482066fed6515c4ae88ec8b90e060a596d
Reviewed-on: https://gerrit.chromium.org/gerrit/29953
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Mon, 13 Aug 2012 16:28:17 +0000 (09:28 -0700)]
ELOG: add event for last post code in previous boot
BUG=none
TEST=manual (with new EC and BIOS)
- interrupt boot process by issuing x86reset on EC console or
by using warm reset button on servo
- read event log with mosys on next boot
78 | 2012-08-13 09:24:04 | System boot | 262
79 | 2012-08-13 09:24:04 | Last post code in previous boot | 0x9e
80 | 2012-08-13 09:24:04 | System Reset
Change-Id: Ib70cbc1349388074c24db802fce99efc2b3a00cc
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29996
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Duncan Laurie [Tue, 7 Aug 2012 20:06:10 +0000 (13:06 -0700)]
ELOG: Add new EC events
Some events are being added to the EC to try and troubleshoot
system shutdown events and these can be reported in ELOG.
BUG=chrome-os-partner:12353
TEST=mosys on link device
Change-Id: I66beaa68dc63bfc70681737c3d680ce3c68108e4
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29434
Rong Chang [Mon, 30 Jul 2012 10:15:52 +0000 (18:15 +0800)]
Parrot EC firmware ec command returns BCD format
Parrot EC command GET_FIRMWARE_VER(0x51) returns 3 bytes of binary
coded dicimals: MAJOR (0 ~ 9), MINOR (00 ~ 99), REV(00 ~ 99)
BUG=chrome-os-partner:11865
TEST=manual
flash EC spi rom with KBEC010A.ROM (version 0.10A)
VT2 command "mosys ec info" should return:
ENE | KB932 |
00BE010A00
Change-Id: I753b98319643fea2d69b86c8e726fe3927b458d8
Reviewed-on: https://gerrit.chromium.org/gerrit/28696
Tested-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: Rong Chang <rongchang@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Gerrit [Mon, 23 Jul 2012 20:48:51 +0000 (13:48 -0700)]
Merge "HACK: Don't fail due to gec GET_BUILD_INFO command"
Gerrit [Mon, 23 Jul 2012 20:23:05 +0000 (13:23 -0700)]
Merge "Parrot: Enable event log support"
David Hendricks [Sun, 15 Jul 2012 01:05:50 +0000 (18:05 -0700)]
HACK: Don't fail due to gec GET_BUILD_INFO command
(note: this is cherry-picked from factory-2569.B)
The GET_BUILD_INFO command is currently broken. While it's nice to
have, we really only care about the GET_VERSION data for the
"mosys ec info" command. So for now, don't bail out if GET_BUILD_INFO
fails.
BUG=none
TEST=tested on Snow with affected EC firmware
localhost ~ # ectool version # shows nothing due to breakage
localhost ~ # ./mosys ec info -k
vendor="stm" name="stm32f100" fw_version="snow_v1.1.226-e95813c"
Change-Id: Ie9f6b75e5219c1219d3464f1b713c519f8e5ea97
Duncan Laurie [Fri, 20 Jul 2012 23:21:00 +0000 (16:21 -0700)]
Parrot: Enable event log support
BUG=none
TEST=manual
1) Enable ELOG in parrot BIOS
2) run "mosys eventlog list"
0 | 2012-07-20 15:42:22 | Log area cleared | 4096
1 | 2012-07-20 15:42:22 | System boot | 1
2 | 2012-07-20 15:42:22 | System Reset
3 | 2012-07-20 15:42:22 | Wake Source | SMBALERT | 0
4 | 2012-07-20 15:42:22 | Chrome OS Developer Mode
5 | 2012-07-20 15:42:22 | Chrome OS Recovery Mode | Recovery Button Pressed
Change-Id: I37f88757ecb0e0dd8fc221c72b062f7e89ee7b20
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Duncan Laurie [Fri, 20 Jul 2012 22:19:07 +0000 (15:19 -0700)]
ELOG: Add new recovery reasons for EC Software Sync
These are new since ELOG was first added to mosys.
BUG=chrome-os-partner:9195
TEST=manual
Since these are exception cases and cannot be triggered under
normal operation I used crossystem to request recovery with
this specific reason:
> crossystem recovery_request=34 && reboot
30 | 2012-07-20 15:20:59 | Chrome OS Recovery Mode | EC Software Sync Error
> crossystem recovery_request=35 && reboot
39 | 2012-07-20 15:21:55 | Chrome OS Recovery Mode | Unable to determine active EC image
Change-Id: I1108a3f46d218d70a0f38595f4b1e3812dfb2c62
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Gerrit [Fri, 20 Jul 2012 02:19:43 +0000 (19:19 -0700)]
Merge "Add memory command and SPD data for Daisy/Snow"
David Hendricks [Wed, 18 Jul 2012 20:19:59 +0000 (13:19 -0700)]
Add memory command and SPD data for Daisy/Snow
This adds memory commands. It also adds hard-coded SPD data to draw
from, since there is no SPD ROM or blob like on other platforms.
Currently it's intended for Snow.
TODO: Figure out the "right thing" to do for Daisy
BUG=chrome-os-partner:11159
TEST=Tested on Snow (Elpida variant).
Forcing use of Samsung SPD data turned up reasonable results too.
(using Elpida blob)
localhost ~ # mosys memory spd print all -k
dimm="0" dram="DDR3" module="SO-DIMM"
dimm="0" module_mfg="3-126: Elpida" serial_number="
00000000" part_number="EDJ2108EDBG-GN-F"
dimm="0" size_mb="2048" ranks="1" width="64"
dimm="0" speeds="DDR3-800, DDR3-1066, DDR3-1333, DDR3-1600"
(using Samsung blob)
localhost ~ # ./mosys memory spd print all -k
dimm="0" dram="DDR3" module="SO-DIMM"
dimm="0" module_mfg="1-78: Samsung" serial_number="
00000000" part_number="K4B2G0846D-HYK0"
dimm="0" size_mb="2048" ranks="1" width="64"
dimm="0" speeds="DDR3-800, DDR3-1066, DDR3-1333, DDR3-1600"
Change-Id: Id506418697ed48d5e3b2c019ac206ec10ff70b64