summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add GBB flags for disabling software sync and defaulting to legacy bootfirmware-link-2695.BRandall Spangler2015-08-043-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) GBB flag to skip EC software sync, so EC will be untouched. Needed for EC development. 2) GBB flag to default to booting legacy at end of dev screen timeout. Very handy for booting Ubuntu (or other OS). Also added unit tests for the new flags. BUG=chrome-os-partner:20111 BRANCH=link TEST=manual TEST=make runtests Original-Change-Id: I9da87d87014881a1b1393b0b4a5acb921d080066 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58270 Reviewed-by: Bill Richardson <wfrichar@chromium.org> (cherry picked from commit f2a1dc0a54ec542dd4be7b634483de317c89a2a2) [cernekee: reverted to Googley 2-space indents; removed test cases that had nowhere to live] Change-Id: I688cd48a23c00ae450f7f2b4b46f6d66659ff461 Reviewed-on: https://chromium-review.googlesource.com/290426 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Kevin Cernekee <cernekee@chromium.org> Tested-by: Kevin Cernekee <cernekee@chromium.org>
* Add FAFT keyboard remap GBB flagMarc Jones2015-08-042-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Add a new flag, 0x100, to indicate FAFT key stroke overrides. BUG=chrome-os-partner:14056 BRANCH=link TEST=none Original-Change-Id: I76b7f3f4c51abec5528047f690f20a09b257abc2 Signed-off-by: Marc Jones <marc.jones@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/37074 Reviewed-by: Ronald G. Minnich <rminnich@chromium.org> Reviewed-by: Gediminas Ramanauskas <gedis@chromium.org> Tested-by: Gediminas Ramanauskas <gedis@chromium.org> Commit-Ready: Marc Jones <marc.jones@se-eng.com> (cherry picked from commit 9754cae1c1c4b267f228ee65df410e4115dc3d17) Change-Id: I7d71b4e7f591521e7a89303122d35c01faca5012 Reviewed-on: https://chromium-review.googlesource.com/290425 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Kevin Cernekee <cernekee@chromium.org> Tested-by: Kevin Cernekee <cernekee@chromium.org>
* vboot_reference: Fix keyboard input lag at confirm screen.Shawn Nematbakhsh2012-11-131-1/+3
| | | | | | | | | | | | | | | | | | | | | Changing languages is terribly slow at the confirm screen, when switching from dev to normal. Reduce sleep time to improve user experience. BUG=chrome-os-partner:15726 TEST=boot in dev, hit space, hit arrows rapidly to change language, observe no lag. BRANCH=butterfly, stout Change-Id: I0943debc31d78dcfce87e7f7d4537ae47f5f8cfd Reviewed-on: https://gerrit.chromium.org/gerrit/36956 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Shawn Nematbakhsh <shawnn@google.com> Tested-by: Shawn Nematbakhsh <shawnn@google.com> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/37939 Tested-by: Simon Glass <sjg@chromium.org>
* Get kernel size/load address from vboot headersVadim Bendebury2012-10-242-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently kernel load address and buffer size are programmed in the u-boot device tree. There is no reason for this: the address and size are part of the vboot encapsulation headers. Duplicating this information hardcoded in the device tree does not bring any benefit and is in fact harmful, as it is easy to get out of sync. A better way of doing things is to derive kernel load address and size from the appropriate vboot header. ARM people object to this, as they want the very same kernel blob operate on devices with DRAM mapped to different address ranges. The suggested solution is to exclude the kernel memory section from the device tree on the platforms where the load address could be safely taken from the vboot header. In this case u-boot will pass address of zero to vboot, which will know to derive the address/size from the appropriate header. vboot then rewrites fields of the u-boot supplied structure with actual address and size of the kernel blob. There is no sanity check yet, as it is presumed that there is enough memory to load any kernel and u-boot does not use the space above 0x100000 for at least 16 megabytes (the kernel partition size). On x86 platform the check could be verify that the top of the kernel space is well below the stack. BUG=chrome-os-partner:11994 TEST=manual . with the appropriate u-boot change run a Link target through a FAFT cycle, observe it succeed. Original-Change-Id: I3c2c2cefb1e31d16ac497a01894bf32638479ed7 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/29038 Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Ready: Bill Richardson <wfrichar@chromium.org> (cherry picked from commit b321dbb6bc819d4b7b5a2831dbda0816d3f772d8) Change-Id: Ideae5beba64466328276db030a0a8cfd9c52bd7d Reviewed-on: https://gerrit.chromium.org/gerrit/36512 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org>
* signing script: Resign just firmware body, not the entire sectionChe-Liang Chiou2012-10-051-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signing script extracted firmware body sections FW_MAIN_{A,B} and resigned the whole section instead of just firmware body. As a result, read-only firmware spends more time loading read-write firmware from SPI flash. Since vblock has firmware body size information, signing script should retrieve it and use it to sign just firmware body. This may reduce boot time for ~560ms, depending on firmware image size, section size and SPI flash/bus throughput. Signed-off-by: Che-Liang Chiou <clchiou@chromium.org> BRANCH=snow,link BUG=chrome-os-partner:13094 TEST=For Snow (or boards that use cros_bundle_firmware), check that after resigning, VBLOCK_{A,B} and FW_MAIN_{A,B} are unchanged For Alex and ZGB, check that old and new resign_firmwarefd.sh generates identical output (Test for Snow; repeat for A and B) dump_fmap -x image.bin VBLOCK_A FW_MAIN_A mv VBLOCK_A VBLOCK_A.orig mv FW_MAIN_A FW_MAIN_A.orig resign_firmwarefd.sh image.bin image-resigned.bin \ firmware_data_key.vbprivk \ firmware.keyblock \ dev_firmware_data_key.vbprivk \ dev_firmware.keyblock \ kernel_subkey.vbpubk dump_fmap -x image-resigned.bin VBLOCK_A FW_MAIN_A cmp VBLOCK_A.orig VBLOCK_A cmp FW_MAIN_A.orig FW_MAIN_A (Test for Alex and ZGB; repeat for old and new resign_firmwarefd.sh) resign_firmwarefd.sh image.bin image-resigned-{old or new}.bin \ firmware_data_key.vbprivk \ firmware.keyblock \ dev_firmware_data_key.vbprivk \ dev_firmware.keyblock \ kernel_subkey.vbpubk cmp image-resigned-old.bin image-resigned-new.bin Original-Change-Id: Ie70b6c91614343ad9f991ae369a0f8e74ec213fe Reviewed-on: https://gerrit.chromium.org/gerrit/31572 Commit-Ready: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Gaurav Shah <gauravsh@chromium.org> (cherry picked from commit 3ae4dd70522d06dda08db8e7dd0b5df41bea273e) Change-Id: I89277818c600683be5d7d0dd0818d6e9120abf73 Reviewed-on: https://gerrit.chromium.org/gerrit/34789 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Che-Liang Chiou <clchiou@chromium.org>
* Add CTRL-L in dev screen to support a "legacy boot option"Stefan Reinauer2012-10-0512-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | This option is disabled per default and can be enabled with crossystem dev_boot_legacy=1 or by setting the GBB flag GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080 BUG=chrome-os-partner:6108 TEST=crossystem dev_boot_legacy=1 boot to dev mode screen, press CTRL-L, see SeaBIOS start (other CLs needed) BRANCH=link Signed-off-by: Stefan Reinauer <reinauer@chromium.org> (cherry picked from commit a2326ee152ab5b8aee924ccf794cee38d54909bd) Change-Id: I0aa9ff6c187637761155aa7292a2fda5230eb3b9 Reviewed-on: https://gerrit.chromium.org/gerrit/31265 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Stefan Reinauer <reinauer@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/34788
* Support alternative GPT header signatureStefan Reinauer2012-10-0510-10/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to dual boot Windows and ChromeOS, Windows must not find a GPT partition table on the disk. So change ChromeOS to cope with an alternative signature "CHROMEOS" instead of the standard "EFI PART" BUG=chrome-os-partner:6108 TEST=rebuild chromeos, install it, run cgpt legacy /dev/sda dd if=/dev/sda of=/tmp/x bs=1k hexdump -C /tmp/X see the string CHROMEOS BRANCH=link Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31264 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> (cherry picked from commit b7b865cfee68190babd971ab9a897bdabbab075f) Change-Id: I7388ba8c8621ba05b8bcec6d008e5b250feaa683 Reviewed-on: https://gerrit.chromium.org/gerrit/34787 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org>
* Declare VbExProtectFlash() in vboot_api.h so we can implement it.Bill Richardson2012-10-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | We have to define the function we need here, so that we can implement it in U-Boot, then we can come back here and try to use it. Grr. BUG=chrome-os-partner:11215 BRANCH=link TEST=none This just defines the function prototype. No change to test. Original-Change-Id: I38a19baa54c59c9744d20f743eb53260f2d19852 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31658 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit e0c55a3238f41ce30d6d592725670766355bed67) Change-Id: Ieee7c9ce5375a3511b06fa36a94492d026fc620c Reviewed-on: https://gerrit.chromium.org/gerrit/34676 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add VB_INIT_FLAG_SW_WP_ENABLED to VbInit() input flags.Bill Richardson2012-10-046-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | We need to know not only whether the HW WP pin is asserted, but whether the flash chip has configured its software protection registers to actually protect anything. This flag can be used to indicate that. BUG=chrome-os-partner:13265 BRANCH=link TEST=none This just adds the flag. Nothing actually sets the flag yet, so there's nothing to test. Original-Change-Id: Icba9945fb56eb3a4681486c630cbbdc9232485ef Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31642 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 9dc62178c97b94e5c308f1c36fd0858c316959e5) Change-Id: I0877b5a1080491d0774c7b18889de75e0e23d5b4 Reviewed-on: https://gerrit.chromium.org/gerrit/34672 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* cgpt: Fix error in modifying size of an existing partitionBill Richardson2012-10-042-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Modifying the size of an existing partition without modifying the start as well assumed the start was at block 0. Sometimes it was caught, often it wasn't. Fix the error, add a test to catch the problem. BUG=chrome-os-partner:13090 BRANCH=all TEST=manual make && make runtests Original-Change-Id: I4f5a5031a90a3e78d886ed3573f61305316a3f1f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31418 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit da77e6953c96f9bb52a04dc32b337066144879aa) Change-Id: Id318b92ff1b5c8607692298575ca6fee8d51cc60 Reviewed-on: https://gerrit.chromium.org/gerrit/34666 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Rename $GPT as $CGPT, just for clarity.Bill Richardson2012-10-041-63/+63
| | | | | | | | | | | | | | | | | | | | | | | I'm about to add a new test to fix some borkage with cgpt. First step is to clean up the script a little bit. BUG=none (yet) BRANCH=all TEST=manual make && make runtests Original-Change-Id: I2311b5eb20aff80c4a0435cf1d10331c679af3c0 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31379 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 263ffdfdd710a33a2a12ee33179f088292b2864f) Change-Id: Ic6e3d70d90bb5bce07a704a30d56a5a7701a8599 Reviewed-on: https://gerrit.chromium.org/gerrit/34664 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Fix broken bitmap testsBill Richardson2012-10-046-6/+6
| | | | | | | | | | | | | | | | | | | | | | | When we changed the bmpblk version from 1.2 to 2.0, the tests weren't updated. BUG=chrome-os-partner:11078 BRANCH=all TEST=manual make && make runtests Original-Change-Id: I244a9aeeb34be912fe6058687394c37d0e474890 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31377 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 2e70c1226a511b9e331f2e9ef6226c2c9920cef4) Change-Id: I338eab576e3df7d293da936b1e31635e2a3bbcaa Reviewed-on: https://gerrit.chromium.org/gerrit/34654 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Check keyboard more often in recovery modeSimon Glass2012-09-121-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we check the keyboard each 250ms. This makes for a pretty choppy experience when changing languages. Change to check every 20ms, without changing the disk check interval (which remains 1s). BUG=chrome-os-partner:13962 BRANCH=snow TEST=manual Boot into recovery Try changing language on snow with left/right arrow and see that it updates instantly. Original-Change-Id: I2ae411bc36fdb2badac11595b099bca43f116669 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/32463 Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Tested-by: Tom Wai-Hong Tam <waihong@chromium.org> (cherry picked from commit 74fa20748dc71556c9a53d8056eab71709143c24) Change-Id: I6dcf2ed51c4ed427bdf0ff1896dd3731a6fb325f Reviewed-on: https://gerrit.chromium.org/gerrit/33073 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* Cache GBB images to speed up displaySimon Glass2012-09-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than read the images from slow flash every time we need them, cache them the first time and use that cache thereafter. BUG=chrome-os-partner:13962 BRANCH=snow,link TEST=manual Go into recovery mode on link See that we can display a new screen in roughly 20ms instead of the 250ms it previously took on link. Also tested on snow and shown to have no ill effects. Original-Change-Id: Ieb39c44bddeb6315da8983669f19f550888659bd Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/32462 Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Tested-by: Tom Wai-Hong Tam <waihong@chromium.org> (cherry picked from commit cf67ca4eb3ddbfc1699de1810478f765ac9575b7) Change-Id: Ic57621eb2394b996193bab17adb4d3d301213b86 Reviewed-on: https://gerrit.chromium.org/gerrit/33072 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* Esc at DEV screen no longer triggers TONORMRandall Spangler2012-09-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:13765 BRANCH=all TEST=manual 1. boot in dev mode. see DEV screen 2. press space -> TONORM 3. press esc -> DEV 4. press esc -> (still at DEV) Original-Change-Id: I9ed2fd2ff2380b058f1aa677ccd516d9fd5679d2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/32454 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> (cherry picked from commit 0b4c02889136d92961dd4a8add8d9b76d91b4904) Change-Id: I43dbb087567422fda2b2e07247ad28268f80f8cf Reviewed-on: https://gerrit.chromium.org/gerrit/32554 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Fix handling of enter and space in developer screens.Randall Spangler2012-08-172-60/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At DEV screen: - Space triggers TONORM - Enter is ignored unless new GBB flag is set At TONORM screen: - Enter always means YES - Space is ignored So, if you hold the space key at the dev screen, you'll go to tonorm and stay there until you press Enter or Esc. If you hold the Enter key at the dev screen, nothing will happen. Add a GBB flag to allow Enter to trigger the TONORM screen; this will be used by FAFT testing. BRANCH=all BUG=chrome-os-partner:12699 TEST=manual 1. press enter at dev screen. nothing happens. 2. press space at dev screen. tonorm. 3. press space at tonorm. nothing happens. 4. press enter at tonorm. turns off dev mode. Original-Change-Id: I9f3128d5114e1486911cc4d76d0ccd5649de1680 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30456 Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> (cherry picked from commit 5eb7cdba0e4671d412415743f48b87172d6bba91) Change-Id: I91064f39d3435f83a79505198197faaef87b51d7 Reviewed-on: https://gerrit.chromium.org/gerrit/30713 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add clear TPM owner requestRandall Spangler2012-08-1512-26/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds two new flags to crossystem: clear_tpm_owner_request clear_tpm_owner_done The first one requests that the firmware clear the TPM owner on the next boot. When the firmware does this, it will set clear_tpm_owner_request=0, and set clear_tpm_owner_done=1. The OS can use the done-flag as a hint that trusted things guarded by the TPM are no longer trustable. BUG=chromium-os:31974 TEST=manual crossystem // both flags initially 0 crossystem clear_tpm_owner_request=1 crossystem clear_tpm_owner_done=1 // request=1, done=0; done can be cleared but not set by crossystem reboot tpmc getownership // owned=no crossystem // request=0, done=1 crossystem clear_tpm_owner_done=0 crossystem // both flags 0 again Signed-off-by: Randall Spangler <rspangler@chromium.org> Original-Change-Id: I49f83f3c39c3efc3945116c51a241d255c2e42cd Reviewed-on: https://gerrit.chromium.org/gerrit/25646 (cherry picked from commit 29e8807ea045e119e3adeaec40c5f8421901b6fb) Change-Id: I2e6e3e4a94fda3b90fc1dcb762748e972a5e7b3f Reviewed-on: https://gerrit.chromium.org/gerrit/30458 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Scale bmp files correctly for x86 when generating bmpblocks.Duncan Laurie2012-08-141-1/+1
| | | | | | | | | | | | | | | | | | BUG=None TEST=Run 'make' in newbitmaps directory but remove the "clean" step in the Makefile. Use the bmp_viewer utility to verify all graphic elements are scaled. Old-Change-Id: Ifd62c2ba3a6c354c4de7d9fd052d76de36842fb6 Reviewed-on: https://gerrit.chromium.org/gerrit/30126 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Ready: Dave Parker <dparker@chromium.org> Tested-by: Dave Parker <dparker@chromium.org> (cherry picked from commit 9a6e6e7785988dc9a0434d5b734d282460a9ce6b) Change-Id: Ic805a73cb4c53b4ff53ab12df59a7749e88f5d58 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30254
* newbitmaps: Add ToNorm confirm screen resource.Duncan Laurie2012-08-1454-190/+124
| | | | | | | | | | | | | | | | | | | | According to new flow, we need "confirm" screens for TONORM. Also simplified default_source folder, with better hints and using PNG image source. image/assets/* are files from issue page. BUG=chrome-os-partner:11078 TEST=make # x86 and arm bitmaps both works. Old-Change-Id: I3701d6ed5a944305e12a01c1841a197d3e18a8cd Reviewed-on: https://gerrit.chromium.org/gerrit/29983 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit b57b8c3deae3dad870d8785fed46daabbdf35ea9) Change-Id: I4c8d686ad4f5e3df9d047c8ebdc6988277dc1bc4 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30249
* Increase max number of bitmaps to composite to 16 per screen.Duncan Laurie2012-08-146-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to render new-style screens that use 13 bitmaps. bmpblk version is changed from 1.2 to 2.0, due to incompatibility. BUG=chrome-os-partner:11078 TEST=emerge-<board> vboot-reference. Run firmware with new bmpblock. Original-Change-Id: I750da66b020fe195896df58f31fcbb2a9e33e404 Reviewed-on: https://gerrit.chromium.org/gerrit/28945 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Dave Parker <dparker@chromium.org> (cherry picked from commit 0b7ee46c2eeba858ff59d534e265b445895623a2) Original-Change-Id: I80543c46a7c0e09169e29e32077d84c57192e431 Reviewed-on: https://gerrit.chromium.org/gerrit/29602 Reviewed-by: Dave Parker <dparker@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> (cherry picked from commit 3985f94fae52aa1df853f7d47388c67c3022e069) Change-Id: I93cdfa2bf107a3f9362c0de5f9730cd284e93e99 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30248
* firmware: Add TONORM_CONFIRM screen.Duncan Laurie2012-08-143-0/+6
| | | | | | | | | | | | | | | | | | | We need to alert user his change has been accepted for 5 seconds. BUG=chrome-os-partner:11078 TEST=emerge-daisy vboot_reference-firmware vboot_reference chromeos-u-boot chromeos-boogimage Old-Change-Id: I6a3b13e7543479fbd6543d759093ecf501fb1d04 Reviewed-on: https://gerrit.chromium.org/gerrit/29982 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 9ea8e0d390cccff2057acc71dcc3807e3709c2fb) Change-Id: I7d2a85e53a396b9fcdb76e90c09b2f8d3c4a5368 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30247
* newbitmaps: Refine font and text generation.Duncan Laurie2012-08-1418-1182/+192
| | | | | | | | | | | | | | | | | | | | | | | The bmpblk build scripts used to rely on lots of pre-generated resources, and the HWID font data was fixed to x86 special size & scaling parameters. Since the screens now rely on more platform dependent parameters, this CL refined whole flow so fonts are now generated and processed (ex, re-scale) in the same way as other text messages. BUG=chrome-os-partner:11078 TEST=make # x86 and arm bitmaps both works. Old-Change-Id: I59a4fb31718ef052c6b54cd4642f4fc487893f2b Reviewed-on: https://gerrit.chromium.org/gerrit/29873 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit c951eb8257862a3f85c8d23050cf3b617ce1e1c0) Change-Id: I25887c0b8df3087859bc57cb79d27558ccc06a7e Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30246
* newbitmaps: Always generate bitmaps in 8bpp mode.Duncan Laurie2012-08-141-7/+29
| | | | | | | | | | | | | | | | | | | | ImageMagick may produce 1bpp mode for background if the image is modified (ex, x86 output). We need to ensure the output to be 8bpp mode for firmware to render images correctly. BUG=chrome-os-partner:11078 TEST=make x86 # all images are in 8bpp mode. Old-Change-Id: Ia6e4fbc5e7580ebbb51e1067bcf554ee06f1fbc5 Reviewed-on: https://gerrit.chromium.org/gerrit/29868 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 69742668297ac9e5e82f0dbb704a3714bd0cba62) Change-Id: Ia0527b665ca032e08b2d11e6699e2f1f738ba9b4 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30245
* Translated text for "v2" firmware recovery screens.Duncan Laurie2012-08-14758-411/+1180
| | | | | | | | | | | | | | | | BUG=chrome-os-partner:11078 TEST=run make in newbitmaps directory to build a new bmpblock. Old-Change-Id: I97683c95c7c0881ce17617ccab4eb674a06704de Reviewed-on: https://gerrit.chromium.org/gerrit/29866 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Ready: Dave Parker <dparker@chromium.org> Tested-by: Dave Parker <dparker@chromium.org> (cherry picked from commit 1eb883dce6eb96be984a1155e5a6011e637979b9) Change-Id: Ia5e0c338ca6a372f43d3b784802a5a646aaf27fe Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30244
* newbitmaps: Add TODEV, TONORM, and UPDATE(WAIT) screens.Duncan Laurie2012-08-1443-6/+147
| | | | | | | | | | | | | | | | | | | | An initial draft of missing screens, with only English messages (*.txt in localized folders are now all English - will update them once translation is ready). BUG=chrome-os-partner:11078 TEST=make; bitmap_viewer DEFAULT.yaml # see basic screen. Old-Change-Id: I3209e18bf604030cf8e92d264781add33aab84fe Reviewed-on: https://gerrit.chromium.org/gerrit/29765 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 1dc00165e5b374edd3be79636657a1d90688a617) Change-Id: I22888af52d59023421ce552f255eaa01596b46f7 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30243
* bmplk_utility: Libraries should be in end of build command.Duncan Laurie2012-08-141-1/+1
| | | | | | | | | | | | | | | | | | | Libraries (-llzma, -lyaml) should be in end of dependency list, otherwise linking in static mode (-static) would fail. BUG=none TEST=emerge vboot_reference Old-Change-Id: Idd072443d042edfb214f5a958abd064bc18573ed Reviewed-on: https://gerrit.chromium.org/gerrit/29738 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 64a2aff9622b6fca8b0d6e2ed62291a1cf38412f) Change-Id: I35f7dda76b40d5a0d680f4abb0962ceb52cc76ce Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30242
* newbitmaps: Remove Alex files and refer to specific branch.Duncan Laurie2012-08-14226-3003/+5
| | | | | | | | | | | | | | | | | | | | | | Alex bitmaps cannot be generated by latest tools anymore, so let's remove the resource files and refer to the correct place that contains everything you need to generate a new Alex bitmap. (Also see https://gerrit-int.chromium.org/#/c/23243/ for more information) BUG=none TEST=none, simply delete files. Old-Change-Id: I170071892df04ad1cf8304da506f2639a8f39b8b Reviewed-on: https://gerrit.chromium.org/gerrit/29743 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit b7adca3f4cd20795227575767076365345b2d859) Change-Id: Id0c530dd925d2b2c4296232a896d55d85a7d3baf Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30241
* Generates x86 and arm firmware bitmap blocks.Duncan Laurie2012-08-146-84/+115
| | | | | | | | | | | | | | | | | | | | | | X86 (coreboot) uses 800x600 resolution while ARM systems (uboot) initialze LCD as its maximum size, so we must refine the bmpblk build scripts to generate output with different scaling parameters. BUG=chrome-os-partner:11078 TEST=make # got ARM bmpblock and verified to work on daisy. Old-Change-Id: Ib9e9a0dc3b6695cef451772391f207a5b57977df Reviewed-on: https://gerrit.chromium.org/gerrit/29606 Reviewed-by: Dave Parker <dparker@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> (cherry picked from commit 4e4ed8bc96ee2947c77d778ce04f449fc54c963d) Change-Id: I0e38fffcaf9a0c6f5b7cdf518dd177a212685933 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30240
* Generate localized messages in PNG format.Duncan Laurie2012-08-143-56/+32
| | | | | | | | | | | | | | | | | | | | To support rendering messages in multiple resolution profiles, we need to keep the images in its original format. BUG=chrome-os-partner:11078 TEST=./text_to_png # images were converted correctly. Old-Change-Id: I6e13331eddfa4c40b17b67b5cf56b5a0284e3b34 Reviewed-on: https://gerrit.chromium.org/gerrit/29605 Reviewed-by: Dave Parker <dparker@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 7f06cfd68d7bd184b37748267b07fdee779b6a85) Change-Id: I6833a70bd5c942983323274421571fbbd12cfa45 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30239
* Add firmware update message for WAIT screen.Duncan Laurie2012-08-1443-0/+86
| | | | | | | | | | | | | | | | | | Simply copied from assets (boot-messages). BUG=chrome-os-partner:11078 TEST=none, simply adding text resource files. Old-Change-Id: Idd81a1471b440e2ef2b7be652e4eb6896e93a2fc Reviewed-on: https://gerrit.chromium.org/gerrit/29604 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit c11d83513f6dccdd8ec9556f9297f74ea3e71d2c) Change-Id: Ief1a233078240691843710421b42b6b84c35efc2 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30238
* Update bmpblock with new-style minimalist screens.Duncan Laurie2012-08-14142-1373/+1192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: Only the "launch countries" have a full set of updated text strings...and those strings were translated via translate.google.com and need fixing-up prior to use in a real product. BUG=chrome-os-partner:11078 TEST=install bmpblock_x86.bin into a firmware image with gbb_utility -s -b bmpblock_x86.bin image.bin Verify the four firmware screens are displayed correctly. Original-Change-Id: Ib8ff142e9a938a6a3bf949153594cc013c8bb311 Reviewed-on: https://gerrit.chromium.org/gerrit/28574 Reviewed-by: Dave Parker <dparker@chromium.org> Tested-by: Dave Parker <dparker@chromium.org> (cherry picked from commit 7c41920b754cb0d18da9a125f76d3f1ef90e04f4) Original-Change-Id: I534beaea5be95b549a6305d4b2911abeb983e034 Reviewed-on: https://gerrit.chromium.org/gerrit/29603 Reviewed-by: Dave Parker <dparker@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 5da1061b46b7287f93272e58dece420d0d7f571d) Change-Id: Ibb2a3633d4a516526f8119c81afac8a977994244 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30237
* rename common.mk to build.mkDuncan Laurie2012-08-144-3/+3
| | | | | | | | | | | | | | | | | | | This is to avoid confusion with the canonical common.mk file that is a CrOS build system. BUG=chromium-os:33327 TEST=`cros_run_unit_tests --board x86-alex -p vboot_reference` still works Old-Change-Id: I4b6719d58a4a8ab44b62c23c0e2c45b154374958 Reviewed-on: https://gerrit.chromium.org/gerrit/29578 Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> (cherry picked from commit 6c34ecf61bf621e4b4cfffb3f99732eb9930e85c) Change-Id: I1c072a2410f37712ae3b168351454313537dd7b7 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30236
* vboot: add flag to indicate that the EC is slow to programDuncan Laurie2012-08-144-8/+16
| | | | | | | | | | | | | | | | | | | | | | Some EC's are slow to program their firmware. This could happen at any boot as part of software sync. This adds the VB_INIT_FLAG_EC_SLOW_UPDATE input flag to VbInit(), so that vboot knows to display the EC-is-being-programmed screen when that flag is set. BUG=chrome-os-partner:12255 TEST=none This isn't activated yet by anything, so there's nothing to test. Old-Change-Id: Id4d12e463fcdee017b7c52b53a2facefc33b745f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/29370 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit f217520215e7e3d2f5ca006992ab5002927c4f87) Change-Id: I3c312ce91020c684805a52394924bd282408d71a Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30235
* Add WAIT screen to default bitmapDuncan Laurie2012-08-145-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Some systems take a long time to program the EC firmware (because it's behind a really slow I2C bus or something). This could happen at any boot as part of software sync. If it's necessary to reprogram the EC on a slow system, we need to display a BIOS screen to the user so he/she doesn't think it's bricked. This CL is just to add a new default bitmap so we'll have something to display when we need it. Nothing actually uses it yet. BUG=chrome-os-partner:12254 TEST=none There should be no user-visible changes. We don't invoke this screen yet. Old-Change-Id: Icb922f933e2e921472dbdff7a26a3ca4d58fbba3 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/29241 Reviewed-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit b48cd672a731df7866b43110c62ebbbf23120125) Change-Id: I442782b62dd0b22390bf1335d626db891470d50e Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30234
* Revert "Increase max number of bitmaps to composite to 16 per screen."Duncan Laurie2012-08-146-12/+19
| | | | | | | | | | | | | | This reverts commit 22a145cb4421633e30addc6f415fd85c26a0f5a6. Missing changes mean this cherry-pick is out of order. BUG=none TEST=none Change-Id: I7bf1159a079a118e505241b77be73582c75eb3f7 Reviewed-on: https://gerrit.chromium.org/gerrit/30233 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Tested-by: Duncan Laurie <dlaurie@chromium.org>
* vboot_reference: Improve make_dev_firmware script.Duncan Laurie2012-08-141-48/+35
| | | | | | | | | | | | | | | | | | | | | | | Developers testing firmware preamble flags (usually for turn on/off RO-NORMAL bits) need a easy way to change existing firmware, without hacking FDT source / looking for complex script. Also included some minor improvements: * Always enable FORCE_DEV_BOOT_USB and DISABLE_FW_ROLLBACK_CHECK. These are flags most developers need when leaving official signed normal firmware. * --bmpfv is deprecated because our latest firmware now always include official bitmaps in updater, no more DEV bitmaps. BUG=none TEST=./make_dev_firmware.sh -f bios.bin -t new_bios.bin --preamble_flags 0 ./make_dev_firmware.sh -f bios.bin -t new_bios.bin --preamble_flags 1 Old-Change-Id: I7ee72d32b4b7fa28f2be635fd8c7bb678852e132 (cherry picked from commit af44dce1e80ebd818770b906a328423762389753) Change-Id: I0c03c0803ce558c63148624431e54d5c444b1bed Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30232
* Increase max number of bitmaps to composite to 16 per screen.Dave Parker2012-08-096-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to render new-style screens that use 13 bitmaps. bmpblk version is changed from 1.2 to 2.0, due to incompatibility. BUG=chrome-os-partner:11078 TEST=emerge-<board> vboot-reference. Run firmware with new bmpblock. Original-Change-Id: I750da66b020fe195896df58f31fcbb2a9e33e404 Reviewed-on: https://gerrit.chromium.org/gerrit/28945 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Dave Parker <dparker@chromium.org> (cherry picked from commit 0b7ee46c2eeba858ff59d534e265b445895623a2) Original-Change-Id: I80543c46a7c0e09169e29e32077d84c57192e431 Reviewed-on: https://gerrit.chromium.org/gerrit/29602 Reviewed-by: Dave Parker <dparker@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> (cherry picked from commit 3985f94fae52aa1df853f7d47388c67c3022e069) Change-Id: Ied1ed3613727f0e8ae3ca1a1044ac30407a0c2fb Reviewed-on: https://gerrit.chromium.org/gerrit/29773 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Hash-based EC verification needs only a tiny bit of padding.c infoRandall Spangler2012-08-081-20/+9
| | | | | | | | | | | | | | | BUG=chrome-os-partner:11232 TEST=build u-boot and ec for link CQ-DEPEND=29496 Original-Change-Id: I614cfc0a45b1cf492f1cec4e085e8f3259ac6662 Signed-off-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 62fed6f191db4e73cf299a2f5ab42d8eba5aac40) Change-Id: If0ce9ef6da2875a35ae43941731fd680864461bb Reviewed-on: https://gerrit.chromium.org/gerrit/29642 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* cryptolib: put constant arrays in rodata segmentVincent Palatin2012-08-084-10/+10
| | | | | | | | | | | | | | | | | The SHA256 constants and some algo definitions are currently in the .data segment, this wastes precious RAM on the EC where read-only data are stored in flash only. BUG=chrome-os-partner:12271 TEST=sudo emerge vboot_reference && emerge-daisy vboot_reference vboot_reference-firmware chromeos-ec and manually check the content of the .data segment in the EC binary. Change-Id: Ib5428d5bdcbece1152238109304ae009c38984bc Original-Change-Id: I67b8c0f2843312651e8ac287cea2f8cb5f075453 Reviewed-on: https://gerrit.chromium.org/gerrit/29641 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Crossystem should return at-boot switch positions from VbSharedDatafirmware-link-2695.2.BRandall Spangler2012-08-065-63/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more reliable than reading them through FDT/ACPI, since it reflects the positions as shown to verified boot code. Notes: 1. This affects ALL platforms with virtual dev switches (x86 AND arm) 2. The fix should have no effect on older platforms, but I haven't tested those. BUG=chrome-os-partner:11805 TEST=manual 1. boot in normal mode. devsw_boot = 0 # Developer switch position at boot recovery_reason = 0 # Recovery mode reason for current boot recoverysw_boot = 0 # Recovery switch position at boot wpsw_boot = 1 # Firmware write protect hardware switch position at boot 2. boot in developer mode. localhost ~ # crossystem devsw_boot = 1 # Developer switch position at boot recovery_reason = 0 # Recovery mode reason for current boot recoverysw_boot = 0 # Recovery switch position at boot wpsw_boot = 1 # Firmware write protect hardware switch position at boot 3. boot in developer-recovery mode using keyboard combo. devsw_boot = 1 # Developer switch position at boot recovery_reason = 2 # Recovery mode reason for current boot recoverysw_boot = 1 # Recovery switch position at boot wpsw_boot = 1 # Firmware write protect hardware switch position at boot 4. disable WP and reboot. wpsw_boot should be 0. Original-Change-Id: If4156b5e14c6923c5b331c7e5feaabbffe1dad37 (cherry picked from commit da8d32dc8d0fb5ebcfffa305f4a3ecb2dd7c79ac) Change-Id: I6b80c4f507ebbb9accb75ad6b21b0b5bd963921a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/29320
* TONORM screen should display at Dev screen, not Recovery screen.Bill Richardson2012-08-063-64/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're still working out the correct behavior for the keyboard-based dev-mode. Before this, we rebooted into recovery mode before asking if you wanted to return to normal mode, so if you said "no, stay in dev-mode" you'd still be at the recovery screen. But now the confirmation for returning to normal mode happens at the dev-mode screen, so you never get to the recovery screen (unless normal mode won't boot, in which case you get there automatically). BUG=chrome-os-partner:11707 TEST=manual First, clear the GBB flags so that you can actually test the virtual dev switch: /usr/share/vboot/bin/set_gbb_flags.sh 0 reboot It should come up in normal mode. Activate keyboard-based dev-mode as before: - three-finger salute - Ctrl-D at the recovery screen - Press ENTER when asked Now, at the DEV screen, try to leave: - Press SPACE. It should ask if you want to go to normal mode. - Press ESC (no). You should be back at the DEV screen again. - Press ENTER. It should ask if you want to go to normal mode. - Press ESC (no). You should be back at the DEV screen again. - Press SPACE. It should ask if you want to go to normal mode. - Press ENTER (yes). It should reboot into normal mode. Original-Change-Id: I99af6e7b97fb61f943bd14c8c7166571b5ccf106 Signed-off-by: Bill Richardson <wfrichar@chromium.org> (cherry picked from commit 2934475dbc6267915ecddd7bb53c922da928a749) Change-Id: I5a5b47b39a9a4f4b9a82505fa21ee874c93ccb30 Reviewed-on: https://gerrit.chromium.org/gerrit/29283 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add missing mocked TPM functionsKees Cook2012-08-061-1/+18
| | | | | | | | | | | | | | | BUG=chromium-os:33110, chromium-os:33111, chromium-os:33112 TEST=alex build, "MOCK_TPM=1 make" links STATUS=Fixed Original-Change-Id: I9d71e49ec6c98e74954a17849ca82bf948d78ff2 Signed-off-by: Kees Cook <keescook@chromium.org> (cherry picked from commit 41282f1bbbf3a5dd75055d99194d15aa98b67242) Change-Id: I1164ab236dcb467ba78b65aa9dc3b9552529a4ef Reviewed-on: https://gerrit.chromium.org/gerrit/29282 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Flush keyboard at start of screens which take keyboard inputRandall Spangler2012-08-061-1/+51
| | | | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:11887 TEST=manual Boot with dev mode on. Boots normally. Boot with dev mode on, hammering on ENTER key as soon as you release power. Dev mode screen is shown. Keep hammering. Dev screen will stay up as long as you do this. Wait >2 sec. Press ENTER. System reboots to TONORM screen. Original-Change-Id: I18e35b23c18a65637a84d3d1964b291e0cb5e8c5 Signed-off-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 7c3a486d6de63fd1c8c8e55adf5ec3aa2dcd65aa) Change-Id: Iaeb5eb3f6a883874892b140856ab206437a1b4f5 Reviewed-on: https://gerrit.chromium.org/gerrit/29281 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Revert "Enter key at DEV screen no longer transition to TONORM screen"Randall Spangler2012-08-062-7/+7
| | | | | | | | | | | | | | This reverts commit 2b45044edf702db665865de5b1b903346ed407a8 We will instead flush the keyboard buffer at the start of screens which accept keyboard input. Original-Change-Id: I1f5a480c6c1eeb7432b557dd4d984c1450ac973e (cherry picked from commit 6c9f09738045efd84156304c7684bab4a009a5f1) Change-Id: I597ad2e49c67b6bac7625ac9c0754d10da666e49 Reviewed-on: https://gerrit.chromium.org/gerrit/29280 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Fix 'possible use of unassigned' variable 'retval'.Taylor Hutt2012-08-061-0/+1
| | | | | | | | | | | | | | | | This change ensures that 'retval' is set for all paths to 'done'. BUG=none TEST=Now compiles without warning. Signed-off-by: Taylor Hutt <thutt@chromium.org> Original-Change-Id: I4ab368b5c60afbed28a5b6d5417e18bedf986e2d (cherry picked from commit 5b8210bd559437010ef3692122af008bffe29b4c) Change-Id: Ic0589871a2f8dd984c42412ba33ff344c1325ddd Reviewed-on: https://gerrit.chromium.org/gerrit/29277 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Enter key at DEV screen no longer transition to TONORM screenRandall Spangler2012-07-312-7/+7
| | | | | | | | | | | | | | | | | | | | | | And space at TONORM screen no longer confirms disabling dev mode Added Ctrl+Refresh as an alias for tonorm screen request. U-boot will need to be enhanced to support that. Until then, many FAFT tests will break. BUG=chrome-os-partner:11887 TEST=manual 1. Boot to DEV screen 2. Press Enter. Nothing happens. 3. Press Space. Goes to TONORM screen. 4. Press Space. Nothing happens. 5. Press Enter. Reboots with dev mode disabled. Change-Id: I7f61c4001c668ac916f50f931a79a107752c83b5 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28851 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* security: Avoid integer wrap on 32-bit platformsBill Richardson2012-07-311-2/+4
| | | | | | | | | | | | | | | | | | | | | This could wrap before the assignment: uint64_t = uint32_t * int; Instead: uint64_t = uint32_t; uint64_t *= int; BUG=chrome-os-partner:11643 TEST=none Nothing to test or verify. If the security guys approve, it's fixed. Change-Id: Ib7c9774998332ac1a29c4551bc039eaa999ee681 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28841 Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
* vbutil_kernel: gracefully exit if the config file is badLucian Cojocar2012-07-311-0/+4
| | | | | | | | | | | | | | | | If the config file is specified in the parameter list but we aren't able to open (or read) the file, vbutil_kernel should return an error instead of crashing with a Segmentation Fault. BUG=chromium-os:33087 TEST=manual Invoke vbutil_kernel with a bogus path for the config file (--config). Change-Id: I32dab7c381b9094f4015a554bc59989f1bb329ef Signed-off-by: Lucian Cojocar <cojocar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28740 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Fix "cgpt show" output for large hard drives.Shawn Nematbakhsh2012-07-301-5/+5
| | | | | | | | | | | | | | | | "cgpt show" output table can be incorrect for large hard drives due to the number of digits in the start/size parameters. Fix by adding extra printf padding. BUG=chromium-os:33082 TEST=emerge, "cgpt show -q /dev/sda" on large HDD platform. Change-Id: I21008322739f5cd4a34372a4436a71259565c6e7 Reviewed-on: https://gerrit.chromium.org/gerrit/28730 Tested-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Tammo Spalink <tammo@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Ready: Shawn Nematbakhsh <shawnn@chromium.org>
* Shut down after EC software sync if lid is closedRandall Spangler2012-07-261-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | So if the EC reboots when the lid is closed (for example, it wakes from hibernate because the AC adapter was inserted), it won't leave the AP powered on. BUG=chrome-os-partner:11087 TEST=manual Reboot EC with lid closed ('reboot hard'). Should finish software sync and shut down. Reboot EC with lid open. Boots. Hibernate EC and wake with lid open. Boots. Hibernate EC and wake with power button press. Boots. Reboot into recovery mode. Boots. Press power button; shuts down. Reboot into recovery mode. Boots. Close lid; shuts down. CQ-DEPEND=*22578 Change-Id: I09d5331222aa10b73518f9f574ec5a32d8e6ac23 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28525 Reviewed-by: Bill Richardson <wfrichar@chromium.org>