summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Allow path to the cgpt binary to be set on the command line0.14.811.BEric M. Blake2011-09-192-14/+28
| | | | | | | | | | | | | | | | BUG=chromium-os:17138 TEST=tested changes on vm8-m2, was able to successfully run au-generate.py and it used the cgpt binary from au-generate.zip Change-Id: Ia57f1be4b0d669cad430e51977cce6e26d704320 Reviewed-on: http://gerrit.chromium.org/gerrit/7796 Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Reviewed-by: Eric Blake <eblake@chromium.org> Tested-by: Eric Blake <eblake@chromium.org> (cherry picked from commit 236faae91a224b36fb48ec407535a426f1f67877) Reviewed-on: http://gerrit.chromium.org/gerrit/7944 Reviewed-by: David McMahon <djmm@chromium.org> Tested-by: David McMahon <djmm@chromium.org>
* Move VbNvContext setup/teardown to vboot wrapper funcsRandall Spangler2011-07-267-52/+21
| | | | | | | | | | BUG=chromium-os:18226 TEST=make && make runtests Change-Id: Ie22e99a9796866e646ed92158410bc7a2fdf90f6 Reviewed-on: http://gerrit.chromium.org/gerrit/4754 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Randall Spangler <rspangler@chromium.org>
* Make crossystem kern_nv field read-only.Randall Spangler2011-07-262-5/+7
| | | | | | | | | | | | | | | | | | | | | BUG=chromium-os:14029 TEST=make && make runtests, and manually check: crossystem fwupdate_tries=3 crossystem fwupdate_tries kern_nv (should print 3 0x00000003) crossystem kern_nv=0 (should fail) crossystem fwupdate_tries kern_nv (should print 3 0x00000003) crossystem fwupdate_tries=0 crossystem fwupdate_tries kern_nv (should print 0 0x00000000) Change-Id: I906ad41a36378b93e0c3330d8f94b7d69aafa536 Reviewed-on: http://gerrit.chromium.org/gerrit/4751 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Fix vboot_reference-firmware compilation error when building for coreboot.Vadim Bendebury2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When compiling for coreboot the printf format helpers are not available (they come from the Insyde tree). The specifier is use in a very limited number of places, it is probably better to typecast the variable being printed to avoid compilation errors. This CL accomplishes just that. BUG=none TEST=manual: run the following commands: emerge-x86-alex -C sys-boot/chromeos-coreboot \ sys-boot/chromeos-u-boot\ chromeos-base/vboot_reference \ chromeos-base/vboot_reference-firmware emerge-x86-alex chromeos-bootimage observe the second one succeed. Change-Id: If19e3a583eb759ba5a21863d1b9b28636c7f00b0 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/4690
* Refactor LoadFirmware() and LoadKernel() to return VbError_tRandall Spangler2011-07-269-117/+58
| | | | | | | | | | BUG=chromium-os:18161 TEST=make && make runtests Change-Id: I1f60654fef84e26ee15fa8bdaacdb87fb1ddf69e Reviewed-on: http://gerrit.chromium.org/gerrit/4676 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Return more meaningful error codes from vboot entry pointsRandall Spangler2011-07-254-52/+114
| | | | | | | | | | | | This also fixes one place where TPM error codes were getting lost. BUG=chromium-os:18132 TEST=make && make runtests Change-Id: I83c74e1103805f166d1dc7448be7d67bd46d15b3 Reviewed-on: http://gerrit.chromium.org/gerrit/4659 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Refactor TPM calls into vboot wrapperRandall Spangler2011-07-2511-339/+257
| | | | | | | | | | | | | | | | | | | | | | Try #2, now that ARM has the fix from http://gerrit.chromium.org/gerrit/4667 This cleans up the TPM calls inside vboot_reference. * TPM calls share mode code between boot modes. * Better handling for TPM_E_MUST_REBOOT, particularly in recovery mode. * TAB screen shows current TPM versions. No changes required to the wrapper API; these changes are internal to vboot. BUG=chromium-os:18084 TEST=make && make runtests; built for both alex and tegra2-seaboard Original-Change-Id: I2a52066f2889210af83409872b10f9d6380470af (cherry picked from commit da55560cddcf7a1aa8a881cdf52792a21a01e766) Change-Id: I120797145772116f09b8125b9e56fdbb11dc16b3 Reviewed-on: http://gerrit.chromium.org/gerrit/4671 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Fix missing inttypes define on ARMRandall Spangler2011-07-251-0/+1
| | | | | | | | | | BUG=none TEST=emerge-tegra2_seaboard vboot_reference-firmware Change-Id: Ia14468885454383945dd47d328a54c7f6b7221e0 Reviewed-on: http://gerrit.chromium.org/gerrit/4667 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Elly Jones <ellyjones@chromium.org>
* Revert "Refactor TPM calls into vboot wrapper"Elly Jones2011-07-2511-257/+339
| | | | | | | | | This reverts commit da55560cddcf7a1aa8a881cdf52792a21a01e766. This commit caused http://build.chromium.org/p/chromiumos/builders/arm%20tegra2%20binary/builds/6301 to fail. Change-Id: Ie132c1e600ab28f97337ecfe0e7cff053987717d Reviewed-on: http://gerrit.chromium.org/gerrit/4661 Reviewed-by: Elly Jones <ellyjones@chromium.org> Tested-by: Elly Jones <ellyjones@chromium.org>
* Refactor TPM calls into vboot wrapperRandall Spangler2011-07-2511-339/+257
| | | | | | | | | | | | | | | | | | This cleans up the TPM calls inside vboot_reference. * TPM calls share mode code between boot modes. * Better handling for TPM_E_MUST_REBOOT, particularly in recovery mode. * TAB screen shows current TPM versions. No changes required to the wrapper API; these changes are internal to vboot. BUG=chromium-os:18084 TEST=make && make runtests; built for both alex and tegra2-seaboard Change-Id: I2a52066f2889210af83409872b10f9d6380470af Reviewed-on: http://gerrit.chromium.org/gerrit/4611 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* resign_firmwarefd.sh: support new "flag" (for hinting two-stop FW)Hung-Te Lin2011-07-222-3/+18
| | | | | | | | | | | | | | The two-stop firmware relies on the "flag" field which may be useful for the resign_firmwarefd.sh. BUG=chrome-os-partner:5095 TEST=./resign_firmwarefd [params] 1 vbutil_firmware --verify ..... # seeing flag = 1 Change-Id: I56b44ee5b610e36384e15e6eb31286f0f838734b Reviewed-on: http://gerrit.chromium.org/gerrit/4561 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
* Cleanup and preparation for inside-wrapper TPM refactoring.Randall Spangler2011-07-226-6/+13
| | | | | | | | | | | | | | | | | Add recovery reason for already in recovery and need to reboot to recovery to let the TPM init. Add vboot_struct fields. Fix type for keyblock flags param to SetTPMBootModeState(). BUG=none TEST=make && make runtests Change-Id: I4035bdb377aaebaca03a43799be57977166da739 Reviewed-on: http://gerrit.chromium.org/gerrit/4599 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Implement different strategy for soft-reset workaround on Kaen prototypes.Luigi Semenzato2011-07-221-46/+3
| | | | | | | | | | | BUG=chrome-os-partner:5071 TEST=check that factory flow works on Kaen prototypes without HW fix Change-Id: I56a830ed292d7e998fa25299f52d22d2faac3c77 Reviewed-on: http://gerrit.chromium.org/gerrit/4533 Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
* Fix script to use new key=value style /bin/verity argumentsGaurav Shah2011-07-211-6/+5
| | | | | | | | | | | BUG=chromium-os:17953 TEST=Run sign_official_build.sh verify from the chroot on an image, now it succeeds. Change-Id: Idd923716c95f4f12bd0a1236e2894af276e26d71 Reviewed-on: http://gerrit.chromium.org/gerrit/4499 Reviewed-by: Elly Jones <ellyjones@chromium.org> Tested-by: Gaurav Shah <gauravsh@chromium.org>
* Fix "tpmc help" description of pplockGaurav Shah2011-07-211-1/+1
| | | | | | | | | | BUG=none TEST=none Change-Id: I2a976f6e876ff7751a746ea89211795ab454e65d Reviewed-on: http://gerrit.chromium.org/gerrit/4458 Reviewed-by: Luigi Semenzato <semenzato@chromium.org> Tested-by: Gaurav Shah <gauravsh@chromium.org>
* Add check to validate VbSharedData magicNick Sanders2011-07-201-0/+7
| | | | | | | | | | TEST=run crossystem BUG=chrome-os-partner:4691 Change-Id: If590d185446dfa7cb628b5014f3a9a9c7b7a901d Reviewed-on: http://gerrit.chromium.org/gerrit/3355 Reviewed-by: Nick Sanders <nsanders@chromium.org> Tested-by: Nick Sanders <nsanders@chromium.org>
* CHROMIUM: fix incorrect crossystem recovery_reasonChe-Liang Chiou2011-07-201-7/+1
| | | | | | | | | | | | | | | | | | U-Boot should not parse the raw contents of VbNvStorage, and so cannot read the recovery reason from the VbNvStorage. On the other hand, it is easy for crossystem to read the recovery reason from the VbNvStorage itself. After this change is merged, U-Boot will stop providing the (incorrect) recovery reason in the device tree. BUG=chromium-os:17876,chromium-os:17852 TEST=press recovery button and see crossystem reports recovery_reason=2 Change-Id: I236667f0b4f2e25da193cf6b6f7db3871d1e093f Reviewed-on: http://gerrit.chromium.org/gerrit/4396 Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Change description of dev_boot_usbRandall Spangler2011-07-201-1/+1
| | | | | | | | | | | | Now indicates it covers SD as well (it did already, but now it's clearer). BUG=chromium-os:17907 TEST=run `crossystem`; look at new descriptions Change-Id: I4e4d8502b0dc5a29eb403039535b7512941ab4fa Reviewed-on: http://gerrit.chromium.org/gerrit/4408 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Clear the recovery request after each boot attempt which is allowed to failRandall Spangler2011-07-201-4/+9
| | | | | | | | | | | | | | The problem is that the recovery request was only being cleared when the firmware found a good image, not after a failed attempt was ignored. BUG=chromium-os:17846 TEST=see bug for manual test procedure Change-Id: I4c6b026bef477839def9bf2b0fed626a9922650f Reviewed-on: http://gerrit.chromium.org/gerrit/4352 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add indication to developer that dev_boot_usb is disabledRandall Spangler2011-07-191-50/+65
| | | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:5031 TEST=manual 1. crossystem dev_boot_usb=0 2. Boot with dev switch on and bootable USB device inserted 3. Press Tab. Should show dev_boot_usb: 0 4. Press Ctrl+U. Should beep twice 5. crossystem dev_boot_usb=1 6. Boot with dev switch on and nothing in USB/SD 7. Press Tab. Should show dev_boot_usb: 1 8. Press Ctrl+U. Should beep once Change-Id: Ie9b73f86d68337b48c1b859c7c6d76fcb72d13c2 Reviewed-on: http://gerrit.chromium.org/gerrit/4312 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Report mainfw_act based on VbSharedData780.BRandall Spangler2011-07-152-3/+20
| | | | | | | | | | | | | | | Don't use FDT to report it on ARM. This fixes ARM reporting the wrong thing for RO-normal. BUG=none TEST=none Change-Id: Id3a1bd2a1d2502e1d9493ab362be5a58fa88d70e Reviewed-on: http://gerrit.chromium.org/gerrit/4213 Reviewed-by: Olof Johansson <olofj@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add typecast to fix compiling in MSVCRandall Spangler2011-07-151-1/+1
| | | | | | | | | | BUG=none TEST=make && make runtests Change-Id: I774645c1059df70cd25ea6a3f78161eb916d7293 Reviewed-on: http://gerrit.chromium.org/gerrit/4192 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Randall Spangler <rspangler@chromium.org>
* crossystem: arm: use proper gpio referencesOlof Johansson2011-07-141-11/+24
| | | | | | | | | | BUG=none TEST=make sure developer switch and recovery switch runtime reading works as expected (manually) Change-Id: I3b17ac66f88b2b789bebe4e7d271666f8c63a8b0 Reviewed-on: http://gerrit.chromium.org/gerrit/4127 Reviewed-by: Olof Johansson <olofj@chromium.org> Tested-by: Olof Johansson <olofj@chromium.org>
* Fix compiler errorChe-Liang Chiou2011-07-141-1/+1
| | | | | | | | | | BUG=chromium-os:17304 TEST=make successfully Change-Id: Icebd25069a445960eb4e1e92f10dec195ea3fbf1 Reviewed-on: http://gerrit.chromium.org/gerrit/4152 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Che-Liang Chiou <clchiou@chromium.org>
* Add vboot support for RO-normal code path.Randall Spangler2011-07-147-62/+78
| | | | | | | | | | BUG=chromium-os:17304 TEST=make && make runtests Change-Id: I4d0f8afd516649fba67119845ec1c4479ba54c43 Reviewed-on: http://gerrit.chromium.org/gerrit/4065 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* arm: convert to new device tree usageOlof Johansson2011-07-141-102/+114
| | | | | | | | | | | | | This also includes reading the nonvolatile storage from disk instead of through the device-tree, since it's not updated there. BUG=none TEST=read and write a few crossystem variables Change-Id: I6836a6eb0c92a0560dd393e694690a694bdb77a6 Reviewed-on: http://gerrit.chromium.org/gerrit/4078 Tested-by: Olof Johansson <olofj@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* Add support for flags in the firmware preamble.Randall Spangler2011-07-1311-26/+125
| | | | | | | | | | | | | | | | | | The old (v2.0) parser is compatible with new (v2.1) structs. That is, this won't break existing firmware or vbutil_firmware. A new (v2.1) parser parsing an old (v2.0) struct will return 0 for the flags. This will be used to support the RO-normal code path in a subsequent CL. BUG=chromium-os:17304 TEST=added unit tests; make && make runtests Change-Id: I73bcd8acd3330b0d7d143061b5ef838e6d79cf1a Reviewed-on: http://gerrit.chromium.org/gerrit/4030 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Introduce arm fdt support in crossystem utilityRong Chang2011-07-111-172/+218
| | | | | | | | | | | | | | | | | | | | This CL builds upon recent changes in u-boot and kernel. (see issue ids: 15744, 16665) - Remove /sys/kernel/debug/chromeos_arm share memory mechanism - Load properties from /proc/device-tree/crossystem/* - Write NVCXT to /dev/mmcblk0:lba[0] BUG=chromium-os:17300 TEST=manual Run crossystem on device console. Check current values of gpio switches. All other values are exported from FDT directly. Change-Id: Ib8db4a4aeb6dc36308ad8882403cb2f5978a5c70 Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/3676 Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
* Add support for merged normal+dev firmwareRandall Spangler2011-07-114-37/+31
| | | | | | | | | | | | | | | BUG=chromium-os:17457 TEST=make && make runtests When this is merged into an actual firmware build, can test it: * dev switch off -> no dev screen, won't boot self-signed kernel * dev switch on --> dev warning screen, will boot self-signed kernel (e.g., it acts like the Cr-48) Change-Id: I985428256e48b7e05dd4d8fe582a0c0103bf5fb2 Reviewed-on: http://gerrit.chromium.org/gerrit/3901 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add support for dev_boot_usb flagRandall Spangler2011-07-116-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG=chromium-os:17433 TEST=make && make runtests. Additional manual tests: 0. Insert a valid dev-signed USB key. 1. Boot with dev switch off. `crossystem dev_boot_usb` should print 0. 2. Flip dev switch on. `crossystem dev_boot_usb` should print 0. Ctrl+U at dev screen should beep, but not boot USB. 3. Type `crossystem dev_boot_usb=1`. Should succeed. `crossystem dev_boot_usb` should print 1. 4. Reboot system. At the dev mode warning, press Ctrl+U System should boot from USB key `crossystem dev_boot_usb` should print 0. 5. Flip dev switch off. `crossystem dev_boot_usb` should print 0. 6. Flip dev switch on. `crossystem dev_boot_usb` should print 0. Note that this does not apply to Cr-48, Alex, or ZGB. Change-Id: Idf85fdd642f38f531c89e5fa5b1679e84936d4da Reviewed-on: http://gerrit.chromium.org/gerrit/3875 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Randall Spangler <rspangler@chromium.org>
* Vboot wrapper - add recovery reason, refactor timingRandall Spangler2011-07-0810-180/+175
| | | | | | | | | | | | | | | | | | | | | Pressing Tab at a firmware screen now displays real data, including the recovery reason, HWID, and contents of VbNvStorage. Entry point start/end time tracking in VbSharedData now refers to the new wrapper APIs. Added capability for calling firmware to request recovery mode (for example, if it's unable to initialize RAM, can't find the SSD, etc.). Previously, calling firmware had no (good) way to do this other than faking the recovery button being pressed. BUG=chromium-os:17018 TEST=emerge on x86 and tegra2_seaboard Change-Id: I7d377f279842b30a10d945d13571c41c464633f1 Reviewed-on: http://gerrit.chromium.org/gerrit/3814 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Vboot wrapper initial implementationRandall Spangler2011-07-0822-311/+908
| | | | | | | | | | | | | | | | | | Patch 1: Initial change Patch 2: Fix comment in vboot_struct.h Patch 3: Revert files unintentionally reverted Patch 4: (rebase) Patch 5: (rebase) Patch 6: Revert files unintentionally reverted (again) Patch 7: Fix mocked tlcl for ARM build BUG=chromium-os:17010 TEST=make && make runtests; works on H2C; emerge-tegra2_seaboard chromeos-bootimage compiles Change-Id: I6e5ce72d41b9297c07a3f330a881eba68cfabee2 Reviewed-on: http://gerrit.chromium.org/gerrit/3593 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Port vboot_reference to use new wrapper API utility functionsRandall Spangler2011-07-0816-136/+85
| | | | | | | | | | | | | | | | Third time's the charm. Now that we've moved to u-boot-next, this won't break the ARM build. BUG=chromium-os:17006 TEST=make && make runtests; emerge vboot_reference; emerge-tegra2_seaboard chromeos-bootimage Change-Id: Ib4fa26c7a23868dd2ffd2b321ee8dc08c66ea322 Original-Change-Id: I771085dcdf79d9592de64f35e3b758111a80dd9f Original-Reviewed-on: http://gerrit.chromium.org/gerrit/3263 Original-Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/3803 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* Fix compiler warning in vboot_referenceRandall Spangler2011-07-081-1/+1
| | | | | | | | | | BUG=none TEST=none Change-Id: I60089b4bfb5f4ba2f0df66f335794b3fed1495f3 Reviewed-on: http://gerrit.chromium.org/gerrit/3787 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Add string utility functions.Randall Spangler2011-07-085-0/+213
| | | | | | | | | | | | | These are used by the coming-soon vboot wrapper (vboot_api_kernel) to display debug information when Tab is pressed at a BIOS screen. BUG=chromium-os:17035 TEST=make && make runtests (runs new test!) Change-Id: I4893f31e9333f4e9d458a6e347213eef22f770cd Reviewed-on: http://gerrit.chromium.org/gerrit/3759 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Introduce GUID type for Chrome OS read/write firmware.Gabe Black2011-07-073-0/+5
| | | | | | | | | | | | | | | | | | This change teaches cgpt a new GUID type to be used for the Chrome OS read/write firmware. The GUID is CAB6E88E-ABF3-4102-A07A-D4BB9BE3C1D3. BUG=chrome-os-partner:4843 TEST=Built and installed on my host, used a separate change to repurpose partition 11 for the R/W firmware using cgpt and the "firmware" type, inspected the image using cgpt. Built and installed an image and used cgpt on the device to inspect it's GPT. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: I3b2801b2e1f71b3275bbddbc45fb63bde5bce5a7 Reviewed-on: http://gerrit.chromium.org/gerrit/3763 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org>
* Reduce race conditions in TPM initialization.Luigi Semenzato2011-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | With this change, the firmware creates and initializes the kernel space first, then the firmware space. Thus, if the initialization is interrupted (by cutting power) in between the two spaces, at the next boot the initialization path will be taken again, since it is triggered by a missing firmware space. A space creation succeeds when the space already exists (the space is removed and recreated), so this eliminates two races. There is still the possibility that the power is cut between creating the firmware space and initializing it, but let's assume it's not a problem until proven otherwise. (It won't be a security problem anyhow.) BUG=chromium-os:17049 TEST=none (too hard to reproduce the race) Change-Id: Iae4c1cc2b9a5056cb5d858e71b680e27a442357e Reviewed-on: http://gerrit.chromium.org/gerrit/3520 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Luigi Semenzato <semenzato@chromium.org>
* Revert "Verified boot wrapper - replace utility functions"Randall Spangler2011-07-0115-83/+137
| | | | | | | | | | | This reverts commit 0184886c8cb35e8e01d610622df448a7cb063e06 (This works with uboot-next, but not uboot, which doesn't implement its half of the new wrapper API. So rolling back to leave uboot working. Change-Id: I1f9e3c63e5bbdb20b9195cd68787bef89f24afee Reviewed-on: http://gerrit.chromium.org/gerrit/3588 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Verified boot wrapper - replace utility functionsRandall Spangler2011-07-0115-137/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is part 3 of the vboot wrapper API refactoring. It replaces the function calls to utility.c functions with new API calls. (It also fixes up some integer type mismatches in cryptolib that were causing warnings on the H2C build; those had been fixed a while ago in H2C but hadn't been propagated across.) This is a re-commit of the original; I've verified it compiles on both x86-alex and tegra2, for both vboot_reference and vboot_reference-firmware, now that the patch from 1c1a883bc746a6216bb634825d33d80562853020 is checked in. BUG=chromium-os:17006 TEST=make && make runtests, and emerged on both x86-alex and tegra2 Original-Change-Id: I771085dcdf79d9592de64f35e3b758111a80dd9f Original-Reviewed-on: http://gerrit.chromium.org/gerrit/3263 Original-Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit bd81b3a7d3b7fe4ca6179ade665e565800ab17fc) Change-Id: Iefdbfb3d10eb9aa385fb6dfc3bf0896f637cb64b Reviewed-on: http://gerrit.chromium.org/gerrit/3582 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* make_dev_ssd: support new %U parameterHung-Te Lin2011-07-011-5/+1
| | | | | | | | | | | | The %U is better since arm and x86 both supports it now. BUG=chromium-os:15683 TEST=./make_dev_ssd.sh # need latest kernel patch Change-Id: I94a6471788d3496cfa7ef263493e89877bb2b593 Reviewed-on: http://gerrit.chromium.org/gerrit/3551 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
* make_dev_ssd: fix ARM device namesHung-Te Lin2011-06-302-3/+25
| | | | | | | | | | | BUG=chromium-os:15061 TEST=(on arm) ./make_dev_ssd.sh --remove_rootfs_verification # works Change-Id: I0ed5e02cd566c89b2604a2e77b87413dc957471e Reviewed-on: http://gerrit.chromium.org/gerrit/3375 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
* crossystem: fix VbSharedDataHeader sizeHung-Te Lin2011-06-301-3/+1
| | | | | | | | | | | | | The content in VbSharedMem should be VbSharedData instead of FMAP. BUG=chromium-os:17168 TEST=crossystem # seeing correct value (the test need a u-boot with fix included) Change-Id: I3d7d1eb2b35c9475c2047e9479cee69464da20b1 Reviewed-on: http://gerrit.chromium.org/gerrit/3436 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
* Revert "Verified boot wrapper - replace utility functions"mukesh agrawal2011-06-2715-83/+137
| | | | | | | | | This reverts commit bd81b3a7d3b7fe4ca6179ade665e565800ab17fc. Change-Id: I2be2c076a37bf0e49569248691fceac417254f0b Reviewed-on: http://gerrit.chromium.org/gerrit/3295 Reviewed-by: mukesh agrawal <quiche@chromium.org> Tested-by: mukesh agrawal <quiche@chromium.org>
* Fix ARM build for vboot_reference crossystem libRandall Spangler2011-06-272-6/+6
| | | | | | | | | | BUG=none TEST=none Change-Id: I655cd69a0e1d2a3ad6ce9f326cbd989fc8ecb43d Reviewed-on: http://gerrit.chromium.org/gerrit/3270 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Verified boot wrapper - replace utility functionsRandall Spangler2011-06-2715-137/+83
| | | | | | | | | | | | | | | | This is part 3 of the vboot wrapper API refactoring. It replaces the function calls to utility.c functions with new API calls. (It also fixes up some integer type mismatches in cryptolib that were causing warnings on the H2C build; those had been fixed a while ago in H2C but hadn't been propagated across.) BUG=chromium-os:17006 TEST=make && make runtests Change-Id: I771085dcdf79d9592de64f35e3b758111a80dd9f Reviewed-on: http://gerrit.chromium.org/gerrit/3263 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Verified boot wrapper - add stub implementations for hostRandall Spangler2011-06-2735-313/+479
| | | | | | | | | | | | | | | This is part 2 of the wrapper API refactor. It adds stub implementations for the host, and changes the host-side utilities to use them. Firmware implementation is unchanged in this CL (other than a few updates to macros). BUG=chromium_os:16997 TEST=make && make runtests Change-Id: I63989bd11de1f2239ddae256beaccd31bfb5acef Reviewed-on: http://gerrit.chromium.org/gerrit/3256 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Vboot wrapper API - crossystem and header filesRandall Spangler2011-06-278-12/+72
| | | | | | | | | | | | | | | | Header file changes for wrapper API implementation Crossystem support for reading recovery reason from VbSharedData, and explicit support for version 1 VbSharedData structs. BUG=chromium-os:16970 TEST=make && make runtests; run crossystem on Alex and make sure it still reports recovery_reason in recovery mode. Change-Id: I15195b899583e425d3c9e8df09842d764528e2cb Reviewed-on: http://gerrit.chromium.org/gerrit/3203 Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* Produce better error message when TPM device cannot be opened.Luigi Semenzato2011-06-241-3/+1
| | | | | | | | | | BUG=chromium-os:16925 TEST=run "tpmc getvf" before stopping tcsd and observe that the error message no longer says "forgot to call TlclLibInit()" Change-Id: I867c010c07286c0aa4cec49dda60524de1c2bec1 Reviewed-on: http://gerrit.chromium.org/gerrit/3147 Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Vboot wrapper APIRandall Spangler2011-06-231-0/+519
| | | | | | | | | | | | | New APIs for the wrapper funtions (VbSelectFirmware() and VbSelectKernel()) and the APIs for the firmware services they need. BUG=none TEST=none Change-Id: Id8ddc456d062095b12495dd534e21342b5490aee Reviewed-on: http://gerrit.chromium.org/gerrit/2195 Reviewed-by: Gaurav Shah <gauravsh@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
* make: remove typo quote marksChe-Liang Chiou2011-06-211-2/+2
| | | | | | | | | | BUG=chromium-os:16808 TEST=run "make FIRMWARE_ARCH=arm" and make sure CFLAGS are set properly Change-Id: I4cd5d8d03dabf256706a2961b6776c64c03c72ac Reviewed-on: http://gerrit.chromium.org/gerrit/2966 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Che-Liang Chiou <clchiou@chromium.org>