Commit graph

10,045 commits

Author SHA1 Message Date
Duncan Laurie
3d3e075af5 pearlvalley: Add mainboard for Broadwell Y CRB
This is a quick port from wtm2 to test on the broadwell Y CRB.

Note that it produces an 8MB image and yet the board has a
16MB SPI flash part.  The build tools are not ready to handle
a 16MB image yet so just add 8MB of FFs to the end for now.

BUG=chrome-os-partner:28234
TEST=boot on pearl valley

Change-Id: I849075fc07fa017b5ccca17d0736342a1518db7d
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210661
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-07-31 22:45:40 +00:00
Duncan Laurie
8b2ce5c584 samus: Update SPD
- geometry was incorrect for 8GB modules, should be x32,
so refactor the rest of the geometry to match
- some of the timing values were off, calcualte new values
from the datasheet

BUG=chrome-os-partner:28234
BRANCH=None
TEST=build and boot on samus

Change-Id: I645f354ef21c5032ab73c66e1ad843136ec93eff
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210660
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-07-31 22:45:36 +00:00
Duncan Laurie
2831154af4 broadwell: Add config option to disable DSP power gating in D3
This is useful for debug and testing.

BUG=chrome-os-partner:29649
BRANCH=None
TEST=build and boot on samus

Change-Id: I9050e75fd7c308ebd97d196298c687f8b0f8f97d
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210599
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-07-31 22:45:32 +00:00
Furquan Shaikh
26e53568e8 arm64: Seed the stack at stage_entry
Seed the stack in order to avoid boot process from complaining false stack
overflow.

BUG=chrome-os-partner:30824
BRANCH=None
TEST=Compiles successfully for rush and stack overflow error fixed in boot flow

Change-Id: Ie51e1bcd263e3b886feb2e0e9c7d544f23c3444e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210594
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-31 06:39:40 +00:00
Vadim Bendebury
723e4a600a libpayload: Add board id parsing
Make board ID value supplied in the coreboot table available to the
bootloader on all three architectures.

BUG=chrome-os-partner:30489
TEST=none yet

Change-Id: I7847bd9fe2d000a29c7ae95144f4868d926fb198
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210430
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-07-31 04:38:07 +00:00
Furquan Shaikh
d7ba56b245 rush: Fix recovery mode switch function
BUG=chrome-os-partner:31032
BRANCH=None
TEST=Compiles successfully

Change-Id: I97da77c4f2ec3934066916c62491335a6536a85c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210435
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
2014-07-31 02:17:02 +00:00
Furquan Shaikh
5447adb964 rush: Add support for chromeos_ec
BUG=chrome-os-partner:31032
BRANCH=None
TEST=Compiles successfully and ec error fixed while booting.

Change-Id: I02172a30863b7b97892289e880c29f2d71220fda
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210436
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-31 02:16:55 +00:00
Furquan Shaikh
14af527a5d t132: Change romstage base address
Romstage was overflowing. So move the base address lower

BUG=chrome-os-partner:31032
BRANCH=None
TEST=Compiles successfully

Change-Id: Ia05034477b51b149c87347ed1880f8e85ecbfbf8
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210434
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-31 02:16:50 +00:00
Vadim Bendebury
f4d41ddf90 Enable publishing of board ID where supported
These boards are supposed to be able to determine the board ID at run
time based on the certain GPIO settings.

BUG=chrome-os-partner:30489
TEST=verified that all boards build. Checked that storm proto0 reports
     board ID of 0 on the console

Change-Id: Iadd758a799d69e1e34579d7d495378856b64c45b
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210119
2014-07-30 23:41:23 +00:00
Vadim Bendebury
6ba24f3158 storm: Add board ID calculation function
storm uses three GPIOs in tertiary mode, such that proto0 returns
value of 8 when the GPIOs are interpreted as a single tertiary number.

Adjust the calculated value to return board ID of 0 on proto0, and
monotonously incrementing values on newer boards.

BUG=chrome-os-partner:30489
TEST=when enabled, the board ID value of zero is reported on the console.

Change-Id: I2ff8fd5cbc8d568877b6f8bf220e146893f1e4be
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210118
2014-07-30 23:41:16 +00:00
Vadim Bendebury
27dd40e85b Include board ID calculations only when necessary
For the majority of Chrome OS boards there is no need to include board
ID calculation in any stage but ramstage, where the ID should be
available for inclusion into the coreboot table.

BUG=chrome-os-partner:30489
TEST=build only, no other tests yet

Change-Id: Ib9c06698a399d31e79a9b14143343ba2ad46d0fb
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210117
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-07-30 23:41:10 +00:00
Vadim Bendebury
b2057a02db Publish the board ID value in coreboot table, when configured
Board ID value is usually of interest to bootloaders. Instead of
duplicating the board ID discovery code in different bootloaders let's
determine it in coreboot and publish it through coreboot table, when
configured.

BUG=chrome-os-partner:30489
TEST=none yet

Change-Id: Iee247c44a1c91dbcedcc9058e8742c75ff951f43
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210116
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-30 23:41:05 +00:00
Vadim Bendebury
e951f73500 ipq806x: implement GPIO API
Add implementation of the GPIO API defined in src/include/gpiolib.h.
Also, clean up the GPIO driver, make it use pointers instead of
integers for register address.

This requires a touch in the SPI driver, where the CS GPIO is toggled
and in the board function where it enables USB interface.

BUG=chrome-os-partner:30489
TEST=tested with the following patches, observed proto0 properly read
     the board ID.

Change-Id: I0962947c6bb32a854ca300752d259a48e9e7b4eb
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210115
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-30 23:40:58 +00:00
Vadim Bendebury
c79ef1c545 Generalize revision number calculation function
Some platforms use tertiary interpretation of GPIO input state to
increase number of distinct values represented by a limited number of
GPIOs. The three states are

- external pull down (interpreted as 0)
- external pull up (1)
- not connected (2)

This has been required by Nvidia devices so far, but Exynos and
Ipq8086 platforms need this too.

This patch moves the function reading the tertiary state into the
library and exposes the necessary GPIO API functions in a new include
file. The functions are still supposed to be provided by platform
specific modules.

The function interpreting the GPIO states has been modified to allow
to interpret the state either as a true tertiary number or as a set
two bit fields.

Since linker garbage collection is not happening when building x86
targets, a new configuration option is being added to include the new
module only when needed.

BUG=chrome-os-partner:30489
TEST=verified that nyan_big still reports proper revision ID.

Change-Id: I243c9f43c82bd4a41de2154bbdbd07df0a241046
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/209673
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-07-30 23:40:53 +00:00
Furquan Shaikh
4cb05ffa95 rush: Add MMC support
BUG=None
BRANCH=None
TEST=Compiles successfully. Depthcharge is able to see mmc.

Change-Id: Ia0c9b432fa447c64fa13e5fae5a66a26bbc86360
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210002
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-30 08:39:52 +00:00
Furquan Shaikh
01e87ae354 t132: Add support for tpm i2c
Iniitialize I2C bus required for TPM operation. Problem observed was that if
frequency is raised above 20KHz, TPM starts responding with NAKs either for
address or for data. Need to look into that.

BUG=None
BRANCH=None
TEST=Compiles successfully and TPM success messages seen while booting.

Change-Id: I9e1b4958d2ec010e31179df12a099277e6ce09e0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210001
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-30 08:39:46 +00:00
Furquan Shaikh
670e21ed11 t132: Add TTB_BUFFER to resource reserved
TTB_BUFFER holds the MMU tables. Thus, this memory needs to be preserved while
performing a wipe in depthcharge. Hence, marking it as reserved

BUG=None
BRANCH=None
TEST=Compiles successfully and boots upto depthcharge. Error wiping memory
tables is fixed.

Change-Id: Idd5cd0235d50f7b9617df2cead3bf71012e3b630
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/210000
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-30 08:39:41 +00:00
Neil Chen
158872ff7c blaze: update EMC BCT table
This change updated the EMC tables with emc_reg_tool 5.0.18,
for below memory SKUs:

- Hynix H5TC4G63AFR-PBR 2GB, ramcode = 0
- Micron MT41K256M16HA-125 2GB, ramcode = 1
- Samsung K4B4G1646Q-HYK0 2GB, ramcode = 2
- Hynix H5TC8G63AFR-PBR 4GB, ramcode = 8
- Micron MT41K512M16TNA-125 4GB, ramcode = 9
- Samsung K4B8G1646Q-MYKO 4GB, ramcode = 10

BUG=chrome-os-partner:30963
BRANCH=blaze
TEST=emerged coreboot, booted successfully into kernel.

Change-Id: I44adfdb5b433e37e2d25095acdcce3d9c14eb897
Signed-off-by: Neil Chen <neilc@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/210024
Tested-by: Ken Chang <kenc@nvidia.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
2014-07-30 05:31:12 +00:00
Furquan Shaikh
ca9f2f86ff vboot: Update VBOOT_CFLAGS to include rmodules ccopts
rmodules ccopts contain information about specific arch like armv4,v7. Hence, it
is important to include them in VBOOT_CFLAGS

BUG=None
BRANCH=None
TEST=Compiles correctly for armv4 in rush

Change-Id: I8f5509f753e28046678c3782d6f0b6210559f798
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209979
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:55 +00:00
Furquan Shaikh
0088f5aade rush: Update rush Kconfig file
Update rush Kconfig file to include TPM and RAMSTAGE_INDEX options

BUG=None
BRANCH=None
TEST=Compiles successfully. TPM works. Ramstage boots successfully.

Change-Id: Ie55260c710ffcb6a2e04c8658ca6dd3cdec6b6db
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209978
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:51 +00:00
Furquan Shaikh
a6fbb92223 rush: Add CONFIG_FLASHMAP_OFFSET for rush
BUG=None
BRANCH=None
TEST=Compiles successfully for rush and fmap error gone because of this change

Change-Id: I955fa4b35535db15d3704ebc2e27398915acc86b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209977
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:47 +00:00
Furquan Shaikh
b8c992a996 rush: Add VBOOT_VERIFY config option to rush
BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles

Change-Id: I077adda278ee4916c105f609e40afd9aba96dbb7
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209628
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:41 +00:00
Furquan Shaikh
28a41a6ab2 vboot: Makefile updates for arm64
Add memset and memcpy to VBOOT_STUB_DEFS and add vbnv_ec to romstage and
ramstage for arm64

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles successfully for rush

Change-Id: Ib65bae96a86b78ed7770efd084a29f61b3370fee
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209976
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:37 +00:00
Furquan Shaikh
3d3f0494d8 rush: Add ec_dummy file to enable vboot compilation
BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles successfully for rush

Change-Id: Ic11bef85e5c7635000582f87727cd9a33b0b36e3
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209975
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:30 +00:00
Furquan Shaikh
2e6934d47c rush: Pull in chromeos.c from nyan into rush
Hardcoded values are set for developer,recovery mode. Change as per requirements

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles succesfully for rush

Change-Id: Ied506a9d1c4e0ba8ee06d57c6ca8c726220998b5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209974
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-30 03:09:25 +00:00
david
56f2f3bff0 haswell: Update microcode revision
CPUID 306C3 Haswell MOB C-0 microcode to 1ch
CPUID 40651 Haswell ULT C-0 microcode to 1ch

BUG=none
BRANCH=peppy
TEST=manual: build and boot on peppy and check microcode revision
localhost ~ # grep microcode /proc/cpuinfo
microcode       : 0x1c
microcode       : 0x1c

Change-Id: I1a4c21c81c5dc08dfbb296e133f5677887bd7877
Signed-off-by: David Wu <David_Wu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/210031
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: David Wu <david_wu@quantatw.com>
Tested-by: David Wu <david_wu@quantatw.com>
2014-07-29 04:37:18 +00:00
David Hendricks
5ec28de11f ipq806x: Break apart large transfers in spi_xfer()
The current spi_xfer() function sets the count in hardware and then
loops while waiting for the requested number of bytes to be sent or
received. However, the number of bytes to be transferred may exceed
the maximum count that can be programmed into the controller.

This patch re-factors spi_xfer() to split the low-level FIFO handling
portions for transmit/receive into their own functions to be called
by loops in spi_xfer() which will break large transfers into smaller
ones.

BUG=chrome-os-partner:30904
BRANCH=storm
TEST=built and booted with a >64KB payload on Storm

Change-Id: I70743487996cf08cfc602449f2181a7fcd99bfa4
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/209838
Reviewed-by: Trevor Bourget <tbourget@codeaurora.org>
Tested-by: Trevor Bourget <tbourget@codeaurora.org>
2014-07-29 00:03:27 +00:00
Jimmy Zhang
ba77e26508 Tegra132: Configure CPU clock
Since CCLK_BURST_POLICY and SUPER_CCLK_DIVIDER are not accesible
from AVP, the first place that can change CPU clock is after CPU
has been brought up, ie, ramstage in this case.

CPU initial clock source is set to PLLP by MTS.

BUG=None
TEST=Norrin64 and A44

Change-Id: I525bb2fa2be0afba52837bc0178950541535fd22
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/209698
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-07-29 00:02:07 +00:00
Furquan Shaikh
dc5f411f95 cbfstool: Add relocation codes for arm mode
Add relocation codes required for arm mode. These are required by armv4.

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles successfully for rush

Change-Id: Ie7c5b3e07689c85091036a619a65f9fea1918b6b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209973
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-28 19:19:50 +00:00
Furquan Shaikh
8096ae56c4 t132: Add monotonic_timer.c to rmodules_arm
Update VBOOT_STUB_DEPS to include monotonic_timer.c

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles successfully for rush

Change-Id: I3cc559fa21c444da1a7976e4952ea4941c2a1428
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209972
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-28 19:19:45 +00:00
Furquan Shaikh
00da67cc02 rmodules: Make rmodules inclusion for vboot dependent on romstage_arch
Currently, the rmodules inclusion for vboot is dependent on ramstage_arch.
This change adds dependency on romstage_arch, since vboot is associated with
romstage. Inclusion based on ramstage_arch is left as is in case someone needs
it in ramstage.

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles successfully for link, rush and nyan

Change-Id: Ib62415671c26a4a18c7133d98e8c683414def32b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209568
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-28 19:19:40 +00:00
Furquan Shaikh
242bb90d74 coreboot classes: Add dynamic classes to coreboot
Provide functionality to create dynamic classes based on program name and the
architecture for which the program needs to be compiled/linked. define_class
takes program_name and arch as its arguments and adds the program_name to
classes-y to create dynamic class and compiler toolset is created for the
specified arch. All the files for this program can then be added to
program_name-y += .. Ensure that define_class is called before any files are
added to the class. Check subdirs-y for order of directory inclusion.

One such example of dynamic class is rmodules. Multiple rmodules can be used
which need to be compiled for different architectures. With dynamic classes,
this is possible.

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Compiles successfully for nyan, rush and link.

Change-Id: I3e3aadbe723d432b9b3500c44bcff578c98f5643
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209379
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-28 19:19:34 +00:00
Aaron Durbin
d7dfe4c2c2 t132: prepare for ramstage vboot verification
Implement the necesary logic for running vboot
verification on ramstage. The logic just handles
the fallback path of loading from cbfs.

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Built for rush.

Change-Id: I7b4fa0438efbdb0af7420e1a8b87f4fa4a86c0ee
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/209571
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-28 19:19:29 +00:00
Aaron Durbin
00e9127e2d vboot: split loading and running of ramstage
The vboot module previously assumed the CPU running the
verfication would also be the one executing the next
stage of execution. That isn't true for all platforms.
Therefore, provide the ability to load and return the
entry point by way of vboot_verify_firmware_get_entry().
vboot_verify_firmware() still does the same thing as
it previously did -- load and run from the current
execution context.

BUG=chrome-os-partner:30784
BRANCH=None
TEST=Built for nyan.

Change-Id: Id06c3d382edfe84adb170e7f52c12be58b88bab9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/209592
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-28 19:19:23 +00:00
Aaron Durbin
3d69cce280 UPSTREAM: x86: provide stage_exit() like arm
The arm architectures have a stage_exit() function
which takes a void * pointer as an entry point. Provide
the same API for x86. This can make the booting paths
less architecture-specific.

BUG=chrome-os-partner:30784
TEST=built for nyan.

Change-Id: I4ecfbf32f38f2e3817381b63e1f97e92654c5f97
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/5086
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: https://chromium-review.googlesource.com/209591
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-07-28 19:19:16 +00:00
Yogesh Lal
61528884ad libpayload: ipq808x: stale interrupt shall not be cleared unconditionally
The serial driver hangs in cases when FIFO has more than single word to be
processed. Easiest way to reproduce is to paste a string of greater than 4
characters in cli.

Clearing the RXSTALE interrupt without draining all the characters from FIFO
leads to the issue as the driver is dependent on msm_boot_uart_dm_read
function to reinitialize for next transfer.

Logically the driver is organized in such a manner that next transfer never
gets initiated till rx_data_read < total_rx_data. Clearing the RXSTALE without
consideration of total number of characters (or words) unprocessed makes the
msm_boot_uart_dm_read to return on the first if conditional. Thus the driver is
stuck forever.

A quick fix is to avoid clearing the stale interrupt. Reset is handled whenever
a new transfer is initialized in msm_boot_uart_dm_init_rx_transfer.

BUG=chrome-os-partner:29542
TEST=manual
	-Paste a string greater than 4 characters in cli.

Change-Id: I016afb01a77cd14764f0176f6bf144fb29796c2f
Signed-off-by: Yogesh Lal <ylal@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/209512
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
2014-07-26 02:43:49 +00:00
Vadim Bendebury
589e6415fa Use a common boardid.h instead of per board copies
There is no point in duplicating boardid.h per board - they are all
the same. Let's keep a single instance in the common include directory
and let the linker report a problem if one tries using this function
on a board where it is not supported.

BUG=chrome-os-partner:30489
TEST=verified that coreboot builds fine for nyan_big and nyan_blaze.

Change-Id: Ifbe9c2287a1d828d4db74c637d1d02047ac4da25
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/209699
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-07-25 03:45:43 +00:00
Furquan Shaikh
473a450bcd t132: Get rid of Kconfig warning
Get rid of Kconfig warning "warning: defaults for choice values not supported"

BUG=None
BRANCH=None
TEST=Compiles successfully and boots rush till last known good point

Change-Id: Ib2667eacdb4f4e4d2ac8005078c5c1f644d0325c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209556
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-23 23:14:22 +00:00
Furquan Shaikh
71cd62740e rmodule: Correct the typecast with proper parenthesis
BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I67801f96ec63a3150263ce3d6a4a7556092c6be5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209505
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-07-23 23:14:18 +00:00
Vadim Bendebury
8553fae710 Prepare vboot_handoff structure for depthcharge consumption
vboot_handoff field includes information used by verified boot in
depthcharge, let's make sure it is available on storm.

BUG=chrome-os-partner:30705
TEST=tested along with accompanying depthcharge patches, observed
     proper verified mode boot

Change-Id: I38f360cd5e336c74eee7ee054e67a4b5dc3d5d44
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/208840
Reviewed-by: Stefan Reinauer <reinauer@google.com>
2014-07-23 15:17:41 +00:00
Furquan Shaikh
c615136aa8 coreboot t132: Remove empty function cpu0_config_and_reset
This function is not used/required in t132.

BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: Iba5ea3c14cc9facbf2a86aa08021edb9907f92da
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209425
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-23 11:09:01 +00:00
Furquan Shaikh
df4e8b4c8a coreboot t132: Stop running AVP at the end of romstage
Stop running AVP at the end of romstage until event conditions are met (JTAG,
GIC_IRQ or LIC_IRQ).

BUG=chrome-os-partner:30831
BRANCH=None
TEST=Compiles successfully and boots till last known good checkpoint.

Change-Id: Ia221f08b27ac0c60a66d588e351677144cc6a322
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209424
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-23 11:08:53 +00:00
Paul Burton
3790e1340d Makefile.inc: Remove duplication of ROMSTAGE_ELF assignment
The ROMSTAGE_ELF variable is assigned based upon the architecture the
romstage is being built for. x86 uses a unique value but arm & arm64
both use the same value which MIPS will also share. Remove the
duplication of the assignment by special casing x86 only.

Change-Id: Id4307c30d91fde8dc48f89b2eb6f5b16b45e0c67
Suggested-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/208932
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-23 11:08:49 +00:00
Paul Burton
7c4df61715 cbfstool: Add the MIPS architecture
Specify a CBFS architecture value for MIPS & allow cbfstool to make
use of it.

Change-Id: I604d61004596b65c9903d444e030241f712202bd
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/207971
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-23 11:08:43 +00:00
Paul Burton
d6c9603c41 build: mipsel cross compiler support
This patch introduces support for building a MIPS cross compiler
targetting little endian machines by default.

Change-Id: I116f6f431cdf80f5f5f58d2743357a9f70a7347d
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/207970
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-23 11:08:36 +00:00
jinkun.hong
2f72473a8c coreboot: rk3288: Add a stub implementation of the rk3288 SOC
Most things still needs to be filled in, but this will allow us to build boards which use this SOC.

BUG=chrome-os-partner:29778
TEST=emerge-veyron coreboot

Change-Id: If643d620c5fb8951faaf1ccde400a8e9ed7db3bc
Signed-off-by: jinkun.hong <jinkun.hong@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/205069
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
2014-07-23 06:46:35 +00:00
Daisuke Nojiri
0a9e7f0992 vboot2: translate shared data to hand off to depthcharge
TEST=Built Blaze with USE=+/-vboot2. Ran faft: CorruptBothFwAB,
CorruptBothFWSigAB, CorruptFwBodyA/B, CoccurptFwSigA/B, DevBootUSB, DevMode,
TryFwB, UserRequestRecovery, SelfSignedBoot, RollbackFirmware.
BUG=None
BRANCH=none
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I45a1efd4d55fde37cc67fc02642fed0bc9366469
Reviewed-on: https://chromium-review.googlesource.com/205236
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-07-23 02:29:26 +00:00
Daisuke Nojiri
6b66140ac9 vboot2: read secdata and nvdata
This code ports antirollback module and tpm library from platform/vboot_reference.
names are modified to conform to Coreboot's style.

The rollback_index module is split in a bottom half and top half. The top half
contains generic code which hides the underlying storage implementation
the bottom half implements the storage abstraction.
With this change, the bottom half is moved to coreboot, while the top half stays
in vboot_reference.

TEST=Built with USE=+/-vboot2 for Blaze. Built Samus, Link.
BUG=none
Branch=none
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I77e3ae1a029e09d3cdefe8fd297a3b432bbb9e9e
Reviewed-on: https://chromium-review.googlesource.com/206065
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
2014-07-23 02:29:18 +00:00
Furquan Shaikh
5d3aef321a fmap: Fix pointer related casts
BUG=None
BRANCH=None
TEST=Compiles

Change-Id: I3a747cb562e7390bb81eca874d6c5aaa54b81e6e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209337
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-23 00:21:11 +00:00
Furquan Shaikh
b50c9441dd coreboot tpm: Fix printk format specifiers
BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I828776724dce287d9a7eb732f2c9ecccf8d68229
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/209336
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-07-23 00:21:05 +00:00