All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 22/23] x86: Add some documentation on how to port U-Boot on x86
Date: Tue, 27 Jan 2015 16:51:15 +0800	[thread overview]
Message-ID: <CAEUhbmVa1dp-zh8C2X9mfuBYgC_n=WoFAs3eAjcU-2-ZG3UzPA@mail.gmail.com> (raw)
In-Reply-To: <1422321801-6743-23-git-send-email-sjg@chromium.org>

Hi Simon,

On Tue, Jan 27, 2015 at 9:23 AM, Simon Glass <sjg@chromium.org> wrote:
> Some information has been gleaned on tools and procedures for porting
> U-Boot to different x86 platforms. Add a few notes to start things off.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

A minor comment below.

>  doc/README.x86 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
>
> diff --git a/doc/README.x86 b/doc/README.x86
> index 809a291..0e4628a 100644
> --- a/doc/README.x86
> +++ b/doc/README.x86
> @@ -164,6 +164,69 @@ mtrr - List and set the Memory Type Range Registers (MTRR). These are used to
>          mode to use. U-Boot sets up some reasonable values but you can
>          adjust then with this command.
>
> +Development Flow
> +----------------
> +
> +These notes are for those who want to port U-Boot to a new x86 platform.
> +
> +Since x86 CPUs boot from SPI flash, a SPI flash emulator is a good investment.
> +The Dediprog em100 can be used on Linux. The em100 tool is available here:
> +
> +   http://review.coreboot.org/p/em100.git
> +
> +On Minnowboard Max the following command line can be used:
> +
> +   sudo em100 -s -p LOW -d u-boot.rom -c W25Q64DW -r
> +
> +A suitable clip for connecting over the SPI flash chip is here:
> +
> +   http://www.dediprog.com/pd/programmer-accessories/EM-TC-8
> +
> +This allows you to override the SPI flash contents for development purposes.
> +Typically you can write to the em100 in around 1200ms, considerably faster
> +than programming the real flash device each time. The only important
> +limitation of the em100 is that it only supports SPI bus speeds up to 20MHz.
> +This means that images must be set to boot with that speed (Intel-specific
> +feature).
> +

It would be better to document what this Intel-specific feature is in
order to support this SPI bus frequency.

> +If your chip/board uses an Intel Firmware Support Package (FSP) it is fairly
> +easy to fit it in. You can follow the Minnowboard Max implementation, for
> +example. Hopefully you will just need to create new files similar to those
> +in arch/x86/cpu/baytrail which provide Bay Trail support.
> +
> +If you are not using an FSP you have more freedom and more responsibility.
> +The ivybridge support works this way, although it still uses a ROM for
> +graphics and still has binary blobs containing Intel code. You should aim to
> +support all important peripherals on your platform including video and storage.
> +Use the device tree for configuration where possible.
> +
> +For the microcode you can create a suitable device tree file using the
> +microcode tool:
> +
> +  ./tools/microcode-tool -d microcode.dat create <model>
> +
> +or if you only have header files and not the full Intel microcode.dat database:
> +
> +  ./tools/microcode-tool -H BAY_TRAIL_FSP_KIT/Microcode/M0130673322.h \
> +       -H BAY_TRAIL_FSP_KIT/Microcode/M0130679901.h \
> +       create all
> +
> +These are written to arch/x86/dts/microcode/ by default.
> +
> +Note that it is possible to just add the micrcode for your CPU if you know its
> +model. U-Boot prints this information when it starts
> +
> +   CPU: x86_64, vendor Intel, device 30673h
> +
> +so here we can use the M0130673322 file.
> +
> +If you platform can display POST codes on two little 7-segment displays on
> +the board, then you can use post_code() calls from C or assembler to monitor
> +boot progress. This can be good for debugging.
> +
> +If not, you can try to get serial working as early as possible. The early
> +debug serial port may be useful here. See setup_early_uart() for an example.
> +
>  TODO List
>  ---------
>  - Audio
> --

Regards,
Bin

  reply	other threads:[~2015-01-27  8:51 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  1:22 [U-Boot] [PATCH 0/23] x86: Add bare support for Intel Minnowboard Max Simon Glass
2015-01-27  1:22 ` [U-Boot] [PATCH 01/23] x86: Enhance the microcode tool to support header files as input Simon Glass
2015-01-27  8:59   ` Bin Meng
2015-01-27 15:12     ` Simon Glass
2015-01-28  1:10       ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 02/23] pci: Add a function to find a device by class Simon Glass
2015-01-27  9:53   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 03/23] x86: pci: Add PCI IDs for Minnowboard Max Simon Glass
2015-01-27  9:44   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 04/23] x86: video: Enable video " Simon Glass
2015-01-27  9:45   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 05/23] usb: pci: Use pci_find_class() to find the device Simon Glass
2015-01-27  9:55   ` Bin Meng
2015-01-27 17:50   ` Marek Vasut
2015-01-27 20:53     ` Simon Glass
2015-01-27 21:16       ` Marek Vasut
2015-01-27  1:23 ` [U-Boot] [PATCH 06/23] usb: pci: Add XHCI driver for PCI Simon Glass
2015-01-27 10:06   ` Bin Meng
2015-01-27 17:57   ` Marek Vasut
2015-01-27 20:52     ` Simon Glass
2015-01-27 21:18       ` Marek Vasut
2015-01-27  1:23 ` [U-Boot] [PATCH 07/23] x86: Add an option to enabling building a ROM file Simon Glass
2015-01-27 10:14   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 08/23] x86: Make MMCONF_BASE_ADDRESS common across x86 Simon Glass
2015-01-27 10:22   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 09/23] x86: video: Allow video ROM execution to fall back to the other method Simon Glass
2015-01-27 10:37   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 10/23] x86: bootstage: Add time measurement for vesa start-up Simon Glass
2015-01-27 10:42   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 11/23] x86: Move common FSP code into a common location Simon Glass
2015-01-27 10:52   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 12/23] x86: Adjust the FSP types slightly Simon Glass
2015-01-27 12:25   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 13/23] x86: Make CAR and DRAM FSP code common Simon Glass
2015-01-27 12:27   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 14/23] x86: Move common FSP functions into a common file Simon Glass
2015-01-27 12:20   ` Bin Meng
2015-01-27 15:15     ` Simon Glass
2015-01-28  1:12       ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 15/23] x86: Remove unnecessary casts and fix comment typos Simon Glass
2015-01-27 12:32   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 16/23] x86: Allow FSP Kconfig settings for all x86 Simon Glass
2015-01-27 12:45   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 17/23] x86: Define cache line size Simon Glass
2015-01-27 13:05   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 18/23] x86: Allow a UART to be set up before the FSP is ready Simon Glass
2015-01-27 13:12   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 19/23] x86: spi: Support ValleyView in ICH SPI driver Simon Glass
2015-01-27 14:00   ` Bin Meng
2015-01-28  5:17     ` Simon Glass
2015-01-28  6:02       ` Bin Meng
2015-01-28 23:45         ` Simon Glass
2015-01-27  1:23 ` [U-Boot] [PATCH 20/23] scsi: bootstage: Measure time taken to scan the bus Simon Glass
2015-01-27 13:20   ` Bin Meng
2015-01-27 17:38   ` Rob Herring
2015-01-28  1:20     ` Bin Meng
2015-01-28  5:07       ` Simon Glass
2015-01-27  1:23 ` [U-Boot] [PATCH 21/23] x86: Enable bootstage features Simon Glass
2015-01-27 13:26   ` Bin Meng
2015-01-27  1:23 ` [U-Boot] [PATCH 22/23] x86: Add some documentation on how to port U-Boot on x86 Simon Glass
2015-01-27  8:51   ` Bin Meng [this message]
2015-01-27  1:23 ` [U-Boot] [PATCH 23/23] x86: Add support for Intel Minnowboard Max Simon Glass
2015-01-27 14:25   ` Bin Meng
2015-01-27 14:31 ` [U-Boot] [PATCH 0/23] x86: Add bare " Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEUhbmVa1dp-zh8C2X9mfuBYgC_n=WoFAs3eAjcU-2-ZG3UzPA@mail.gmail.com' \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.