summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_ui_menu.c
Commit message (Collapse)AuthorAgeFilesLines
* detachables: create menu items for legacy screensstabilize-10176.65.Bstabilize-10176.58.Bstabilize-10176.54.Bstabilize-10176.47.Bstabilize-10176.13.Brelease-R64-10176.BShelley Chen2017-11-231-2/+18
| | | | | | | | | | | | | | | | | Previously, we didn't require any action on these legacy screens, so didn't update current_screen when displaying these. Now, will be adding language switching and debug display for these screens, so need to keep track of them. BUG=b:65470853, b:67371896, b:64400036 BRANCH=None TEST=None Change-Id: I2bab22fcbb0bb3cdfffe585eb633231ba8015fc3 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/676269 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Fix vboot compilation with coreboot-sdkStefan Reinauer2017-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | BUG=none BRANCH=none TEST=Upstream builder does not fail with uninitialized variable anymore like this: firmware/lib/vboot_ui_menu.c: In function 'vb2_get_current_menu_size': firmware/lib/vboot_ui_menu.c:255:15: error: 'temp_menu' may be used uninitialized in this function [-Werror=maybe-uninitialized] *menu_array = temp_menu; ~~~~~~~~~~~~^~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Change-Id: Idb1690c7b0becf3556cad379160fe152707ae843 Reviewed-on: https://chromium-review.googlesource.com/777805 Commit-Ready: Stefan Reinauer <reinauer@google.com> Tested-by: Stefan Reinauer <reinauer@google.com> Reviewed-by: Martin Roth <martinroth@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org>
* detachables: Use Volup+Voldown to exit recovery graphicfactory-fizz-10139.BShelley Chen2017-11-161-7/+11
| | | | | | | | | | | | | | | | | | Previously, we were able to exit the initial recovery graphic with either the volume up or volume down button. However, we would only like the user to exit the screen when they know what they are doing, we are making it so that they can only intentionally exit (with volup + voldown simultaneously pressed). BUG=b:67371896 BRANCH=None TEST=reboot into recovery and press volume up + volume down keys. Make sure we exit to the recovery menu screen. Change-Id: I7dfb4a0e42c8b88e9b075e886cea1adfe248246c Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/766847 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Implement disable dev mode for enterpriseShelley Chen2017-11-161-101/+36
| | | | | | | | | | | | | | | | | | | | | When develper mode is disabled (through FWMP), don't allow user to see the dev warning screen. Boot straight to TO_NORM and disable the cancel option. Basically, the user will only be able to enable OS verification, power off, or change the language. There is also no 30 second timeout during bootup. BUG=b:65595945 BRANCH=None TEST=Force disable_dev_boot flag to 1 and ensure the TO_NORM menu is displayed w/o a cancel option. Scroll through options to make sure they work as expected. Make sure debug message is displayed indicating dev mode is disabled. Wait > 30 secs to ensure timeout doesn't occur. Change-Id: I7d2bcd369694e886866f9dedff05d81a40f8270a Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/757115 Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot_ui_menu: Use volume down short press at recovery menu screenFurquan Shaikh2017-11-141-1/+1
| | | | | | | | | | | | | | | | | Fix the typo made in https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/757123 for usage of volume down button at recovery menu screen. It should be short press instead of long press. BUG=b:64992445,b:65013794 BRANCH=None TEST=Verified that volume down short press works as expected on recovery menu. Change-Id: Ia9a172439ac3bbd1ea395778e83a95c988816e01 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/767059 Reviewed-by: Shelley Chen <shchen@chromium.org>
* buttons: Update button codes for vup, vdn and powerFurquan Shaikh2017-11-091-9/+11
| | | | | | | | | | | | | | | | | | | 1. Differentiate button codes for short press and long press of volume up and volume down. 2. Add a new code for volume up-down combo press since it is expected to be used for one of the firmware screens. 3. Treat volume down long press as Ctrl-D on developer screen. 4. Treat volume up long press as Ctrl-U on developer screen. CQ-DEPEND=CL:756254 BUG=b:64992445,b:65013794 BRANCH=None TEST=Verified that buttons work as expected on Soraka. Change-Id: I5d443f43f785b973f3ff4aeaac52b152ed2fe0bd Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/757123 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
* Call VbExEcRunningRW to set IN_RW flagDaisuke Nojiri2017-10-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | CL:693008 changed check_ac_active so that we ask CR50 to verify EC is in RO. While this is the right decision, on some platforms ECs can't reset EC_IN_RW. This causes check_ec_active to set IN_RW wrongly when EC is in RO after reboot. This patch replaces VbExTrustEC with VbExEcRunningRW. If RW is owned it may say it's in RO. Then, the software sync will proceed and flash RW while the EC is running RW copy. It also removes redundant checks for VbExTrustEC() when deciding whether to allow developer mode to be enabled from the INSERT screen. The INSERT screen can only be reached by manual recovery, which resets the EC, we don't need to check again before going to TODEV. BUG=b:67976359 BRANCH=none TEST=make runtests Change-Id: Ide722146ca8683411dd9072a39387aa9531f6cfc Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/740878
* detachables: Remove screen blankingShelley Chen2017-10-261-5/+0
| | | | | | | | | | | | | | | This is not necessary anymore and rendering is taken care of in depthcharge. BUG=b:35585623 BRANCH=None TEST=reboot and scroll through menus and make sure that rendering is still good. Change-Id: I078751014c8f84fb2ee403b6895e9dfa58e758d6 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/731114 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* detachables: Print error if enable normal mode when FORCE_DEV onShelley Chen2017-10-201-13/+28
| | | | | | | | | | | | | | | | | | Print a debug error and beep when user tries to enable normal mode when FORCE_DEV gbb flag is enabled. BUG=b:67828898 BRANCH=None TEST=Boot up with gbb flag 0x8 enabled. Select "Enabled OS Verification" and select confirm. Should see error message printed and a beep. Confirm switching to normal mode screen will not appear. Change-Id: Ic02558eb4a86555cebc9c1cd6972d0f0600b4ff1 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/730415 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot_ui_menu: Checking vb2_update_menu return valueShelley Chen2017-10-181-0/+2
| | | | | | | | | | | | | | If return value is not VBERROR_SUCCESS, return with an error. BUG=None BRANCH=None TEST=None Change-Id: I1402277567b901701cdd68d74968e43e838c89da Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/707496 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Check EC_IN_RW before proceeding to recovery modeDaisuke Nojiri2017-10-051-11/+4
| | | | | | | | | | | | | | | | | | | | | | Depthcharge currently asks EC whether recovery was requested manually or not without verifying EC is in RO or not. If EC-RW is compromised, recovery switch state can be spoofed. This patch makes Depthcharge check EC_IN_RW to determine whether EC is in RO or not. Only if it's in RO and it says recovery button was pressed at boot, we proceed to the recovery process. All other recovery requests including manual recovery requested by a (compromised) host will end up with 'broken' screen. BUG=b:66516882 BRANCH=none TEST=Boot Fizz. make runtests. Change-Id: I01d2df05fe22e79bbc949f5cb83db605147667b3 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/693008 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* vboot: Handle power button press in broken screenDivya Chellap2017-10-051-2/+7
| | | | | | | | | | | | | | | | | | power button press is not being handled in broken screen (VB_SCREEN_OS_BROKEN) if the user wants to exit out of it. BUG=none BRANCH=none TEST=verified power button key functionality in broken screen in Soraka board Change-Id: I64cbb79479e3e0579aeec4e87894441acf26c9fa Signed-off-by: Divya Chellap <divya.chellappa@intel.com> Reviewed-on: https://chromium-review.googlesource.com/674886 Commit-Ready: Divya Chellappa <divya.chellappa@intel.com> Tested-by: Divya Chellappa <divya.chellappa@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
* detachables: fix setting selected_idx of DEV_WARNING menuShelley Chen2017-09-151-1/+1
| | | | | | | | | | | | | | | Selecting cancel from DEV_MENU should not set the selected_idx to loc. It should be set to power off. BUG=b:35585623 BRANCH=None TEST=go to DEV_MENU, hit cancel and make sure that power off is selected item Change-Id: I8cae397c7174b5bd52a3a27736cd3d5a57412e63 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/667933 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Set TO_DEV menu's default selection to cancelShelley Chen2017-09-151-7/+10
| | | | | | | | | | | | | BUG=b:65546569 BRANCH=None TEST=Boot into recovery, selection Disabled OS Verification. Ensure that in next menu, Cancel is selected. Also, setting default for TO_NORM menu to Confirm. Change-Id: Ibf72ec15aa38b1b815be97a08cfe7c9ee2615390 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/665356 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Ensure keyboard input in TO_DEV menu trustedShelley Chen2017-09-151-3/+16
| | | | | | | | | | | | | | | | | | Add in check at TO_DEV menu screen to make sure that the navigation keys (up/down, volup/voldown) are trusted. Beep when user tries to use unstrusted keys (usb keyboard) in the TO_DEV menu so that the user knows they're doing something wrong. USB keyboard return key will still work in the TO_DEV menu. BUG=b:65546569 BRANCH=None TEST=test out using up/down keys in TO_DEV menu and make sure that they are disabled and hear beeps. Change-Id: Ifc7183c7ca35efaf079abb196a90ab7305380642 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/665355 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Disable Network Boot OptionShelley Chen2017-09-131-0/+3
| | | | | | | | | | | | BUG=b:65595963 BRANCH=None TEST=enabled Dev mode, reboot, select developer options & make sure Network Boot doesn't appear in menu. Change-Id: I30953d037740259b06011ecb141d508db114b79e Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/664298 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Power button turns off device on RECOVERY_INSERT screenShelley Chen2017-09-131-11/+11
| | | | | | | | | | | | BUG=b:64400325 BRANCH=None TEST=boot up into recovery, press power button ensure device shuts down. Change-Id: Ia8e6e91921e81692a2e57b1f77163c656b56ea85 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/646488 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Display recovery insert icon at recovery startupShelley Chen2017-08-211-8/+28
| | | | | | | | | | | | | | | | | | | | | When user first starts up recovery (3 finger salute), display usb insert instructions and original insert graphic until user starts pushing volume buttons. If the user pushes power button during while the icon is displayed (no menu items), device will shut down (this is to accomodate users that accidentally enter the recovery screen and want to exit quickly). Upon user pressing the volume buttons, the insert icon will disappear and user will see the menu items and be able to scroll up/down. BUG=b:64400325 BRANCH=None TEST=boot into recovery. Make sure graphic shown until start pushing volume buttons. Change-Id: I4a5001271a0b84d1237d4bbc6a098afa10cb9372 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/617600 Reviewed-by: Julius Werner <jwerner@chromium.org>
* lib/vboot_ui_menu: Consider volume buttons in vb2_update_selectionFurquan Shaikh2017-08-181-0/+2
| | | | | | | | | | | | | | | | | vb2_update_selection considered only KEY_UP and KEY_DOWN inputs to update the selection. This resulted in volume buttons not working on firmware screen to update the selection. Add volume buttons as valid inputs in vb2_update_selection. BUG=b:64839396 BRANCH=None TEST=Verified that volume buttons work on firmware screen. Change-Id: I08bfa91eafb170fb450649a2abaafe7f4d58e17b Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/621787 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org>
* detachables: Skip "Enable Developer Mode" in DEV modeShelley Chen2017-08-141-69/+107
| | | | | | | | | | | | | | | | | | | | When DUT is already in dev mode, don't let user select the "Enable Developer Mode" selection in the menu. Add disabled_idx_mask to VbExDisplayMenu API to allow for disabling of menu items in the future if needed. BUG=b:63078243, b:35585623 BRANCH=None TEST=reboot into recovery with DUT already in dev mode. Make sure can't scroll to "Enable Developer Mode: entry. reboot into recovery with DUT in normal mode. Make sure "Enable Developer Mode" entry is selectable. CQ-DEPEND=CL:565335 Change-Id: Ic71fe6aa2e41337787a0c2278f729356edb155fd Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/598430 Reviewed-by: Julius Werner <jwerner@chromium.org>
* detachables: Select power off after language selectionShelley Chen2017-08-011-3/+22
| | | | | | | | | | | | | | | | | | Set current selection to power off after exiting the languages menu. Previously, we were just defaulting to selecting the 0 index. However, this won't work anymore if we hide the "Enable Developer Mode" entry in the recovery menu due to that entry being at the 0th index. BUG=b:63078243, b:35585623 BRANCH=None TEST=Boot into recovery when machine in normal mode. Select languages menu, make language selection and make sure that when return to recovery menu, power off item is selected. Change-Id: I479c2270ca99197fd8c44386ab1ca4526ae7d64a Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/565527 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* detachables: Fix language menu size in recoveryShelley Chen2017-06-221-4/+9
| | | | | | | | | | | | | BUG=b:35585623 BRANCH=None TEST=Reboot into recovery, scroll to language menu and make sure that you can scroll and select other languages. Change-Id: I6fe7f0550b05e33eaeef928cd23932f5a40fe9ad Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/544897 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* detachables: Remove locale switch on up arrowShelley Chen2017-05-271-8/+0
| | | | | | | | | | | | | | | This was old code that switched locale when pressing up arrow. BUG=b:35585623 BRANCH=None TEST=Boot to recovery and make sure up arrow doesn't change the locale. Change-Id: Ibb4d2785170a2e36d599e4af56de3dfd922c5957 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/517283 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* detachables: Adding language selection menuShelley Chen2017-05-271-15/+64
| | | | | | | | | | | | | | Handle displaying of language menu. BUG=b:35585623 BRANCH=None TEST=Reboot and select Language from menu, select language and make sure displays menu items in current language. Change-Id: I518021c5278895e95cb4afdde044091c5bec7233 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/477093 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* detachables: Reset timer every time user moves the cursorShelley Chen2017-05-261-0/+6
| | | | | | | | | | | | | | | In dev mode, after 30 seconds of inactivity, we'll get the usual loud beep and automatic boot from disk. BUG=b:35585623 BRANCH=None TEST=reboot and make sure that fw screen timeout only occurs after 30 seconds of inactivity. Change-Id: Id6552f7213a52ed8c0f083a8388719a8fe79fa77 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457841 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* detachables: Use locale bitmaps instead of textShelley Chen2017-05-261-37/+25
| | | | | | | | | | BUG=b:35585623 BRANCH=None TEST=reboot and make sure that the bitmaps show up Change-Id: I92a9cf7dc808a22c7ace25763d4ef49824a93054 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457840
* detachables: New code path for displaying detachable menusstabilize-9592.82.Bstabilize-9592.67.Bstabilize-9592.55.Bstabilize-9592.15.Brelease-R60-9592.BShelley Chen2017-05-251-0/+28
| | | | | | | | | | | BUG=b:35585623 BRANCH=None TEST=None CQ-DEPEND=CL:457863 Change-Id: Ib2f8d93334cecfd80169842994ea7561baf41378 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457839
* vboot_ui_menu: Show Developer options on USB failureRizwan Qureshi2017-05-231-0/+2
| | | | | | | | | | | | | | | | | | | | | In the current implementation, if the boot from USB fails after pressing Ctrl-U or selecting "Boot USB Image", only a blank screen is shown instead of a menu. There is no option for the user to do anything else except wait for the timeout, after which boot from fixed disk is attempted. This does not seem like an intuitive boot flow. Hence, if the USB boot fails display the current menu, allowing the user to attempt something else. BUG=None BRANCH=None TEST= verfied that menu is displayed on USB boot failure from developer screen. Change-Id: Ide3967be7bba3d87c8a545a0f4ed52da44150fd0 Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com> Reviewed-on: https://chromium-review.googlesource.com/509671 Commit-Ready: Rizwan Qureshi <rizwan.qureshi@intel.corp-partner.google.com> Tested-by: Rizwan Qureshi <rizwan.qureshi@intel.corp-partner.google.com> Reviewed-by: Shelley Chen <shchen@chromium.org>
* poppy: center detachable menu textstabilize-M58-9334.41.0.Bstabilize-9334.58.Brelease-R58-9334.BShelley Chen2017-03-021-2/+6
| | | | | | | | | | | | BUG=b:35585623 BRANCH=None TEST=reboot and make sure menu is centered in fw screen CQ-DEPEND=CL:447818 Change-Id: I7ce5063adab978338af18ad2befe65107fdea21f Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/447838 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: Disable arrow keys for language switchShelley Chen2017-03-021-2/+0
| | | | | | | | | | | | | | | | Previously, could use arrow keys to change language in fw screen. Disabling this in detachable menu because will be using menu to switch languages. BUG=b:35585623 BRANCH=None TEST=reboot and try to use right/left arrows. Make sure they don't do anything. Change-Id: Ic720ea4ec9e6b7ae1676fdf60d27e2c74e48f736 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/444945 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: use return key for selectionShelley Chen2017-03-021-9/+2
| | | | | | | | | | | | | | Replacing right arrow key with return for selection when keyboard is available because it's more obvious. BUG=b:35585623 BRANCH=None TEST=reboot and make sure return selects menu item. Change-Id: I6b2fbd8cddcd98c49638a6b9d79b47da1ca6545f Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/444944 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: reinstating fw ctrl functionsShelley Chen2017-03-021-0/+43
| | | | | | | | | | | | | | | Putting ctrl+D, ctrl+U, ctrl+L shortcuts back in from the fw screens. BUG=b:35585623 BRANCH=None TEST=reboot and try ctrl+D, etc. in fw screen to make sure that they have desired effects. Change-Id: I5ca555658eddabeeea6a2f64794e6839f35d75f7 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/443349 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* vboot_ui_menu: getting rid of explicit function printShelley Chen2017-03-021-50/+39
| | | | | | | | | | | | | | | Since we're now using VB2_DEBUG, no need to explicitly print out __func__ anymore. BUG=b:35585623 BRANCH=None TEST=reboot and make sure still see serial output in AP console. Change-Id: Ica524d4e50c61681e466815ffb93d33ceee215aa Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/443348 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: replacing dev warn & rec screens with baseShelley Chen2017-03-021-9/+9
| | | | | | | | | | | | | | | Using new base screen only and leaving center blank for displaying the detachable menu items. BUG=b:35585623 BRANCH=None TEST=reboot and make sure icons don't show up in FW screens. Change-Id: I705dac43441f386ebceb58533fa0e336541fcd3c Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/442692 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: Highlight menu selectionShelley Chen2017-02-271-21/+10
| | | | | | | | | | | | | | | Reverse foreground/background colors for highlighted selection. BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and make sure selection is highlighted CQ-DEPEND=CL:442747 Change-Id: Iaf33cf6140a3ce774a67e3ac7d381d5e05feeddb Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/442690 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: initializing next_menu_idx to current_menu_idxShelley Chen2017-02-111-1/+1
| | | | | | | | | | | | | Get rid of uninitialized variable warning. BUG=chrome-os-partner:61275 BRANCH=None TEST=make cgpt WERROR= STATIC=1 Change-Id: I31faa557406c6a90cfdea8571620675c81c0c0ec Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/440432 Reviewed-by: Hung-Te Lin <hungte@chromium.org>
* poppy: Converting all // comments to /* */Shelley Chen2017-01-301-64/+70
| | | | | | | | | | | | | Also, ensuring comments start with capital letter. BUG=chrome-os-partner:61275 BRANCH=None TEST=None. No functionality change. Change-Id: I961236e2b6d95cf0281cd4e3313f465bf12ead9f Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/434250 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: Moving menu placement higherShelley Chen2017-01-301-1/+1
| | | | | | | | | | | | | | Prevent scrolling off for low res displays BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot snappy and make sure menu doesn't cause screen to scroll. Change-Id: Ic5641c7c43ab3872dcb321df2629e228e86ddbb6 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/434249 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: Check NULL menu_array params in vb2_get_current_menu_size()Shelley Chen2017-01-301-1/+2
| | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=None Change-Id: I1d88e552a4c9184061207a8e14e32dfb1a39745a Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/434248 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* poppy: Adding kernel-doc commentsShelley Chen2017-01-301-5/+40
| | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=None. No functionality change. Change-Id: I00bb1924e22f398e1b614789dd0cd068ce51cc5d Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/434247 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* firmware: Using power button for selectionShelley Chen2017-01-241-0/+8
| | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and try to make selections in detachable UI with power button. Change-Id: I0a3178eb3fa2c8c1ed77d96fdefa948eaea508e5 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/427220
* firmware: Prevent wraparound when scrolling through menusShelley Chen2017-01-241-5/+10
| | | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and scroll to ends of menus to make sure that they don't wraparound. Change-Id: I9ba83b23939140d23fe54858b9a10f873091ff72 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/426410 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* firmware: set fw screen default selectionShelley Chen2017-01-241-74/+95
| | | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and scroll through menus to make sure defaults to power off in all menus. Change-Id: I21e6c24c43a46e9e79001857c1dec9869a07d61a Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/426409 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* firmware: Adding vol up/down ascii definitionsShelley Chen2017-01-241-0/+4
| | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=test vol up/down keys and see if menu changes. Change-Id: I2213639d530f954f12040b14bf2e5cdeb5c03218 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/426408 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* firmware: fixing menu artifacts during printingShelley Chen2017-01-181-2/+9
| | | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and switch menus and make sure everything is printing out properly. Change-Id: I1269d3dc762a66dde0203673b7b400aba92afa75 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/424356 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* firmware: adding support for language menuShelley Chen2017-01-181-0/+57
| | | | | | | | | | | BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot and try selecting language menu. Change-Id: I3ec208578aec0ccaa92e17e4589ebeae250dae4f Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/424355 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* firmware: Add recovery menu support for detachablesShelley Chen2017-01-181-64/+176
| | | | | | | | | | | | | Adding in basic menu support (using arrow keys) for detachables. This is specifically for the recovery menu. BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot into recovery and try booting into developer mode. Change-Id: I9596cde62f2748928b4b796bde0a0226dc981235 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/424354
* firmware: Add developer menu support for detachablesShelley Chen2017-01-181-0/+814
Adding in basic menu support (using arrow keys) for detachables, which do not have keyboards. Thus, we can only do menu scrolling rather than the old ctrl+D/U/L way. This is specifically for the developer warning menu. BUG=chrome-os-partner:61275 BRANCH=None TEST=reboot system and try scrolling through menu Change-Id: I39f56f5ca2fedd47df53ab246ec357d07c9c4af0 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/424353 Reviewed-by: Randall Spangler <rspangler@chromium.org>