Sergey Larin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38253 )
Change subject: src/superio: Add it8987e
......................................................................
src/superio: Add it8987e
Add support for IT8987E SuperIO. Based on it8528e.
Currently untested.
Signed-off-by: cerg2010cerg2010 <cerg2010cerg2010(a)mail.ru>
Change-Id: I3e39be986ffbdebe873ff9b9dbc6902ed1ceaf6f
---
A src/superio/ite/it8987e/Kconfig
A src/superio/ite/it8987e/Makefile.inc
A src/superio/ite/it8987e/it8987e.h
A src/superio/ite/it8987e/superio.c
4 files changed, 135 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/38253/1
diff --git a/src/superio/ite/it8987e/Kconfig b/src/superio/ite/it8987e/Kconfig
new file mode 100644
index 0000000..b8e3258
--- /dev/null
+++ b/src/superio/ite/it8987e/Kconfig
@@ -0,0 +1,18 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2019 Sergey Larin <cerg2010cerg2010(a)mail.ru>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+config SUPERIO_ITE_IT8987E
+ bool
+ select SUPERIO_ITE_COMMON_PRE_RAM
diff --git a/src/superio/ite/it8987e/Makefile.inc b/src/superio/ite/it8987e/Makefile.inc
new file mode 100644
index 0000000..01e4d3e
--- /dev/null
+++ b/src/superio/ite/it8987e/Makefile.inc
@@ -0,0 +1,17 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2019 Sergey Larin <cerg2010cerg2010(a)mail.ru>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+ramstage-$(CONFIG_SUPERIO_ITE_IT8987E) += superio.c
diff --git a/src/superio/ite/it8987e/it8987e.h b/src/superio/ite/it8987e/it8987e.h
new file mode 100644
index 0000000..4e265df
--- /dev/null
+++ b/src/superio/ite/it8987e/it8987e.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Sergey Larin <cerg2010cerg2010(a)mail.ru>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SUPERIO_ITE_IT8987E_H
+#define SUPERIO_ITE_IT8987E_H
+
+#define IT8987E_SWUC 0x04 /* System Wake-Up */
+#define IT8987E_KBCM 0x05 /* PS/2 mouse */
+#define IT8987E_KBCK 0x06 /* PS/2 keyboard */
+#define IT8987E_IR 0x0a /* Consumer IR */
+#define IT8987E_SMFI 0x0f /* Shared Memory/Flash Interface */
+#define IT8987E_RTCT 0x10 /* RTC-like Timer */
+#define IT8987E_PMC1 0x11 /* Power Management Channel 1 */
+#define IT8987E_PMC2 0x12 /* Power Management Channel 2 */
+#define IT8987E_SSPI 0x13 /* Serial Peripheral Interface */
+#define IT8987E_PECI 0x14 /* Platform EC Interface */
+#define IT8987E_PMC3 0x17 /* Power Management Channel 3 */
+#define IT8987E_PMC4 0x18 /* Power Management Channel 4 */
+#define IT8987E_PMC5 0x19 /* Power Management Channel 5 */
+
+
+#endif /* SUPERIO_ITE_IT8987E_H */
diff --git a/src/superio/ite/it8987e/superio.c b/src/superio/ite/it8987e/superio.c
new file mode 100644
index 0000000..dce7a6f
--- /dev/null
+++ b/src/superio/ite/it8987e/superio.c
@@ -0,0 +1,65 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Sergey Larin <cerg2010cerg2010(a)mail.ru>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <device/device.h>
+#include <device/pnp.h>
+#include <superio/conf_mode.h>
+
+#include "it8987e.h"
+
+static void it8987e_init(struct device *dev)
+{
+}
+
+static struct device_operations ops = {
+ .read_resources = pnp_read_resources,
+ .set_resources = pnp_set_resources,
+ .enable_resources = pnp_enable_resources,
+ .enable = pnp_alt_enable,
+ .init = it8987e_init,
+ .ops_pnp_mode = &pnp_conf_mode_870155_aa,
+};
+
+static struct pnp_info pnp_dev_info[] = {
+ { NULL, IT8987E_SWUC, PNP_IO0 | PNP_IRQ0, 0xfff0, },
+ { NULL, IT8987E_KBCM, PNP_IRQ0, },
+ { NULL, IT8987E_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
+ { NULL, IT8987E_IR, PNP_IO0 | PNP_IRQ0, 0xfff8, },
+ { NULL, IT8987E_SMFI, PNP_IO0 | PNP_IRQ0 | PNP_MSC4, 0xfff0, },
+ { NULL, IT8987E_RTCT, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IO3 | PNP_IRQ0
+ | PNP_MSC0 | PNP_MSC1 | PNP_MSC2,
+ 0xfffe, 0xfffe, 0xfffe, 0xfffe},
+ { NULL, IT8987E_PMC1, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff },
+ { NULL, IT8987E_PMC2, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IRQ0 | PNP_MSC0,
+ 0x07fc, 0x07fc, 0xfff0 },
+ { NULL, IT8987E_SSPI, PNP_IO0 | PNP_IRQ0, 0xfff8 },
+ { NULL, IT8987E_PECI, PNP_IO0, 0xfff8 },
+ { NULL, IT8987E_PMC3, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff },
+ { NULL, IT8987E_PMC4, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0,
+ 0x07ff, 0x07ff },
+ { NULL, IT8987E_PMC5, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0,
+ 0x07ff, 0x07ff },
+};
+
+static void enable_dev(struct device *dev)
+{
+ pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+}
+
+struct chip_operations superio_ite_it8987e_ops = {
+ CHIP_NAME("ITE IT8987E Super I/O")
+ .enable_dev = enable_dev,
+};
--
To view, visit https://review.coreboot.org/c/coreboot/+/38253
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3e39be986ffbdebe873ff9b9dbc6902ed1ceaf6f
Gerrit-Change-Number: 38253
Gerrit-PatchSet: 1
Gerrit-Owner: Sergey Larin <cerg2010cerg2010(a)mail.ru>
Gerrit-MessageType: newchange
Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38136 )
Change subject: console,boot_state: Denote unit in beginning in log message
......................................................................
console,boot_state: Denote unit in beginning in log message
Looking at the board status repository logs, lines similar to
BS: postcar times (exec / console): total (unknown) / 0 ms
BS: BS_DEV_ENUMERATE run times (exec / console): 6 / 0 ms
are not obvious right away, as the unit visually only applies to the
value after the slash.
So, add the unit after `times`.
BS: BS_DEV_ENUMERATE run times [ms] (exec / console): 6 / 0
Change-Id: If01a5d43a54aeefc0a6d49d4b600436c2a8328cd
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M src/console/printk.c
M src/lib/hardwaremain.c
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/38136/1
diff --git a/src/console/printk.c b/src/console/printk.c
index 3ef28f3..be7c98b 100644
--- a/src/console/printk.c
+++ b/src/console/printk.c
@@ -49,7 +49,7 @@
if (!TRACK_CONSOLE_TIME)
return;
- printk(BIOS_DEBUG, "BS: " ENV_STRING " times (exec / console): total (unknown) / %ld ms\n",
+ printk(BIOS_DEBUG, "BS: " ENV_STRING " times [ms] (exec / console): total (unknown) / %ld\n",
DIV_ROUND_CLOSEST(console_usecs, USECS_PER_MSEC));
}
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index eba5f12..cf1e1b7 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -250,7 +250,7 @@
execution = DIV_ROUND_CLOSEST(execution, USECS_PER_MSEC);
console = DIV_ROUND_CLOSEST(console, USECS_PER_MSEC);
if (execution) {
- printk(BIOS_DEBUG, "BS: %s %s times (exec / console): %ld / %ld ms\n",
+ printk(BIOS_DEBUG, "BS: %s %s times [ms] (exec / console): %ld / %ld\n",
state->name, sample_id[i], execution - console, console);
/* Reset again to ignore printk() time above. */
console_time_get_and_reset();
--
To view, visit https://review.coreboot.org/c/coreboot/+/38136
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If01a5d43a54aeefc0a6d49d4b600436c2a8328cd
Gerrit-Change-Number: 38136
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange
Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38677 )
Change subject: util/lint/checkpatch: Update to 96 char line length limit
......................................................................
util/lint/checkpatch: Update to 96 char line length limit
Follow up on commit bcbf2deb42 (Documentation/coding_style.md: Update
line length limit) and update the script `checkpatch.pl`.
Change-Id: I2b5c5d4cf9f0534298d00e76173cd448e8e13281
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M util/lint/checkpatch.pl
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/38677/1
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl
index 1affdb7..c6cbe69 100755
--- a/util/lint/checkpatch.pl
+++ b/util/lint/checkpatch.pl
@@ -51,7 +51,7 @@
my @exclude = (); #coreboot
my $help = 0;
my $configuration_file = ".checkpatch.conf";
-my $max_line_length = 80;
+my $max_line_length = 96;
my $ignore_perl_version = 0;
my $minimum_perl_version = 5.10.0;
my $min_conf_desc_length = 4;
--
To view, visit https://review.coreboot.org/c/coreboot/+/38677
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2b5c5d4cf9f0534298d00e76173cd448e8e13281
Gerrit-Change-Number: 38677
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32020
Change subject: [WIP]x86: Introduce the blobolator
......................................................................
[WIP]x86: Introduce the blobolator
This is a PoC to run arbitrary code and blobs inside an emulated
virtual machine using libx86emu, thus the name blobolator.
The libx86emu has been patched to the following:
* redirect IO to the host machine it's running on
* trace IO
* start in protected mode
* add mechanism to drop IO access
* add Kconfig to debug code it is running
Implemented features:
* Run ramstage in libx86emu
* Run postcar in libx86emu
TODO:
* Add support to trace only blobs, not stages.
* Improve translation of known IO to human readable format
** COM
** PCI
** APIC
** PIT
** POST
Tested on qemu. Sucessfully run ramstage in blobolator.
Change-Id: I13e47f45e69376d046f35c04363fe3db1cfaa610
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/Kconfig
M src/arch/x86/boot.c
M src/mainboard/emulation/qemu-i440fx/romstage.c
M src/mainboard/emulation/qemu-q35/romstage.c
M src/vendorcode/Makefile.inc
A src/vendorcode/libx86emu/Makefile.inc
A src/vendorcode/libx86emu/blobolator.c
A src/vendorcode/libx86emu/decode.c
A src/vendorcode/libx86emu/include/decode.h
A src/vendorcode/libx86emu/include/mem.h
A src/vendorcode/libx86emu/include/ops.h
A src/vendorcode/libx86emu/include/prim_ops.h
A src/vendorcode/libx86emu/include/x86emu.h
A src/vendorcode/libx86emu/include/x86emu_int.h
A src/vendorcode/libx86emu/mem.c
A src/vendorcode/libx86emu/ops.c
A src/vendorcode/libx86emu/ops2.c
A src/vendorcode/libx86emu/prim_ops.c
18 files changed, 14,512 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/32020/1
--
To view, visit https://review.coreboot.org/c/coreboot/+/32020
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I13e47f45e69376d046f35c04363fe3db1cfaa610
Gerrit-Change-Number: 32020
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34632 )
Change subject: Documentation: Add guidelines for new mainboard ports
......................................................................
Documentation: Add guidelines for new mainboard ports
This is WIP and partly copied from https://www.coreboot.org/Motherboard_Porting_Guide
It also list what should be documented for new mainboard ports.
Change-Id: I134dbf2341696ba0dd33c3d52bf787b8eaabbdab
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
M Documentation/getting_started/index.md
A Documentation/getting_started/new_mainboard_ports.md
M Documentation/getting_started/writing_documentation.md
3 files changed, 95 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/34632/1
diff --git a/Documentation/getting_started/index.md b/Documentation/getting_started/index.md
index 52d873e..7821ee1 100644
--- a/Documentation/getting_started/index.md
+++ b/Documentation/getting_started/index.md
@@ -7,3 +7,4 @@
* [Gerrit Guidelines](gerrit_guidelines.md)
* [Documentation License](license.md)
* [Writing Documentation](writing_documentation.md)
+* [Adding new mainboards](new_mainboard_ports.md)
diff --git a/Documentation/getting_started/new_mainboard_ports.md b/Documentation/getting_started/new_mainboard_ports.md
new file mode 100644
index 0000000..cb7cd9b
--- /dev/null
+++ b/Documentation/getting_started/new_mainboard_ports.md
@@ -0,0 +1,91 @@
+# Adding new mainboards
+
+Mainboard code is placed under `src/mainboards`. It glues the HW components
+together by selecting appropiate northbridge, southbridge, on-board HW and
+drivers.
+
+It provides the devicetree.cb, configures GPIOs, audio codecs, a static ACPI
+board desciption and allows the romstage code to retrieve the SPD for
+DRAM training.
+
+## Starting a new port from scratch
+
+1. Identify your platform
+ Try to find out as much as possible about the current hardware.
+ Dump information with existing tools:
+ * lspci
+ * lsusb
+ * superiotool
+ * inteltool
+ * ectool
+ * dmidecode
+ * acpidump
+
+ Have a look at the mainboard schematics to see how those components are
+ connected.
+2. Find a similar existing board
+ It a good idea to find a similar board and use it as reference. You should
+ then provide a proper GPIO configuration and devicetree.cb.
+3. Find a similar SuperIo or BMC
+ To debug coreboot you should get the serial console working first. If your
+ board has a SuperIO or BMC try to find a compatible one.
+ Some boards have UART hardware on the SoC, makeing external components
+ obsolete.
+4. Start with a minimal bootable configuration. That is:
+ * serial is working
+ * SPD reading/DRAM is working
+ * A payload that is able to boot an operating system
+5. Be able to recover from a bad flash. You should use external flashing as
+ it's likely that you will brick your platform on the first attempts.
+ Make sure to backup the original firmware (if any).
+
+## Code submission
+
+Here's a checklist for new mainboard ports:
+
+1. Try to not duplicate code, use variants scheme instead.
+2. Split changes logical into top level directories:
+ `src/mainboard` , `src/northbridge`, `src/ec`, ...
+3. Provide good documentation, see point 4
+4. In the commit message describe as much as possible or point to the
+ documentation, satisfying the following questions:
+ * Where's the flash IC located?
+ * Can you flash incircuit?
+ * Are there pinheaders for flashing?
+ * Is the flash hardware write-protected?
+ * Which flash IC is usually equipped?
+ * If the board features an BMC, can it be used for developing and
+ debugging?
+ * What was tested and is working?
+ * What was tested and isn't working?
+ * What wasn't tested (due to lack of testing equipment)?
+ * Are blobs necessary?
+ * How can the board be debugged?
+ * Are there serial, EHCI debug, xHCI debug or BMC connections?
+ * Does it have a SuperIO?
+
+ In addition please descibe:
+ * How to retrieve blobs, like dumping them from vendor firmware
+
+ See [Writing Documentation] for more details.
+
+5. What you should **not** document:
+ * Steps or instructions how to flash the board
+ * Steps or instructions how to use a specific application for flashing
+ * Please do not provide pictures of the whole board or it's backplate
+ connectors
+6. Recommand a flashing method as descibed in [Flashing tutorial]
+7. If you are working at/for a hardware vendor, please provide free board
+ schematics as well.
+8. Provide a picture of the flash IC or flash connector.
+ * The picture should be less than 800pc in width and compressed with
+ 70% compression to reduce size.
+ * You must own the Copyright
+ * Try to cut of uninteresting parts of the image, like tables, cables, ...
+
+Once done submit your board to Gerrit. Please follow the [Gerrit Guidelines] as
+well.
+
+[Writing Documentation]: writing_documentation.md
+[Flashing tutorial]: ../flash_tutorial/index.md
+[Gerrit Guidelines]: gerrit_guidelines.md
diff --git a/Documentation/getting_started/writing_documentation.md b/Documentation/getting_started/writing_documentation.md
index fb942a4..0b820fc 100644
--- a/Documentation/getting_started/writing_documentation.md
+++ b/Documentation/getting_started/writing_documentation.md
@@ -49,6 +49,8 @@
the current theme doesn't allow bigger images.
12. Shouldn't cover implementation details; for details, the code is the
reference.
+13. New mainboard ports should also add documentation. See
+ [Adding new mainboards] for more details.
## Referencing markdown documents
@@ -122,3 +124,4 @@
[Markdown Guide]: https://www.markdownguide.org/
[Gerrit Guidelines]: gerrit_guidelines.md
[review.coreboot.org]: https://review.coreboot.org
+[Adding new mainboards]: new_mainboard_ports.md
--
To view, visit https://review.coreboot.org/c/coreboot/+/34632
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I134dbf2341696ba0dd33c3d52bf787b8eaabbdab
Gerrit-Change-Number: 34632
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39124 )
Change subject: mb/kontron/986lcd-m: Select FIXED_UART_FOR_CONSOLE
......................................................................
mb/kontron/986lcd-m: Select FIXED_UART_FOR_CONSOLE
The serial port base address is hardcoded for this mainboard, so
deactivate the Kconfig dialog for `TTYS0_BASE`.
Change-Id: Ic989e4c4fde8ce03c6941c44f71dc72840fc77c3
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M src/mainboard/kontron/986lcd-m/Kconfig
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/39124/1
diff --git a/src/mainboard/kontron/986lcd-m/Kconfig b/src/mainboard/kontron/986lcd-m/Kconfig
index dfc7c3c..204d404 100644
--- a/src/mainboard/kontron/986lcd-m/Kconfig
+++ b/src/mainboard/kontron/986lcd-m/Kconfig
@@ -9,6 +9,7 @@
select SOUTHBRIDGE_INTEL_I82801GX
select SUPERIO_WINBOND_W83627THG
select SUPERIO_NUVOTON_COMMON_HWM # Nuvoton is a Winbond spin-off
+ select FIXED_UART_FOR_CONSOLE
select HAVE_ACPI_TABLES
select HAVE_PIRQ_TABLE
select HAVE_MP_TABLE
--
To view, visit https://review.coreboot.org/c/coreboot/+/39124
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic989e4c4fde8ce03c6941c44f71dc72840fc77c3
Gerrit-Change-Number: 39124
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange