Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38926 )
Change subject: Documentation: Add GM45 ThinkPads common page
......................................................................
Documentation: Add GM45 ThinkPads common page
- Add a common page about X200/T400/T500 ThinkPads.
- Describe how to remove ME on these models.
- Describe default flash layouts.
Change-Id: I85917821efe63fff4b933b6226e99c17b63eb1b9
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.io>
---
M Documentation/mainboard/index.md
A Documentation/mainboard/lenovo/xx00_series.md
2 files changed, 115 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/38926/1
diff --git a/Documentation/mainboard/index.md b/Documentation/mainboard/index.md
index ce30ee2..3b5903b 100644
--- a/Documentation/mainboard/index.md
+++ b/Documentation/mainboard/index.md
@@ -77,6 +77,7 @@
### GM45 series
+- [X200 / T400 / T500 common](lenovo/xx00_series.md)
- [X301](lenovo/x301.md)
### Sandy Bridge series
diff --git a/Documentation/mainboard/lenovo/xx00_series.md b/Documentation/mainboard/lenovo/xx00_series.md
new file mode 100644
index 0000000..3ac7c87
--- /dev/null
+++ b/Documentation/mainboard/lenovo/xx00_series.md
@@ -0,0 +1,114 @@
+# Lenovo X200 / T400 / T500 common
+
+These models can have 8 MB or 4 MB flash chip installed. You can identify the
+chip in your machine through flashrom:
+```
+flashrom -p internal
+```
+
+## Installing without ME firmware
+
+On GM45 machines it's possible to disable and remove ME by modifying the flash
+descriptor. This also make it possible to use the flash region the ME used for
+`bios` region, allowing for much larger payloads.
+
+First of all create a backup of your ROM with an external programmer:
+```
+flashrom -p YOUR_PROGRAMMER -r backup.rom
+```
+
+Then extract FD modules to a separate files. Your will need
+`flashregion_3_gbe.bin` later.
+```
+ifdtool -x backup.rom
+```
+
+There is a tool to generate modified flash descriptor called **bincfg**. Go to
+`util/bincfg` and build it:
+```
+cd util/bincfg
+make
+```
+
+If your flash is 4 MB, edit the `ifd-x200.set` file as shown:
+
+```diff
+diff --git a/util/blobtool/ifd-x200.set b/util/blobtool/ifd-x200.set
+--- a/util/blobtool/ifd-x200.set
++++ b/util/blobtool/ifd-x200.set
+@@ -35,7 +35,7 @@
+ "flmap2_msl" = 0x1,
+ "flmap2_reserved" = 0x0,
+
+- "flcomp_density1" = 0x4,
++ "flcomp_density1" = 0x3,
+ "flcomp_density2" = 0x2,
+ "flcomp_reserved0" = 0x0,
+ "flcomp_reserved1" = 0x0,
+@@ -56,7 +56,7 @@
+ "flreg0_reserved1" = 0x0,
+ "flreg1_base" = 0x3,
+ "flreg1_reserved0" = 0x0,
+- "flreg1_limit" = 0x7ff,
++ "flreg1_limit" = 0x3ff,
+ "flreg1_reserved1" = 0x0,
+ "flreg2_base" = 0x1fff,
+ "flreg2_reserved0" = 0x0,
+```
+
+Create the flash descriptor:
+```
+./bincfg ifd-x200.spec ifd-x200.set ifd.bin
+```
+
+Now configure coreboot. You need to select correct chip size and specify paths
+to flash descriptor and gbe dump.
+```
+Mainboard --->
+ ROM chip size (8192 KB (8 MB)) # According to your chip
+ (0x7fd000) Size of CBFS filesystem in ROM # or 0x3fd000 for 4 MB chip
+
+Chipset --->
+ [*] Add Intel descriptor.bin file
+ (/path/to/util/bincfg/ifd.bin) Path and filename of the descriptor.bin file
+
+ [*] Add gigabit ethernet configuration
+ (/path/to/flashregion_3_gbe.bin) Path to gigabit ethernet configuration
+```
+
+Then build coreboot and flash whole `build/coreboot.rom` to the chip.
+
+## Installing with ME firmware
+
+To install coreboot and keep ME, you don't need to do anything special. Just
+flash only `bios` and don't touch other regions:
+```
+flashrom -p YOUR_PROGRAMMER -w coreboot.rom --ifd -i bios
+```
+
+## Flash layout
+
+The flash layout of the OEM firmware on 8 MB chips is as follows:
+```
+00000000:00000fff descriptor
+00001000:005f5fff me
+005f6000:005f7fff gbe
+005f8000:005fffff platform
+00600000:007fffff bios
+00690000:006affff ec
+007e0000:007fffff bootblock
+```
+
+On 4 MB chips:
+```
+00000000:00000fff descriptor
+00001000:001f5fff me
+001f6000:001f7fff gbe
+001f8000:001fffff platform
+00200000:003fffff bios
+00290000:002affff ec
+003e0000:003fffff bootblock
+```
+
+The `ec` region is not where EC firmware is stored. It's where EC firmware
+updates are stored for PhoenixBIOS to write them to EC once.
--
To view, visit https://review.coreboot.org/c/coreboot/+/38926
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I85917821efe63fff4b933b6226e99c17b63eb1b9
Gerrit-Change-Number: 38926
Gerrit-PatchSet: 1
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.io>
Gerrit-MessageType: newchange
Hello Julius Werner,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/38538
to review the following change.
Change subject: libpayload/corebootfb: Add option to center a 80x25 console
......................................................................
libpayload/corebootfb: Add option to center a 80x25 console
This makes payloads which are hardcoded to a 80x25 console look much
better, e.g. FILO with its "GRUB" user interface.
Change-Id: I9f4752328d85d148cd40a0c2337c7191e1d6a586
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M payloads/libpayload/Kconfig
M payloads/libpayload/drivers/video/corebootfb.c
2 files changed, 28 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/38538/1
diff --git a/payloads/libpayload/Kconfig b/payloads/libpayload/Kconfig
index f7501e3..36f4af5 100644
--- a/payloads/libpayload/Kconfig
+++ b/payloads/libpayload/Kconfig
@@ -315,6 +315,13 @@
Say Y here if coreboot switched to a graphics mode and
your payload wants to use it.
+config COREBOOT_VIDEO_CENTERED
+ bool "Center a classic 80x25 console on bigger screens"
+ depends on COREBOOT_VIDEO_CONSOLE
+ help
+ Say 'y' here if your payload is hardcoded to a 80x25 console. Otherwise
+ its output would look squeezed into the upper-left corner of the screen.
+
config FONT_SCALE_FACTOR
int "Scale factor for the included font"
depends on GEODELX_VIDEO_CONSOLE || COREBOOT_VIDEO_CONSOLE
diff --git a/payloads/libpayload/drivers/video/corebootfb.c b/payloads/libpayload/drivers/video/corebootfb.c
index c4b5048..8e7ac11 100644
--- a/payloads/libpayload/drivers/video/corebootfb.c
+++ b/payloads/libpayload/drivers/video/corebootfb.c
@@ -236,8 +236,16 @@
font_init(FI->x_resolution);
- coreboot_video_console.columns = FI->x_resolution / font_width;
- coreboot_video_console.rows = FI->y_resolution / font_height;
+ /* Draw centered on the framebuffer if requested and feasible, */
+ const int center =
+ IS_ENABLED(CONFIG_LP_COREBOOT_VIDEO_CENTERED)
+ && coreboot_video_console.columns * font_width <= FI->x_resolution
+ && coreboot_video_console.rows * font_height <= FI->y_resolution;
+ /* adapt to the framebuffer size, otherwise. */
+ if (!center) {
+ coreboot_video_console.columns = FI->x_resolution / font_width;
+ coreboot_video_console.rows = FI->y_resolution / font_height;
+ }
chars = malloc(coreboot_video_console.rows *
coreboot_video_console.columns * 2);
@@ -246,6 +254,17 @@
// clear boot splash screen if there is one.
corebootfb_clear();
+
+ if (center) {
+ FI->physical_address +=
+ (FI->x_resolution - coreboot_video_console.columns * font_width)
+ / 2 * FI->bits_per_pixel / 8
+ + (FI->y_resolution - coreboot_video_console.rows * font_height)
+ / 2 * FI->bytes_per_line;
+ FI->x_resolution = coreboot_video_console.columns * font_width;
+ FI->y_resolution = coreboot_video_console.rows * font_height;
+ }
+
return 0;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/38538
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9f4752328d85d148cd40a0c2337c7191e1d6a586
Gerrit-Change-Number: 38538
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange
Hello Julius Werner,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/38537
to review the following change.
Change subject: libpayload/corebootfb: Keep local copy of framebuffer info
......................................................................
libpayload/corebootfb: Keep local copy of framebuffer info
Keeping a local copy of the framebuffer info allows us to make changes,
e.g. add offsets. It also avoids trouble with relocation.
Change-Id: I852c4eb229dd0724114acb302ab2ed7164712b64
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M payloads/libpayload/drivers/video/corebootfb.c
1 file changed, 6 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/38537/1
diff --git a/payloads/libpayload/drivers/video/corebootfb.c b/payloads/libpayload/drivers/video/corebootfb.c
index 11397ba..c4b5048 100644
--- a/payloads/libpayload/drivers/video/corebootfb.c
+++ b/payloads/libpayload/drivers/video/corebootfb.c
@@ -61,13 +61,12 @@
(0xFF << 16) | (0xFF << 8) | 0xFF,
};
-/* Addresses for the various components */
-static unsigned long fbinfo;
-static unsigned long fbaddr;
+struct cb_framebuffer fbinfo;
static unsigned short *chars;
-#define FI ((struct cb_framebuffer *) phys_to_virt(fbinfo))
-#define FB ((unsigned char *) phys_to_virt(fbaddr))
+/* Addresses for the various components */
+#define FI (&fbinfo)
+#define FB ((unsigned char *) phys_to_virt(FI->physical_address))
#define CHARS (chars)
static void corebootfb_scroll_up(void)
@@ -230,12 +229,9 @@
if (lib_sysinfo.framebuffer == NULL)
return -1;
- /* We might have been called before relocation (like FILO does). So
- just keep the physical address which won't break on relocation. */
- fbinfo = virt_to_phys(lib_sysinfo.framebuffer);
+ fbinfo = *lib_sysinfo.framebuffer;
- fbaddr = FI->physical_address;
- if (fbaddr == 0)
+ if (FI->physical_address == 0)
return -1;
font_init(FI->x_resolution);
--
To view, visit https://review.coreboot.org/c/coreboot/+/38537
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I852c4eb229dd0724114acb302ab2ed7164712b64
Gerrit-Change-Number: 38537
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39376 )
Change subject: util/superiotool: Drop one SCH5317 entry
......................................................................
util/superiotool: Drop one SCH5317 entry
The SCH5317 can have either 0x85 or 0x8c as device ID. However, the
former results in false positives on any ITE IT85xx series embedded
controller, which has led some people to think that chip was actually in
their laptops. Moreover, there is no register dump for the SCH5317.
Since nobody has touched this in over a decade, avoid further confusion
by dropping the misleading definition.
Change-Id: I4d1d34d1b88b878461499e52f1a916ee1e33210d
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M util/superiotool/smsc.c
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/39376/1
diff --git a/util/superiotool/smsc.c b/util/superiotool/smsc.c
index ab61ba4..7e50548 100644
--- a/util/superiotool/smsc.c
+++ b/util/superiotool/smsc.c
@@ -860,9 +860,6 @@
{EOT}}},
{0x83, "SCH5514D", { /* From sensors-detect */
{EOT}}},
- {0x85, "SCH5317", { /* From sensors-detect */
- /* The SCH5317 can have either 0x85 or 0x8c as device ID. */
- {EOT}}},
{0x86, "SCH5127", { /* From sensors-detect, dump from datasheet */
{NOLDN, NULL,
{0x02,0x03,0x21,0x22,0x23,0x24,0x26,0x27,
--
To view, visit https://review.coreboot.org/c/coreboot/+/39376
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4d1d34d1b88b878461499e52f1a916ee1e33210d
Gerrit-Change-Number: 39376
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39364 )
Change subject: vendorcode/intel/fsp/fsp2_0/tgl: Update FSP header for Tiger Lake
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/39364
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib6ac89163c0f7a11910e56b9804e386f8bcf355d
Gerrit-Change-Number: 39364
Gerrit-PatchSet: 2
Gerrit-Owner: Srinidhi N Kaushik <srinidhi.n.kaushik(a)intel.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Raj Astekar <raj.astekar(a)intel.corp-partner.google.com>
Gerrit-Reviewer: Shaunak Saha <shaunak.saha(a)intel.com>
Gerrit-Reviewer: Srinidhi N Kaushik <srinidhi.n.kaushik(a)intel.com>
Gerrit-Reviewer: Wonkyu Kim <wonkyu.kim(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 09 Mar 2020 08:07:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment