From fcf776fd02d60ab01b885ce48beae929098d6aad Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Thu, 4 Feb 2016 11:23:36 -0800 Subject: Documentation: x86 add sleep state and minimal memory setup Document how to add the sleep state and minimal memory setup. TEST=None Change-Id: Ibebeef34269dbf2366f1bea6d734f6bade4e4028 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/13446 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- Documentation/Intel/Board/board.html | 79 ++++++++++++++++++++++++++++++++++++ Documentation/Intel/SoC/soc.html | 53 ++++++++++++++++++++++++ Documentation/Intel/development.html | 58 ++++++++++++++++++++++++++ 3 files changed, 190 insertions(+) (limited to 'Documentation/Intel') diff --git a/Documentation/Intel/Board/board.html b/Documentation/Intel/Board/board.html index d50ff4e74f..47d329515d 100644 --- a/Documentation/Intel/Board/board.html +++ b/Documentation/Intel/Board/board.html @@ -15,6 +15,7 @@
  1. Required Files
  2. Enable Serial Output
  3. +
  4. Load the Memory Timing Data
@@ -101,6 +102,84 @@ +
+

Memory Timing Data

+

+ Memory timing data is located in the flash. This data is in the format of + serial presence detect + (SPD) data. + Use the following steps to load the SPD data: +

+
    +
  1. Edit Kconfig to add the DISPLAY_SPD_DATA" value which enables the + display of the SPD data being passed to MemoryInit +
  2. +
  3. Create an "spd" subdirectory
  4. +
  5. Create an spd/spd.c file for the SPD implementation +
      +
    1. Implement the mainboard_fill_spd_data routine +
        +
      1. Read the SPD data either from the spd.bin file or using I2C or SMBUS
      2. +
      3. Fill in the pei_data structure with SPD data for each of the DIMMs
      4. +
      5. Set the DIMM channel configuration
      6. +
      +
    2. +
    +
  6. +
  7. Add an .spd.hex file containing the memory timing data to the spd subdirectory
  8. +
  9. Create spd/Makefile.inc +
      +
    1. Add spd.c to romstage
    2. +
    3. Add the .spd.hex file to SPD_SOURCES
    4. +
    +
  10. +
  11. Edit Makefile.inc to add the spd subdirectory
  12. +
  13. Edit romstage.c +
      +
    1. Call mainboard_fill_spd_data
    2. +
    3. Add mainboard_memory_init_params to copy the SPD and DRAM + configuration data from the pei_data structure into the UPDs + for MemoryInit +
    4. +
    +
  14. +
  15. Edit devicetree.cb +
      +
    1. Include the UPD parameters for MemoryInit except for: +
        +
      • Address of SPD data
      • +
      • DRAM configuration set above
      • +
      +
    2. +
    +
  16. +
  17. A working FSP + MemoryInit + routine is required to complete debugging
  18. +
  19. Debug the result until port 0x80 outputs +
      +
    1. 0x34: + - Just after entering + raminit +
    2. +
    3. 0x36: + - Just before displaying the + UPD parameters + for FSP MemoryInit +
    4. +
    5. 0x92: POST_FSP_MEMORY_INIT + - Just before calling FSP + MemoryInit +
    6. +
    7. 0x37: + - Just after returning from FSP + MemoryInit +
    8. +
    +
  20. +
  21. Continue debugging with CONFIG_DISPLAY_HOBS enabled until TempRamExit is called
  22. +
+

Modified: 31 January 2016

diff --git a/Documentation/Intel/SoC/soc.html b/Documentation/Intel/SoC/soc.html index 0b0615d049..b5daac8fb5 100644 --- a/Documentation/Intel/SoC/soc.html +++ b/Documentation/Intel/SoC/soc.html @@ -22,6 +22,8 @@
  • Romstage
    1. Enable Serial Output"
    2. +
    3. Get the Previous Sleep State
    4. +
    5. Add the MemoryInit Support
  • @@ -328,6 +330,57 @@ Use the following steps to debug the call to TempRamInit: +

    Determine Previous Sleep State

    +

    + The following steps implement the code to get the previous sleep state: +

    +
      +
    1. Implement the fill_power_state routine which determines the previous sleep state
    2. +
    3. Debug the result until port 0x80 outputs +
        +
      1. 0x32: + - Just after entering + romstage_common +
      2. +
      3. 0x33 - Just after calling + soc_pre_ram_init +
      4. +
      5. 0x34: + - Just after entering + raminit +
      6. +
      +
    + + +

    MemoryInit Support

    +

    + The following steps implement the code to support the FSP MemoryInit call: +

    +
      +
    1. Add the chip.h header file to define the UPD values which get passed + to MemoryInit. Skip the values containing SPD addresses and DRAM + configuration data which is determined by the board. +

      + Build Note: The src/mainboard/<Vendor>/<Board>/devicetree.cb + file specifies the default values for these parameters. The build + process creates the static.c module which contains the config data + structure containing these values. +

      +
    2. +
    3. Edit romstage/romstage.c +
        +
      1. Implement the romstage/romstage.c/soc_memory_init_params routine to + copy the values from the config structure into the UPD structure +
      2. +
      3. Implement the soc_display_memory_init_params routine to display + the updated UPD parameters by calling fsp_display_upd_value +
      4. +
      +
    4. +
    + +

    Modified: 31 January 2016

    diff --git a/Documentation/Intel/development.html b/Documentation/Intel/development.html index b90fa96567..0cd2bd59b7 100644 --- a/Documentation/Intel/development.html +++ b/Documentation/Intel/development.html @@ -82,6 +82,18 @@
  • Enable coreboot/FSP debugging
  • +
  • Determine the Previous Sleep State
  • +
  • Enable DRAM: +
      +
    1. Implement the SoC + MemoryInit + Support +
    2. +
    3. Implement the board support to read the + Memory Timing Data +
    4. +
    +
  • @@ -124,6 +136,32 @@ Where Testing + + DRAM + + Load SPD data: src/soc/mainboard/<Vendor>/<Board>/spd/spd.c
    + UPD Setup: +
      +
    • src/soc<Vendor>//<Chip Family>/romstage/romstage.c
    • +
    • src/mainboard/<Vendor>/<Board>/romstage.c
    • +
    + FSP 1.1 MemoryInit called from src/drivers/intel/fsp1_1/raminit.c + + Select the following Kconfig values +
      +
    • DISPLAY_HOBS
    • +
    • DISPLAY_UPD_DATA
    • +
    + Testing successful if: +
      +
    • MemoryInit UPD values are correct
    • +
    • MemoryInit returns 0 (success) and
    • +
    • The the message "ERROR - coreboot's requirements not met by FSP binary!" + is not displayed +
    • +
    + + Serial Port @@ -150,6 +188,26 @@ is displayed
    + + MemoryInit + SoC support
    + Board support
    + + Select the following Kconfig values +
      +
    • DISPLAY_HOBS
    • +
    • DISPLAY_UPD_DATA
    • +
    + Testing successful if: +
      +
    • MemoryInit UPD values are correct
    • +
    • MemoryInit returns 0 (success) and
    • +
    • The the message "ERROR - coreboot's requirements not met by FSP binary!" + is not displayed +
    • +
    + + -- cgit v1.2.3