Commit graph

9,516 commits

Author SHA1 Message Date
Furquan Shaikh
bb616efbb3 coreboot: Remove redundant file cache.c
File cache.c under armltd/armv8 is redundant as this file is already present
under src/arch/aarch64.

BUG=None
BRANCH=None
TEST=Compiled successfully

Change-Id: If5416c2d8cbb20cdd5a6ebd374250972719e5bc5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/190364
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2014-03-18 00:03:20 +00:00
Marcelo Povoa
85779a34a1 libpayload: Add minimal support for PL011 UART
This creates a new PL011 config variable which avoids the
infinite busy wait on serial_putchar() because the register
mapping is not compatible with current implementation.

BUG=None
BRANCH=none
TEST=printf() works on the PL011 based ARMv8 foundation model

Change-Id: I9feda35a50a3488fc504d1561444161e0889deda
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187020
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-17 22:31:36 +00:00
Shawn Nematbakhsh
5bba447654 baytrail: romstage: Add function to check SW WP status for vboot
Implement vboot_get_sw_write_protect, which returns the FW SPI ROM SW WP
status.

BUG=chrome-os-partner:26777
TEST=Manual on Rambi with all patches in sequence:
`crossystem sw_wpsw_boot` prints 0
`flashrom --wp-enable` + reboot
`crossystem sw_wpsw_boot` prints 1
BRANCH=Rambi

Change-Id: I5da35c1b2d25b8679bf0084af65d08de224387f8
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/190097
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-03-15 20:29:49 +00:00
Shawn Nematbakhsh
c4668fc8a9 chromeos: vboot_loader: Add support for SW_WP_ENABLED flag
Set VB_INIT_FLAG_SW_WP_ENABLED according to the status returned by an
optional platform / mainboard function vboot_get_sw_write_protect().

BUG=chrome-os-partner:26777
TEST=Manual on Rambi with all patches in sequence:
`crossystem sw_wpsw_boot` prints 0
`flashrom --wp-enable` and reboot
`crossystem sw_wpsw_boot` prints 1
BRANCH=Rambi

Change-Id: Ifb852d75cc106d10120cfee0a396b0662282051a
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/190096
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-03-15 20:29:45 +00:00
Neil Chen
edf12f441a nyan*: Switching unused pin to GPIO
Switching unused pin to GPIO to avoid SPI1 conflicting.

BUG=chrome-os-partner:26701
BRANCH=none
TEST=Built and boot on Nyan

Change-Id: I7de5b8d015f6d02baadd41b1b272dfc49d17c376
Signed-off-by: Neil Chen <neilc@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/189970
Reviewed-by: Gabe Black <gabeblack@chromium.org>
2014-03-14 19:42:59 +00:00
Shawn Nematbakhsh
c98ae1fee5 rambi: Enable PCIe wake
Allow PCIe devices to wake system from suspend.

BUG=chrome-os-partner:26135
TEST=Manual on Rambi:
iotools io_read32 0x400 --> 0x01202001
BRANCH=Rambi

Change-Id: I339b2a6440d45244dd5756e5aeb175f068d90555
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189995
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-03-14 19:42:06 +00:00
Shawn Nematbakhsh
1cc31a7c02 baytrail: Add config option for PCIe wake
Add config option to allow PCIe devices to wake system from suspend.

BUG=chrome-os-partner:26135
TEST=Manual on Rambi. Set devicetree config to enable PCIe wake:
iotools io_read32 0x400 --> 0x01202001
Disable config:
iotools io_read32 0x400 --> 0x41202001
BRANCH=Rambi

Change-Id: I6e457726d30398166e65da02eb55f8a343a46534
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189994
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2014-03-14 19:42:00 +00:00
Marcelo Povoa
3f854dccfd aarch64: Pass coreboot table in jmp_to_elf_entry
BUG=None
BRANCH=none
TEST=Boot to libpayload hello.c ELF at 0x80100000 which reads cb_table

Change-Id: Ia1be4cb03386011a3184e76ed048cf589b390d11
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186929
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-14 03:44:53 +00:00
Marcelo Povoa
ab3ecaff41 aarch64/foundation-armv8: Set up RAM area and enter ramstage
Increase available RAM to 16M, register a ram_resource to it
and enter ramstage. Bounce buffer seems to be broken yet,
so assign the payload entry to be above coreboot area at
0x80000000 and it should jump to it.

BUG=None
BRANCH=none
TEST=Boot to minimal payload at 0x80100000 which halts the emulation

Change-Id: I77d6c56f5d4104c95283598b3d6ddabb8e5d0c7b
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186745
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-14 03:44:50 +00:00
Marcelo Povoa
57510d553c Remove stale char[] initialization causing unaligned memory access
This throws an alignment fault when run in ARMv8 Foundation
model and seems unnecessary, so remove it.

BUG=None
BRANCH=none
TEST=Boot coreboot in foundation model

Change-Id: I2e3aa54502c292958ba44ff4e2e71c27653f2e1a
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186744
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-14 03:44:47 +00:00
Marcelo Povoa
25fd2e9798 aarch64: Remove CAR definitions from early_variables.h
Copied from ARMv7 file to avoid build errors.

BUG=None
BRANCH=none
TEST=Build coreboot successfully

Change-Id: Ibe8c7fb10478622636f69cb51237beba000b7adb
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186743
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-14 03:44:44 +00:00
Marcelo Povoa
57bbca93f1 cbmem: Fix 64-bit pointer related casts in dynamic_cbmem.c
BUG=None
BRANCH=none
TEST=Build and run coreboot for foundation-armv8 target

Change-Id: I7a382d42e1552d13b1feffc37848674f304adee2
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187726
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-14 03:44:40 +00:00
Gabe Black
f8ac4a9e31 configs: Make some board configs public.
Make the previously partially or completely private configs for bolt, falco,
peppy and samus public.

BUG=None
TEST=Built for each affected board.
BRANCH=None

Change-Id: I8650cc58c804ddf595b44a3feea82b94138bd3c1
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/189781
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2014-03-13 11:29:42 +00:00
Marcelo Povoa
65bf77df71 aarch64/foundation-armv8: Enable DYNAMIC_CBMEM
Some 64-bit pointer casts errors related to
DYNAMIC_CBMEM were fixed in a separate patch.

BUG=None
BRANCH=none
TEST=Ran image in foundation model

Change-Id: Ia4cce9bef152e9acd9c897de895b7c293f7d2188
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186742
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-12 22:27:35 +00:00
Marcelo Povoa
948487311b aarch64: Change default exception level to EL2
Since booting Linux requires that we are running
at EL1 or EL2, transition already from EL3 to EL2.

It is assumed for now that the system implements
all exception levels, which is not a requirement.

BUG=None
BRANCH=none
TEST=Boot to ramstage worked as before and used current_el()
to verify that we are indeed at EL2

Change-Id: I29d8fc830367158cba53703d1dc2f0ad398b9d49
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186741
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-12 22:27:31 +00:00
Marcelo Povoa
7a152c3d9d aarch64: Fix formatting of exception registers dump
BUG=None
BRANCH=none
TEST=Build coreboot

Change-Id: I9f55e85e720de5f55ea6bfe863b83be842859be1
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186740
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-12 22:27:29 +00:00
Marcelo Povoa
9959047c82 aarch64: Add aarch64-elf toolchain to crossgcc Makefile
BUG=None
BRANCH=none
TEST=Build crosgcc for aarch64-elf
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>

Change-Id: Ifc886b6bd125552855ad1cf49ee7c1b7a0350895
Reviewed-on: https://chromium-review.googlesource.com/186413
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Marcelo Póvoa <marcelogp@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Marcelo Póvoa <marcelogp@chromium.org>
2014-03-12 22:27:25 +00:00
Marcelo Povoa
72c4907700 aarch64: Bump GCC version for Aarch64 support
BUG=None
BRANCH=none
TEST=Build crossgcc for aarch64-elf
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>

Change-Id: I53886b106a2ec18e42de52cd741310e8d30a1666
Reviewed-on: https://chromium-review.googlesource.com/186412
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Marcelo Póvoa <marcelogp@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Marcelo Póvoa <marcelogp@chromium.org>
2014-03-12 22:27:21 +00:00
Marcelo Povoa
69464644ce aarch64: Implement basic exception handling
This installs a exception vector in bootblock, aborts are now
handled with a register file dump to console for debugging.

BUG=None
BRANCH=none
TEST=Ran image in foundation model, tested some exceptions
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>

Change-Id: I4cb4d95fc5eb905f8c3c623315a46a00fdbf2677
Reviewed-on: https://chromium-review.googlesource.com/185755
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Marcelo Póvoa <marcelogp@chromium.org>
Commit-Queue: Marcelo Póvoa <marcelogp@chromium.org>
2014-03-12 22:27:18 +00:00
Duncan Laurie
ed1ee57701 dptf: chromeec: Notify DPTF Charger participant on AC state change
The DPTF charger particpant device needs to be notified when the
AC state changes so it can re-evaluate the PPCC object and apply
the proper charge rate limit if necessary.

BUG=chromium:349681
TEST=emerge-rambi chromeos-coreboot-rambi
BRANCH=baytrail

Change-Id: I6723754e2fe12862f50709875140fcadcddb18eb
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189029
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Brad Geltz <brad.geltz@intel.com>
2014-03-12 01:27:21 +00:00
Shawn Nematbakhsh
27fae3e670 baytrail: DPTF: Enable mainboard-specific PPCC
Allow PL1 to be set at the mainboard level.

BUG=chrome-os-partner:26436
TEST=Run DPTF utility, verify specified PL1 settings are still in place.
Modify PL1 settings at mainboard level, verify that changes are
reflected in DPTF utility.
BRANCH=Rambi.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: Id05701385867420e4d0f129f38dda0d3580abaff
Reviewed-on: https://chromium-review.googlesource.com/189576
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-03-12 01:27:18 +00:00
Stefan Reinauer
721fc2361e google/panther: Be safe about invalid thermal readings
In case we get an invalid thermal reading, let's run the fan
at full speed rather than at low speed. This might impact the
user experiance slightly in cases where the bad reading does
not happen while the system is hot, but it will increase stability
in the cases where the system is actually overheating.

Also, set the critical temperature below tjmax, because otherwise
thermal shutdown by the OS will never be triggered.

Signed-off-by: Stefan Reinauer <reinauer@google.com>

BUG=chrome-os-partner:26045
BRANCH=panther, all haswell designs with ITE superIO
TEST=Unable to reproduce bug described in 26045

Change-Id: Iab262f1f17a5dff875c596d9e8d50e4e50ee90f9
Reviewed-on: https://chromium-review.googlesource.com/188556
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
2014-03-11 05:54:12 +00:00
Shawn Nematbakhsh
ee7c3ea182 libpayload: usb: xhci: Treat port reset as a port status change
If a port is connected before and after an xhci controller reset, the
PORTSC CSC bit may not be asserted. Add an additional check in
xhci_rh_port_status_changed for the PRC bit so we can correctly handle
ports in such a state.

BUG=chrome-os-partner:24090
TEST=Manual on Rambi:
- Boot Chromium OS from USB 3.0 drive
- Issue 'reboot' on command line
- Boot from USB 3.0 drive again successfully
Also --
- Boot Chromium OS from USB 3.0 drive
- Issue 'reboot' on command line
- Boot Chromium OS from eMMC
- Issue 'reboot' on command line
- Boot from USB 3.0 drive again successfully
Also, verify that USB ports continue to function correctly, and USB 3.0
device is always detected in Chromium OS as a superspeed device.
BRANCH=Rambi

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I2d623aae647ab13711badd7211ab467afdc69548
Reviewed-on: https://chromium-review.googlesource.com/189394
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-03-11 05:54:00 +00:00
Shawn Nematbakhsh
54e1da075b libpayload: usb: Remove generic roothub reset port function
The generic roothub reset port function is overly broad and does some
things which may be undesirable, such as issuing multiple resets to a
port if the reset is deemed to have finished too quickly. Remove the
generic function and replace it with a controller-specific function,
currently only implemented for xhci.

BUG=chrome-os-partner:24090
TEST=Manual on Rambi. Verify that USB 3.0 media is found + bootable on
cold boot.
BRANCH=Rambi.

Change-Id: Id46f73ea3341d4d01d2b517c6bf687402022d272
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189495
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-03-11 05:53:56 +00:00
Shawn Nematbakhsh
5955350cd5 rambi: Put LPE device into ACPI mode
The kernel drivers will soon be updated to use ACPI probing methods, and
now we can put the LPE device into ACPI mode.

BUG=chrome-os-partner:24380
TEST=Verify dev mode FW beep is heard on Rambi platform.
BRANCH=Rambi

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>

Change-Id: I0a2262cb16be8b6da4bcfb557608bc8035249309
Reviewed-on: https://chromium-review.googlesource.com/189371
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
2014-03-08 05:14:06 +00:00
Aaron Durbin
36b33a25b6 baytrai: update MRC wrapper header
Incorporate the updated MRC wrapper header file to
handle overriding ODT settings.

BUG=chrome-os-partner:26579
BRANCH=baytrail
CQ-DEPEND=CL:*156606
TEST=Built and booted rambi. suspended and resumed.

Change-Id: I5e89e36d3aa7ce0bc2c1657b31e8bc6b28a3cc36
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189196
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Tested-by: Marc Jones <marc.jones@se-eng.com>
2014-03-08 05:13:57 +00:00
Marcelo Povoa
00a3b46eed foundation-armv8: Fix some memory addresses constants
Set correct value for SDRAM in Foundation model, map
romstage to run in SRAM and enlarge stack space (in DRAM).

BUG=None
BRANCH=none
TEST=Ran image in foundation model

Change-Id: Id2f7d185fd09f8990c1756ac7ad4569498885ba7
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/185754
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2014-03-08 03:52:07 +00:00
Marcelo Povoa
c732a9d6a5 aarch64/foundation-armv8: Basic bootblock implementation
This adds simple bootblock initialization procedures with console
ouput support for the Foundation ARMv8 model. Includes stack
setup, basic caches/tlb/mmu control routines, SCTLR register access
for different exception levels and memset.S code from ARM.

It runs on the Foundation_v8 fast model from arm (see command line
in src/mainboard/emulation/foundation-armv8/Kconfig) until loading
romstage at cbfs_load_stage(), where it currently halts. Code is
debugable using printk only (after console_init) because the
Foundation model does not provide bare metal debugging support (so
adding exception handling and stack/register dump might be useful).

BUG=None
BRANCH=none
TEST=Ran image in foundation model
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>

Change-Id: I81b12416424a02f24a80924791fc39d9411fa4b4
Reviewed-on: https://chromium-review.googlesource.com/185275
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Marcelo Póvoa <marcelogp@chromium.org>
Commit-Queue: Marcelo Póvoa <marcelogp@chromium.org>
2014-03-08 03:52:04 +00:00
Gabe Black
06c4d346de nyan: big: Only delay when and as long as necessary in the PMIC setup code.
The PMIC setup code was unconditionally waiting for 10ms after each register
write. It might be possible for there to be an excess of current from lots of
rails switching around at the same time, but we can avoid that with a much
shorter delay in a few strategic places.

This change also moves the write to LDO3 to just under SD1 because LDO3 should
track SD1.

The duration and position for the delays and moving LDO3 were provided by Dan
Coggin at nvidia.

BUG=chrome-os-partner:25467
TEST=Built and booted on nyan rev1. Measured a 230 ms decrease in boot time.
BRANCH=None

Change-Id: I14805bf1b6242bdd0b286f37ae7d635c03909677
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/189016
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Daniel Coggin <dcoggin@nvidia.com>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2014-03-08 02:24:42 +00:00
Gabe Black
afca97a29a nyan: big: Set the i2c controller frequencies appropriately.
These had been set to something fairly random which results in a very slow
clock on the bus itself. The new settings take into consideration the speed
the devices on the bus can run at. The TPM can't seem to handle speeds above
40KHz, but some documentation suggests that it should be able to handle up to
at least 100KHz.

BUG=chrome-os-partner:25467
TEST=Built and booted on nyan rev1. Built for big.
BRANCH=None

Change-Id: Iee98957c7e492c7dd08b071aeef3cce75c4a9e56
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/189015
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2014-03-08 02:24:39 +00:00
Gabe Black
24714399a9 tegra124: Add a macro specifically for configuring the I2C controller clocks.
The divider for the I2C clocks works differently than for other IP blocks and
needs to be set up to reflect that. There's also a large internal divider which
means you have to do extra calculations to determine what the frequency of the
bus itself will be based on the I2C controller clock. The new macro takes the
desired frequency of the bus itself and figures everything else out.

BUG=chrome-os-partner:25467
TEST=Built and booted on nyan rev1 using this function to set up the i2c
busses.
BRANCH=None

Change-Id: Ib62a5659bcc0d0e15de41887514ae8efb8c8129a
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/189014
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2014-03-08 02:24:35 +00:00
Marcelo Povoa
9b09912a17 agesa: Add CONFIG_CBFS_SIZE in Kconfig
This allows limiting the CBFS size which is necessary
for building chromeos-bootimage.

BUG=none
BRANCH=none
TEST=emerge-gizmo chromeos-bootimage and run depthcharge

Change-Id: Idc1af152651973864704160ba1076ffa3b0ad749
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188919
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-03-08 00:43:54 +00:00
Aaron Durbin
6fce823512 baytrail: stop e820 reserving default SMM region
The default SMM region was previously being reserved.
Stop doing that in order to not antagonize certain kernel
loaders and payloads when there are low e820 ram
reservations. Since the default SMM region is not marked
as reserved the region needs backed up and restored on
resume.

BUG=chrome-os-partner:26563
BRANCH=baytrail
TEST=Built and booted. Suspended and resumed. Confirmed no more
     e820 reservations at default SMM region. Also noted resume
     times are still at ~200ms.

Change-Id: Icf21d40a790b0c1b0b8c2111f779abb996adce56
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189084
2014-03-07 06:06:55 +00:00
Daisuke Nojiri
7fda3885f5 ARM: API to Map Physical Address to Wipe Memory above 4GB
TEST=Booted nyan in normal and recovery mode. Created a map, filled it with some
chars, then verified they can be read from the pointer returned.
BUG=chrome-os-partner:25587
BRANCH=None
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: Id1f1be4f6d2d5734d87bf3452d4806d0fe3fda88
Reviewed-on: https://chromium-review.googlesource.com/188894
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-03-07 04:54:49 +00:00
Gabe Black
462e61ad89 tegra124: Fix some bugs in the clock configuration macros.
There were some missing parenthesis and some extra semicolons which this
change adds and removes, respectively.

BUG=chrome-os-partner:25467
TEST=Built and booted on nyan rev1. Verified that the same frequency calculated
differently results in the same settings. Before operator precedence would
pull apart the frequency calculation and use the pieces in the wrong order.
BRANCH=None

Change-Id: I843d4ae9f7a2ae362926d94b6b77ef31d350a329
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/189013
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2014-03-07 02:20:59 +00:00
Aaron Durbin
49f5be75bd rambi: enable CHROMEOS_RAMOOPS_DYNAMIC
Instead of using a hard-coded memory reservation address, allocate
the RAM dynamically for the ram oops buffer.

BUG=chrome-os-partner:26563
BRANCH=baytrail
TEST=Built, booted, crashed. Confirmed pstore had crash. Also, confirmed
     ramoops buffer in high memory.

Change-Id: Ic16987e9e54720d807616baf5e40e858fe1604e9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188718
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
2014-03-07 00:41:01 +00:00
Aaron Durbin
e236bf0750 BACKPORT: x86: provide infrastructure to backup default SMM region
Certain CPUs require the default SMM region to be backed up
on resume after a suspend. The reason is that in order to
relocate the SMM region the default SMM region has to be used.
As coreboot is unaware of how that memory is used it needs to
be backed up. Therefore provide a common method for doing this.

BUG=chrome-os-partner:26563
BRANCH=baytrail
TEST=Confirmed SMM backup region in cbmem. Suspend and Resumed.

Change-Id: I65fe1317dc0b2203cb29118564fdba995770ffea
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188716
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2014-03-07 00:32:54 +00:00
Aaron Durbin
3fa832840e baytrail: mirror payload to be loaded into high ram
Previously the SPI mirroring was using the SMM default
region. If the payload exceeds the SMM default region size
the mirroring won't happen. This causes a slow down. Instead
find a region to mirror into below 4GiB that is marked as
available ram.

Prior to this change 60ms payload times were observed with
current depthcharge builds. With this change the load time is
24ms - 32ms depending on boot type.

BUG=chrome-os-partner:25385
BRANCH=baytrail
TEST=Booted and noted timing.

Change-Id: I201f0fd6cf82f4521e5cb7fafac6ece27951995d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188715
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2014-03-07 00:32:50 +00:00
Jimmy Zhang
d32124cb75 t124: Skip PLLP init to 408MHz
PLLP is configured to 408MHz by hardware on T124. Init PLLP is needed only when
to configure it other than 408MHz.

BUG=none
TEST=build nyan and boot kernel.

Change-Id: I8b1abf510ab886e7fddea8864a6d36f12529880e
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/188849
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-03-06 21:32:50 +00:00
Jimmy Zhang
7e8e2854b2 t124: nyan: Enable lock bit on pll
A PLL (Phase-Locked Loop) clock must be locked before it is assigned
as clock source. Otherwise, this clock is unreliable.

Before:
c base(60006080): 48003201, misc(6000608c): 03000000
x base(600060e0): 40009e01, misc(600060e4): 00000000
p base(600060a0): 40002201, misc(600060ac): 00000200
u base(600060c0): 40005001, misc(600060cc): 00000300
d base(600060d0): 48011b0c, misc(600060dc): 40400800
dp base(60006590): 58305a01, misc(60006594): 40000000

After:
c base(60006080): 48003201, misc(6000608c): 03000000
x base(600060e0): 48009e01, misc(600060e4): 00040000
p base(600060a0): 5801980c, misc(600060ac): 00040800
u base(600060c0): 48005001, misc(600060cc): 00400300
d base(600060d0): 48011b0c, misc(600060dc): 40400800
dp base(60006590): 58305a01, misc(60006594): 40000000

BUG=None
TEST=build nyan and boot

Change-Id: I7e5a2eeb5b17f761e0c462ec68a8b221f327fedc
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/188447
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-03-06 21:32:46 +00:00
Hung-Te Lin
bcd3832c06 vendorcode: Access to ChromeOS VPD on default CBFS media.
The new function "cros_vpd_gets(key, buf, size)" provides an easy and quick way
to retrieve values in ChromeOS VPD section.

BRANCH=none
BUG=none
TEST=Manually added CONFIG_FLASHMAP_OFFSET=0x00100000 in Nayn config,
      added a cros_vpd_gets("test", buf, sizeof(buf)) in romstage.c,
      emerge-nyan chromeos-coreboot-nyan # builds successfully,
      and then get correct VPD values in console output.
     Also tried x86 ("emerge-lumpy chromeos-coreboot-lumpy")

Change-Id: I38e50615e515707ffaecdc4c4fae65043541b687
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187430
Reviewed-by: Yung-chieh Lo <yjlou@chromium.org>
2014-03-06 16:42:01 +00:00
Aaron Durbin
cd1b5f757c chromeos: fix build breakage when !CHROMEOS_RAMOOPS
Needed types were being guarded by CONFIG_CHROMEOS_RAMOOPS.
Expose those unconditionally.

BUG=None
BRANCH=None
TEST=None

Change-Id: Ie858c746307ad3669eab5c35bf219e1a58da2382
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188714
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-03-06 04:11:57 +00:00
Daisuke Nojiri
16a40a48c2 Nyan: Set DMA Reserve to 2MB
When using LPAE, the address space is split to 2MB blocks. This change makes
the space reserved for DMA consistent with the block size.

TEST=Booted nyan with and without LPAE. Built nyan_big.
BUG=None
BRANCH=None
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>

Change-Id: I75c77484f6ca9f23b583ef651956d0265a9b4474
Reviewed-on: https://chromium-review.googlesource.com/188571
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
2014-03-06 02:43:27 +00:00
Hung-Te Lin
03f4d521a7 vendorcode: Update ChromeOS VPD Parser.
Merge recent changes in ChromeOS VPD that allows non-memory-mapped firmware
to load VPD easier and faster (ref:
 https://chromium-review.googlesource.com/188134 ).

BRANCH=none
BUG=none
TEST=emerge-panther chromeos-coreboot-panther

Change-Id: I3ee0b89c703f476f3d77cdde52cc7588724f7686
Reviewed-on: https://chromium-review.googlesource.com/188743
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yung-chieh Lo <yjlou@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
2014-03-06 02:43:24 +00:00
Andrew Bresticker
bdbe9ead46 tegra124: fix OSC initialization on LP0 resume
Add a missing "~" so that we mask off just OSC_XOFS field and not the
rest of the register.

BUG=chrome-os-partner:26326
TEST=XHCI sometimes works after LP0.
BRANCH=none

Change-Id: I2df2387dbad6920d36aa2ae5e6cd91e9ec42fa08
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188897
Reviewed-by: Julius Werner <jwerner@chromium.org>
2014-03-06 02:42:40 +00:00
Marcelo Povoa
8f4ef24609 gizmo: Add support for the gizmo mainboard
This is a port of coreboot changes from SageBIOS
to support the GizmoSphere Gizmo board target.

A defconfig is avaliable and is similar to other
targets but CONSOLE_CBMEM is not yet functional.

BUG=None
BRANCH=none
TEST=Build with SeaBIOS payload; boot chromeos development image

Change-Id: Ib1ff87d92f0e7cd6c3dbefd6237fef33f185ba86
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188275
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2014-03-05 01:47:25 +00:00
Marcelo Povoa
5cb89f1479 sb800: Implement get_top_of_ram when HAVE_ACPI_RESUME
Fix build failing because of missing get_top_of_ram.

This is already fixed upstream.

BUG=None
BRANCH=none
TEST=Build coreboot for Gizmo board

Change-Id: I0f0317a5ae4818b4e75e8ba2cd3099c088316c2b
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188274
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2014-03-05 01:47:22 +00:00
Marcelo Povoa
b81b1bb51a agesa: Add support for soldered down DDR3 initialization
Creates a new CONFIG_DDR3_SOLDERED_DOWN variable to enable
handling proper DDR3 SPD initialization. This patch is from
SageBIOS (forked coreboot) sources and is required for platforms
such as the GizmoSphere Gizmo board.

BUG=None
BRANCH=none
TEST=Run on Gizmo board and check SPD dump being same as SageBIOS
Signed-off-by: Marcelo Povoa <marcelogp@chromium.org>

Change-Id: I28e69d649252f542eb3d20d51ff8af69ae6e394a
Reviewed-on: https://chromium-review.googlesource.com/188273
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Marcelo Póvoa <marcelogp@chromium.org>
Commit-Queue: Marcelo Póvoa <marcelogp@chromium.org>
2014-03-05 01:47:18 +00:00
Aaron Durbin
7d8570ac52 rambi: always show dev/rec screens on eDP connected panel
The baytrail option rom was not correctly mirroring to the eDP
panel and the HDMI-connected monitor. Therefore, don't suggest
the HDMI monitor in the 0x5f35 video BIOS callback.

BUG=chrome-os-partner:26365
BRANCH=baytrail
TEST=Booted with and without HDMI connected monitor. DEV screen
     always showed on eDP panel.

Change-Id: Icd388a9158700e0a9f9f38530297ee13397e7f76
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188731
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-03-05 01:47:16 +00:00
Aaron Durbin
f38e6969df baytrail: use new chromeos ram oops API
Utilize the newly introduced chromoes ram oops API.

BUG=None
BRANCH=baytrail,haswell
TEST=Tested both ways with corresponding kernel change. ramoops
     is recovered using both methods.

Change-Id: Id3495a99d72ec6d2afa6af0c899c0a5aaeeba84d
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/186394
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2014-03-05 01:47:11 +00:00