Commit Graph

5 Commits

Author SHA1 Message Date
Bill Richardson
ec8df1628c Support virtual dev-switch (keyboard-based dev-mode)
BUG=chrome-os-partner:9706
TEST=manual

Currently, Link is the only platform that enables this feature.

To enter dev-mode:

  Boot into recovery mode using the magic key chord. At the Insert screen,
  press Ctrl-D. You'll be asked if you want to enter developer mode. If you
  then press ENTER, it will reboot with dev-mode enabled. If you press SPACE
  or ESC, it will return to the Insert screen.

  If you enter recovery mode through any other means, or if dev-mode is
  already enabled, pressing Ctrl-D at the Insert screen will have no effect.

To return to normal mode:

  Reboot. At the Dev screen, press ENTER or SPACE. It will reboot to
  recovery mode and ask you if you want to return to normal mode. If you
  press ESC or power off, you'll still be in dev-mode. Press ENTER or SPACE,
  and it will reboot into normal mode (of course, if you've messed up your
  images while in dev-mode, you'll just come right back to recovery mode
  again).

  You can also request a direct return to normal mode by running

    crossystem disable_dev_request=1

  and rebooting.

Change-Id: I435905855a6c39932ee466cc046bdc4c4c860f98
Reviewed-on: https://gerrit.chromium.org/gerrit/24160
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
2012-06-08 22:24:05 -07:00
Bill Richardson
b75d8adcc0 Use virtual dev-mode switch when told to.
If VbInit() is instructed to look at a virtual dev-mode switch, then it will
use value contained in the TPM's firmware space instead of a hardware GPIO
to determine if developer mode is enabled.

This change just makes it look. It doesn't provide a way to actually set
the value in the TPM. VbInit() isn't being told to look yet, either. Those
changes are coming.

BUG=chrome-os-partner:9706
TEST=none

The usual sanity-check applies:

  make
  make runtests

But to actually test that this stuff is working IRL requires special tweaks
to other components and monitoring the serial debug output from both EC and
CPU. We'll save the hands-on tests for when it's all done.

Change-Id: Ie485ad2180224e192238bf2a5dbf95bbcb9130f9
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23067
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-05-18 18:15:58 -07:00
Bill Richardson
7272a69511 Dev-mode allows booting self-signed kernels by default.
When you enter dev-mode,

  Pressing Ctrl-U to boot from USB is DISABLED.
  Booting any self-signed kernel from the SSD is ENABLED.

This replaces the "crossystem dev_boot_custom" argument with
"crossystem dev_boot_signed_only", which has the opposite polarity.
So if you want to dev-mode to only boot official kernels, you have to
explictly set it that way. If you leave dev-mode and then come back,
it will go back to the conditions shown above.

BUG=chrome-os-partner:5954
TEST=manual

Just run the factory flow. It was broken; this should fix it (except for any
workarounds that were added while it was broken; those may need to be
reverted).

Change-Id: I13e0edbc0e77c5d6ea609dabf771085006cd1805
Reviewed-on: https://gerrit.chromium.org/gerrit/11853
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2011-11-18 13:39:37 -08:00
Bill Richardson
c8e4ff7c15 Add flag to GBB to allow loading PCI Option ROMs
As shipped, H2C only loads the option ROM for the built-in video, and that
only when it needs display the BIOS warning screens.

By setting a flag in the GBB, you can allow all option ROMs to be loaded:

Note that we'll never enable this ourselves (and there's a factory test to
ensure that*) because it executes non-verified code. But if a customer wants
to void their warranty and set this flag in the read-only flash so they can
install and use other PCI devices, they should be able to do so.

BUG=chrome-os-partner:6148
TEST=none

The only way to test this is to use a BIOS that was compiled with serial
debugging enabled, so there's nothing for QA to do. If you have such a BIOS,
you can see the difference like so:

  flashrom -r oldbios.bin
  gbb_utility -s --flags=2 oldbios.bin newbios.bin
  flashrom -w newbios.bin
  <reboot>

When bit 1 of the GBB flags is 0, you'll see these lines in the serial
output:

  LoadOpRomImage-->GetSystemConfigurationTable Status = Success
  LoadOpRomImage-->GetH2cBootMode Status = Success

When bit 1 of the GBB flags is 1, you'll see these lines in the serial
output:

  LoadOpRomImage-->GetSystemConfigurationTable Status = Success
  LoadOpRomImage-->GetH2cBootMode Status = Success
  LoadOpRomImage-->PCI OpRom on 1.0.0 is allowed!!!

This happens in any boot mode (normal, developer, recovery).

--
*The factory test for GBB zero flags is gft_clear_gbb_flags.sh, in
 src/platform/factory_test_tools

Change-Id: I31a10cc9d562b4b83669ca8a114b60e87ae28b0a
Reviewed-on: https://gerrit.chromium.org/gerrit/11505
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2011-11-11 11:01:20 -08:00
Randall Spangler
391b31024d Add unit tests for vboot_api_init.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Idca158e82d1ea102221ea3b51d445fadee9d2794
Reviewed-on: http://gerrit.chromium.org/gerrit/7183
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-09-06 14:05:03 -07:00