Commit graph

10,476 commits

Author SHA1 Message Date
Vadim Bendebury
fd4853be51 bg4cd: provide support for the SPI_WRAPPER configuration mode
The SOC code should include the SPI controller driver when configured.
With the upcoming configuration change media.c is not needed anymore.

BRANCH=none
BUG=chrome-os-partner:32631
TEST=the driver compiles when the upcoming patches are applied

Change-Id: If7e12e2fb04e63c36d9696d13e08397b91a77a8c
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223750
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:25:14 +00:00
Vadim Bendebury
0583f17fe3 bg4cd: add SPI controller driver skeleton
This file provides the SOC specific SPI driver API, it needs to be
filled up with code. Function descriptions can be found in
src/include/spi-generic.h.

BRANCH=none
BUG=chrome-os-partner:32631
TEST=compiles with the upcoming patches applied.

Change-Id: I0ee04ca17874a13403007bba80d5e8a7708bc625
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223719
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:25:10 +00:00
Vadim Bendebury
c6ab30f108 libpayload: normalize board configurations
With a few recently added configuration options many libpayload board
config got out of sync. The following command was used to normalize
them (with default answers to all questions):

for f in configs/config.*; do
   cp $f .config
   make oldconfig
   mv .config $f
done

BRANCH=as required
BUG=none
TEST=none

Change-Id: I25b9862d868f9a62d663567b077e7b2b8cc42e22
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223650
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:24:54 +00:00
Vadim Bendebury
3b49c25891 cosmos: enable SOC uart driver
Add necessary configuration to enable the inclusion of the UART driver
into the image when serial console is enabled.

BRANCH=none
BUG=chrome-os-partner:32631
TEST=building with serial console enabled includes the skeleton uart
     driver into the build

Change-Id: I6cbd110f600169021901b3f864d596404587fbcc
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223598
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:24:51 +00:00
Vadim Bendebury
c55a7e9d50 cosmos: rearrange configuration and makefile definitions
This is a no-op aesthetic change, arranging configurarion and makefile
lines alphanumerically.

BRANCH=none
BUG=none
TEST=cosmos still builds

Change-Id: I4498eef59fc20ea04b6ebadb451d0fe346824c05
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223597
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:24:46 +00:00
Vadim Bendebury
4a6db7b19c console: add configs to support Marvell bg4cd uart
This adds a new option to the set of console UART choices and uses the
common console wrapper for bg4cd based devices.

BRANCH=none
BUG=chrome-os-partner:32631
TEST=with the upcoming SOC specific patch applied, when building with
     serial console enabled the following option shows up in
     auto.conf:
CONFIG_CONSOLE_SERIAL_BG4CD=y

Change-Id: Id2aa2ed4827740aaf04514233bd57cd8df0fea55
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223596
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:24:42 +00:00
Vadim Bendebury
99b13bf9da bg4cd: add uart driver skeleton
This adds the file to be filled up with the uart driver implementation
for bg4cd.

The console driver structure when required is provided by
src/console/uart_wrapper.c.

BRANCH=none
BUG=chrome-os-partner:32772
TEST=none yet, this file is not event being compiled

Change-Id: I73c12ddcd6f5099cc2196820452e714eeb736cdc
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223595
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-17 03:24:36 +00:00
Wenkai Du
f10b368e01 broadwell: add RCBA posting read after writing
MEI PCI device has internal logic to flush out the posted writes
before returning completion for non-posted request. When doing a RCBA
write to function disable and then using the PCI CFG RD cycle, need
to do RCBA posting read after writing to it to make sure the write
went through.

As Aaron sugegsted, abstracted function disable path to a common
function.

BUG=chrome-os-partner:33048
TEST=run warm and cold reboot testing

Change-Id: I87aa8ccd604446263fc3621c9a01839a5a75b644
Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/223715
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-17 01:14:19 +00:00
huang lin
2e7e7c2656 rk3288: cpu frequency up to 1.8GHz
before the rkclk_init(), we must set rk808
buck1 voltage up to 1300mv

BUG=chrome-os-partner:32716, chrome-os-partner:31896
TEST=Boot on veyron_pinky rev2,check the rk808 buck1 voltage 1300mv
     and check the cpu frequency up to 1.8GHz

Change-Id: I6a8c6e35bd7cc6017f2def72876a9170977f206e
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/222957
Reviewed-by: Doug Anderson <dianders@chromium.org>
2014-10-15 23:55:59 +00:00
Daisuke Nojiri
8f8419fe22 cosmos: add template files for libpayload
this adds template files to build chromeos-bootimage. it also adjusts
coreboot.rom size and flash map offset with respect to the board's fmap.dts.

BUG=chrome-os-partner:32772
BRANCH=none
TEST=Built chromeos-bootimage
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I97f2ac8ffc7232c7a6c6d40deb8a35630d3d62a7
Reviewed-on: https://chromium-review.googlesource.com/222662
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-10-15 18:23:26 +00:00
huang lin
57a5d90d39 rk3288: guarantee i2c low period more than 1.3us
change i2c clock low period and high perid propoton to 7:3
       guarantee the low period more than 1.3us

BUG=None
TEST=Boot on veyron_pinky rev2,check the i2c clock frequency

Change-Id: I235e9e3ff54ab3b9cabad36bab58a8409f7005a0
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/223002
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-15 18:23:07 +00:00
Furquan Shaikh
a06b36f900 t132: Enable SMMU translations
BUG=None
BRANCH=None
TEST=Verified by reading back the value of SMMU_CONFIG register that enable bit
is set to 1

Change-Id: Iccc870141f9b9729971bf12119f9f3dae8181a43
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/222770
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-15 00:10:10 +00:00
Duncan Laurie
a5346141e4 broadwell: Add reporting of broadwell MCH revision
Since the E0 and F0 stepping parts have the same CPUID it is
necessary to use the MCH PCI device revision to determine what
the actual stepping is.

Add this decode table so the early output gives proper identification
of the installed CPU type.

BUG=chrome-os-partner:32359
BRANCH=samus,auron
TEST=build and boot on samus with E0 and F0 parts

Change-Id: I1bc127badd75ecc34d3d2dbae5d272bd4d9f9082
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223158
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:11 +00:00
Ryan Lin
c3fc03bc2e coreboot: force 4-byte alignment for init structure with GCC 4.9
Force 4-byte alignment for .bs_init section to ensure that no padding
data is added to init structures.

BUG=chromium:416651
BRANCH=none
TEST=build firmware with GCC 4.9 and test on Auron and Rambi.

Change-Id: I3f94cd419b5951fdc6e5749576c4df2cc44f8a24
Signed-off-by: Ryan Lin <ryan.lin@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/223116
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Kenji Chen <kenji.chen@intel.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-14 23:59:10 +00:00
Duncan Laurie
55ed3bc880 broadwell: Change CPUID 306D4 to report "E0 or F0"
The F0 stepping has the same CPUID as E0 stepping so report
it as either stepping to avoid confusion.

BUG=chrome-os-partner:32359
BRANCH=samus,auron
TEST=build and boot on samus

Change-Id: Ia4955f346ceb9be92e06ecea5b7a8fe2db84cabc
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223097
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:10 +00:00
Duncan Laurie
08413589ba samus: Add smbios_mainboard_version to define board version
Instead of having this in mosys just have coreboot report the
board version in SMBIOS tables.

BUG=chrome-os-partner:32359
BRANCH=samus
TEST=build and boot on samus, check /sys/class/dmi/id/product_version

Change-Id: Ib851d2e79ed721dcbc1c2f2eda6da50cac064cf3
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/223096
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:09 +00:00
Julius Werner
0ed3c0c2b6 cbfs: Enforce media->map() result checking, improve error messages
If you try to boot a VBOOT2_VERIFY_FIRMWARE with less than 4K CBFS cache
right now, your system will try and fail to validate the FMAP signature
at (u8 *)0xFFFFFFFF and go into recovery mode. This patch avoids the
memcmp() to potentially invalid memory, and also adds an error message
to cbfs_simple_buffer_map() to make it explicit that we ran out of CBFS
cache space.

BUG=None
TEST=Booted on Veyron_Pinky with reduced CBFS cache, saw the message.

Change-Id: Ic5773b4e0b36dc621513f58fc9bd29c17afbf1b7
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222899
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:08 +00:00
Vadim Bendebury
b104d5c1c3 storm: fix CBFS definitions
It's been a while since SBL blob size was reduced. As CBFS area by
definition includes the bootblock, storm configuration needs to be
updated to address the changes in layout.

Incidentally, it looks like CBFS_SIZE configuration setting is not
used on ARM platforms, this will have to be addressed separately.

BRANCH=storm
BUG=chromium:422501
TEST=storm firmware does not report the failure to find payload anymore

Change-Id: I37abf76a9d8884b3431633f57f64896c3a5fb135
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222898
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:08 +00:00
Vadim Bendebury
427261fbcf cbfs: fix debug mode compilation error
When cbfs debug is enabled, compilation fails because one of the debug
messages is using an non-existing variable.

BRANCH=nonr
BUG=None
TEST=compiling with CONFIG_DEBUG_CBFS enabled does not fail anymore.

Change-Id: Ic83f5e96cdcb5275ec0b7fadbc901e254a1002ca
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222897
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:07 +00:00
Tom Warren
3f6a21afdb tegra132: Store ODMDATA from BCT into PMC scratch for use by kernel
In able to do earlyprintk spew on LP0 resume, the kernel needs to
know the board UART. ODMDATA (in bct/odmdata.cfg) contains this info,
and the kernel looks for it in PMC_SCRATCH20. Fetch the ODMDATA word
from the BCT copy stored in IRAM by the BootROM.

BUG=chrome-os-partner:32015
BRANCH=none
TEST=Built for Rush and Ryu OK. Dumped PMC_SCRATCH20 in TegraShell
on Rush and confirmed value is what's in odmdata.cfg.

Change-Id: I63f33558ee8b00bd6c1e313efcd531e1d5fc67eb
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/222402
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-14 23:59:06 +00:00
Julius Werner
7466ffc035 rk3288: Fix some PLL divisors and improve clock code
This patch does some general cleanup in the Rockchip clock code, and
adds some more assertions regarding the PLL VCO and output frequency
ranges. It changes all PLL divisors to use the lowest values that can
still hit the target frequency, since higher NR values lead to higher
jitter and higher NO values increase power draw.

Also change DDR3 frequency code to hardcode the optimal divisors for
certail frequencies. As a little hack we will interpret 666000000 to
actually mean 666666666.6P (and analogous for 533MHz), since that's what
you usually want for memory.

BUG=chrome-os-partner:32139
TEST=Boot on veyron_pinky rev2, check that dpll_is shown as 666666666 in
/sys/kernel/debug/clk/clk_summary.

Change-Id: I4f3c39641955a95c6dfbe9334035eb670b138bf0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221801
2014-10-14 23:59:06 +00:00
David Hendricks
6a14f5ff8e rk3288: Re-write spi_xfer() to support full duplex
This change re-writes the spi_xfer() function to support full-duplex
transfers.

Even though the code looks much different, the same basic algorithm
for setting up the transfer is used. The main difference is that
reads from rxdr and writes to txdr occur simultaneously and accounting
is more complicated, so I separated the higher-level accounting
portion from the low-level FIFO handling portion to simplify things.

BUG=chrome-os-partner:31850
BRANCH=none
TEST=Loaded content from SPI ROM fine, needs testing w/ EC

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I33d2f5179360baf94627c86b57d12f032897caf5
Reviewed-on: https://chromium-review.googlesource.com/218881
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-14 23:59:05 +00:00
Furquan Shaikh
688ef3856d arm64: Move console_init after post_sysinfo_mmu_setup call
This is important since mmu is disabled during the post_sysinfo_mmu_setup call
and calling printf can cause unaligned access.

BUG=None
BRANCH=None
TEST=Compiles successfully and boots to kernel prompt with console_init

Change-Id: Ie376e394d084edd6c999fc9edde79f15a0264e7b
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/222664
Reviewed-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-10 11:39:45 +00:00
Furquan Shaikh
3cd75756e1 arm64: Add function to get new range from available memranges
Provide a function to obtain a new memrange with requested properties (type,
size, alignment, max_addr and other restrictions) from the set of available
memranges passed in coreboot table. One user of this function would be getting
memrange for dma, another one would be framebuffer.

BUG=chrome-os-partner:31634
BRANCH=None
TEST=Compiles successfully and boots to kernel prompt

Change-Id: I187d73a4d55d3c6f49afbe9852901672d25de8dc
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/222110
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-10 11:39:40 +00:00
Duncan Laurie
de6149508c broadwell: me: Fix typo and add missing phase state
Fix the typo of sate to state and add uKernel phase to just
output the current state byte.

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

Change-Id: I520a4cc75faffa5feeb6113ffd7b07a48c4e6f28
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222677
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-10 11:39:33 +00:00
Duncan Laurie
f29c1b0b7c broadwell: Work around VBIOS framebuffer issue
The first 64 bytes of the framebuffer contain garbage after running
the option rom and after calling the VBE mode set with the flag to
clear the framebuffer.

Work around this issue by clearing the first 64 bytes in the framebuffer
in the broadwell graphics setup code after it executes the VBIOS.

BUG=chrome-os-partner:32771
BRANCH=samus,auron
TEST=build and boot on samus in dev mode, check for graphical corruption

Change-Id: I072bc913f7daea16e4861a7549e1b4ec85cde4cd
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222676
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-10 11:39:25 +00:00
Duncan Laurie
7021a2ff90 samus: Use custom VESA mode
This selects the correct custom vesa mode for Samus which is
added to the VBIOS for bitmaps to be scaled appropriately.

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

Change-Id: Id2b3349340e85ab6f29374dff096c39ac0506fc6
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222675
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-10 11:39:12 +00:00
Kenji Chen
1717505a3f Broadwell: Synchronization with FRC for Root Port Power Management
BUG=chrome-os-partner:31424
TEST=Build a image and run on Samus proto boards to confirm if the
settings are applied correctly.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I8138507506771148420a585fd12897a3bfe91916
Reviewed-on: https://chromium-review.googlesource.com/221387
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-10 11:39:03 +00:00
David Hendricks
56b3e8c02a pinky: Enable EC_SOFTWARE_SYNC
CQ-DEPEND=CL:218766
BUG=none
BRANCH=none
TEST=built and booted on Pinky

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: Icbee95350949bd9bfa4490a8a4b6bbf09beb4170
Reviewed-on: https://chromium-review.googlesource.com/221019
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-10 06:54:00 +00:00
Kenji Chen
b94c8c715f Broadwell: Select PCIE_L1_SUB_STATE and apply Broadwell settings.
BUG=chrome-os-partner:31424
TEST=Build an image and confirm the settings are correctly applied
to registers for PCIe L1 Sub-State feature enabling.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: I07ce6eea648b1b37d606f5529edad184e3de70ac
Reviewed-on: https://chromium-review.googlesource.com/222599
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-10 04:36:56 +00:00
Kenji Chen
6ac04ad7e2 PCIe: Add L1 Sub-State support.
Enable L1 Sub-State when both root port and endpoint support it.

BUG=chrome-os-partner:31424
TEST=Build a image and run on Samus proto boards to check if the
settings are applied correctly. I just only have proto boars and
need someone having EVT boards to confirm the settings.
Signed-off-by: Kenji Chen <kenji.chen@intel.com>
Change-Id: Id1b5a52ff0b896f4531c4a6e68e70a2cea8c736a
Reviewed-on: https://chromium-review.googlesource.com/221436
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-10 04:36:50 +00:00
Daisuke Nojiri
fd9dbcf102 cosmos: add template for soc and board files
This adds board and soc files as a template for cosmos.

BUG=chrome-os-partner:32772
BRANCH=none
TEST=Built coreboot for cosmos and veyron_pinky.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I676bdf460f5dd996dcce1fc422a69882798bc112
Reviewed-on: https://chromium-review.googlesource.com/222050
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
2014-10-09 20:44:46 +00:00
Kane Chen
f7dc2a0772 pearlvalley: enable M.2 socket power for wlan
according to schematic, GPIO29 needs to output high to enable M.2
socket power

BUG=none
BRANCH=none
TEST=build ok and see wifi device on M.2 socket working in OS

Change-Id: I7f122541a7bf3a5d7872f37a866ea3f1e52e8b47
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/221927
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-10-09 16:42:30 +00:00
Daisuke Nojiri
1916da6712 vboot: add vbnv_flash as template
this adds a flash vbnv driver for vboot to store non-volatile data in a flash
storage.

BUG=chrome-os-partner:32774
BRANCH=none
TEST=Built samus, veyron pinky, and cosmos
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: If5fc1b779722528134ad283fa030f150b3bab55f
Reviewed-on: https://chromium-review.googlesource.com/222258
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-10-09 16:42:25 +00:00
Aaron Durbin
1ff8da9fed tegra132: remove framebuffer reservation
There's no need to reserve the framebuffer within corebot. If the
payloads need a framebuffer they can allocate one themselves.

BUG=chrome-os-partner:31355
BRANCH=None
TEST=Built and booted on ryu.

Change-Id: I8d8b159e7fdd877e392193c5474a7518e9b3ad21
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221726
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-09 16:42:21 +00:00
Sourabh Banerjee
7eefb3b285 libpayload: usb: xhci: set ENT flag in last Normal TRB
If a TD is comprised of one or more Normal TRBs and terminated with an
Event Data TRB, then the transition to the Idle state (and associated
 Stream state save) could occur after all the data for the TD has been
moved (e.g. after Transfer Event TRBs have been executed), but before the
Event Data TRB is executed. Under these conditions, the execution of the
Event Data TRB is necessary to complete the TD, otherwise it does not
occur until the nexttime the Stream is scheduled. This could lead to the
lock up.

The Evaluate Next TRB(ENT) flag provides a means of forcing the execution
of a terminating Event Data TRB. Setting ENT flag in last Normal TRB makes
the xHC to evaluate the Even Data TRB.

BUG=chrome-os-partner:29375
TEST=Verified kernel boot-up on storm from previously failing USB stick.
     USB stick model: Sandisk Ultra USB 3.0 Pen Drive 32 GB
		      Strontium Jet USB 3.0 Pen Drive(32 GB)

Change-Id: I4e123577ec5a5996d87d2fc52cb6cf5c571c9fae
Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/220123
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
2014-10-09 16:42:18 +00:00
Aaron Durbin
66518fd86e libpayload: arm64: fix mmu bugs
1. keep functions and objects used entirely within mmu.c as static.
2. DMA region finding needs to terminate. Therefore, the next address
   to be attempted needs to be less then the current end address.
3. Ensure mmu_ranges passed to mmu_init_ranges_from_sysinfo() has
   0 entries marked as used.

BUG=chrome-os-partner:31634
BRANCH=None
TEST=Booted ryu with RAM hole above cbmem tables below 4GiB.

Change-Id: I5cb4e5009359cb04c4e1b5fe60845f80fbdff02c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221725
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-09 16:42:13 +00:00
Aaron Durbin
df4991ce1d cbmem: stop assuming 1MiB of memory can be mapped
The default mapping size is 1MiB of ram. However, not
all systems allow 1MiB of memory to mapped depending on
the kernel's memory map. Therefore, be explicit about
the sizes to mmap().

The only path that wasn't cleaned up was the coverage path
as that needs to handle dynamic cbmem. The correct way to
fix that is to add a global like the timestamps that is set
while parsing cbtable.

BUG=chrome-os-partner:31355
BRANCH=None
TEST=Can cbmem -ltc on ryu.

Change-Id: I27b70ae8a8fba168d1c1829bbef0135c7b651eac
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221971
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-09 16:42:09 +00:00
Aaron Durbin
8ab5fca570 UPSTREAM: util/cbmem: handle larger than 1MiB mappings for console
In some cases the cbmem console can be larger than the default
mapping size of 1MiB. Therefore, add the ability to do a mapping
that is larger than the default mapping using map_memory_size().
The console printing code will unconditionally map the console based
on the size it finds in the cbmem entry.

Change-Id: I016420576b9523ce81195160ae86ad16952b761c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/5440
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/221970
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-09 16:42:04 +00:00
Furquan Shaikh
907ea2d1f8 arm64: Add verstage support
This stage is not tested on any hardware.

BUG=None
BRANCH=None
TEST=Compiles successfully for rush_ryu and veyron_pinky

Change-Id: I6dd266471c815895bb3dd53d34aacc8fe825eeb6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221911
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-08 09:30:54 +00:00
Furquan Shaikh
a843bb6773 verstage: Add proper guard conditions
BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I8494402144ad22a4e1c0652e3c94e59cd706bb16
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221808
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-08 09:30:48 +00:00
Duncan Laurie
c3fbeac10f broadwell: Skip DDI-A enable in S3 resume
DDI-A should not need re-enabled in the resume path, just
the resume path when we did not execute VBIOS.

BUG=chrome-os-partner:28234
BRANCH=samus,auron
TEST=build and boot on samus, test suspend+resume

Change-Id: Iaf7d083c5c92c42b7a117e2d2c9546ada6bf5f76
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221988
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-08 07:14:59 +00:00
Duncan Laurie
481aba8341 broadwell: Update 306D4 to microcode 0x11
This is the latest available microcode.

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

Change-Id: I3fdc93d834a43c97cf6f404f0f465902781ad9e4
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221987
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-10-08 05:07:27 +00:00
Vadim Bendebury
c76f4b40eb Change GDB_DEBUG to SOURCE_DEBUG
With introduction of GDB support the GDB_DEBUG make parameter sounds
misleading. Let's change it to SOURCE_DEBUG. It is still quite useful
when debugging with GDB, but can be used with any debugger.

BUG=None
TEST=built coreboot with SOURCE_DEBUG in the environment, observed it
     compiled as expected

Change-Id: Ia6cfddfa1764fb070f4d35f374ed4f35e38d38fe
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221386
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-08 05:07:21 +00:00
Julius Werner
41bb802681 stddef: Add KHz, MHz and GHz constants
This patch adds some simple constants to more easily write and do math
with frequencies, analogous to the existing KiB, MiB and GiB constants
for sizes. They are exemplary added to the Veyron_Pinky/Rk3288 code for
now and will hopefully be adopted by other parts of the codebase in the
future.

BUG=None
TEST=Compiled Veyron_Pinky.

Change-Id: I4a1927fd423eb96d3f76f7e44b451192038b02e0
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221800
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-10-07 20:59:39 +00:00
Michael Spang
1182c46e39 Revert "arm64: Add verstage support"
This reverts commit 36960019dc.

Change-Id: Ie347622774bd9343face4890da2f65e8b29f4fb7
Reviewed-on: https://chromium-review.googlesource.com/221944
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Tested-by: Michael Spang <spang@chromium.org>
2014-10-07 14:35:34 +00:00
Jim Lin
37e6844906 libpayload: config: nyan: Set CONFIG_LP_USB_EHCI_HOSTPC_ROOT_HUB_TT
Set "CONFIG_LP_USB_EHCI_HOSTPC_ROOT_HUB_TT=y" for nyan-series
platforms to enable USB keyboard when it's connected to root hub.

BUG=chrome-os-partner:32355
TEST=Tested on nyan series platforms.
Press ESC+REFRESH+POWER keys on internal keyboard to power up.
Press Left Arrow or Right Arrow on USB keyboard to switch between
"English" and "Default Locale" in coreboot UI. Or unplug and plug
in device and try again.
Root hub <- low-speed USB keyboard
Root hub <- full-speed hub <- low-speed USB keyboard
Root hub <- high-speed hub <- low-speed USB keyboard

Change-Id: I0c47cdd7018133185b6ffe1a51c62932f1287b34
Signed-off-by: Jim Lin <jilin@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/221035
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-10-07 05:54:13 +00:00
Furquan Shaikh
1b950f3a2e rush: Enable vboot2 config option
CQ-DEPEND=CL:221601, CL:*178568
BUG=chrome-os-partner:32684
BRANCH=None
TEST=Compiles successfully

Change-Id: I0bc5061a012214e451a289473dc6f8cc8c52849e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221600
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:38:07 +00:00
Furquan Shaikh
14e3487213 rush: Add vboot2 support
CQ-DEPEND=CL:221601, CL:*178568
BUG=chrome-os-partner:32684
BRANCH=None
TEST=Compiles successfully

Change-Id: I50d0475dbe1390b640a726c259364f36abcbebe0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221579
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:59 +00:00
Furquan Shaikh
7657e2a9fc ryu: Enable vboot2 config option
CQ-DEPEND=CL:221598, CL:*178568
BUG=chrome-os-partner:32684
BRANCH=None
TEST=Compiles and boots to kernel prompt

Change-Id: I807c5c2945d95bfae961c4880ed54d650aea7ecf
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/221578
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-10-07 03:37:52 +00:00