Commit graph

968 commits

Author SHA1 Message Date
Mathias Krause
d7c1cc2efe UPSTREAM: libpayload: multiboot - support meminfo flag
Some simple implementation of the MultiBoot protocol may not pass a
memory map (MULTIBOOT_FLAGS_MMAP missing in the flags) but just the two
values for low and high memory, indicated by the MULTIBOOT_FLAGS_MEMINFO
flag.

Support those kind of boot loaders too, instead of falling back to the
hard-coded values in lib_get_sysinfo().

Tested with a multiboot enhanced version of FILO.

BUG=none
BRANCH=none
TEST=none

Change-Id: I4c1d95a8f4aa8735538dad85d5f856ce36a5f72e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 898de6111a
Original-Change-Id: I22cf9e3ec0075aff040390bd177c5cd22d439b81
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18350
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/445141
2017-02-21 06:44:23 -08:00
Mathias Krause
c958bb42a0 UPSTREAM: libpayload: x86/head - implement argc/argv handling
Implement the argc/argv passing as described in coreboots payload API:
http://www.coreboot.org/Payload_API

While at it, give the code some love by not needlessly trashing register
values.

BUG=none
BRANCH=none
TEST=none

Change-Id: If49874b1ac1c7359816f4ec02c5380c32101fa1a
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: d2f16cac74
Original-Change-Id: Ib830f2c67b631b7216843203cefd55d9bb780d83
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18336
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/444817
2017-02-18 03:10:59 -08:00
Mathias Krause
98efca1d93 UPSTREAM: libpayload: x86/exec - simplify and robustify the code
Simplify the code by directly using the arguments on the stack as base
pointer relative memory references, instead of loading them into
intermediate registers first.

Make it more robust by preserving all callee saved registers mandated by
the C calling convention (and only those), namely EBP, EBX, ESI and EDI.

Don't assume anything about the register state when the called function
returns -- beside the segment registers and the stack pointer to be
still the same as before the call.

BUG=none
BRANCH=none
TEST=none

Change-Id: I231828bb9a65a6b1077b17024c0c59fed8546284
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 57dc93c967
Original-Change-Id: I383d6ccefc5b3d5cca37a1c9b638c231bbc48aa8
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18335
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/444816
2017-02-18 03:10:58 -08:00
Mathias Krause
f8e37efbcf UPSTREAM: libpayload: x86/main - propagate return value of main()
According to coreboots payload API [1], the called payload should be
able to return a value via %eax. Support this by changing the prototype
of start_main() and pass on the return value of main() to the caller
instead of discarding it.

[1] https://www.coreboot.org/Payload_API

BUG=none
BRANCH=none
TEST=none

Change-Id: I1782c45b615d431de8be5a533d5890ed53ddb9d8
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 7b681c5926
Original-Change-Id: I8442faea19cc8e04487092f8e61aa4e5cba3ba76
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18334
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444815
2017-02-18 03:10:58 -08:00
Mathias Krause
d808757641 UPSTREAM: libpayload: x86/exec - fix argc/argv value passing
According to coreboots payload API [1] the argc value should be passed
at stack offset 0x10, so we need to push a dummy value to comply to the
API.

[1] https://www.coreboot.org/Payload_API

BUG=none
BRANCH=none
TEST=none

Change-Id: I2acc66d20fcc4e313d1ddbc4a7bc1772548981c5
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 9fa78c136d
Original-Change-Id: Id20424185a5bf7e4d94de1886a2cece3f3968371
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18333
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/444814
2017-02-18 03:10:58 -08:00
Mathias Krause
6b19c3fe38 UPSTREAM: libpayload: x86/exec - fix return value passing
The pointer to write the return value to is in %ecx, not %eax. Writing
to (%eax) leads to memory corruptions as %eax holds the return value,
e.g. would write zero to address zero for a "successful" returning
payload.

BUG=none
BRANCH=none
TEST=none

Change-Id: I92d9ceec19d236e756c4eaf2ecf9c0534a3ad482
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: 901efea8ab
Original-Change-Id: I82df27ae89a9e3d25f479ebdda2b50ea57565459
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18332
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/443927
2017-02-17 04:09:23 -08:00
Mathias Krause
cd09feca23 UPSTREAM: libpayload: x86/exec - fix libpayload API magic value
According to coreboots payload API [1] the magic value passed to the
payload should be 0x12345678, not 12345678. Fix that.

[1] https://www.coreboot.org/Payload_API

BUG=none
BRANCH=none
TEST=none

Change-Id: I54fb70bca7ede3343de93b15fff58e9df1673793
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Commit-Id: d42c38b93c
Original-Change-Id: I10a7f7b1a4aec100416c5e7e4ba7f8add10ef5c5
Original-Signed-off-by: Mathias Krause <minipli@googlemail.com>
Original-Reviewed-on: https://review.coreboot.org/18331
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/443926
2017-02-17 04:09:22 -08:00
Patrick Georgi
ae20cc56cc various cleanups from upstream
These were done during upstreaming (ie. to the commits directly), so
there's no correspondence as individual CLs for these.
The "Reviewed-on" list below is a catch-all to help gerrit-rebase ignore
changes that were handled one way or another but aren't tracked.

BUG=none
BRANCH=none
TEST=with various up/downstreaming CLs merged,
$ git diff --stat cros/chromeos-2016.05 origin/master # has only a very
small set of remaining changes (COMMIT-QUEUE.ini etc, git submodules)

Change-Id: I9c2cee7fbadbc1393ca0fb1c3b4f7a1ddb48341b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Ignore-CL-Reviewed-on: https://review.coreboot.org/15122
Ignore-CL-Reviewed-on: https://review.coreboot.org/15604
Ignore-CL-Reviewed-on: https://review.coreboot.org/15919
Ignore-CL-Reviewed-on: https://review.coreboot.org/16021
Ignore-CL-Reviewed-on: https://review.coreboot.org/16055
Ignore-CL-Reviewed-on: https://review.coreboot.org/16253
Ignore-CL-Reviewed-on: https://review.coreboot.org/17061
Ignore-CL-Reviewed-on: https://review.coreboot.org/17179
Ignore-CL-Reviewed-on: https://review.coreboot.org/17185
Ignore-CL-Reviewed-on: https://review.coreboot.org/17340
Ignore-CL-Reviewed-on: https://review.coreboot.org/17366
Ignore-CL-Reviewed-on: https://review.coreboot.org/17775
Ignore-CL-Reviewed-on: https://review.coreboot.org/17872
Ignore-CL-Reviewed-on: https://review.coreboot.org/17875
Ignore-CL-Reviewed-on: https://review.coreboot.org/17962
Ignore-CL-Reviewed-on: https://review.coreboot.org/18023
Ignore-CL-Reviewed-on: https://review.coreboot.org/18158
Ignore-CL-Reviewed-on: https://review.coreboot.org/18170
Ignore-CL-Reviewed-on: https://review.coreboot.org/18171
Ignore-CL-Reviewed-on: https://review.coreboot.org/18172
Ignore-CL-Reviewed-on: https://review.coreboot.org/18205
Reviewed-on: https://chromium-review.googlesource.com/427824
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-02-06 05:03:19 -08:00
Patrick Georgi
36fb382432 UPSTREAM: libpayload: fix build
When .xcompile doesn't already exist, building libpayload fails because
the CC variable (et al) remain empty since .xcompile is only included
after the variables coming from there are evaluated.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie18787c4d871681de72e15ab6275a2f0003ed622
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b144a34c60
Original-Change-Id: I73f1cbced95afcff15839604fea5fd05d81bc3d3
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18228
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/432758
2017-01-26 18:43:51 -08:00
Patrick Georgi
c2ab04e697 UPSTREAM: build system: don't run xcompile or git for %clean/%config targets
It takes a long time for no gain: We don't need to update the
submodules, we don't need to fetch the revision, we don't need to find
the compilers, when all we want to do is to manipulate the .config file
or clean the build directory.

BUG=none
BRANCH=none
TEST=none
CQ-DEPEND=CL:432758

Change-Id: I2a2e65d1f5945885b43e32ecb8406f83f973c106
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0ffef882d8
Original-Change-Id: Ie1bd446a0d49a81e3cccdb56fe2c43ffd83b6c98
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18182
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/431983
2017-01-26 18:43:51 -08:00
Paul Kocialkowski
de6e1b70e4 UPSTREAM: libpayload: Enable USB HID in veyron configuration
This enables USB HID support in the veyron config, since it seems to
work correctly and is needed for interaction with depthcharge on devices
without an embedded keyboard (such as veyron_mickey).

BUG=none
BRANCH=none
TEST=none

Change-Id: Ic1ed2987074924fdab987974ad8e5bb7c9006f15
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3e7f14bfae
Original-Change-Id: Icae829e3a132005df17bcb6f7e6f8a190912576d
Original-Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Original-Reviewed-on: https://review.coreboot.org/17930
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/430715
2017-01-20 08:47:59 -08:00
Paul Kocialkowski
11ddfce5d8 UPSTREAM: libpayload: Get current tick from high register in generic timer
This fixes the generic timer driver to get the current tick from the
high register, so that comparison with the high count value (obtained
previously from the same register) has a chance to succeed.

BUG=none
BRANCH=none
TEST=none

Change-Id: I5ce02bfa15a91ad34641b8e24813a5b7ca790ec3
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/17929
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/427823
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-19 09:22:27 -08:00
Patrick Georgi
5846d248fb libpayload: adopt upstream changes to generic timer driver
There was some ongoing development on the generic timer driver after it
was merged into CrOS libpayload, so fetch that.

BUG=none
BRANCH=none
TEST=none
CQ-DEPEND=CL:427823

Change-Id: I78c38eb8c8a3aca66a08e702978a7290a26fd3d7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/427822
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-19 09:22:24 -08:00
Shelley Chen
25654e214f 8042 keyboard: power button processing
power button is usually dropped because it's not
in the keyboard matrix range.  Adding in condition
to forward it like other keys.

BUG=chrome-os-partner:61275
BRANCH=None
TEST=reboot and make sure power button selection
     in detachable menus is processed on reef.

Change-Id: I516a0043bd7730789728d5c5498d0a0f30a2acac
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/428199
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2017-01-18 16:06:42 -08:00
Paul Kocialkowski
d98755e753 UPSTREAM: libpayload: Update ARM CrOS devices configuration
This updates the configuration for ARM CrOS devices (nyans and veyrons)
by using the CHROMEOS Kconfig option, thus reducing the number of
options to select. It also brings proper serial console support.

BUG=none
BRANCH=none
TEST=none

Change-Id: I455b66801c3518319e078aa63d63b515ee80cd22
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7a9ec36fd4
Original-Change-Id: Iffc84c44a1d339c5bb575fbaffc40bc2d56bb6cf
Original-Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Original-Reviewed-on: https://review.coreboot.org/17928
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/428258
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
2017-01-13 18:41:31 -08:00
Jeffy Chen
4749fc82fd libpayload: usb: Reset ohci controller when trying to shutdown ohci
Currently we just disabled ohci interrupts when calling ohci_shutdown,
Which would not actually shutdown the ohci controller, for example it
may still written the increased HccaFrameNumber to Hcca buffer.

Perform a soft reset to ohci controller as the linux kernel ohci-hcd
driver does.

BUG=chrome-os-partner:60996
BRANCH=None
TEST=Checked on gru, no more "BUG: Bad page state" error in kernel.

Change-Id: I3f192aea627ba2fa69533bc0a4270466ca18f2a7
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/426338
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2017-01-09 23:47:32 -08:00
Kan Yan
acea6e2a20 libpayload: Add VPD address into lib_sysinfo
BUG=chrome-os-partner:56947
TEST=Verifed country code can be parsed from VPD in depthcharge.
BRANCH=None

Change-Id: I4616fefc6a377d7830397cdadb493927358e25cc
Signed-off-by: Kan Yan <kyan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/425819
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-01-09 23:47:22 -08:00
Patrick Georgi
9782512355 UPSTREAM: libpayload: usb: handle situation with no free device address
Change-Id: I1308bdca90f1a09d980f384ee85552198a39b965
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1260940
Original-Reviewed-on: https://review.coreboot.org/18036
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/425986
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-01-09 23:47:00 -08:00
Patrick Georgi
508c02c15a UPSTREAM: libpayload: xhci: plug leak
Change-Id: Ia163872846906c6c78144a984a405812f856f626
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1325835
Original-Reviewed-on: https://review.coreboot.org/18035
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/425985
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-01-09 23:46:58 -08:00
Patrick Georgi
b4e7e4c8eb UPSTREAM: libpayload: timer: cast cpu_khz to make sure 64bit math is used
Change-Id: Iaf84de2330b433076a66c22fa72ffb45e957c0dc
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Found-by: Coverity Scan #1261177
Original-Reviewed-on: https://review.coreboot.org/18034
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/425984
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-01-09 23:46:56 -08:00
Patrick Georgi
b1b4b374c0 UPSTREAM: libpayload/drivers/video: Improve check in if condition
Coverity considers this a copy&paste error, and maybe it is. In any
case, it makes sense to check the variable that (if the condition is
true) is changed, and the values are the same before that test, so the
change is harmless.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1347376
Reviewed-on: https://review.coreboot.org/17837
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I163c6a9f5baa05e715861dc19643b19a9c79c883
Reviewed-on: https://chromium-review.googlesource.com/420839
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-12-16 04:51:00 -08:00
Patrick Georgi
314b3e9d53 UPSTREAM: libpayload/.../PDCurses: Improve compatibility with ncurses
Coverity erroneously complains that we call wmove with x or y == -1,
even though our copy of that function properly checks for that.

But: setsyx is documented to always return OK (even on errors), so let
it do that. (and make coverity happy in the process)

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1260797
Reviewed-on: https://review.coreboot.org/17836
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I1bc9ba2a075037f0e1a855b67a93883978564887
Reviewed-on: https://chromium-review.googlesource.com/420838
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-12-16 04:50:58 -08:00
Patrick Georgi
c84db4c062 UPSTREAM: libpayload/.../PDCurses: avoid reading orig before NULL checking it
Coverity complains and that (unfortunately) means that some compiler
might take advantage of the same fact.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1261105
Reviewed-on: https://review.coreboot.org/17835
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I59aff77820c524fa5a0fcb251c1268da475101fb
Reviewed-on: https://chromium-review.googlesource.com/420836
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-12-16 04:50:53 -08:00
Nico Huber
53f6ebb55e UPSTREAM: libpayload: Add Cougar Point PCH's AHCI to whitelist
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17353
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>

Change-Id: Ie8ca342a32323be4c26c236a5209052ec724317f
Reviewed-on: https://chromium-review.googlesource.com/418371
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-08 22:46:50 -08:00
Jeremy Compostella
f52d2427bc UPSTREAM: libpayload: increase MAX_ARGC_COUNT
MAX_ARGC_COUNT limits the payload to ten parameters which is not
enough when used with a proprietary first stage bootloader providing
hardware description using around 20 parameters.

This patch makes the libpayload able to get up to 32 parameters.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Jeremy Compostella <jeremy.compostella@gmail.com>
Reviewed-on: https://review.coreboot.org/17467
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Martin Roth <martinroth@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: I49925040d951dffb9c11425334674d8d498821f2
Reviewed-on: https://chromium-review.googlesource.com/415080
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-30 02:53:16 -08:00
Hakim Giydan
9a98407337 UPSTREAM: libpayload: mvmap2315: Introduce timer driver
BUG=None
BRANCH=None
TEST=booted successfully.

Change-Id: I4a50c9fb7aec929ea29a3cf2eec3e424e3629c92
Signed-off-by: Hakim Giydan <hgiydan@marvell.com>
Reviewed-on: https://review.coreboot.org/16692
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/396240
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-10-11 14:32:38 -07:00
Jeremy Compostella
570b248381 UPSTREAM: libpayload: Fix strtok_r
This patch makes strtok_r:
- handle the end of the string
- handle string that contains only delimiters
- do not set ptr outside of str

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Jeremy Compostella <jeremy.compostella@gmail.com>
Reviewed-on: https://review.coreboot.org/16524
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: I49925040d951dffb9c11425334674d8d498821f1
Reviewed-on: https://chromium-review.googlesource.com/383692
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-09 12:33:31 -07:00
Julius Werner
9c714baad2 UPSTREAM: cbfs: Add "struct" file type and associated helpers
This patch adds functionality to compile a C data structure into a raw
binary file, add it to CBFS and allow coreboot to load it at runtime.
This is useful in all cases where we need to be able to have several
larger data sets available in an image, but will only require a small
subset of them at boot (a classic example would be DRAM parameters) or
only require it in certain boot modes. This allows us to load less data
from flash and increase boot speed compared to solutions that compile
all data sets into a stage.

Each structure has to be defined in a separate .c file which contains no
functions and only a single global variable. The data type must be
serialization safe (composed of only fixed-width types, paying attention
to padding). It must be added to CBFS in a Makefile with the 'struct'
file processor.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16272
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Iab65c0b6ebea235089f741eaa8098743e54d6ccc
Reviewed-on: https://chromium-review.googlesource.com/377606
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-09-01 22:56:18 -07:00
Julius Werner
6ae28b205b UPSTREAM: libpayload: head.S: Avoid clearing BSS (and heap) again
3 out of 4 architectures currently zero out the payload BSS in early
assembly code, which is pointless since the code loading the payload has
already done that (with a more efficient memset). ARM64 has never had
any code like this and can run just fine without it. This also defeats
the new optimization of moving the heap out of the BSS, since all three
implementations assume that everything between _edata and _end is BSS.
We should just take this out.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16091
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

Change-Id: I45cd2dabd94da43ff0f77e990f11c877cee6cda1
Reviewed-on: https://chromium-review.googlesource.com/370697
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-15 18:35:54 -07:00
Julius Werner
e10e635726 UPSTREAM: libpayload: cbfs: Fix minor memory leak in some edge cases
cbfs_get_handle() allocates memory for a handle and doesn't free it if
it errors out later, leaving the memory permanently leaked. Fix.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16207
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: Ide198105ce3ad6237672ff152b4490c768909564
Reviewed-on: https://chromium-review.googlesource.com/369153
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-15 07:36:11 -07:00
Julius Werner
d7c15e636c UPSTREAM: libpayload: lzma: Allocate scratchpad on the heap
Allocating a 15980-byte scratchpad on the stack when your default stack
size is set to 16KB is really not a great idea. We're regularly
overflowing into the end of our heap when using LZMA in libpayload, and
just happen not to notice it because the heap rarely gets filled up all
the way. Of course, since we always *have* a heap in libpayload, the
much saner solution is to just use it directly to allocate the
scratchpad rather than accidentally grow backwards into it anyway.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16089

Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: Ibe4f02057a32bd156a126302178fa6fcab637d2c
Reviewed-on: https://chromium-review.googlesource.com/368287
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-13 20:28:18 -07:00
Julius Werner
bd8ef7964e UPSTREAM: libpayload: arm64: Fix MMU range overlap check
The ARM64 MMU code maintains a list of used ranges, to avoid mapping the
DMA buffer over the coreboot tables and things like that. Unfortunately,
the overlap with ranges in that list is checked with

 (start1 >= start2 && start1 <= end2) || (end1 >= start2 && end1 <= end2)

which is not a full overlap check and misses the case where the second
region is completely contained within the first. This patch replaces
that code with a properly vetted primitive from Stack Overflow.

BRANCH=none
BUG=chrome-os-partner:54416
TEST=Observe how Kevin recovery screen now gets drawn at 10x the speed.

Change-Id: Ie4dd43afeb8a30fedc4da28ccc6ecce9589d23f3
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16075
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/368782
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-08-12 18:28:19 -07:00
Antonello Dettori
498622cbad UPSTREAM: libpayload: split "Drivers" config section in Kconfig
Move the configuration of the timer, storage and USB drivers from the
main Kconfig to three separate ones stored in the respective
directories.

This reduces the LOC of Kconfig and makes it more manageable.

BUG=None
BRANCH=None
TEST=None

Change-Id: Iab88c135c3dc5d2e4a9859ecdab31bbb70b699b8
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/15914
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/367372
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-08-10 00:27:33 -07:00
Martin Roth
bf5c2e059f UPSTREAM: Add newlines at the end of all coreboot files
BUG=None
BRANCH=None
TEST=None

Change-Id: I56587a151b4c7bb0a2e71698799d4ef9dd2c436a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15974
Tested-by: build bot (Jenkins)
Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/366301
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-08-05 11:45:17 -07:00
Patrick Georgi
3c6e113f26 UPSTREAM: libpayload: fix leak in libcbfs
stage wasn't freed on errors.

BUG=None
BRANCH=None
TEST=None

Change-Id: Ie1e30ec043e4ed817dbe758f0fe217796f9da8ef
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1347345
Reviewed-on: https://review.coreboot.org/15958
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/366293
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-08-04 23:38:18 -07:00
Patrick Georgi
7e953ab96a UPSTREAM: libpayload: Drop superfluous "continue"
BUG=None
BRANCH=None
TEST=None

Change-Id: Icef4f3eaba6be3764b01487e82dd8a1013a52184
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1260729
Reviewed-on: https://review.coreboot.org/15957
Tested-by: build bot (Jenkins)
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Omar Pakker
Reviewed-on: https://chromium-review.googlesource.com/366279
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-08-04 23:37:46 -07:00
Martin Roth
10988cdbc5 UPSTREAM: Remove extra newlines from the end of all coreboot files.
This removes the newlines from all files found by the new
int-015-final-newlines script.

BUG=None
BRANCH=None
TEST=None

Change-Id: I89fcb55ff285e4793d7f057f684187359334cb70
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15975
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/366218
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-08-04 23:36:56 -07:00
Julius Werner
9e8d262eb5 UPSTREAM: cbgfx: Use memset() for faster screen clearing if possible
cbgfx currently makes a separate function call (recomputing some values)
for every single pixel it draws. While we mostly don't care that much
about display speed, this can become an issue if you're trying to paint
the whole screen white on a lowly-clocked Cortex-A53. As a simple
solution for these extreme cases, we can build a fast path into
clear_screen() that just memset()s the whole framebuffer if the color
and pixel format allow it.

BUG=chrome-os-partner:54416
TEST=Screen drawing speed on Kevin visibly improves (from 2.5s to 3ms).

BUG=None
BRANCH=None
TEST=None

Change-Id: I22f032afbb86b96fa5a0cbbdce8526a905c67b58
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15524
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/358591
Reviewed-by: Martin Roth <martinroth@chromium.org>
2016-07-07 01:09:21 -07:00
Furquan Shaikh
b95b41fb07 UPSTREAM: libpayload/pci: Correct MASK macro names
BUG=chrome-os-partner:54563

Change-Id: I8ef1c595205fe46dd64357051eeb232e2bbbebc1
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15270
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/355000
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-06-22 10:41:34 -07:00
Liangfeng Wu
0c21e92b23 libpayload: usb: xhci: Support rockchip xHCI controller
1. Make the xHCI driver to support xHCI controller v1.1
2. And a new function xhci_ring_doorbell(), it aims to
   add a memory barrier before ring the doorbell, ensure
   all TRB changes are written to memory.

BRANCH=none
BUG=chrome-os-partner:52684
TEST=boot from USB on Kevin rk3399 platform

Change-Id: I4e38e04dc3c7d32ee4bb424a473c70956a3c3ea9
Signed-off-by: Liangfeng Wu <wulf@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/346831
Commit-Ready: Brian Norris <briannorris@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-06-01 20:37:01 -07:00
Julius Werner
e558f59e2e libpayload: Reintroduce CONFIG_LP_CHROMEOS to set suitable defaults
Chrome OS builds always have some inherent differences to "standard"
libpayload configurations: they don't want to use curses or things like
storage drivers, they always use the coreboot framebuffer and USB, etc.
This patch reintroduces CONFIG_LP_CHROMEOS as an option that only
affects Kconfig defaults. This allows Chrome OS builds to select most of
what they need in one go and reduces board-specific .config files to
only the options that are really specific to that board.

Also restricts the 8250_SERIAL_CONSOLE Kconfig to only default to yes on
x86 boards, which probably makes sense for all of libpayload (some but
far from all ARM boards use 8250-compatible UARTs, and we should
probably not default a platform option unless it's going to be correct
with very high probability).

BRANCH=None
BUG=None
TEST=Built and booted Jerry and Oak.

Change-Id: I609637cd2ea7dfb4558aa3c04c90b64038c9ab57
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/347970
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-27 18:08:50 -07:00
Julius Werner
a036af62a9 libpayload: Replace majority of timer drivers with a generic one
Currently every non-x86 platform supported by libpayload needs to
provide its own timer driver. Most of the ones we have accumulated there
look almost identical: For the frequency, return a preset constant. For
the value, read a 32-bit register, possibly read another 32-bit register
and shift+OR it with the previous one, then return that.

Let's replace this with a single .c file that can easily handle all of
those cases. Menuconfig convenience can still be maintained by providing
several presets that select different defaults for the driver's
configuration options (register address(es) and frequency).

Removes an "enabled" check from Samsung MCT driver since coreboot always
unconditionally enables that timer anyway.

CQ-DEPEND=CL:344809
BRANCH=None
BUG=None
TEST=Booted Oak and Veyron, observed how dev-mode delay was still ~30s

Change-Id: I9784e7c6aa5abd6d92478ea7ec1cf42c9a437546
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/347749
2016-05-27 18:08:49 -07:00
Julius Werner
edacf7d191 UPSTREAM: arm64: Add stack dump to exception handler
Some exceptions (like from calling a NULL function pointer) are easier
to narrow down with a dump of the call stack. Let's take a page out of
ARM32's book and add that feature to ARM64 as well. Also change the
output format to two register columns, to make it easier to fit a whole
exception dump on one screen.

Applying to both coreboot and libpayload and syncing the output format
between both back up.

BUG=None
BRANCH=None
TEST=None

Change-Id: I19768d13d8fa8adb84f0edda2af12f20508eb2db
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14931
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/347166
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-05-26 03:21:55 -07:00
Julius Werner
d8dcfd56b5 UPSTREAM: libpayload: cbfs: Add cbfs_handle API for more fine-grained accesses
The libpayload CBFS APIs are pretty old and clunky, primarily because of
the way the cbfs_media struct may or may not be passed in and may be
initialized inside the API calls in a way that cannot be passed back out
again. Due to this, the only real CBFS access function we have always
reads a whole file with all metadata, and everything else has to build
on top of that. This makes certain tasks like reading just a file
attribute very inefficient on non-memory-mapped platforms (because you
always have to map the whole file).

This patch isn't going to fix the world, but will allow a bit more
flexibility by bolting a new API on top which uses a struct cbfs_handle
to represent a found but not yet read file. A cbfs_handle contains a
copy of the cbfs_media needed to read the file, so it can be kept and
passed around to read individual parts of it after the initial lookup.
The existing (non-media) legacy API is retained for backwards
compatibility, as is cbfs_file_get_contents() (which is most likely what
more recent payloads would have used, and also a good convenience
wrapper for the most simple use case), but they are now implemented on
top of the new API.

CQ-DEPEND=CL:344602
BRANCH=None
BUG=None
TEST=Booted Oak, made sure that firmware screens and software sync
worked okay.

Change-Id: I269f3979e77ae691ee9d4e1ab564eff6d45b7cbe
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/14810
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry picked from commit 2296479dfd)
Reviewed-on: https://chromium-review.googlesource.com/344459
Reviewed-on: https://chromium-review.googlesource.com/346298
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:43 +00:00
Lee Leahy
f92a98c56e coreboot_tables: Extend serial port description
Extend the serial port description to include the input clock frequency
and a payload specific value.

Without the input frequency it is impossible for the payload to compute
the baud-rate divisor without making an assumption about the frequency.
This breaks down when the UART is able to support multiple input clock
frequencies.

Add the UART_PCI_ADDR Kconfig value to specify the unique PCI device
being used as the console UART.  Specify this value as zero when the
UART is not on the PCI bus.  Otherwise specify the device using bus,
device and function along with setting the valid bit.

Currently the only payload to consume these new fields is the EDK-II
CorebootPayloadPkg.

Testing on Galileo:
*  Edit the src/mainboard/intel/galileo/Makefile.inc file:
   *  Add "select ADD_FSP_PDAT_FILE"
   *  Add "select ADD_FSP_RAW_BIN"
   *  Add "select ADD_RMU_FILE"
*  Place the FSP.bin file in the location specified by CONFIG_FSP_FILE
*  Place the pdat.bin files in the location specified by
   CONFIG_FSP_PDAT_FILE
*  Place the rmu.bin file in the location specified by CONFIG_RMU_FILE
*  Build EDK2 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc to generate
   UEFIPAYLOAD.fd
*  Testing is successful when CorebootPayloadPkg is able to properly
   initialize the serial port without using built-in values.

Change-Id: Id4b4455bbf9583f0d66c315d38c493a81fd852a8
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/14609
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-05-09 17:21:22 +02:00
Varadarajan Narayanan
c1ae7e9183 libpayload: ipq40xx: Introduce timer and uart driver
BUG=chrome-os-partner:49249
TEST=None. Initial code not sure if it will even compile
BRANCH=none

Change-Id: Ibf2c91be93e2567cc1262b6fb84461eef51ab3e0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b87157138302b017e64a28417a22421c880c1bcb
Original-Change-Id: I16a8324d3c8ef4ee729f4509fda5bfe703b24ce4
Original-Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/333304
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://review.coreboot.org/14656
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-09 08:53:24 +02:00
Patrick Georgi
5dc87fe470 libpayload/arm64: Mark existing framebuffer as DMAable
If a framebuffer is already configured by coreboot, libpayload's
MMU tables didn't mark its memory DMAable (unlike when libpayload
set up its own framebuffer memory).

BRANCH=none
BUG=chrome-os-partner:52826
TEST=depthcharge's recovery screen is not corrupted anymore on kevin

Change-Id: I228a861b3fdcf1298a3cfa0a054214c78ed55e70
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 889e8358a0f2f504abd9910549aa68f3992bb4e8
Original-Change-Id: I7ba79151ccc1eb605f82e1869a74b539a6be5e99
Original-Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/341092
Reviewed-on: https://review.coreboot.org/14685
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-09 08:30:56 +02:00
Varadarajan Narayanan
8e0ffe2088 libpayload: xhci: Set MPS based on speed
BUG=chrome-os-partner:49249
TEST=Compiles and boots and detect USB storage
BRANCH=none

Change-Id: I9007399e1f785e6f1d2258225e3f7cc602053aed
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 1db43f53973d2124e41186777caa829aa346ace3
Original-Change-Id: I943d19a3a7d785bd075073b57ba6388662d7df90
Original-Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/333311
Original-Commit-Ready: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/14659
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-09 08:29:57 +02:00
Paul Kocialkowski
d2ea674635 libpayload: Add nyan config
This adds a nyan libpayload config, that should fit all nyan devices.

Change-Id: I6b86a03054a7625534fd38ee6a21d3b91fb43589
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/14473
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-09 07:49:57 +02:00
Stef van Os
c012428291 libpayload: time: split time.h from libpayload.h
Move time functions and prototypes from libpayload.h to time.h.
In a similar manner to other c libary headers, this change makes
porting existing applications to libpayload easier.

Change-Id: I71e27c6dddde6e77e0e9b4d7be7cd5298e03a648
Signed-off-by: Stef van Os <stef.van.os@prodrive-technologies.com>
Reviewed-on: https://review.coreboot.org/14437
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-04-21 23:08:52 +02:00