| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # 51NB X210 | ||
|
|
||
| ## Extracting vendor EC firmware | ||
|
|
||
| EC firmware is included in the SPI image. To extract it, run: | ||
|
|
||
| `` | ||
| dd bs=64K skip=32 count=1 if=bios.rom of=ec.bin | ||
| `` | ||
|
|
||
| and ensure that you have a file that includes the string "Insyde Software Corp" | ||
|
|
||
| ## Flashing instructions | ||
|
|
||
| This can be performed using the internal SPI controller, even when flashing | ||
| from stock firmware. Use flashrom -p internal and follow the appropriate | ||
| flashrom instructions to force it. Alternatively, external flashing has been | ||
| tested with Dediprog SF100 and SF600 and using a Beaglebone Black. The flash | ||
| is located on the upper side of the motherboard, below the keyboard | ||
| connector. It is circled in red here: | ||
|  | ||
|
|
||
| ## Flashing a subset of the ROM | ||
|
|
||
| If you want to flash coreboot without extracting firmware blobs, you can | ||
| flash coreboot without overwriting those blobs. After building coreboot, | ||
| create a layout file with the following content: | ||
|
|
||
| ``` | ||
| 00000000:001fffff me | ||
| 00200000:0020ffff ec | ||
| 00210000:007fffff main | ||
| ``` | ||
|
|
||
| and run flashrom with the "--layout rom.layout --image main" arguments. This | ||
| will flash the main firmware without overwriting the existing EC or ME | ||
| firmware. | ||
|
|
||
| ## Working | ||
|
|
||
| All hardware features are believed to be working, although the SD reader is | ||
| untested. Note that certain hotkeys don't work (including the Thinkvantage | ||
| button) - this is a limitation of the EC firmware, and these keys also | ||
| generate no events under the stock vendor firmware. | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| # Lenovo X200 / T400 / T500 / X301 common | ||
|
|
||
| These models are sold with either 8 MiB or 4 MiB flash chip. You can identify | ||
| the chip in your machine through flashrom: | ||
| ```console | ||
| # flashrom -p internal | ||
| ``` | ||
|
|
||
| Note that this does not allow you to determine whether the chip is in a SOIC-8 | ||
| or a SOIC-16 package. | ||
|
|
||
| ## Installing without ME firmware | ||
|
|
||
| ```eval_rst | ||
| .. Note:: | ||
| **ThinkPad R500** has slightly different flash layout (it doesn't have | ||
| ``gbe`` region), so the process would be a little different for that model. | ||
| ``` | ||
|
|
||
| On Montevina machines it's possible to disable ME and remove its firmware from | ||
| SPI flash by modifying the flash descriptor. This also makes 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: | ||
| ```console | ||
| # flashrom -p YOUR_PROGRAMMER -r backup.rom | ||
| ``` | ||
|
|
||
| Then, split the IFD regions into separate files with ifdtool. You will need | ||
| `flashregion_3_gbe.bin` later. | ||
| ```console | ||
| $ ifdtool -x backup.rom | ||
| ``` | ||
|
|
||
| Now you need to patch the flash descriptor. You can either [modify the one from | ||
| your backup with **ifdtool**](#modifying-flash-descriptor-using-ifdtool), or | ||
| [generate a completely new one with **bincfg**](#creating-a-new-flash-descriptor-using-bincfg). | ||
|
|
||
| #### Modifying flash descriptor using ifdtool | ||
|
|
||
| Pick the layout according to your chip size from the table below and save it to | ||
| the `new_layout.txt` file: | ||
|
|
||
| ```eval_rst | ||
| +---------------------------+---------------------------+---------------------------+ | ||
| | 4 MB chip | 8 MB chip | 16 MB chip | | ||
| +===========================+===========================+===========================+ | ||
| | .. code-block:: none | .. code-block:: none | .. code-block:: none | | ||
| | | | | | ||
| | 00000000:00000fff fd | 00000000:00000fff fd | 00000000:00000fff fd | | ||
| | 00001000:00002fff gbe | 00001000:00002fff gbe | 00001000:00002fff gbe | | ||
| | 00003000:003fffff bios | 00003000:007fffff bios | 00003000:01ffffff bios | | ||
| | 00fff000:00000fff pd | 00fff000:00000fff pd | 00fff000:00000fff pd | | ||
| | 00fff000:00000fff me | 00fff000:00000fff me | 00fff000:00000fff me | | ||
| +---------------------------+---------------------------+---------------------------+ | ||
| ``` | ||
|
|
||
| The last two lines define `pd` and `me` regions of negative size. This way | ||
| ifdtool will mark those as unused. | ||
|
|
||
| Update regions in the flash descrpitor (it was extracted previously with | ||
| `ifdtool -x`): | ||
| ```console | ||
| $ ifdtool -n new_layout.txt flashregion_0_flashdescriptor.bin | ||
| ``` | ||
|
|
||
| Set `MeDisable` bit in ICH0 and MCH0 straps: | ||
| ```console | ||
| $ ifdtool -M 1 flashregion_0_flashdescriptor.bin.new | ||
| ``` | ||
|
|
||
| Delete previous descriptors and rename the final one: | ||
| ```console | ||
| $ rm flashregion_0_flashdescriptor.bin | ||
| $ rm flashregion_0_flashdescriptor.bin.new | ||
| $ mv flashregion_0_flashdescriptor.bin.new.new flashregion_0_flashdescriptor.bin | ||
| ``` | ||
|
|
||
| Continue to the [Configuring coreboot](#configuring-coreboot) section. | ||
|
|
||
| #### Creating a new flash descriptor using bincfg | ||
|
|
||
| There is a tool to generate a modified flash descriptor called **bincfg**. Go to | ||
| `util/bincfg` and build it: | ||
| ```console | ||
| $ cd util/bincfg | ||
| $ make | ||
| ``` | ||
|
|
||
| If your flash is not 8 MB, you need to change values of `flcomp_density1` and | ||
| `flreg1_limit` in the ifd-x200.set file according to following table: | ||
|
|
||
| ```eval_rst | ||
| +-----------------+-------+-------+--------+ | ||
| | | 4 MB | 8 MB | 16 MB | | ||
| +=================+=======+=======+========+ | ||
| | flcomp_density1 | 0x3 | 0x4 | 0x5 | | ||
| +-----------------+-------+-------+--------+ | ||
| | flreg1_limit | 0x3ff | 0x7ff | 0x1fff | | ||
| +-----------------+-------+-------+--------+ | ||
| ``` | ||
|
|
||
| Then create the flash descriptor: | ||
| ```console | ||
| $ ./bincfg ifd-x200.spec ifd-x200.set ifd.bin | ||
| ``` | ||
|
|
||
| #### Configuring coreboot | ||
|
|
||
| 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 / 0x1ffd000 for 16 MB chip | ||
| Chipset ---> | ||
| [*] Add Intel descriptor.bin file | ||
| # Note: if you used bincfg, specify path to generated util/bincfg/ifd.bin | ||
| (/path/to/flashregion_0_flashdescriptor.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 working, you don't need to do anything special | ||
| with the flash descriptor. Just flash only `bios` externally and don't touch any | ||
| other regions: | ||
| ```console | ||
| # flashrom -p YOUR_PROGRAMMER -w coreboot.rom --ifd -i bios | ||
| ``` | ||
|
|
||
| ## Flash layout | ||
|
|
||
| The flash layouts of the OEM firmware are as follows: | ||
|
|
||
| ```eval_rst | ||
| +---------------------------------+---------------------------------+ | ||
| | 4 MB chip | 8 MB chip | | ||
| +=================================+=================================+ | ||
| | .. code-block:: none | .. code-block:: none | | ||
| | | | | ||
| | 00000000:00000fff fd | 00000000:00000fff fd | | ||
| | 00001000:001f5fff me | 00001000:005f5fff me | | ||
| | 001f6000:001f7fff gbe | 005f6000:005f7fff gbe | | ||
| | 001f8000:001fffff pd | 005f8000:005fffff pd | | ||
| | 00200000:003fffff bios | 00600000:007fffff bios | | ||
| | 00290000:002affff ec | 00690000:006affff ec | | ||
| | 003e0000:003fffff bootblock | 007e0000:007fffff bootblock | | ||
| +---------------------------------+---------------------------------+ | ||
| ``` | ||
|
|
||
| On each boot of vendor BIOS `ec` area in flash is checked for having firmware | ||
| there, and if there is one, it proceedes to update firmware on H8S/2116 (when | ||
| both external power and main battery are attached). Once update is performed, | ||
| first 64 KB of `ec` area is erased. Visit | ||
| [thinkpad-ec repository](https://github.com/hamishcoleman/thinkpad-ec) to learn | ||
| more about how to extract EC firmware from vendor updates. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| # Libretrend LT1000 | ||
|
|
||
| This page describes how to run coreboot on the [Libretrend LT1000] (aka | ||
| Librebox). | ||
|
|
||
|  | ||
|
|
||
| ## Required proprietary blobs | ||
|
|
||
| To build a minimal working coreboot image some blobs are required (assuming | ||
| only the BIOS region is being modified). | ||
|
|
||
| ```eval_rst | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | Binary file | Apply | Required / Optional | | ||
| +=================+=================================+=====================+ | ||
| | FSP-M, FSP-S | Intel Firmware Support Package | Required | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | microcode | CPU microcode | Required | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| ``` | ||
|
|
||
| FSP-M and FSP-S are obtained after splitting the Kaby Lake FSP binary (done | ||
| automatically by coreboot build system and included into the image) from the | ||
| *3rdparty/fsp* submodule. | ||
|
|
||
| Microcode updates are automatically included into the coreboot image by build | ||
| system from the *3rdparty/intel-microcode* submodule. | ||
|
|
||
| The mainboard code also contains a VBT file (version 1.00, BDB version 2.09) | ||
| which is automatically included into the image by coreboot build system. | ||
|
|
||
| ## Flashing coreboot | ||
|
|
||
| ### Internal programming | ||
|
|
||
| The main SPI flash can be accessed using [flashrom]. It is strongly advised to | ||
| flash only the BIOS region if not having an external programmer, see known | ||
| issues. | ||
|
|
||
| ### External programming | ||
|
|
||
| The system has an internal flash chip which is a 8 MiB soldered SOIC-8 chip. | ||
| This chip is located on the top middle side of the board near the CPU fan, | ||
| between the DIMM slots and the M.2 disk. Use a clip (or solder the wires) to | ||
| program the chip. Specifically, it's a Winbond W25Q64FV (3.3V) - | ||
| [datasheet][W25Q64FV]. | ||
|
|
||
| ## Known issues | ||
|
|
||
| - Fastboot (MRC cache) is not working reliably (missing schematics for CPU to | ||
| DIMM wiring). | ||
| - Flashing ME region with already cleaned ME firmware may lead to platform not | ||
| booting, flashing full ME firmware is needed to recover. | ||
| - In order to have the USB device wake support from S3 state using the front | ||
| USB 3.0 ports, one has to move the jumper on DUSB1_PWR_SET header (it will | ||
| switch the power rails for the USB 3.0 ports). | ||
| - There are 6 unknown GPIO pins on the board. | ||
|
|
||
| ## Untested | ||
|
|
||
| Not all mainboard's peripherals and functions were tested because of lack of | ||
| the cables or not being populated on the board case. | ||
|
|
||
| - LVDS header | ||
| - Onboard USB 2.0 and USB 3.0 headers | ||
| - Speakers and mic header | ||
| - SPDIF header | ||
| - Audio header | ||
| - PS/2 header | ||
| - LPT header | ||
| - CIR (infrared header) | ||
| - COM2 port RS485 mode (RS232/RS485 mode is controlled via jumper) | ||
| - SYS_FAN header | ||
|
|
||
| ## Working | ||
|
|
||
| - USB | ||
| - Ethernet | ||
| - Integrated graphics (with libgfxinit) on VGA and HDMI ports | ||
| - flashrom | ||
| - PCIe | ||
| - NVMe | ||
| - WiFi and Bluetooth | ||
| - SATA | ||
| - Serial ports 1-6 | ||
| - SMBus | ||
| - HDA (verbs not implemented yet, but works under GNU/Linux (4.15 tested)) | ||
| - Initialization with KBL FSP 2.0 | ||
| - SeaBIOS payload (version rel-1.13.0) | ||
| - TPM2 ([custom module] connected to LPC DEBUG header) | ||
| - Automatic fan control | ||
| - Platform boots with cleaned ME (MFS partition must be left on SPI flash) | ||
|
|
||
| ## Technology | ||
|
|
||
| The platform contains an LR-i7S65T1 baseboard (LR-i7S65T2 with two NICs not | ||
| sold yet). More details on [baseboard site]. Unfortunately the board manual is | ||
| not publicly available. | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU | Intel Core i7-6500U | | ||
| +------------------+--------------------------------------------------+ | ||
| | PCH | Skylake-U Premium | | ||
| +------------------+--------------------------------------------------+ | ||
| | Super I/O | ITE IT8786E | | ||
| +------------------+--------------------------------------------------+ | ||
| | Coprocessor | Intel Management Engine | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
| [Libretrend LT1000]: https://libretrend.com/specs/librebox/ | ||
| [W25Q64FV]: https://www.winbond.com/resource-files/w25q64fv%20revs%2007182017.pdf | ||
| [flashrom]: https://flashrom.org/Flashrom | ||
| [baseboard site]: http://www.minicase.net/product_LR-i7S65T1.html | ||
| [custom module]: https://shop.3mdeb.com/product/tpm2-module-for-librebox/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| # Protectli Vault FW2B and FW4B | ||
|
|
||
| This page describes how to run coreboot on the [Protectli FW2B] and | ||
| [Protectli FW4B]. | ||
|
|
||
|
|
||
| ## Required proprietary blobs | ||
|
|
||
| To build a minimal working coreboot image some blobs are required (assuming | ||
| only the BIOS region is being modified). | ||
|
|
||
| ```eval_rst | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | Binary file | Apply | Required / Optional | | ||
| +=================+=================================+=====================+ | ||
| | FSP | Intel Firmware Support Package | Required | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | microcode | CPU microcode | Required | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | vgabios | VGA Option ROM | Optional | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| ``` | ||
|
|
||
| FSP is automatically added by coreboot build system into the image) from the | ||
| `3rdparty/fsp` submodule. | ||
|
|
||
| microcode updates are automatically included into the coreboot image by build | ||
| system from the `3rdparty/intel-microcode` submodule. | ||
|
|
||
| VGA Option ROM is not required to boot, but if one needs graphics in pre-OS | ||
| stage, it should be included. | ||
|
|
||
| ## Flashing coreboot | ||
|
|
||
| ### Internal programming | ||
|
|
||
| The main SPI flash can be accessed using [flashrom]. | ||
|
|
||
| ### External programming | ||
|
|
||
| The system has an internal flash chip which is a 8 MiB soldered SOIC-8 chip. | ||
| This chip is located on the bottom side of the case (the radiator side). One | ||
| has to remove all screws (in order): 4 top cover screws, 4 side cover screws | ||
| (one side is enough), 4 mainboard screws, 3 CPU screws (under the DIMM). Lift | ||
| up the mainboard and turn around it. The flash chip is near the mainboard edge | ||
| close to the Ethernet Controllers. Use a clip (or solder the wires) to program | ||
| the chip. **Watch out on the voltage, the SPI operates at 1.8V!** Specifically, | ||
| it's a Macronix MX25U6435F (1.8V) - [datasheet][MX25U6435F]. | ||
|
|
||
| ## Known issues | ||
|
|
||
| - After flashing with external programmer the board will not boot if flashed | ||
| the BIOS region only. For some reason it is required to flash whole image | ||
| along with TXE region. | ||
| - USB 3.0 ports get detected very late in SeaBIOS, it needs huge timeout | ||
| values in order to get the devices detected. | ||
|
|
||
| ## Untested | ||
|
|
||
| Not all mainboard's peripherals and functions were tested because of lack of | ||
| the cables or not being populated on the board case. | ||
|
|
||
| - internal USB 2.0 header | ||
|
|
||
| ## Working | ||
|
|
||
| - USB 3.0 front ports (SeaBIOS and Linux) | ||
| - 4 Ethernet ports (2 Ethernet ports on FW2B) | ||
| - 2 HDMI ports with VGA Option ROM | ||
| - 2 HDMI ports with libgfxinit | ||
| - flashrom | ||
| - PCIe WiFi | ||
| - SATA and mSATA | ||
| - Super I/O serial port 0 (RS232 via front RJ45 connector) | ||
| - SMBus (reading SPD from DIMMs) | ||
| - initialization with Braswell FSP | ||
| - SeaBIOS payload (version rel-1.13.0) | ||
|
|
||
| - booting Debian, Ubuntu, FreeBSD | ||
|
|
||
| ## Not working | ||
|
|
||
| - mPCIe debug card connected to mSATA (mSATA slot has LPC signals routed, | ||
| however for some reason the debug card is not powered) | ||
|
|
||
| ## Technology | ||
|
|
||
| The mainboard has two variants: FW2B and FW4B. They have different Braswell | ||
| SoC. The FW2B replaces 2 out of 4 Ethernet Controllers with 4 USB ports | ||
| connected via [FE1.1 USB 2.0 hub]. | ||
|
|
||
| - FW2B: | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU | Intel Celeron J3060 | | ||
| +------------------+--------------------------------------------------+ | ||
| | PCH | Braswell | | ||
| +------------------+--------------------------------------------------+ | ||
| | Super I/O | ITE IT8613E | | ||
| +------------------+--------------------------------------------------+ | ||
| | Coprocessor | Intel Trusted Execution Engine | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
| - FW4B: | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU | Intel Celeron J3160 | | ||
| +------------------+--------------------------------------------------+ | ||
| | PCH | Braswell | | ||
| +------------------+--------------------------------------------------+ | ||
| | Super I/O | ITE IT8613E | | ||
| +------------------+--------------------------------------------------+ | ||
| | Coprocessor | Intel Trusted Execution Engine | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
| [Protectli FW2B]: https://protectli.com/vault-2-port/ | ||
| [Protectli FW4B]: https://protectli.com/product/fw4b/ | ||
| [MX25U6435F]: https://www.macronix.com/Lists/Datasheet/Attachments/7411/MX25U6435F,%201.8V,%2064Mb,%20v1.5.pdf | ||
| [FE1.1 USB 2.0 hub]: https://cdn-shop.adafruit.com/product-files/2991/FE1.1s+Data+Sheet+(Rev.+1.0).pdf | ||
| [flashrom]: https://flashrom.org/Flashrom |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| # Protectli Vault FW6 series | ||
|
|
||
| This page describes how to run coreboot on the [Protectli FW6]. | ||
|
|
||
|  | ||
|
|
||
| ## Required proprietary blobs | ||
|
|
||
| To build a minimal working coreboot image some blobs are required (assuming | ||
| only the BIOS region is being modified). | ||
|
|
||
| ```eval_rst | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | Binary file | Apply | Required / Optional | | ||
| +=================+=================================+=====================+ | ||
| | FSP-M, FSP-S | Intel Firmware Support Package | Required | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | microcode | CPU microcode | Required | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| | vgabios | VGA Option ROM | Optional | | ||
| +-----------------+---------------------------------+---------------------+ | ||
| ``` | ||
|
|
||
| FSP-M and FSP-S are obtained after splitting the Kaby Lake FSP binary (done | ||
| automatically by the coreboot build system and included into the image) from | ||
| the `3rdparty/fsp` submodule. | ||
|
|
||
| Microcode updates are automatically included into the coreboot image by build | ||
| system from the `3rdparty/intel-microcode` submodule. | ||
|
|
||
| VGA Option ROM is not required to boot, but if one needs graphics in pre-OS | ||
| stage, it should be included (if not using libgfxinit). | ||
|
|
||
| ## Flashing coreboot | ||
|
|
||
| ### Internal programming | ||
|
|
||
| The main SPI flash can be accessed using [flashrom]. The first version | ||
| supporting the chipset is flashrom v1.1. Firmware an be easily flashed | ||
| with internal programmer (either BIOS region or full image). | ||
|
|
||
| ### External programming | ||
|
|
||
| The system has an internal flash chip which is a 8 MiB soldered SOIC-8 chip. | ||
| This chip is located on the bottom side of the case (the radiator side). One | ||
| has to remove all screws (in order): 4 top cover screws, 4 side cover screws | ||
| (one side is enough), 4 mainboard screws, 4 CPU screws (under DIMMs). Lift up | ||
| the mainboard and turn around it. The flash chip is near the SoC on the DIMM | ||
| slots side. Use a clip (or solder the wires) to program the chip. Specifically, | ||
| it's a Macronix MX25L6406E (3.3V) -[datasheet][MX25L6406E]. | ||
|
|
||
| ## Known issues | ||
|
|
||
| - After flashing with external programmer it is always required to reset RTC | ||
| with jumper or disconnect coin cell temporarily. Only then the platform will | ||
| boot after flashing. | ||
| - FW6A does not always work reliably with all DIMMs. Linux happens to hang or | ||
| gives many panics. This issue was present also with vendor BIOS. | ||
| - Sometimes FSPMemoryInit return errors or hangs (especially with 2 DIMMs | ||
| connected). A workaround is to power cycle the board (even a few times) or | ||
| temporarily disconnect DIMM when platform is powered off. | ||
| - When using libgfxinit and SeaBIOS bootsplash, the red color is dim | ||
|
|
||
| ## Untested | ||
|
|
||
| Not all mainboard's peripherals and functions were tested because of lack of | ||
| the cables or not being populated on the board case. | ||
|
|
||
| - Internal USB 2.0 headers | ||
| - Boot with cleaned ME | ||
|
|
||
| ## Working | ||
|
|
||
| - USB 3.0 front ports (SeaBIOS and Linux) | ||
| - 6 Ethernet ports | ||
| - HDMI port with libgfxinit and VGA Option ROM | ||
| - flashrom | ||
| - PCIe WiFi | ||
| - SATA and mSATA | ||
| - Super I/O serial port 0 (RS232 via front RJ45 connector) | ||
| - SMBus (reading SPD from DIMMs) | ||
| - Initialization with KBL FSP 2.0 (with MemoryInit issues) | ||
| - SeaBIOS payload (version rel-1.12.1) | ||
| - Mini PCIe debug card connected to mSATA (mSATA slot has LPC signals routed) | ||
| - Reset switch | ||
| - Booting Debian, Ubuntu, FreeBSD | ||
|
|
||
| ## Technology | ||
|
|
||
| There are 3 variants of FW6 boards: FW6A, FW6B and FW6C. They differ only in | ||
| used SoC. | ||
|
|
||
| - FW6A: | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU | Intel Celeron 3865U | | ||
| +------------------+--------------------------------------------------+ | ||
| | PCH | Kaby Lake U w/ iHDCP2.2 Base | | ||
| +------------------+--------------------------------------------------+ | ||
| | Super I/O, EC | ITE IT8772E | | ||
| +------------------+--------------------------------------------------+ | ||
| | Coprocessor | Intel Management Engine | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
| - FW6B: | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU | Intel Core i3-7100U | | ||
| +------------------+--------------------------------------------------+ | ||
| | PCH | Kaby Lake U w/ iHDCP2.2 Premium | | ||
| +------------------+--------------------------------------------------+ | ||
| | Super I/O, EC | ITE IT8772E | | ||
| +------------------+--------------------------------------------------+ | ||
| | Coprocessor | Intel Management Engine | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
| - FW6C: | ||
|
|
||
| ```eval_rst | ||
| +------------------+--------------------------------------------------+ | ||
| | CPU | Intel Core i5-7200U | | ||
| +------------------+--------------------------------------------------+ | ||
| | PCH | Kaby Lake U w/ iHDCP2.2 Premium | | ||
| +------------------+--------------------------------------------------+ | ||
| | Super I/O, EC | ITE IT8772E | | ||
| +------------------+--------------------------------------------------+ | ||
| | Coprocessor | Intel Management Engine | | ||
| +------------------+--------------------------------------------------+ | ||
| ``` | ||
|
|
||
| [Protectli FW6]: https://protectli.com/vault-6-port/ | ||
| [MX25L6406E]: https://www.macronix.com/Lists/Datasheet/Attachments/7370/MX25L6406E,%203V,%2064Mb,%20v1.9.pdf | ||
| [flashrom]: https://flashrom.org/Flashrom |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,223 @@ | ||
| # VBOOT enabled devices | ||
|
|
||
| ## Emulation | ||
| - QEMU x86 i440fx/piix4 (aka qemu -M pc) | ||
| - QEMU x86 q35/ich9 (aka qemu -M q35, since v1.4) | ||
|
|
||
| - Facebook Monolith | ||
|
|
||
| - Auron_Paine (Acer C740 Chromebook) | ||
| - Auron_Yuna (Acer Chromebook 15 (C910/CB5-531)) | ||
| - Buddy (Acer Chromebase 24) | ||
| - Gandof (Toshiba Chromebook 2 (2015)) | ||
| - Lulu (Dell Chromebook 13 7310) | ||
| - Samus (Google Chromebook Pixel (2015)) | ||
| - Mccloud (Acer Chromebox CXI) | ||
| - Monroe (LG Chromebase 22CV241 & 22CB25S) | ||
| - Panther (ASUS Chromebox CN60) | ||
| - Tricky (Dell Chromebox 3010) | ||
| - Zako (HP Chromebox G1) | ||
| - Butterfly (HP Pavilion Chromebook 14) | ||
| - Cheza | ||
| - Banon (Acer Chromebook 15 (CB3-532)) | ||
| - Celes (Samsung Chromebook 3) | ||
| - Cyan (Acer Chromebook R11 (C738T)) | ||
| - Edgar (Acer Chromebook 14 (CB3-431)) | ||
| - Kefka (Dell Chromebook 11 3180/3189) | ||
| - Reks (Lenovo N22/N42 Chromebook) | ||
| - Relm | ||
| - Setzer (HP Chromebook 11 G5) | ||
| - Terra (ASUS Chromebook C202SA/C300SA/C301SA) | ||
| - Ultima (Lenovo Yoga 11e G3) | ||
| - Wizpig | ||
| - Daisy (Samsung Chromebook (2012)) | ||
| - DragonEgg | ||
| - Drallion | ||
| - Eve (Google Pixelbook) | ||
| - Fizz | ||
| - Karma | ||
| - Endeavour | ||
| - Foster | ||
| - Gale (Google WiFi) | ||
| - Asuka (Dell Chromebook 13 3380) | ||
| - Caroline (Samsung Chromebook Pro) | ||
| - Cave (Asus Chromebook Flip C302SA) | ||
| - Chell (HP Chromebook 13 G1) | ||
| - Glados Skylake Reference Board | ||
| - Lars (Acer Chromebook 14 for Work (CP5-471)) | ||
| - Sentry (Lenovo Thinkpad 13 Chromebook) | ||
| - Kevin (Samsung Chromebook Plus) | ||
| - Gru | ||
| - Bob (Asus Chromebook Flip C101PA) | ||
| - Scarlet | ||
| - Nefario | ||
| - Rainier | ||
| - Akemi | ||
| - Dratini | ||
| - Hatch | ||
| - Jinlon | ||
| - Kohaku | ||
| - Kindred | ||
| - Helios | ||
| - Mushu | ||
| - Palkia | ||
| - Nightfury | ||
| - Puff | ||
| - Helios_Diskswap | ||
| - Stryke | ||
| - Guado (ASUS Chromebox CN62) | ||
| - Jecht | ||
| - Rikku (Acer Chromebox CXI2) | ||
| - Tidus (Lenovo ThinkCentre Chromebox) | ||
| - Aleena | ||
| - Careena | ||
| - Grunt | ||
| - Liara | ||
| - Nuwani | ||
| - Treeya | ||
| - Kukui | ||
| - Krane | ||
| - Kodama | ||
| - Kakadu | ||
| - Flapjack | ||
| - Jacuzzi | ||
| - Juniper | ||
| - Kappa | ||
| - Damu | ||
| - Link (Google Chromebook Pixel (2013)) | ||
| - Mistral | ||
| - Nyan | ||
| - Nyan Big (Acer Chromebook 13 (CB5-311)) | ||
| - Nyan Blaze (HP Chromebook 14 G3) | ||
| - Oak | ||
| - Elm (Acer Chromebook R13) | ||
| - Hana (Lenovo N23 Yoga Chromebook) | ||
| - Parrot (Acer C7/C710 Chromebook) | ||
| - Peach Pit (Samsung Chromebook 2 11\") | ||
| - Atlas | ||
| - Poppy | ||
| - Nami | ||
| - Nautilus | ||
| - Nocturne | ||
| - Rammus | ||
| - Soraka | ||
| - Banjo (Acer Chromebook 15 (CB3-531)) | ||
| - Candy (Dell Chromebook 11 3120) | ||
| - Clapper (Lenovo N20 Chromebook) | ||
| - Enguarde | ||
| - Glimmer (Lenovo ThinkPad 11e Chromebook) | ||
| - Gnawty (Acer Chromebook 11 (CB3-111/131,C730/C730E/C735)) | ||
| - Heli (Haier Chromebook G2) | ||
| - Kip (HP Chromebook 11 G3 / G4 / G4 EE) | ||
| - Ninja (AOpen Chromebox Commercial) | ||
| - Orco (Lenovo 100S Chromebook) | ||
| - Quawks (ASUS Chromebook C300) | ||
| - Squawks (ASUS Chromebook C200) | ||
| - Rambi | ||
| - Sumo (AOpen Chromebase Commercial) | ||
| - Swanky (Toshiba Chromebook 2) | ||
| - Winky (Samsung Chromebook 2 (XE500C12)) | ||
| - Reef/Electro (Acer Chromebook Spin 11 R751T) | ||
| - Pyro (Lenovo Thinkpad (Yoga) 11e Chromebook) | ||
| - Sand (Acer Chromebook 15 CB515-1HT/1H) | ||
| - Snappy (HP Chromebook x360 11 G1 EE) | ||
| - Nasher | ||
| - Coral | ||
| - Arcada | ||
| - Sarien | ||
| - Falco (HP Chromebook 14) | ||
| - Leon (Toshiba Chromebook) | ||
| - Peppy (Acer C720/C720P Chromebook) | ||
| - Wolf (Dell Chromebook 11) | ||
| - Smaug (Google Pixel C) | ||
| - Storm (OnHub Router TGR1900) | ||
| - Stout (Lenovo Thinkpad X131e Chromebook) | ||
| - Trogdor | ||
| - Veyron_Jaq (Haier Chromebook 11) | ||
| - Veyron_Jerry (Hisense Chromebook 11) | ||
| - Veyron_Mighty (Haier Chromebook 11(edu)) | ||
| - Veyron_Minnie (ASUS Chromebook Flip C100) | ||
| - Veyron_Speedy (ASUS C201 Chromebook) | ||
| - Veyron_Mickey (Asus Chromebit CS10) | ||
| - Veyron_Rialto | ||
|
|
||
| ## HP | ||
| - Z220 SFF Workstation | ||
|
|
||
| ## Intel | ||
| - Basking Ridge CRB | ||
| - Cannonlake U LPDDR4 RVP | ||
| - Cannonlake Y LPDDR4 RVP | ||
| - Coffeelake U SO-DIMM DDR4 RVP | ||
| - Coffeelake H SO-DIMM DDR4 RVP11 | ||
| - Whiskeylake U DDR4 RVP | ||
| - Coffeelake S U-DIMM DDR4 RVP8 | ||
| - Cometlake U DDR4 RVP | ||
| - Emerald Lake 2 CRB | ||
| - Galileo | ||
| - Glkrvp | ||
| - Icelake U DDR4/LPDDR4 RVP | ||
| - Icelake Y LPDDR4 RVP | ||
| - Jasperlake DDR4/LPDDR4 RVP | ||
| - Jasperlake DDR4/LPDDR4 RVP with Chrome EC | ||
| - Kabylake LPDDR3 RVP3 | ||
| - Kabylake DDR3L RVP7 | ||
| - Kabylake DDR4 RVP8 | ||
| - Kabylake DDR4 RVP11 | ||
| - Kunimitsu | ||
| - Strago | ||
| - Tigerlake UP3 RVP | ||
| - Tigerlake UP4 RVP | ||
| - Whitetip Mountain 2 CRB | ||
|
|
||
| ## Lenovo | ||
| - ThinkPad T400 | ||
| - ThinkPad T500 | ||
| - ThinkPad R400 | ||
| - ThinkPad R500 | ||
| - ThinkPad W500 | ||
| - ThinkPad T410 | ||
| - ThinkPad T420 | ||
| - ThinkPad T420s | ||
| - ThinkPad T430 | ||
| - ThinkPad T430s | ||
| - ThinkPad T431s | ||
| - ThinkPad T440p | ||
| - ThinkPad T520 | ||
| - ThinkPad W520 | ||
| - ThinkPad T530 | ||
| - ThinkPad W530 | ||
| - ThinkPad X131e | ||
| - ThinkPad X1 carbon gen 1 | ||
| - ThinkPad X200 / X200s / X200t | ||
| - ThinkPad X301 | ||
| - ThinkPad X201 / X201i / X201s / X201t | ||
| - ThinkPad X220 | ||
| - ThinkPad X220i | ||
| - ThinkPad X1 | ||
| - ThinkPad X230 | ||
| - ThinkPad X230t | ||
|
|
||
| ## OpenCellular | ||
| - Elgon (GBCv2) | ||
|
|
||
| ## SAMSUNG | ||
| - Lumpy | ||
| - Stumpy | ||
|
|
||
| ## Siemens | ||
| - MC APL1 | ||
| - MC APL2 | ||
| - MC APL3 | ||
| - MC APL4 | ||
| - MC APL5 | ||
| - MC APL6 | ||
|
|
||
| ## Supermicro | ||
| - X11SSH-TF | ||
| - X11SSM-F | ||
|
|
||
| ## UP | ||
| - Squared |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # NCT5539D SuperIO | ||
|
|
||
| The SuperIO has the ID `0xd121` and the source can be found in | ||
| `src/superio/nuvoton/nct5539d/`. | ||
|
|
||
| ## For developers | ||
|
|
||
| The SuperIO generates ACPI using the | ||
| [SSDT generator for generic SuperIOs](../common/ssdt.md). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # type this to get working .config: | ||
| # make defconfig KBUILD_DEFCONFIG=configs/builder/config.intel.cpx.crb | ||
|
|
||
| CONFIG_VENDOR_INTEL=y | ||
| CONFIG_BOARD_INTEL_CEDARISLAND_CRB=y | ||
| CONFIG_HAVE_IFD_BIN=y | ||
| CONFIG_HAVE_ME_BIN=y | ||
| CONFIG_DO_NOT_TOUCH_DESCRIPTOR_REGION=y | ||
| CONFIG_USE_CPU_MICROCODE_CBFS_BINS=y | ||
| CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y | ||
| CONFIG_CPU_UCODE_BINARIES="site-local/cedarisland_crb/ucode-05-06-5a" | ||
| CONFIG_ADD_FSP_BINARIES=y | ||
| CONFIG_FSP_T_FILE="site-local/cedarisland_crb/Server_T.fd" | ||
| CONFIG_FSP_M_FILE="site-local/cedarisland_crb/Server_M.fd" | ||
| CONFIG_FSP_S_FILE="site-local/cedarisland_crb/Server_S.fd" | ||
| CONFIG_ME_BIN_PATH="site-local/cedarisland_crb/me.bin" | ||
| CONFIG_IFD_BIN_PATH="site-local/cedarisland_crb/descriptor.bin" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # type this to get working .config: | ||
| # make defconfig KBUILD_DEFCONFIG=configs/builder/config.ocp.tiogapass | ||
|
|
||
| CONFIG_VENDOR_OCP=y | ||
| CONFIG_HAVE_IFD_BIN=y | ||
| CONFIG_HAVE_ME_BIN=y | ||
| CONFIG_DO_NOT_TOUCH_DESCRIPTOR_REGION=y | ||
| CONFIG_USE_CPU_MICROCODE_CBFS_BINS=y | ||
| CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y | ||
| CONFIG_CPU_UCODE_BINARIES="3rdparty/intel-microcode/intel-ucode/06-55-04" | ||
| CONFIG_ADD_FSP_BINARIES=y | ||
| CONFIG_FSP_T_FILE="site-local/tiogapass/Server_T.fd" | ||
| CONFIG_FSP_M_FILE="site-local/tiogapass/Server_M.fd" | ||
| CONFIG_FSP_S_FILE="site-local/tiogapass/Server_S.fd" | ||
| CONFIG_ME_BIN_PATH="site-local/tiogapass/me.bin" | ||
| CONFIG_IFD_BIN_PATH="site-local/tiogapass/descriptor.bin" | ||
| CONFIG_USE_BLOBS=y |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| CONFIG_VENDOR_GOOGLE=y | ||
| CONFIG_BOARD_GOOGLE_OCTOPUS=y | ||
| CONFIG_CONSOLE_SPI_FLASH=y | ||
| # CONFIG_VBOOT_MEASURED_BOOT is not set |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| CONFIG_VENDOR_LIBRETREND=y | ||
| CONFIG_POWER_STATE_OFF_AFTER_FAILURE=y | ||
| CONFIG_GENERIC_LINEAR_FRAMEBUFFER=y | ||
| CONFIG_USER_TPM2=y | ||
| CONFIG_SEABIOS_ADD_SERCON_PORT_FILE=y |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| CONFIG_VENDOR_OCP=y | ||
| CONFIG_BOARD_OCP_TIOGAPASS=y | ||
| CONFIG_USE_CPU_MICROCODE_CBFS_BINS=y | ||
| CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y | ||
| CONFIG_CPU_UCODE_BINARIES="3rdparty/intel-microcode/intel-ucode/06-55-04" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,341 @@ | ||
| /* | ||
| * This file is part of the libpayload project. | ||
| * Copyright (c) 2020 Qualcomm Technologies. | ||
| * | ||
| * Redistribution and use in source and binary forms, with or without | ||
| * modification, are permitted provided that the following conditions are | ||
| * met: | ||
| * * Redistributions of source code must retain the above copyright | ||
| * notice, this list of conditions and the following disclaimer. | ||
| * * Redistributions in binary form must reproduce the above | ||
| * copyright notice, this list of conditions and the following | ||
| * disclaimer in the documentation and/or other materials provided | ||
| * with the distribution. | ||
| * * Neither the name of The Linux Foundation nor the names of its | ||
| * contributors may be used to endorse or promote products derived | ||
| * from this software without specific prior written permission. | ||
| * | ||
| * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED | ||
| * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT | ||
| * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS | ||
| * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
| * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | ||
| * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| */ | ||
|
|
||
|
|
||
| /* For simplicity sake let's rely on coreboot initializing the UART. */ | ||
| #include <config.h> | ||
| #include <libpayload.h> | ||
| #include <sys/types.h> | ||
|
|
||
| #define GENI_STATUS_M_GENI_CMD_ACTIVE_MASK 0x1 | ||
| #define RX_FIFO_WC_MSK 0x1FFFFFF | ||
| #define START_UART_TX 0x8000000 | ||
|
|
||
| union proto_word_len { | ||
| u32 uart_tx_word_len; | ||
| u32 spi_word_len; | ||
| }; | ||
|
|
||
| union proto_tx_trans_len { | ||
| u32 uart_tx_stop_bit_len; | ||
| u32 i2c_tx_trans_len; | ||
| u32 spi_tx_trans_len; | ||
| }; | ||
|
|
||
| union proto_rx_trans_len { | ||
| u32 uart_tx_trans_len; | ||
| u32 i2c_rx_trans_len; | ||
| u32 spi_rx_trans_len; | ||
| }; | ||
|
|
||
| struct qup_regs { | ||
| u32 geni_init_cfg_revision; | ||
| u32 geni_s_init_cfg_revision; | ||
| u8 _reserved1[0x10 - 0x08]; | ||
| u32 geni_general_cfg; | ||
| u32 geni_rx_fifo_ctrl; | ||
| u8 _reserved2[0x20 - 0x18]; | ||
| u32 geni_force_default_reg; | ||
| u32 geni_output_ctrl; | ||
| u32 geni_cgc_ctrl; | ||
| u32 geni_char_cfg; | ||
| u32 geni_char_data_n; | ||
| u8 _reserved3[0x40 - 0x34]; | ||
| u32 geni_status; | ||
| u32 geni_test_bus_ctrl; | ||
| u32 geni_ser_m_clk_cfg; | ||
| u32 geni_ser_s_clk_cfg; | ||
| u32 geni_prog_rom_ctrl_reg; | ||
| u8 _reserved4[0x60 - 0x54]; | ||
| u32 geni_clk_ctrl_ro; | ||
| u32 fifo_if_disable_ro; | ||
| u32 geni_fw_revision_ro; | ||
| u32 geni_s_fw_revision_ro; | ||
| u32 geni_fw_multilock_protns_ro; | ||
| u32 geni_fw_multilock_msa_ro; | ||
| u32 geni_fw_multilock_sp_ro; | ||
| u32 geni_clk_sel; | ||
| u32 geni_dfs_if_cfg; | ||
| u8 _reserved5[0x100 - 0x084]; | ||
| u32 geni_cfg_reg0; | ||
| u32 geni_cfg_reg1; | ||
| u32 geni_cfg_reg2; | ||
| u32 geni_cfg_reg3; | ||
| u32 geni_cfg_reg4; | ||
| u32 geni_cfg_reg5; | ||
| u32 geni_cfg_reg6; | ||
| u32 geni_cfg_reg7; | ||
| u32 geni_cfg_reg8; | ||
| u32 geni_cfg_reg9; | ||
| u32 geni_cfg_reg10; | ||
| u32 geni_cfg_reg11; | ||
| u32 geni_cfg_reg12; | ||
| u32 geni_cfg_reg13; | ||
| u32 geni_cfg_reg14; | ||
| u32 geni_cfg_reg15; | ||
| u32 geni_cfg_reg16; | ||
| u32 geni_cfg_reg17; | ||
| u32 geni_cfg_reg18; | ||
| u8 _reserved6[0x200 - 0x14C]; | ||
| u32 geni_cfg_reg64; | ||
| u32 geni_cfg_reg65; | ||
| u32 geni_cfg_reg66; | ||
| u32 geni_cfg_reg67; | ||
| u32 geni_cfg_reg68; | ||
| u32 geni_cfg_reg69; | ||
| u32 geni_cfg_reg70; | ||
| u32 geni_cfg_reg71; | ||
| u32 geni_cfg_reg72; | ||
| u32 spi_cpha; | ||
| u32 geni_cfg_reg74; | ||
| u32 proto_loopback_cfg; | ||
| u32 spi_cpol; | ||
| u32 i2c_noise_cancellation_ctl; | ||
| u32 i2c_monitor_ctl; | ||
| u32 geni_cfg_reg79; | ||
| u32 geni_cfg_reg80; | ||
| u32 geni_cfg_reg81; | ||
| u32 geni_cfg_reg82; | ||
| u32 spi_demux_output_inv; | ||
| u32 spi_demux_sel; | ||
| u32 geni_byte_granularity; | ||
| u32 geni_dma_mode_en; | ||
| u32 uart_tx_trans_cfg_reg; | ||
| u32 geni_tx_packing_cfg0; | ||
| u32 geni_tx_packing_cfg1; | ||
| union proto_word_len word_len; | ||
| union proto_tx_trans_len tx_trans_len; | ||
| union proto_rx_trans_len rx_trans_len; | ||
| u32 spi_pre_post_cmd_dly; | ||
| u32 i2c_scl_counters; | ||
| u32 geni_cfg_reg95; | ||
| u32 uart_rx_trans_cfg; | ||
| u32 geni_rx_packing_cfg0; | ||
| u32 geni_rx_packing_cfg1; | ||
| u32 uart_rx_word_len; | ||
| u32 geni_cfg_reg100; | ||
| u32 uart_rx_stale_cnt; | ||
| u32 geni_cfg_reg102; | ||
| u32 geni_cfg_reg103; | ||
| u32 geni_cfg_reg104; | ||
| u32 uart_tx_parity_cfg; | ||
| u32 uart_rx_parity_cfg; | ||
| u32 uart_manual_rfr; | ||
| u32 geni_cfg_reg108; | ||
| u32 geni_cfg_reg109; | ||
| u32 geni_cfg_reg110; | ||
| u8 _reserved7[0x600 - 0x2BC]; | ||
| u32 geni_m_cmd0; | ||
| u32 geni_m_cmd_ctrl_reg; | ||
| u8 _reserved8[0x10 - 0x08]; | ||
| u32 geni_m_irq_status; | ||
| u32 geni_m_irq_enable; | ||
| u32 geni_m_irq_clear; | ||
| u32 geni_m_irq_en_set; | ||
| u32 geni_m_irq_en_clear; | ||
| u32 geni_m_cmd_err_status; | ||
| u32 geni_m_fw_err_status; | ||
| u8 _reserved9[0x30 - 0x2C]; | ||
| u32 geni_s_cmd0; | ||
| u32 geni_s_cmd_ctrl_reg; | ||
| u8 _reserved10[0x40 - 0x38]; | ||
| u32 geni_s_irq_status; | ||
| u32 geni_s_irq_enable; | ||
| u32 geni_s_irq_clear; | ||
| u32 geni_s_irq_en_set; | ||
| u32 geni_s_irq_en_clear; | ||
| u8 _reserved11[0x700 - 0x654]; | ||
| u32 geni_tx_fifon; | ||
| u8 _reserved12[0x780 - 0x704]; | ||
| u32 geni_rx_fifon; | ||
| u8 _reserved13[0x800 - 0x784]; | ||
| u32 geni_tx_fifo_status; | ||
| u32 geni_rx_fifo_status; | ||
| u32 geni_tx_fifo_threshold; | ||
| u32 geni_tx_watermark_reg; | ||
| u32 geni_rx_watermark_reg; | ||
| u32 geni_rx_rfr_watermark_reg; | ||
| u8 _reserved14[0x900 - 0x818]; | ||
| u32 geni_gp_output_reg; | ||
| u8 _reserved15[0x908 - 0x904]; | ||
| u32 geni_ios; | ||
| u32 geni_timestamp; | ||
| u32 geni_m_gp_length; | ||
| u32 geni_s_gp_length; | ||
| u8 _reserved16[0x920 - 0x918]; | ||
| u32 geni_hw_irq_en; | ||
| u32 geni_hw_irq_ignore_on_active; | ||
| u8 _reserved17[0x930 - 0x928]; | ||
| u32 geni_hw_irq_cmd_param_0; | ||
| u8 _reserved18[0xA00 - 0x934]; | ||
| u32 geni_i3c_ibi_cfg_tablen; | ||
| u8 _reserved19[0xA80 - 0xA04]; | ||
| u32 geni_i3c_ibi_status; | ||
| u32 geni_i3c_ibi_rd_data; | ||
| u32 geni_i3c_ibi_search_pattern; | ||
| u32 geni_i3c_ibi_search_data; | ||
| u32 geni_i3c_sw_ibi_en; | ||
| u32 geni_i3c_sw_ibi_en_recover; | ||
| u8 _reserved20[0xC30 - 0xA98]; | ||
| u32 dma_tx_ptr_l; | ||
| u32 dma_tx_ptr_h; | ||
| u32 dma_tx_attr; | ||
| u32 dma_tx_length; | ||
| u32 dma_tx_irq_stat; | ||
| u32 dma_tx_irq_clr; | ||
| u32 dma_tx_irq_en; | ||
| u32 dma_tx_irq_en_set; | ||
| u32 dma_tx_irq_en_clr; | ||
| u32 dma_tx_length_in; | ||
| u32 dma_tx_fsm_rst; | ||
| u32 dma_tx_max_burst_size; | ||
| u8 _reserved21[0xD30 - 0xC60]; | ||
| u32 dma_rx_ptr_l; | ||
| u32 dma_rx_ptr_h; | ||
| u32 dma_rx_attr; | ||
| u32 dma_rx_length; | ||
| u32 dma_rx_irq_stat; | ||
| u32 dma_rx_irq_clr; | ||
| u32 dma_rx_irq_en; | ||
| u32 dma_rx_irq_en_set; | ||
| u32 dma_rx_irq_en_clr; | ||
| u32 dma_rx_length_in; | ||
| u32 dma_rx_fsm_rst; | ||
| u32 dma_rx_max_burst_size; | ||
| u32 dma_rx_flush; | ||
| u8 _reserved22[0xE14 - 0xD64]; | ||
| u32 se_irq_high_priority; | ||
| u32 se_gsi_event_en; | ||
| u32 se_irq_en; | ||
| u32 dma_if_en_ro; | ||
| u32 se_hw_param_0; | ||
| u32 se_hw_param_1; | ||
| u32 se_hw_param_2; | ||
| u32 dma_general_cfg; | ||
| u8 _reserved23[0x40 - 0x34]; | ||
| u32 dma_debug_reg0; | ||
| u32 dma_test_bus_ctrl; | ||
| u32 se_top_test_bus_ctrl; | ||
| u8 _reserved24[0x1000 - 0x0E4C]; | ||
| u32 se_geni_fw_revision; | ||
| u32 se_s_fw_revision; | ||
| u8 _reserved25[0x10-0x08]; | ||
| u32 se_geni_cfg_ramn; | ||
| u8 _reserved26[0x2000 - 0x1014]; | ||
| u32 se_geni_clk_ctrl; | ||
| u32 se_dma_if_en; | ||
| u32 se_fifo_if_disable; | ||
| u32 se_geni_fw_multilock_protns; | ||
| u32 se_geni_fw_multilock_msa; | ||
| u32 se_geni_fw_multilock_sp; | ||
| }; | ||
| check_member(qup_regs, geni_clk_sel, 0x7C); | ||
| check_member(qup_regs, geni_cfg_reg108, 0x2B0); | ||
| check_member(qup_regs, geni_dma_mode_en, 0x258); | ||
| check_member(qup_regs, geni_i3c_ibi_rd_data, 0xA84); | ||
| check_member(qup_regs, dma_test_bus_ctrl, 0xE44); | ||
| check_member(qup_regs, se_geni_cfg_ramn, 0x1010); | ||
| check_member(qup_regs, se_geni_fw_multilock_sp, 0x2014); | ||
|
|
||
| static struct console_input_driver consin = { | ||
| .havekey = serial_havechar, | ||
| .getchar = serial_getchar, | ||
| .input_type = CONSOLE_INPUT_TYPE_UART, | ||
| }; | ||
|
|
||
| static struct console_output_driver consout = { | ||
| .putchar = serial_putchar, | ||
| }; | ||
|
|
||
| static struct qup_regs *uart_base_address(void) | ||
| { | ||
| return (void *)(uintptr_t)lib_sysinfo.serial->baseaddr; | ||
| } | ||
|
|
||
| static void uart_qupv3_tx_flush(void) | ||
| { | ||
| struct qup_regs *regs = uart_base_address(); | ||
|
|
||
| while (read32(®s->geni_status) & GENI_STATUS_M_GENI_CMD_ACTIVE_MASK) | ||
| ; | ||
| } | ||
|
|
||
| static unsigned char uart_qupv3_rx_byte(void) | ||
| { | ||
| struct qup_regs *regs = uart_base_address(); | ||
|
|
||
| if (read32(®s->geni_rx_fifo_status) & RX_FIFO_WC_MSK) | ||
| return read32(®s->geni_rx_fifon) & 0xFF; | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
| static void uart_qupv3_tx_byte(unsigned char data) | ||
| { | ||
| struct qup_regs *regs = uart_base_address(); | ||
|
|
||
| uart_qupv3_tx_flush(); | ||
|
|
||
| write32(®s->rx_trans_len.uart_tx_trans_len, 1); | ||
| /* Start TX */ | ||
| write32(®s->geni_m_cmd0, START_UART_TX); | ||
| write32(®s->geni_tx_fifon, data); | ||
| } | ||
|
|
||
| void serial_putchar(unsigned int data) | ||
| { | ||
| if (data == 0xa) | ||
| uart_qupv3_tx_byte(0xd); | ||
| uart_qupv3_tx_byte(data); | ||
| } | ||
|
|
||
| int serial_havechar(void) | ||
| { | ||
| struct qup_regs *regs = uart_base_address(); | ||
|
|
||
| if (read32(®s->geni_rx_fifo_status) & RX_FIFO_WC_MSK) | ||
| return 1; | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
| int serial_getchar(void) | ||
| { | ||
| return uart_qupv3_rx_byte(); | ||
| } | ||
|
|
||
| void serial_console_init(void) | ||
| { | ||
| if (!lib_sysinfo.serial) | ||
| return; | ||
|
|
||
| console_add_output_driver(&consout); | ||
| console_add_input_driver(&consin); | ||
| } |