Commit graph

10,217 commits

Author SHA1 Message Date
Paul Burton
6cb1017f5e imgvp-danube: Support for the ImgTec Danube Virtual Platform
Add basic board support for the ImgTec Danube Virtual Platform, which
emulates a system built around the Danube SoC.

Run this by loading coreboot.bimg into a flash device connected to SPFI1
chip select 0 & then executing the Danube boot ROM.

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

Change-Id: I7a2b52f304bcb4b614440ec38975e05f38b0e590
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207976
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:06:44 +00:00
Paul Burton
881278d7fb imgtec/danube: Add support for ImgTec Danube SoC
Add build infrastructure and basic support code for the ImgTec Danube
SoC. This support is sufficient to run on a simulator.

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

Change-Id: Ia7ed7288b13085db7ff37b5ad75d978b6137f958
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207974
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:06:39 +00:00
Paul Burton
7fe6a9f383 imgtec/danube: Build BIMG boot images
Add a new utility named bimgtool, a simple tool which generates boot
images in the BIMG format. This is the format the Danube boot ROM
expects the user supplied code to be wrapped in, it is described by
struct bimg_header in the code.

This utility will be used to wrap the coreboot bootblock when building
Danube targets.

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

Change-Id: I63b9f5e09cd1f12765317b38e2a0dd033cdd6d39
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207975
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:06:36 +00:00
Paul Burton
1a41853273 console: Allow bootblock console on MIPS
In addition to ARM based systems, allow MIPS based systems to select
bootblock console support.

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

Change-Id: I41f03ea8c8104ba2dd9f532b084696385d29636c
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-on: https://chromium-review.googlesource.com/207973
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
2014-09-01 11:06:29 +00:00
Aaron Durbin
b6bd7c0de3 ryu: fix power button polarity
The power button signal is driven from the silego part.
It's active high when the button is pressed.

BUG=None
BRANCH=None
TEST=Booted with power button pressed. vboot saw the press and
     requested a shut down.

Change-Id: If25ebce28c1ab5a363f3b4b5ab9fc24baebad56a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214847
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-01 11:06:22 +00:00
Aaron Durbin
5f2af2e329 rush: use names for gpios
Instead of calling out the gpio index and port numbers use
real names. It's semantically clearer and there's only one
place to adjust the hardware values.

BUG=chrome-os-partner:31106
BRANCH=None
TEST=Built and booted.

Change-Id: I68c138b428abbd0c9bc60be0cfc70681528d7728
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215542
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-09-01 11:06:15 +00:00
Vadim Bendebury
9c0978d944 Avoid long division on MIPS
The 64 bit division function is not readily available from the MIPS
toolchain inside chroot. This causes link failures when building
upcoming MIPS coreboot targets.

It turns out that the only place using the 64 bit division is the
printf formatter when processing the '%L' format specification.
Further examining of the source code has shown that so far the '%L'
format specification is used only in x86 code.

The suggested fix is to suppress %L support for MIPS.

BUG=chromium:406038
TEST=with this patch the upcoming MIPS platforms build successfully.

Change-Id: Iec0123620ac84a1697892f995235511b3288d4b2
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214174
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:06:10 +00:00
Paul Burton
fcc0d934d7 arch/mips: Add base MIPS architecture support
Add the build infrastructure and basic architectural support required
to build for targets using the MIPS architecture. This is sufficient
to run on a simulator, but will require the addition of some cache
maintenance and timer setup in order to run on real hardware.

BUG=chrome-os-partner:31438, chromium:409082
TEST=none yet

Change-Id: If4f99554463bd3760fc142477440326fd16c67cc
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207972
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-09-01 11:05:57 +00:00
huang lin
814af4b653 coreboot: rk3288: add cpu and chip
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I1a986fbc8b3737bae655207dd89865dd39aecf87
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209467
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Lin Huang <hl@rock-chips.com>
Tested-by: Lin Huang <hl@rock-chips.com>
2014-08-30 09:15:36 +00:00
Daisuke Nojiri
f3413d3945 nyans: reduce code duplication in bootblock and romstages
this change reduces the code duplication of the bootblock and the romstages for
Nyans.

BUG=none
TEST=Built Nyan, Big, and Blaze. Ran faft on Blaze.
BRANCH=none
Signed-off-by: dnojiri@chromium.org (Daisuke Nojiri)
Change-Id: Ieb9dac3b061a2cf46c63afb2f31eb67ab391ea1a
Reviewed-on: https://chromium-review.googlesource.com/214050
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-08-30 09:15:32 +00:00
Daisuke Nojiri
75a0e78b5d arm, arm64, x86: add vprintk to early console
vprintk is created out of do_printk for all the archs.

BUG=none
TEST=Built Nyans, Falco, and Ryu. Verified serial output on Blaze and Falco.
BRANCH=none
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: Idf708359f0e9e9a9f32a601a5a117e469d5025ba
Reviewed-on: https://chromium-review.googlesource.com/214566
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-08-30 09:15:26 +00:00
Kane Chen
97761b4ad3 broadwell: fixed some errors in selftest
1. Fixed some errors in selftest compare to crb
2. Some WA steps for xhci in sleep trap is only for lpt

BUG=chrome-os-partner:28234
TEST=compile ok, run selftest on auron to verify
     boot to OS
BRANCH=None
Signed-off-by: Kane Chen <kane.chen@intel.com>

Change-Id: Iaccb087581d5f51453614246bf80132fcb414131
Reviewed-on: https://chromium-review.googlesource.com/215646
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: Kane Chen <kane.chen@intel.com>
Tested-by: Kane Chen <kane.chen@intel.com>
2014-08-30 04:03:09 +00:00
Duncan Laurie
ead47fb94c broadwell: Update E0 stepping microcode to rev E
Microcode released on August 29.

BUG=chrome-os-partner:28234
BRANCH=none
TEST=build and boot on samus with E0 step

Change-Id: Icf90b2fb3c70b1edae4979f8e491fe98a6766e95
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215680
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-30 04:03:02 +00:00
Furquan Shaikh
6d4d07e26f libpayload arm64: Remove tight-coupling with any particular EL
Allow more flexibility by reading and writing to system registers at current
EL. Instead of specifying what _ELx register to write to, code can specify
_current.

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

Change-Id: Ic1d9e18e6fc016a04f17621a148e62d6cbd04ce7
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214577
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-29 21:55:21 +00:00
Jinkun Hong
52838c68fe coreboot: rk3288: add ddr driver
Supports DDR3 and LPDDR3.Supports dual channel.ddr max freq is 533mhz.
ddr timing config file in src\mainboard\google\veyron\sdram_inf
Remove dpll init in rk clk_init(), add rkclk_configure_ddr(unsigned int hz).

BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I6ddfe30b8585002b45060fe998c9238cbb611c05
Signed-off-by: jinkun.hong <jinkun.hong@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209465
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-29 21:55:13 +00:00
Furquan Shaikh
2b55fbde46 libpayload arm64: Add support for read and write registers at current EL in assembly
In order to ease the process of reading and writing any register at current EL,
provide read_current and write_current assembly macros. These are included in
arch/lib_helpers.h under the __ASSEMBLY__ macro condition. This is done to allow
the same header file to be included by .c and .S files.

BUG=chrome-os-partner:31634
BRANCH=None
TEST=Compiles successfully for ryu

Change-Id: I678ab89c4aa1b08898166e135b5ab2d6453bb5e8
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214576
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-29 21:55:06 +00:00
Furquan Shaikh
2ca6da580c libpayload arm64: Add library helpers
Add library helpers to access standard arm64 registers. This library also
provides functions to directly read/write register based on current el. So, rest
of the code doesnt need to keep checking the el and call appropriate function
based on that.

BUG=chrome-os-partner:31634
BRANCH=None
TEST=Libpayload and depthcharge compile successfully for ryu

Change-Id: I9b63e04aa26a98bbeb34fdef634776d49454ca8d
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214575
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-29 21:55:01 +00:00
Furquan Shaikh
bba2caae0b libpayload arm64: Make exceptions work
BUG=chrome-os-partner:31634
BRANCH=None
TEST=test_exc generates and handles exceptions properly

Change-Id: I4abe8a0e426eab2532852179dbb32505353cd0a1
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214609
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-29 21:54:54 +00:00
Furquan Shaikh
99157687c5 libpayload arm64: Initialize exception stack
Initialize exception stack to be able to handle exceptions properly

BUG=chrome-os-partner:31634
BRANCH=None
TEST=test_exc successfully generates and handles exceptions on ryu

Change-Id: I4dc83ff32c1665e22127bf0b1e6d4c6b45c07a4a
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214608
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-29 21:54:49 +00:00
Aaron Durbin
b44956ec87 ryu: configure plld for display usage
The kernel doesn't have the logic for bringing up the plld.
Therefore, configure it in the firmware. The clock used
is an interim value until the display controller sequencing
is fully implemented.

BUG=chrome-os-partner:31640
BRANCH=None
TEST=Noted configured freq is close to requested. Also, no
     more plld errors observed from the kernel.

Change-Id: I6f57d5c48630385d1814e7ef61898a2d49c8f747
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214841
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 21:54:44 +00:00
Aaron Durbin
fc928db819 tegra132: return actual plld frequency
Depending on the requested frequency the plld cannot
necessarily obtain the exact clock. Therefore provide the
closest configured frequency as a return value. This is
equivalent to the t124 patch.

BUG=chrome-os-partner:31640
BRANCH=None
TEST=Built and noted plld actual value close to requested.

Change-Id: I94b94a1bf01087ff0d0e4b1ef3fb59eec2a8ba15
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214843
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
2014-08-29 21:54:36 +00:00
Aaron Durbin
d9432b5cf0 arm64: remove _stack and _estack symbols in linker script
These symbols should have been removed with the stack
refactoring. I'm not sure how it was missed.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted into kernel with both cpus.

Change-Id: I17bc9a7aaaf133f427b15f803a6003fa2ca8f8a6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/215541
2014-08-29 15:09:09 +00:00
Furquan Shaikh
9aaa89115a t132: No need of the Kconfig variable for stacks
With the latest changes to include stack storage within ramstage, we no longer
need to define Kconfig options for ramstage/exception stacks in arm64.

BUG=None
BRANCH=None
TEST=Compiles successfully and boots to kernel on ryu

Change-Id: I93c23ac3fa9adab4eac3c739023cbae3e5135497
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214607
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-29 08:01:54 +00:00
Aaron Durbin
74c62e62a6 ryu: bring up secondary core
Instruct the SoC to bring up the 2nd core.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Brought up 2nd core in Linux.

Change-Id: I5f5febc4719951188106041f73625231eafe1b08
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214778
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:15:01 +00:00
Aaron Durbin
01ca366858 tegra132: add spintable support
Until PSCI is functional the other core still needs to be
brought up in the kernel. The kernel boots these cpus with
the spin table which is just an address in memory to monitor
a jump location.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and brought up secondary core in linux.

Change-Id: Ieaf19cd70aff3e6c8de932e04b1b5aba71822a97
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214777
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:14:54 +00:00
Kane Chen
0da45307be auron: Move SPD related files/information to spd directory
Auron port of Samus commit f40e447cee

BUG=chrome-os-partner:31286
TEST=compile ok and make sure the spd index is right on auron
     boot to OS
BRANCH=None

Change-Id: Idf8f58dc48ff7dd2481177aa377628cfa032b699
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/214820
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2014-08-29 03:11:51 +00:00
Aaron Durbin
d7da2dcce9 tegra132: add option to bring up and init secondary cpu
Optionally bring up secondary cpu according to devicetree.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and enabled bringing up second core on ryu.

Change-Id: Ia3f2c10dab2bbfd65ba883451bf4eafc26f2e7cf
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214776
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:11:47 +00:00
Aaron Durbin
5303ae3d6b arm64: provide API for coordinating secondary CPU bringup
Provides a minimal API for coordinating with the SoC for
bringing up the secondary CPUs. There's no eventloop or
dispatcher currently nor does it do anything proper when
one of the secondary CPUs are brought up. Those decisions
are deferred to the SoC.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and brought up 2nd cpu using this API.

Change-Id: I3b7334b7d2df2df093cdc0cbb997e8230d3b2685
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214775
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:10:47 +00:00
Aaron Durbin
813b0a8b3f tegra132: support GIC secondary cpu support
For the secondary CPUs the set of banked registers needs to be
initialized. In the boot CPU path all both the CPU's banked
registers and the global register set is initialized.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and brought up 2nd cpu in kernel.

Change-Id: Ie5db56ca052eebac4ed1a34eaeeb6bbd8a26ca30
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214774
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:10:42 +00:00
Aaron Durbin
76a1c9cb3d arm64: add exception_hwinit()
exception_hwinit() provides a path for just setting the hardware
state. This allows for other CPUs but the boot CPU for setting up
the appropriate vector table.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted to the kernel.

Change-Id: Ib09c813b49a4f00daca0b53d9dca972251fcf476
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214773
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:07:41 +00:00
Aaron Durbin
bd77461d48 arm64: make mmu_enable() use previous ttb from mmu_init()
No need to pass in the same value for the ttb after just
calling mmu_init(). All current users are setting this once
and forgetting it.

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

Change-Id: I54c7e4892d44ea6129429d8a46461d089dd8e2a9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214772
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:07:37 +00:00
Aaron Durbin
f692c5814e arm64: add indirection to C entry point
To allow setting the entry point for the secondary CPUs
provide a pointer, c_entry, which contains the location
to branc to after setting up the stack.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted to the kernel on ryu.

Change-Id: Ic2f6c79cde708b24c379345aed1e2cc0760ccad8
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214771
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:06:52 +00:00
Aaron Durbin
f478cfe175 arm64: move seeding stack to C
Move the stack seeding out of assembly and into C so the
code in stage_entry.S can more easily be used. The seeding
of the stack doesn't touch at least 256 bytes to account
for current usage at time fo the call.

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

Change-Id: I44004220a02b1ff06d27a0555eb4e96d9e213544
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214770
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:06:49 +00:00
Aaron Durbin
6524993f01 arm64: include stack storage within ramstage
Instead of defining the stacks by Kconfig options include
the stack sizes for all the CPUs including each of their
exception stacks. This allows for providing each CPU
on startup a stack to work with.

Note: this currently inherits CONFIG_STACK_SIZE from x86 because
of the Kconfig mess of options not being guarded.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted into the kernel on ryu.

Change-Id: Ica09dc256e6ce1dd032433d071894af5f445acdb
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214669
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:06:43 +00:00
Aaron Durbin
f92a5a01f0 arm64: refactor stage entry
Provide a common entry point arm64 cores coming out of reset. Also,
take into account CONFIG_ARM64_CPUS_START_IN_ELx to set the
correct SCTLR_ELx register. The SCR_EL3 initialization was removed
as that can be done in policy code in C later. Part of this refactor
allows for greater code reuse for the secure monitor.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=built and booted to linux on ryu

Change-Id: If16b3f979923ec8add59854db6bad4aaed35e3aa
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214668
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:03:40 +00:00
Aaron Durbin
8af81929a8 tegra132: select EL3 cpu start up state
The armv8 cores in tegra132 start in EL3. Indicate as such.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and noted Kconfig selection.

Change-Id: I83370a03cfc0f04058ae2b6d87b09b96642df97d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214667
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:03:37 +00:00
Aaron Durbin
bb6b092a43 arm64: add config options for exception level startup
Depending on the armv8 implementation the cpus could start in
EL1, EL2, or EL3.  Therefore allow the SoC to select the appropriate
mode.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built.

Change-Id: Id063681ef7691097e528c105fffac5d467585e4e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214666
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:03:31 +00:00
Aaron Durbin
e2c32b1a46 arm64: implement cpu_info() correctly
There are 2 things wrong with the current implementation:
1. the stack isn't guaranteed to be aligned to CONFIG_STACK_SIZE.
2. the stack isn't necessarily CONFIG_STACK_SIZE bytes.

Utilize the smp_processor_id() function to obtain the correct
cpu_info structure to obtain the correct index.

BUG=chrome-os-partner:31545
BRANC=None
TEST=Built and booted.

Change-Id: I2825118e2313dbbf13712a4afdfa05a2e38ee3a4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214665
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:00:27 +00:00
Aaron Durbin
d5c5c68329 tegra132: implement smp_processor_id()
Implement smp_processor_id() for the arm64 cores.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built.

Change-Id: I7a1cd2f94ba4ae1854450cc60ef8a62f2457aabb
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214664
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 03:00:23 +00:00
Aaron Durbin
6033e73d70 arm64: add smp_processor_id() declaration
In order to accomodate MP on arm64 one needs to be able to determine
the current logical processor id. Because it depends on the SoC
implementation the SoC needs to provide this implementation.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built.

Change-Id: I9511b54b5a1ab340b0f1309b0d9976be68b50903
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214663
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 02:57:20 +00:00
Aaron Durbin
0524d47696 arm64: clean up ramstage.ld
This just removes some unneeded symbols and comments. Additionally,
moved most of the absolute symbols into the individual sections.
Also, aligned data sections to 64 bytes (typical cache line size).

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and booted through coreboot normally on ryu.

Change-Id: I304e3702247a06507f5f4e23f8776331a3562c68
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214662
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 02:57:17 +00:00
Aaron Durbin
efa6c03435 tegra132: increase MAX_CPUS to 2
There are 2 cores visible to the OS and both need to be
brought up. Therefore, provide the proper number of cores.

BUG=chrome-os-partner:31545
BRANCH=None
TEST=Built and noted CONFIG_MAX_CPUS=2.

Change-Id: Id31b0a3046e40e1aec09bf2ee66b1e2f0b27fd21
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214661
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 02:57:14 +00:00
Aaron Durbin
1037d473f3 ryu: normalize board id
Instead of relying on the encoding of gpio_get_in_tristate_values()
normalize the ids.

BUG=chrome-os-partner:31602
BRANCH=None
TEST=Built and noted correct output w/ coresponding correct device
     tree selected in depthcharge.

Change-Id: I7d5449bc14e776fd9faa86af0f80690c3d9ae92d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214840
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2014-08-29 02:57:11 +00:00
Shawn Nematbakhsh
d0752be013 samus: Add PD MCU ACPI device and unmask host event
Samus has a PD MCU, and should handle PD MCU host events.

BUG=chrome-os-partner:31361
TEST=Manual on Samus. Verify that ACPI Notify routine is called when
host event is sent from EC.
BRANCH=None.

Change-Id: Id40ebd438b3dd60cefc7650f2edc695c589343e9
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214860
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
2014-08-29 02:57:07 +00:00
Shawn Nematbakhsh
226b349e40 chromeec: Add ACPI device for PD MCU and handle related EC host event
Add ACPI device for PD MCU, if present. Call Notify routine when the
corresponding EC host event is received.

BUG=chrome-os-partner:31361
TEST=Manual on Samus. Enable EC_ENABLE_PD_MCU_DEVICE, unmask PD MCU host
event, and verify ACPI Notify routine is called when host event is sent
from EC.
BRANCH=None.

Change-Id: I6db61031e434d7ecb211802a4caeaba051e22a28
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214809
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
2014-08-29 02:57:00 +00:00
huang lin
3606d7eb06 coreboot: rk3288: add gpio
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I3e0cff1c6de464a8a79e30e239cfb0960cbae253
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209460
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-28 20:12:56 +00:00
huang lin
abf5c14c8b coreboot: rk3288: add i2c
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I46257cc71cc3cd1e867edf589ddf09f7990d6784
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209462
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-28 20:12:53 +00:00
huang lin
ba9c36daed coreboot: rk3288: add make_idb.py & update bootblock
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: Ia0e4e39d4391674f25e630b40913eb99ff3f75c4
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209427
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-28 20:12:48 +00:00
huang lin
30d02610e8 coreboot: rk3288: add iomux operation
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I8f273f8850e4792ca976bb7c2ed39cbe501401f2
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: huang lin <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209461
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-28 20:12:45 +00:00
huang lin
a30378a315 coreboot: rk3288: add media
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: I5105e5277b8072c06bb41b39479373697ef81c67
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/209468
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Lin Huang <hl@rock-chips.com>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-28 20:12:40 +00:00