From fe169cfef2bd84d3d2995f3a039282dfe83d94dd Mon Sep 17 00:00:00 2001
From: Francis Rowe
+ These are saved as two configs, because there are 2 size flash chips: 4MB or 8MB. +
++ Go back and disable option ROMs: +
++ The resulting .config file was saved as resources/libreboot/config/r400_8mb/config and + resources/libreboot/config/r400_4mb/config and is used by the build + scripts for this machine. +
+diff --git a/docs/hcl/x200_remove_me.html b/docs/hcl/gm45_remove_me.html index ae0a83f..d6c36f4 100644 --- a/docs/hcl/x200_remove_me.html +++ b/docs/hcl/gm45_remove_me.html @@ -8,23 +8,25 @@ @import url('../css/main.css'); -
- This sections relates to disabling and removing the ME (Intel Management Engine) - on the ThinkPad X200. + This sections relates to disabling and removing the ME (Intel Management Engine) on + GM45. This was originally done on the ThinkPad X200, and later adapted for the ThinkPad R400. It can + in principle be done on any GM45 or GS45 machine.
The ME is a blob that typically must be left inside the flash chip (in the ME region, as outlined - by the default descriptor). On the X200, it is possible to remove it without any ill effects. All - other parts of coreboot on the X200 can be blob-free, so removing the ME was the last obstacle to - get X200 support in libreboot (the machine can also work without the microcode blobs). + by the default descriptor). On GM45, it is possible to remove it without any ill effects. All + other parts of coreboot on GM45 machines (provided GMA MHD4500 / Intel graphics) can be blob-free, + so removing the ME was the last obstacle to + make GM45 a feasible target in libreboot (the machines can also work without the microcode blobs).
The ME is removed and disabled in libreboot by modifying the descriptor. More info about @@ -32,7 +34,7 @@ in libreboot, or more generally on this page.
- Back to main X200 compatibility page (x200.html). + Back to previous index.
- This is no longer strictly necessary. Libreboot ROM images for X200 now + This is no longer strictly necessary. Libreboot ROM images for GM45 now contain the 12KiB descriptor+gbe generated from ich9gen, by default.
@@ -80,7 +82,7 @@
A bash script is also included in libreboot which will change the mac address (using ich9gen)
- on all X200 ROM images. For instance:
+ on all GM45 ROM images. For instance:
$ ./ich9macchange XX:XX:XX:XX:XX:XX
@@ -100,7 +102,7 @@
- Assuming that your X200 libreboot image is named libreboot.rom, copy
+ Assuming that your libreboot image is named libreboot.rom, copy
the file to where libreboot.rom is located
and then run, for instance:
$ dd if=ich9fdgbe_8m.bin of=libreboot.rom bs=1 count=12k conv=notrunc
@@ -109,7 +111,7 @@
- Your X200 libreboot.rom image is now ready to be flashed on the machine. Refer back to + Your libreboot.rom image is now ready to be flashed on the machine. Refer back to ../install/index.html#flashrom for how to flash it.
@@ -121,12 +123,13 @@- This is no longer strictly necessary. Libreboot ROM images for X200 now + This is no longer strictly necessary. Libreboot ROM images for GM45 machines now contain the 12KiB descriptor+gbe generated from ich9gen, by default.
- This was the tool originally used to disable the ME on X200. ich9gen now supersedes it; + This was the tool originally used to disable the ME on X200 (later adapted for other machines that use the + GM45 chipset). ich9gen now supersedes it; ich9gen is better because it does not rely on dumping the factory.rom image (whereas, ich9deblob does).
@@ -146,8 +149,8 @@
- Place the factory.rom from your X200
- (can be obtained using the guide at ../install/x200_external.html) in
+ Place the factory.rom from your machine
+ (can be obtained using the external flashing guides for GM45 targets linked ../install/index.html) in
the directory where you have your ich9deblob executable, then run the tool:
$ ./ich9deblob
- Assuming that your X200 libreboot image is named libreboot.rom, copy
+ Assuming that your libreboot image is named libreboot.rom, copy
the deblobbed_descriptor.bin file to where libreboot.rom is located
and then run:
$ dd if=deblobbed_descriptor.bin of=libreboot.rom bs=1 count=12k conv=notrunc
@@ -191,7 +194,7 @@
- The sections below are adapted from (mostly) IRC logs related to early development getting the ME removed on the X200. + The sections below are adapted from (mostly) IRC logs related to early development getting the ME removed on GM45. They are useful for background information. This could not have been done without sgsit's help.
@@ -447,7 +450,7 @@ DD CC 18 00 11 20 17 00 DD DD 18 00 12 20 17 00- To deblob the x200, you chop out the platform and ME regions and correct the addresses in flReg1-4. + To deblob GM45, you chop out the platform and ME regions and correct the addresses in flReg1-4. Then you set meDisable to 1 in ICHSTRAP0 and MCHSTRAP0.
diff --git a/docs/hcl/index.html b/docs/hcl/index.html index 6aec1c7..4aa74da 100644 --- a/docs/hcl/index.html +++ b/docs/hcl/index.html @@ -25,6 +25,7 @@+ +
+ It is believed that all R400 laptops are compatible. +
+ ++ There are two possible flash chip sizes for the R400: 4MiB (32Mbit) or 8MiB (64Mbit). + This can be identified by the type of flash chip below the palmrest: 4MiB is SOIC-8, 8MiB + is SOIC-16. +
+ ++ The R400 laptops come with the ME (and sometimes AMT in addition) before flashing libreboot. Libreboot disables and removes it + by using a modified descriptor: see gm45_remove_me.html (contains notes, plus + instructions) +
+ ++ Flashing instructions can be found at ../install/index.html#flashrom +
+ + ++ Usual limitations apply for native graphics initialization + (no VBT and/or INT10H and only GRUB works so no BIOS, so no DOS/Windows support + - who cares? There is no system but GNU, and Linux is one of it's kernels). +
+ ++ When connecting the AC adapter while system is powered off, system will then power on. + This probably happens in coreboot aswell (with or without blobs). + It's a minor annoyance, but it should be fixed (if it's not already fixed by now). +
+ ++ This method of disabling the ME leaves the flash descriptor and gbe in place (non-functional data, fully documented) + and disables the ME using soft straps. This means that the gigabit ethernet will still work (putting the machine in + non-descriptor mode would wipe it out). +
+ ++ The R400, when run without CPU microcode updates in coreboot, currently kernel panics + if running QEMU with vt-x enabled on 2 cores for the guest. With a single core enabled + for the guest, the guest panics (but the host is fine). Working around this in QEMU + might be possible; if not, software virtualization should work fine (it's just slower). +
++ The following errata datasheet from Intel might help with investigation: + http://download.intel.com/design/mobile/specupdt/320121.pdf +
+
+ Copyright © 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+ This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions.
+ A copy of the license can be found at ../license.txt.
+
+ This document 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 ../license.txt for more information. +
+ +The X200 laptops come with the ME (and sometimes AMT in addition) before flashing libreboot. Libreboot disables and removes it - by using a modified descriptor: see x200_remove_me.html (contains notes, plus + by using a modified descriptor: see gm45_remove_me.html (contains notes, plus instructions)
@@ -287,7 +287,7 @@- ThinkPad R400/R500/T400/T400S/T500/W500. These all use either the GM45 or GS45 + ThinkPad R500/T400/T400S/T500/W500. These all use either the GM45 or GS45 chipset, and should be easy-ish to port to coreboot (based on the X200 port and the GM45 code), then adapted for use in libreboot.
@@ -298,12 +298,6 @@ of Intel. -- For example, the R400 currently has issues with raminit (not yet ported to coreboot) - where it's DDR3 memory reported as DDR2, as shown in - text/r400/r400_dmidecode.txt -
-@@ -353,6 +355,11 @@
+ If you have Lenovo BIOS running (R400), go to r400_external.html instead. + +
++ If you have Apple EFI firmware running (macbook21), go to #flashrom_macbook21 instead.
@@ -363,16 +370,17 @@- If you have an X200 with libreboot or coreboot already running, note that + If you have an X200 or R400 with libreboot or coreboot already running, note that the Gbe in the boot flash contains your MAC address. You will need to change the default MAC address inside the ROM images before flashing a new libreboot image. See - ich9gen for details. + ich9gen for details. - Another important note about the X200: even if you do already have libreboot or coreboot, + Another important note about the X200/R400: even if you do already have libreboot or coreboot, it is possible for the user to write-protect regions in the flash chip, by modifying the flash descriptor. If you have locked regions, you will need an external flasher - (see x200_external.html) to re-flash those regions. By default, - the X200 ROM images in libreboot contain a descriptor+gbe with all regions unlocked. + (see x200_external.html or x200_external.html) + to re-flash those regions. By default, + the X200 and R400 ROM images in libreboot contain a descriptor+gbe with all regions unlocked.
diff --git a/docs/install/r400_external.html b/docs/install/r400_external.html new file mode 100644 index 0000000..ad6e4bd --- /dev/null +++ b/docs/install/r400_external.html @@ -0,0 +1,202 @@ + + +
+ + + + + +Initial flashing instructions for X200.
++ This guide is for those who want libreboot on their ThinkPad R400 + while they still have the original Lenovo BIOS present. This guide + can also be followed (adapted) if you brick your R400, to know how + to recover. +
++ Before following this section, please make sure to setup your libreboot ROM properly first. + Although ROM images are provided pre-built in libreboot, there are some modifications that + you need to make to the one you chose before flashing. (instructions referenced later in + this guide) +
+ + ++ There are two possible flash chip sizes for the R400: 4MiB + (32Mbit) or 8MiB (64Mbit). This can be identified by the type + of flash chip below the palmrest: 4MiB is SOIC-8 (8 pins), 8MiB + is SOIC-16 (16 pins). The X200S uses a WSON package and has the same + pinout as SOIC-8 (covered briefly later on in this guide) but + the chip is on the underside of the board (disassembly required). +
+ + + ++ Refer to bbb_setup.html for how to + setup the BBB for flashing. +
+ ++ The following shows how to connect clip to the BBB (on the P9 header), for SOIC-16 (clip: Pomona 5252): +
++POMONA 5252 (correlate with the BBB guide) +=== ethernet jack and VGA port ==== + NC - - 21 + 1 - - 17 + NC - - NC + NC - - NC + NC - - NC + NC - - NC + 18 - - 3.3V PSU RED + 22 - - NC - this is pin 1 on the flash chip +=== SATA port === +This is how you will connect. Numbers refer to pin numbers on the BBB, on the plugs near the DC jack. ++
+ The following shows how to connect clip to the BBB (on the P9 header), for SOIC-8 (clip: Pomona 5250): +
++POMONA 5250 (correlate with the BBB guide) +=== RAM slots ==== + 18 - - 1 + 22 - - NC + NC - - 21 + 3.3V PSU RED - - 17 - this is pin 1 on the flash chip. in front of it is the screen. +=== slot where the AC jack is connected === ++ +
+ images/r400/r400_pomona.jpg + shows everything connected. In this picture, the R400 is being flashed + with the BBB. +
++ No disassembly instructions yet, unfortunately. Check videos online or + look at the Hardware Maintenance Manual from Lenovo for this machine. + You will need to completely disassemble the machine, removing the motherboard + from its metal shell. + Connect your 5252/5250 (make sure to get it the right way round). + Then connect the 3.3v PSU wire (red one) and make sure that everything else is connected. +
+
+ I did (SSH'd into the BBB):
+ # ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512
+ In my case, the output was:
+
+flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l) +flashrom is free software, get the source code at http://www.flashrom.org +Calibrating delay loop... OK. +Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi. +Found Macronix flash chip "MX25L6406E/MX25L6436E" (8192 kB, SPI) on linux_spi. +Found Macronix flash chip "MX25L6445E/MX25L6473E" (8192 kB, SPI) on linux_spi. +Multiple flash chip definitions match the detected chip(s): "MX25L6405(D)", "MX25L6406E/MX25L6436E", "MX25L6445E/MX25L6473E" +Please specify which chip definition to use with the -c <chipname> option. ++
+ This is just to test that it's working. In my case, I had to define which chip to use, like so (in your case
+ it may be different, depending on what flash chip you have):
+ # ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -c "MX25L6405(D)"
+
+ At this point, you need to create a copy of the original lenovo firmware that is currently flashed. + This is so that you can extract the gbe (gigabit ethernet) and flash descriptor regions for use in libreboot. These + are not blobs, they only contain non-functional data (configuration details, fully readable) which is fully documented in public datasheets. + The descriptor will need to be modified + to disable the ME (also disable AMT) so that you can flash a ROM that excludes it. +
+
+ How to backup factory.rom (change the -c option as neeed, for your flash chip):
+ # ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -c "MX25L6405(D)" -r factory.rom
+ # ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -c "MX25L6405(D)" -r factory1.rom
+ # ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -c "MX25L6405(D)" -r factory2.rom
+ Now compare the 3 images:
+ # sha512sum factory*.rom
+ If the hashes match, then just copy one of them (the factory.rom) to a safe place (on a drive connected to another machine, not
+ the BBB). You will need it later for part of the deblobbing.
+
+ Information about the descriptor, gbe regions and how the ME was removed can be found in the notes linked at + ../hcl/gm45_remove_me.html. Libreboot ROM images now include + the 12KiB descriptor+gbe by default, generated using ich9gen; + however, do note that the MAC address in the Gbe region is generic. Follow the instructions at + ../hcl/gm45_remove_me.html#ich9gen and do what it says to change the MAC address + inside your R400 ROM image, before flashing it. +
+
+ Assuming that your libreboot ROM image is properly setup (modified descriptor plus gbe region included in the ROM),
+ then you can flash (assuming that the filename is libreboot.rom) for example I had to do:
+ # ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -c "MX25L6405(D)" -w libreboot.rom
+
+ You might see errors, but if it says Verifying flash... VERIFIED at the end, then it's flashed and should boot. + Test it! (boot your R400) +
++ My output when running the command above: +
++flashrom v0.9.7-r1854 on Linux 3.8.13-bone47 (armv7l) +flashrom is free software, get the source code at http://www.flashrom.org +Calibrating delay loop... OK. +Found Macronix flash chip "MX25L6405(D)" (8192 kB, SPI) on linux_spi. +Reading old flash chip contents... done. +Erasing and writing flash chip... FAILED at 0x00001000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0000ffff: 0xd716 +ERASE FAILED! +Reading current flash chip contents... done. Looking for another erase function. +Erase/write done. +Verifying flash... VERIFIED. ++ + + +
+ Copyright © 2014, 2015 Francis Rowe <info@gluglug.org.uk>
+ This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions.
+ A copy of the license can be found at ../license.txt.
+
+ This document 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 ../license.txt for more information. +
+ +Information about the descriptor, gbe regions and how the ME was removed can be found in the notes linked at - ../hcl/x200_remove_me.html. Libreboot ROM images now include + ../hcl/gm45_remove_me.html. Libreboot ROM images now include the 12KiB descriptor+gbe by default, generated using ich9gen; however, do note that the MAC address in the Gbe region is generic. Follow the instructions at - ../hcl/x200_remove_me.html#ich9gen and do what it says to change the MAC address + ../hcl/gm45_remove_me.html#ich9gen and do what it says to change the MAC address inside your X200 ROM image, before flashing it.
diff --git a/docs/release.html b/docs/release.html index 94c44b7..c686495 100644 --- a/docs/release.html +++ b/docs/release.html @@ -115,7 +115,13 @@ Lenovo ThinkPad X200