Age | Commit message (Collapse) | Author |
|
BUG=chromium-os:24151
TEST=verify ME hash in the OS
Change-Id: I752bdb9e7fedc3a25772ba33b00d981b9e3db4b0
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13994
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
|
|
U-boot is unable to actually use that memory and it can
cause problems with relocation if it tries to.
BUG=chrome-os-partner:6730
TEST=successfully boot on stumpy with a memory map
that ends up having 6MB remapped above 4GB.
Change-Id: I9ecde227bc0337145a7c0a6a929cfe0636fc2178
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13923
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
|
|
dev_cfg is used by vboot_reference, hence we can't store our
u-boot environment there anymore. So create a section rw-environment
for that purpose.
Signed-off-by: Stefan Reinauer <reinauer@google.com>
BUG=chrome-os-partner:7264
TEST=boot tested on Stumpy
Change-Id: I15479f0f1a2aa111b742d2792052f48d660d122c
Reviewed-on: https://gerrit.chromium.org/gerrit/13022
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
|
|
When keys are pressed on the numeric keypad, emit key codes for the numbers,
operators, dot and enter.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:7436
TEST=On lumpy with USB keyboard activated, boot in dev mode and press
enter (on the numeric keypad) to boot.
Change-Id: I4a50a26c8dca17c015743c16475833447769765b
Reviewed-on: https://gerrit.chromium.org/gerrit/13890
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
|
|
This fixes the breakage introduced by
https://gerrit.chromium.org/gerrit/#change,13371
BUG=none
TEST=emerge-stumpy chromeos-u-boot does not fail anymore
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Change-Id: If969ea2aab6a29d6c22053a63ef1b155d3fb42fa
Reviewed-on: https://gerrit.chromium.org/gerrit/13842
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
|
|
Rather than requesting the burst length on every transaction, just do it
at the start.
This saves 30ms on Kaen (TPM time now 325ms).
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I8a1b028882c28cd6089c2f7514bee285ef349f24
Reviewed-on: https://gerrit.chromium.org/gerrit/13374
Reviewed-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Add debugging options around most transactions.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I71dd48b59a4eefd39eccc29b61bfcd512d63aa56
Reviewed-on: https://gerrit.chromium.org/gerrit/13376
Reviewed-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The TPM fails every second transaction because it goes to sleep and fails
to wake up in time. Add stats for how many transactions are performed
and the number of retries required for each.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I079da55e71e637e3afdacfe38c27b8742da09dc5
Reviewed-on: https://gerrit.chromium.org/gerrit/13373
Reviewed-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
This allows booting without a display, mostly as a way of calculating
the time that LCD init and maintenance costs us. Perhaps we might
integrate the lcd and video APIs within U-Boot - it would be a much
nicer solution. With that in mind I feel it is not work refactoring
this into three separate (lcd, video, none) files to implement the
display API.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Iea4656f8939f7f2fd78292827091de4ee379954b
Reviewed-on: https://gerrit.chromium.org/gerrit/13369
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
|
|
Since burst_length is now set up at init time, it can never be < 0, and
we don't need to write the last byte in a separate I2C transaction.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I0050dd49ba151ee267f2790b550c0ffea4cd976f
Reviewed-on: https://gerrit.chromium.org/gerrit/13375
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
This behaviour is not expected, so remove it. For devs the fdt config
option bootstage-force-report is provided to generate this report.
BUG=chromium-os:20020
TEST=build and boot on Kaen, see that message does not appear
Change-Id: I0394aacfbfed79594dbe44157a557562c2947345
Reviewed-on: https://gerrit.chromium.org/gerrit/13378
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The intent is for LCD init to happen such that we never need to call
udelay(). Add tracking that this is indeed the case, and report it
with the boot time report.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I78e458a6b878a4237e4e059525bae4fa47844ed9
Reviewed-on: https://gerrit.chromium.org/gerrit/13377
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Indent all but the top-level messages which indicate a new transaction.
This makes it much easier to follow the debug trace.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I3259c4e266f87ce4da8ce590f837542e5b219539
Reviewed-on: https://gerrit.chromium.org/gerrit/13372
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Records the total time taken by TPM operations for display as part of the
bootstage report.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I7ce6efa3c2bb90858d17ab6613724e6ae73d918b
Reviewed-on: https://gerrit.chromium.org/gerrit/13371
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
This adds a new type of boot timer, which records the time taken by
an operation, rather than marking the instant when it occurred. This
is useful to track the amount of time spent in a repeating activity
during boot.
To use this, call bootstage_start() at the start of the activity, then
bootstage_accum() at the end, to add this segment of time to the total.
You can call them (start first, then accum) as many times as you like.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I3f1b536dc140c91a4a780188f6974dc37780f4f0
Reviewed-on: https://gerrit.chromium.org/gerrit/13370
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
While we wait for the new relocation stuff to come down from upstream,
this uses memset/memcpy() to do the business. Saves about 20ms on boot.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I958b9f53f27c67d4da2fa0f7a2148c59ed48f7aa
Reviewed-on: https://gerrit.chromium.org/gerrit/13215
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The mmc0_tftpboot option reads a kernel using TFTP but then boots from
eMMC. This allows kernel development without resorting to NFS root (which
changes some parts of the boot process).
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I23c0890f76dc63dde128d7137d8891341761c884
Reviewed-on: https://gerrit.chromium.org/gerrit/13280
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The vboot command makes sure that the LCD init is completed so we don't
need this in board_late_init().
Overall the LCD init optimization reduces boot time by about 150ms.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Idcefb81108d0499bb208f8b3d90df65ca4cb6349
Reviewed-on: https://gerrit.chromium.org/gerrit/13206
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
LCD final init is now kept in board_late_init(), so we need to enable
this feature in the config.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Ib895c2768359439349714805cea6ff636c2307b3
Reviewed-on: https://gerrit.chromium.org/gerrit/13214
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
We need to make sure that the LCD is ready before we complete booting, so
put this code into board_late_init().
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I97bd1fce6ac93d0639dd8fdb17bf83e8a78d2645
Reviewed-on: https://gerrit.chromium.org/gerrit/13213
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Prior to relocation it is expensive to find out the LCD dimensions. Instead
we select the maximum possible size and allow lcd_ctrl_init() to correct
this later.
This works since the only purpose of this early init is to set the LCD
frame buffer size. So long as we set it to the largest value that could
possible be requested, all will be well.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I850ee5cb2b6bf051e32c6a52c42c368a940ea045
Reviewed-on: https://gerrit.chromium.org/gerrit/13212
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The LCD init takes place over five stages. We want to hide this init
behind other operations, so turn it into a state machine which we can
call at any time.
For now, call it in lcd_enable().
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Ia0b50ec74108ac4e015de12b7a9628426ea17656
Reviewed-on: https://gerrit.chromium.org/gerrit/13211
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The interrupt endpoint handling code stores the buffer pointer in the QH
padding field. We need to make it the size of a pointer to avoid strict
aliasing issue with the compiler.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chromium-os:24760
TEST=emerge-lumpy chromeos-u-boot ; emerge-tegra2_kaen chromeos-u-boot
Change-Id: Iecbfa0610591d24452106b79de61abb033c36f2e
Reviewed-on: https://gerrit.chromium.org/gerrit/13732
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
|
|
Some USB keys are very slow at answering the initial GET_DESCRIPTOR or
SET_ADDRESS request.
I have encountered a couple of USB keys which take respectively 140ms
and 230ms to send back their data packet on such a request, and thus
fail with the current code.
According to the USB2.0 standard 9.2.6.4, the device should answer the
standard device requests (e.g. GET_DESCRIPTOR or SET_ADDRESS) in less
than 500ms, so let's increase the control endpoint timeout to that
value.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:7344 chrome-os-partner:7345
TEST=boot a recovery image from the 2 previously non working keys.
(Lexar JUMPDRIVE TwistTurn LJDTT32GASBNA and USB M316 Aquarium Tutle)
Change-Id: I00ffb11810ac538bae4622ecba7edd2388d592b2
Reviewed-on: https://gerrit.chromium.org/gerrit/13716
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
|
|
The GetReport request isn't implemented in all keyboards, so
use interrupt transfers instead.
BUG=chrome-os-partner:5752
TEST=Use USB keyboard in u-boot (recovery mode)
Change-Id: Ided3289ef86ee9899813582c9f137526399ad2f8
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: https://gerrit.chromium.org/gerrit/13491
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
|
|
BUG=chrome-os-partner:5752
TEST=Use USB keyboard in u-boot (recovery mode) with later
commit that enables this code
Change-Id: I60ee2ef94ef0aca9009b9fa6a370d7e4e0536753
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: https://gerrit.chromium.org/gerrit/13490
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
|
|
Interrupt transfers aren't meant to be used from the async list
(the EHCI spec indicates trouble with low/full-speed intr on async).
Build a periodic list instead, and provide an API to make use of it.
Then, use that API from the existing interrupt transfer API.
BUG=chrome-os-partner:5752
TEST=Use USB keyboard in u-boot (recovery mode) when later
commits make use of this code
Change-Id: I9bf0ef838af1076f8060c39bd942d95271cf0035
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: https://gerrit.chromium.org/gerrit/13489
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
|
|
This will write magic value to APMC command port which
will trigger an SMI and cause coreboot to lock down
the ME, chipset, and CPU.
BUG=chrome-os-partner:6609
TEST=boot on stumpy+celeron and lumpy+i5 and ensure
the system still boots and that registers are locked
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Change-Id: Ib30ea83044f5123205531a5e8ee88ee37de2dd86
Reviewed-on: https://gerrit.chromium.org/gerrit/13604
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
|
|
- Depends on related Coreboot changes
- There is a 64k region allocated so use it all
- Write each data blob in a 4K aligned container
- Find the last entry in the region to compare against coreboot copy
- Detect a full region and erase it all and start over at zero
BUG=chrome-os-partner:6962
TEST=manual
I started writing an autotest for this, but it was taking more time
than just doing a thorough manual test. I will finish the autotest
but for now I relied on manual testing and using /sys/firmware/log
to tell what happened in Coreboot/U-boot on each boot.
TEST CASE 1 - newly flashed image:
1) Install the new bios with flashrom and reboot
2) Check that no MRC data was found by Coreboot in firmware log:
"prepare_mrc_cache: invalid MRC data"
3) Check that U-boot wrote training data in firmware log:
"handle_mrc_cache: cached storage mismatch (-1/2895)"
"firmware_storage_spi: before adjustment"
"firmware_storage_spi: offset: 0x1ec000"
"firmware_storage_spi: length: 0xb58"
"firmware_storage_spi: after adjustment"
"firmware_storage_spi: offset: 0x1ec000"
"firmware_storage_spi: length: 0x1000"
"firmware_storage_spi: offset: 0x001ec000"
"firmware_storage_spi: adjusted offset: 0x001ec000"
4) Check the flash to see if it has data in first slot
> flashrom -r /tmp/bios.now
> hexdump -Cv -s $((0x1ec000)) -n $((0x10000)) /tmp/bios.now
TEST CASE 2 - ensure that it uses the saved training data:
1) Reboot
2) Check that Coreboot used the training data in firmware log:
"prepare_mrc_cache: at ff9ec009, entry 0 size b4f checksum 9c"
3) Check that U-boot did not have to update the data in firmware log:
"handle_mrc_cache: cached storage match"
4) Check the flash to see if it still only has data in first slot:
> flashrom -r /tmp/bios.now
> hexdump -Cv -s $((0x1ec000)) -n $((0x10000)) /tmp/bios.now
TEST CASE 3 - ensure that it fills the next slot with new data:
1) Corrupt the seed checksum in CMOS:
> io_write8 0x70 0x78
> io_write8 0x71 0x00
2) Reboot
3) Check that Coreboot did not use cached data in firmware log:
"prepare_mrc_cache: invalid seed checksum"
4) Check that U-boot wrote new training data at new offset in firmware log:
"handle_mrc_cache: cached storage mismatch (2895/2895)"
"firmware_storage_spi: before adjustment"
"firmware_storage_spi: offset: 0x1ed000"
"firmware_storage_spi: length: 0xb58"
"firmware_storage_spi: after adjustment"
"firmware_storage_spi: offset: 0x1ed000"
"firmware_storage_spi: length: 0x1000"
"firmware_storage_spi: offset: 0x001ed000"
"firmware_storage_spi: adjusted offset: 0x001ed000"
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Change-Id: Ifffce29c5f9324f110c047a44a3f66d2e21cd6a4
Reviewed-on: https://gerrit.chromium.org/gerrit/13589
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
|
|
Coreboot was always using MTRR 7 for the write-protect
cache entry that covers the ROM and U-boot was removing it.
However with 4GB configs we need more MTRRs for the BIOS
and so the WP MTRR needs to move. Instead coreboot will
always use the last available MTRR that is normally set
aside for OS use and U-boot can clear it before the OS.
BUG=chrome-os-partner:7350
TEST=boot 4GB stumpy with coreboot MTRR fixes and verify
that U-boot does not clear MTRR 7 but does clear MTRR 9.
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Change-Id: Id6927325131b0b88043daa320a17847764626c0d
Reviewed-on: https://gerrit.chromium.org/gerrit/13477
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
|
|
Turning on this option saves about 20ms boot time.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I06ec0ae0da4afc208ca7952dfa42e725f5a67d4c
Reviewed-on: https://gerrit.chromium.org/gerrit/13208
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Add plumbing to support this option to delay console init until
after relocation.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Iee3be9e2d0b51e6cf2f45a4408bfdde494c97d8b
Reviewed-on: https://gerrit.chromium.org/gerrit/13210
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
|
|
Delay serial console calls and do them later, to support the
CONFIG_DELAY_CONSOLE option.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Ie15a887843a8b5f29fce055f7a2e17b7fc1e614f
Reviewed-on: https://gerrit.chromium.org/gerrit/13209
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
|
|
This option delays console initialization until after relocation. This
can save time if this init is relatively expensive, since after
relocation the CPU is often running much faster.
This option should be used in conjunction with CONFIG_PRE_CONSOLE_BUFFER
to ensure that all console output is buffered until the console is
ready for it.
This saves about 30ms boot time.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I3a774b418d45e7be9338f9942df445c2c2baa528
Reviewed-on: https://gerrit.chromium.org/gerrit/13207
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
|
|
Move the serial init code into its own function to collect this all
in one place.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I70162d836fddfabedd9cfbc07d8f0dc920602af8
Reviewed-on: https://gerrit.chromium.org/gerrit/13204
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
This is a revised version of this patch which fixes an ARM bug.
This change plumbs the size of the GBB specified in the device tree to the
functions that read it from the flash into memory, and adds checks to those
functions to make sure they don't spill out of the in memory GBB. From a
security standpoint this is a largely theoretical problem since the GBB is
in the read only portion of flash and if that can be modified the machine
is totally compromised, but it's possible somehow an attacker could force
vboot to read the GBB from the wrong place. From a practical perspective
it's not a bad idea to check this to avoid accidental memory corruption.
BUG=chromium-os:24223
TEST=Built and booted on Lumpy. Built for Kaen.
Change-Id: I90d23fd6e055db595af12b1bd63d9932cbffe7ae
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/13279
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
|
|
When DEBUG is enabled, display important clocks during init.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: Ic27e7d79bdcd9cf44d94ec25c52fc8776ddc7d04
Reviewed-on: https://gerrit.chromium.org/gerrit/13205
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
This breaks recovery mode on Kaen - the bitmaps are not displayed.
This reverts commit e1153e1f56ebebff188f3693e534f10bd68e6f07
Change-Id: I300ae39382dc1960bb0375ad660a88b65181edc9
Reviewed-on: https://gerrit.chromium.org/gerrit/13274
Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
When we re-enumerate USB devices to configure new USB mass storage key,
we must also properly configure the USB keyboard if there is one
connected.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:5752 chrome-os-partner:6344 chromeos-partner:7188
TEST=on Lumpy, insert and remove a USB key in recovery mode and check
that TAB still triggers the recovery reason screen.
Change-Id: I4bf908023e21c027f6abcb49f168abb3013ed707
Reviewed-on: https://gerrit.chromium.org/gerrit/13251
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
|
|
Instead of doing USB enumeration in a tight loop,
let's check first if anything has changed first,
then do the enumeration only if needed.
This saves time (the full enumeration currently takes 1.2s while the
insertion/removal detection runs in 19ms), and will allow to do the
keypress detection on USB keyboard in parallel.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:5752 chrome-os-partner:6344
TEST=on Lumpy, insert and remove a USB key in recovery mode.
Change-Id: I3ba084caa41234c8629771e9dd8b06b811712cdb
Reviewed-on: https://gerrit.chromium.org/gerrit/13250
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
|
|
Provide a function to detect USB device insertion/removal in order to
avoid having to do USB enumeration in a tight loop when trying to detect
peripheral hotplugging.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:5752 chrome-os-partner:6344
TEST=on Lumpy, insert and remove a USB key in recovery mode.
Change-Id: I18dc97d54cd909acea754fd9b3a4b7f4fc3219ec
Reviewed-on: https://gerrit.chromium.org/gerrit/13249
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
|
|
Relocation takes about 40ms of the boot time, so add a timer to track it.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: If936bc8ff9a23f6dd885f60e845a597ac7edad97
Reviewed-on: https://gerrit.chromium.org/gerrit/13203
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Until we bring in the newer MMC code from upstream, this enables 8-bit
support with a minimum of changes.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I5c3f5e6f4003ae63e08208d9afba66aef8d97ccf
Reviewed-on: https://gerrit.chromium.org/gerrit/13202
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
We can support 8-bit eMMC and it is faster, so turn it on.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I1509594832d317a086fa066d1a37c78a1a52c7c3
Reviewed-on: https://gerrit.chromium.org/gerrit/13201
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
The Tegra2 can support this faster interface, so use it. It can reduce
data transfer time by about 40%.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I656773c83083cd53d3ee52433e324e73fbcdc999
Reviewed-on: https://gerrit.chromium.org/gerrit/13200
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Timeouts should use get_timer() where possible, and avoid looping
with fixed delays. This improves performance.
BUG=chromium-os:22938
TEST=build and boot on Kaen
Change-Id: I7e11151ddc0ac2faf14e05593181470558a52ab2
Reviewed-on: https://gerrit.chromium.org/gerrit/13199
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
Because the offset and count parameters for the border_check function are
unsigned, their total could overflow a uint32_t and end up wrapping to look
smaller than the size of the flash even though it's mathematically larger.
This change adds a check for that overflow.
BUG=chromium-os:24222
TEST=Built and booted on a Lumpy.
Change-Id: Ibe0708d8ad7869d71425bef7793f839bc96ac92d
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/13219
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/13260
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Because the offset and count parameters for the border_check function are
unsigned, their total could overflow a uint32_t and end up wrapping to look
smaller than the size of the flash even though it's mathematically larger.
This change adds a check for that overflow.
BUG=chromium-os:24222
TEST=Built and booted on a Lumpy.
Change-Id: I63b04dcb519f740f6d591301bc3d4d533bbd4e05
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/13219
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
|
|
This change plumbs the size of the GBB specified in the device tree to the
functions that read it from the flash into memory, and adds checks to those
functions to make sure they don't spill out of the in memory GBB. From a
security standpoint this is a largely theoretical problem since the GBB is
in the read only portion of flash and if that can be modified the machine
is totally compromised, but it's possible somehow an attacker could force
vboot to read the GBB from the wrong place. From a practical perspective
it's not a bad idea to check this to avoid accidental memory corruption.
BUG=chromium-os:24223
TEST=Built and booted on Lumpy. Built for Kaen.
Change-Id: I4f33552f9d27321e73659520b08be52d775a6a9b
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/13228
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
|
|
BUG=none
TEST=emerge-tegra_kaen chromeos-u-boot
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
CQ-DEPEND=Ibb8f42116812dba74e726129ea92a941e15c272b
Change-Id: Iba58e415e7cd6deafa5744c1ff501a8ea5730d1e
Reviewed-on: https://gerrit.chromium.org/gerrit/13227
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
|