05 Mar, 2018

1 commit

  • Thomas reported U-Boot failed to build host tools if libfdt-devel
    package is installed because tools include libfdt headers from
    /usr/include/ instead of using internal ones.

    This commit moves the header code:
    include/libfdt.h -> include/linux/libfdt.h
    include/libfdt_env.h -> include/linux/libfdt_env.h

    and replaces include directives:
    #include -> #include
    #include -> #include

    Reported-by: Thomas Petazzoni
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

29 Jan, 2018

1 commit

  • Several host-tools use "bool" type without including .
    This relies on the crappy header inclusion chain.

    tools/Makefile has the following line:

    HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

    All host-tools are forced to include libfdt_env.h even if they are
    totally unrelated to FDT. Then, is indirectly included
    as follows:

    include/libfdt_env.h
    -> include/linux/types.h
    ->

    I am fixing this horrible crap. In advance, I need to add necessary
    include directives explicitly. tools/fdtgrep.c needs more;
    for open() and for errno.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Joe Hershberger
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

20 Dec, 2016

1 commit


09 Sep, 2015

1 commit


26 Aug, 2015

4 commits

  • When ifdtool collates the microcode into one place it effectively creates
    a copy of the 'data' properties in the device tree microcode nodes. This
    is wasteful since we now have two copies of the microcode in the ROM.

    To avoid this, remove the microcode data from the device tree and shrink it
    down. This means that there is only one copy and the overall ROM space used
    by the microcode does not increase.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     
  • The Intel Firmware Support Package (FSP) requires that microcode be provided
    very early before the device tree can be scanned. We already support adding
    a pointer to the microcode data in a place where early init code can access.

    However this just points into the device tree and can only point to a single
    lot of microcode. For boards which may have different CPU types we must
    support multiple microcodes and pass all of them to the FSP in one place.

    Enhance ifdtool to scan all the microcode, place it together in the ROM and
    update the microcode pointer to point there. This allows us to pass multiple
    microcode blocks to the FSP using its existing API.

    Enable the flag in the Makefile so that this feature is used by default for
    all boards.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     
  • The code to set up the microcode pointer in the ROM shares almost nothing
    with the write_uboot() function.

    Move it into its own function so it will be easier to extend.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     
  • Since U-Boot and its device tree can grow we should check that it does not
    overlap the regions above it. Track the ROM offset that U-Boot reaches and
    check that other regions (written after U-Boot) do not interfere.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     

15 Jul, 2015

1 commit


04 Jun, 2015

1 commit


13 Jan, 2015

1 commit


19 Dec, 2014

4 commits

  • Some Intel CPUs use an 'FSP' binary blob which provides an inflexible
    means of starting up the CPU. One result is that microcode updates can only
    be done before RAM is available and therefore parsing of the device tree
    is impracticle.

    Worse, the addess of the microcode update must be stored in ROM since a
    pointer to its start address and size is passed to the 'FSP' blob. It is
    not possible to perform any calculations to obtain the address and size.

    To work around this, ifdtool is enhanced to work out the address and size of
    the first microcode update it finds in the supplied device tree. It then
    writes these into the correct place in the ROM. U-Boot can then start up
    the FSP correctly.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Rather than two independent arrays, use a single array of a suitable
    structure. Also add a 'type' member since we will shortly add additional
    types.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • When a file is missing it helps to know which file. Update the error message
    to print this information.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • This is missing a parameter. Fix it to avoid a warning when debug is
    enabled.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

14 Dec, 2014

2 commits


21 Nov, 2014

2 commits