Commit graph

10,193 commits

Author SHA1 Message Date
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
huang lin
8253a9dbad coreboot: rk3288: add spi
BUG=chrome-os-partner:29778
TEST=Build coreboot

Change-Id: Ib6ee7e3092429a3e47b102751ed6a88aeb9ee7d3
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/209429
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
2014-08-28 20:12:35 +00:00
Kane Chen
57e42c781d broadwell: pcie updates from 2.1.0 ref code
some clock gating and pcie settings are missed in original code

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

Change-Id: I931276adb2f2667c4f9e7611acfd709b7232d492
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/214568
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-28 04:23:54 +00:00
Marc Jones
20b5896adb Add support for GigaDevice GD25LQ64C/GD25LB64C SPI ROM.
GD25LQ64C and GD25LB64C have the same ID and settings.

BUG=chrome-os-partner:25907
BRANCH=baytrail
TEST=Boot  with GD25LQ64 and check MRC data save/restore works.

Change-Id: I86d1e69552b6000faa9e0523356e27d7e2a6a6db
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: https://chromium-review.googlesource.com/193238
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-08-28 01:16:15 +00:00
Furquan Shaikh
de0f3f8016 t132: Increase TrustZone Carveout Region size
Increase TZ carveout region size to 4MiB. TTB lives in the first 1MiB of the
trust zone. Rest of the TZ memory can be used by el3 monitor.

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

Change-Id: I1f25b7b119037cba7055a1bd61997f020a0b1010
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214370
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:39 +00:00
Furquan Shaikh
24ad4383a9 rmodtool: Add support for aarch64
BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles succesfully, rmodule created and loaded for ryu

Change-Id: I4f3a5dbb8fc8150aa670d2e6fed56a6774feb4a6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214329
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:35 +00:00
Furquan Shaikh
e46b517a2c cbfstool: Add AARCH64 reloc types to elf.h
BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles successfully

Change-Id: Ifd4726491e01c3acebd3dfc326c1be994b0aefb8
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214328
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:31 +00:00
Furquan Shaikh
5ca4d5df46 mkelfimage: Add EM_AARCH64 as elf image type for arm64
BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles successfully

Change-Id: I5510a4fe5085430b767161133113578b7cffa237
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214327
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:28 +00:00
Furquan Shaikh
b9bb51c240 rmodule: Fix rmodule.ld for 64-bit
Fix the alignment for 64-bit systems

BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles successfully and rmodule load and run for arm64 works fine

Change-Id: I7fcb1683d760b96307759b7d44d8770dd49a02e3
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214326
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:24 +00:00
Furquan Shaikh
f2abd28c53 rmodtool: Allow rmodules with 0 relocations
Currently, rmodules with 0 relocations are not allowed. Fix this by skipping
addition of .rmodules section on 0 relocs.

BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles succesfully with 0 relocations

Change-Id: I7a39cf409a5f2bc808967d2b5334a15891c4748e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214325
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:19 +00:00
Furquan Shaikh
935a0041ac UPSTREAM: rmodtool: correct final memory size calculation
Apparently when I originally wrote this I confused myself to no end.
The code/data of an rmodule has a set memory size which is associated
with the .payload section. The relocation entries may increase the
overall footprint of the memory size if the rmodule has no bss but
a lot of relocations. Therefore, just compare relocation entries size
plus the file size of the .payload section with the memory size of the
paylod section. The .empty section is added only when we have not met
the final target size.

BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles successfully and the elf.rmod created is verified using readelf
and objdump

Change-Id: I67d8c1267b2216786019eadc02f48b6502026602
Author: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214324
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:13 +00:00
Furquan Shaikh
cae87fb1ef UPSTREAM: elfheaders: fix 64-bit ELF writing
The sh_flags for a 64-bit section header entry are 64-bit in size. Correct
this.

BUG=chrome-os-partner:31615
BRANCH=None
TEST=Compiles successfully and the elf.rmod created is verified using readelf
and objdump

Change-Id: I3fd2c19116c375f7321ae83d70e8f20509c6f4c1
Author: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214323
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
2014-08-28 01:14:10 +00:00
Shawn Nematbakhsh
ae51ac971e auron: Convert mainboard to use soc/intel/broadwell
Switch from the haswell cpu/northbridge/southbridge interface
to the soc/intel/broadwell interface.

- Use new headers where appropriate
- Remove code that is now done by the SOC generic code
- Update GPIO map to drop LP specific handling
- Update INT15 handlers, drop all but the boot display hook

Auron port of Samus commit 715dbb06e9.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: Ie8a660dd139c382929485ff458b5945e8ad72d23
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213957
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-27 04:02:18 +00:00
Shawn Nematbakhsh
f4e9c9b338 auron: Move PEI data structure init to separate file
This needs to be executed in both romstage and ramstage
for the different PEI binary stages.

It uses the broadwell interface now instead of haswell.

Auron clone of Samus commit 89f98a27ea.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: I57f4d6f17c589e1b42ee20e6824c77eb382b44af
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213956
2014-08-27 04:02:14 +00:00
Duncan Laurie
637cbf5c1a broadwell: Read and save HSIO version from ME in romstage
This can be used to know if HSIO registers need updating in ramstage
but it is not possible to query the ME for HSIO version after sending
the DRAM-init-done message.

BUG=chrome-os-partner:28234
BRANCH=samus
TEST=build and boot on samus, check for HSIO version messages in log

Change-Id: Id6beeaf57287e8826b9f142f768636a9c055d7eb
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214259
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-27 04:02:10 +00:00
Duncan Laurie
3cfc4a1812 broadwell: Fix GPE register addresses
This macro is incorrect and should be counting by dword instead of byte.
The effects of this were subtle: incorrect events in ELOG and hanging when
waking from USB input because PME_B0 was not disabled properly.

BUG=chrome-os-partner:31611
BRANCH=none
TEST=test wake from suspend with USB keyboard

Change-Id: I7caf1d46283071787550a9765703897181774957
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214258
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-27 04:02:03 +00:00
Bernie Thompson
e5bf49f9df vboot: auron: enable CHROMEOS_VBNV_CMOS kconfig variable
The change at https://chromium-review.googlesource.com/#/c/213877/
missed Auron as it was still being implemented, so we need to add
this now.

BUG=None
TEST=`emerge-auron chromeos-coreboot`

Change-Id: Ifc0106b3f08f52c67da723f7fd08b4cb7f369691
Signed-off-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214275
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-08-27 01:29:49 +00:00
Vadim Bendebury
8ec616161b Linux copy of mips/ashldi3.c
As MIPS toolchain does not provide adequate support for 64 bit
division and shift operations, the missing functions are required to
be provided by the user.

This patch brings in the Linux implementation of the 64 bit arithmetic
shift borrowed from arch/mips/lib/ashldi3.c.

BUG=chromium:406038
TEST=With the upcoming patches coreboot successfully builds for MIPS
     targets in chroot (coming later).

Change-Id: Ia1ccb29d4c9f3c95e04e06f6af7ce8a00e2e7455
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214156
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-26 21:02:17 +00:00
Ben Chan
070538e60b ryu: initialize LTE modem
BUG=chrome-os-partner:30748
TEST=Verify that LTE modem appears on USB during kernel boots on Ryu.

Change-Id: I8ec1f94c9aec5b4895a01cdfd3b86f88cd6bb877
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/214020
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-08-26 12:53:54 +00:00
Furquan Shaikh
6d6aa84d72 arm64: Add console_init to enable console logs
BUG=None
BRANCH=None
TEST=Compiles sucessfully and hello libpayload seen on screen

Change-Id: I73f888a7b8aa0065c1ca0bf7857c445cc5678cdc
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214073
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-08-26 05:08:32 +00:00
Furquan Shaikh
6931236ba2 libpayload console: Add check for already existing driver
Add support to check if the driver for console_out or console_in is already
present in the list. If console_init is called twice, then the driver might get
added twice leading to a loop.

BUG=None
BRANCH=None
TEST=With console_init in libpayload and depthcharge both, there are no console
loops seen anymore

Change-Id: If9a927318b850ec59619d92b1da4dddd0aa09cd1
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/214072
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-26 05:08:26 +00:00
Shawn Nematbakhsh
87b02a64fa auron: Move SPD handling to separate file
The code to find the SPD data for the mainboard based on GPIOs
is moved from romstage.c into spd.c.

It relies on the updated pei_data structure from broadwell instead
of the haswell interface.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: Idd9de5701a710be7f59d8e1cd9af2ddea236c261
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213955
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-26 03:09:03 +00:00
Furquan Shaikh
561bdd746c libpayload EHCI: Add memory barrier to EHCI driver
EHCI driver accesses mmio space using regular struct pointers. In order to avoid
any CPU re-ordering, memory barrier is required in async_set_schedule,
especially for arm64. Without the memory barrier, there seems to be re-ordering
taking place which leads to USB errors with some flash drives as well as
transfer errors in netboot.

BUG=chrome-os-partner:31533
BRANCH=None
TEST=With the memory barrier introduced, netboot for ryu completes transfer
without any error and finishes within 6-7 seconds.

Change-Id: Ic05d47422312a1cddbebe3180f4f159853604440
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/213917
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-26 03:06:01 +00:00
Furquan Shaikh
937d66cdab libpayload: Add support for memory barriers
Add support for memory barriers in arch {arm,arm64,x86}. This is required to
force strict CPU ordering. Definitions are based on FREEBSD atomic.h
definitions.

BUG=chrome-os-partner:31533
BRANCH=None
TEST=Memory barriers tested with ehci driver on arm64

Change-Id: Ie51e3452f7a254b24111000da5dbe8714ac22223
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/213916
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
2014-08-26 03:05:57 +00:00
Shawn Nematbakhsh
d910468f3d auron: Enable XHCI mode by default
Auron clone of Samus CL c5ef875f6d.

BUG=chrome-os-partner:31286
TEST=Compile only.
BRANCH=None.

Change-Id: I20c7de0606a95cbc20a1b3c018a3318c53c40f4d
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/213954
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-08-26 03:05:53 +00:00