Commit Graph

24 Commits

Author SHA1 Message Date
Gabe Black 1ee2c6dbdf libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig.
When libpayload header files are included in the payload itself, it's possible
that the payloads config settings will conflict with the ones in libpayload.
It's also possible for the libpayload config settings to conflict with the
payloads. To avoid that, the libpayload config settings have _LP_ (for
libpayload) added to them. The symbols themselves as defined in the Config.in files
are still the same, but the prefix added to them is now CONFIG_LP_ instead of just
CONFIG_.

Change-Id: Ib8a46d202e7880afdeac7924d69a949bfbcc5f97
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/65303
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
(cherry picked from commit 23e866da20862cace0ed2a67d6fb74056bc9ea9a)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6427
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
2014-08-05 18:44:08 +02:00
Kyösti Mälkki 48e9eb89fa libpayload: Fix to properly disable serial console
With coreboot builds with serial console disabled, there is no
CB_TAG_SERIAL entry in coreboot tables. We ended up with
lib_sysinfo.serial == NULL and serial_hardware_is_present == 1.

Change-Id: I9a2fc0b55bf77769f2f2bfbb2b5476bee8083f7d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5723
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2014-05-17 14:56:06 +02:00
Dave Frodin adc300d88b libpayload: Fix the logic for hardware-less serial consoles
This fixes the configuration where serial console output is
being sent to non-existant hardware to be captured with I/O
trapping. In this configuration where there isn't serial
hardware present we still want to init the consoles. We just
never want to read non-existant hardware.

Change-Id: Ic51dc574b9c0df3f6ed071086b0fb2119afedc44
Signed-off-by: Dave Frodin <dave.frodin@se-eng.com>
Reviewed-on: http://review.coreboot.org/3249
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-05-15 16:56:33 +02:00
Gabe Black b7b57d9751 libpayload: If there's no IO address space, don't try to use it for serial
Change-Id: I01b1fa42139af925716cd5d57f96dc24da6df5a7
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2660
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-03-13 23:05:06 +01:00
Gabe Black d8d4d113f0 libpayload: If there's no IO space, complain if the serial claims to use it
Change-Id: I36c750d520ff034c9ca9b9af46bd99bd49af7355
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2659
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-03-13 23:04:54 +01:00
Gabe Black 1c1171208f libpayload: Consolidate io vs. mem mapped serial into accessor functions
This way we won't have two copies of the hardware init function, and three
copies of the putchar, havechar, and getchar functions.

Change-Id: Ifda7fec5d582244b0e163ee93ffeedeb28ce48da
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/2657
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2013-03-13 23:04:29 +01:00
Dave Frodin 5056b6e612 libpayload: Check if serial console h/w is present before using
The serial_io_havechar() and serial_io_getchar() functions will
always see keystrokes available if the serial hardware isn't
actually there. We will still output chars to non-existant
hardware to allow virtual hardware to capture them.

Change-Id: I04e85157b6b7a185448abab352b5417a798a397a
Signed-off-by: Dave Frodin <dave.frodin@se-eng.com>
Reviewed-on: http://review.coreboot.org/2040
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
2012-12-18 19:59:59 +01:00
Gabe Black 5ab20054d3 Update the way serial info is read from the coreboot tables.
This information is now stored in a structure instead of in a few seperate
fields. libpayload hadn't been updated to reflect the new layout or to consume
the new information intelligently.

Change-Id: Ice3486ffcdcdbe1f16f9c84515120c591d8dc882
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://review.coreboot.org/1724
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Tested-by: build bot (Jenkins)
2012-11-07 18:30:40 +01:00
Anton Kochkov 93a8b27cbe libpayload: Set 8bits per char for serial port
Previously we assume that hardware using 8 bits
per char by default, but on Asrock A53 Pro
this is not true (7 bit per char by default).
Forcing use 8n1 now.

Change-Id: Ib701725d2ec6dacd7862016b2045270956b27029
Signed-off-by: Anton Kochkov <anton.kochkov@gmail.com>
Reviewed-on: http://review.coreboot.org/1541
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
2012-10-03 09:27:20 +02:00
Patrick Georgi 7f96583f0f Reduce warnings/errors in libpayload when using picky compiler options
The new build system uses quite a few more -W flags for the compiler by
default than the old one. And that's for the better.

Change-Id: Ia8e3d28fb35c56760c2bd0983046c7067e8c5dd6
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/72
Tested-by: build bot (Jenkins)
Reviewed-by: Uwe Hermann <uwe@hermann-uwe.de>
2011-06-30 20:41:23 +02:00
Stefan Reinauer 4e67731011 Allow libpayload to use an OXPCIe 952 card on systems without
onboard serial port                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                         
Signed-off-by: Stefan Reinauer <reinauer@google.com>                                                                                                                                                                                                                     
Acked-by:  Marc Jones <marcj303@gmail.com>                                                                                                                                                                                                                               



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6508 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2011-04-16 00:13:17 +00:00
Stefan Reinauer d233f363c1 Some driver fixes for libpayload:
- fix minor bug in serial driver.
- latest USB stack fixes
- fix dead store in options.c

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4239 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-04-30 16:46:12 +00:00
Jordan Crouse db8c0abefc [PATCH] libpayload: rename config.h to libpayload-config.h
Rename the generated config file to libpayload-config.h to differenciate
it from other config.h files.  Move the default location of the file to
$(src)/include so that LIBPAYLOAD_PREFIX= users can access the file
without staging it.

Signed-off-by: Jordan Crouse <jordan@cosmicpenguin.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3768 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-11-24 17:54:46 +00:00
Patrick Georgi 657a6dc390 This patch removes most of the #ifdefs in libc/console.c, and
replaces it with two queues (input, output) where drivers (serial,
keyboard, video, usb) can attach.

The only things left with #ifdefs are initialization (at some point
the drivers must get a chance to register)


Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3679 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-10-21 15:08:18 +00:00
Stefan Reinauer e75c3d85a3 * factor out serial hardware init
* add reverse color support for serial
* add cursor enable/disable support for serial
* fix tinycurses compilation if serial is disabled
* add functions to query whether serial or vga console is enabled in tinycurses
* initialize uninitialized COLOR_PAIRS variable
* implement has_colors(), wredrawln() functions in curses

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3604 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-09-26 18:36:26 +00:00
Ulf Jordan 0e0ecf27bb Make the serial output driver 8 bit clean. Remove translate_special_chars(),
since it has been superseeded by the ACS code in tinycurses.
  
Signed-off-by: Ulf Jordan <jordan@chalmers.se>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3565 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-09-04 21:05:59 +00:00
Ulf Jordan d57a680632 Add support for curses color output over serial.
Note that the sequence \e[m for turning off bold resets all attributes,
including color.

Signed-off-by: Ulf Jordan <jordan@chalmers.se>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3561 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-09-03 19:59:44 +00:00
Ulf Jordan b4d4bac1c4 Add support for line drawing characters and the alternate character set.
This enables using the ACS_ curses macros with libpayload.

The translation from ACS_ macros (or characters with attribute A_ALTCHARSET)
is done using one acs map for the video console, one for serial console
(xterm/vt100/vt220), and one fallback, from which an ASCII substitute is
taken if the device specific map doesn't contain an entry (ie NUL).

Signed-off-by: Ulf Jordan <jordan@chalmers.se>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3499 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-08-11 20:34:28 +00:00
Stefan Reinauer 5e354b7a43 these should be the last occurences of CONFIG_ without config.h in libpayload.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3496 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-08-11 16:58:23 +00:00
Ulf Jordan b96a2ffaa7 Bugfixes to serial output functions: vt100 has bold with \e[1m,
upper left corner is (0,0) in curses, but (1,1) on the vt100.

Signed-off-by: Ulf Jordan <jordan@chalmers.se>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3493 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-08-09 20:17:22 +00:00
Jordan Crouse 3b4706591c libpayload: Support curses for serial
Support the curses interface over serial by supporting a minimal vt100
terminal.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3370 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-06-20 00:01:42 +00:00
Uwe Hermann be504d1d8d Drop unneeded #includes, add EXIT_SUCCESS/EXIT_FAILURE (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3237 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-04-11 20:16:24 +00:00
Uwe Hermann 6a441bfb46 Cosmetics, coding style fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3180 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-03-20 19:54:59 +00:00
Jordan Crouse f6145c3c15 libpayload: The initial chunk of code writen by AMD
This is the initial chunk of code written by me and copyrighted
by AMD.  Includes everything but a few files that we pulled from
outside sources.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3170 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-03-19 23:56:58 +00:00