depthcharge: add functions to improve dev mode switch security

Add VbExKeyboardReadWithFlags() and VbExGetSwitches()
and read the recovery button state directly from hardware.
Also pass the VB_INIT_FLAG_VIRTUAL_REC_SWITCH at init
as appropriate.

These changes make it possible for vboot to avoid some
dangerous opportunistic exploits that could put the device
in developer mode without the owner intending to do so.

BUG=chrome-os-partner:21729
TEST=compiles
BRANCH=none
CQ-DEPEND=CL:182241,CL:182946,CL:182357

Change-Id: Ied1e59684517c0125be029f575be282fdb2db8a3
Reviewed-on: https://chromium-review.googlesource.com/183052
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
8 files changed