Difference between revisions of "Flag Days"

From coreboot
Jump to: navigation, search
(r6521: Don't initialize the UARTs' baud rate in SuperI/O drivers)
(22 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
== r5152: Change in PS/2 keyboard API ==
 
== r5152: Change in PS/2 keyboard API ==
  
Applicable if: local changes/additions to Super I/Os.
+
'''Applicable if:''' local changes/additions to Super I/Os.
  
 
The [http://www.coreboot.org/pipermail/coreboot/2010-February/056012.html name and function prototype of the PS/2 keyboard initialization function changed]:
 
The [http://www.coreboot.org/pipermail/coreboot/2010-February/056012.html name and function prototype of the PS/2 keyboard initialization function changed]:
Line 24: Line 24:
 
== r5162: Move crt0s away from user servicable parts in the build system ==
 
== r5162: Move crt0s away from user servicable parts in the build system ==
  
Applicable if: local changes/additions to mainboards
+
'''Applicable if:''' local changes/additions to mainboards.
  
 
The crt0s variable in the buildsystem, which collects the various parts that are combined to crt0.o, is [http://www.coreboot.org/pipermail/coreboot/2010-February/056062.html setup generically] now.
 
The crt0s variable in the buildsystem, which collects the various parts that are combined to crt0.o, is [http://www.coreboot.org/pipermail/coreboot/2010-February/056062.html setup generically] now.
Line 38: Line 38:
 
== r5164: Move ldscripts away from user servicable parts in the build system ==
 
== r5164: Move ldscripts away from user servicable parts in the build system ==
  
Applicable if: local changes/additions to mainboards
+
'''Applicable if:''' local changes/additions to mainboards
  
 
The ldscripts variable in the buildsystem, which collects the various parts of the linker script used to link coreboot, is [http://www.coreboot.org/pipermail/coreboot/2010-February/056089.html setup generically] now.
 
The ldscripts variable in the buildsystem, which collects the various parts of the linker script used to link coreboot, is [http://www.coreboot.org/pipermail/coreboot/2010-February/056089.html setup generically] now.
Line 46: Line 46:
 
== r5167: Reorganize i82801 southbridge drivers ==
 
== r5167: Reorganize i82801 southbridge drivers ==
  
Applicable if: your mainboard uses the i82801xx, i82801dbm, i82801ca or i82801er driver (Intel ICH).
+
'''Applicable if:''' your mainboard uses the i82801xx, i82801dbm, i82801ca or i82801er driver (Intel ICH).
  
 
The drivers have been unified and split up.  
 
The drivers have been unified and split up.  
Line 58: Line 58:
 
== r5168: Move generic build rules away from user servicable parts in the build system ==
 
== r5168: Move generic build rules away from user servicable parts in the build system ==
  
Applicable if: local changes/additions to mainboards
+
'''Applicable if:''' local changes/additions to mainboards.
  
 
Various rules of object files that exist for every board, or that exist for every board with a given configuration option, are [http://www.coreboot.org/pipermail/coreboot/2010-February/056089.html moved to] <code>src/arch/i386/Makefile.inc</code>.
 
Various rules of object files that exist for every board, or that exist for every board with a given configuration option, are [http://www.coreboot.org/pipermail/coreboot/2010-February/056089.html moved to] <code>src/arch/i386/Makefile.inc</code>.
Line 71: Line 71:
 
* obj-$(CONFIG_BOARD_HAS_HARD_RESET) += reset.o
 
* obj-$(CONFIG_BOARD_HAS_HARD_RESET) += reset.o
  
Also, <code>include some_path/Makefile.romccboard.inc</code> must be dropped, as this file was removed. A statement to set <code>ROMCCFLAGS</code> must be kept.
+
Also, <code>include some_path/Makefile.romccboard.inc</code> must be dropped, as this file was removed. A statement to set <code>ROMCCFLAGS</code> must be kept. If your mainboard's Makefile is empty after these changes, or only contains comments, you can remove it completely.
 
+
If your mainboard's Makefile is empty after these changes, or only contains comments, you can remove it completely.
+
  
 
== r5171: Move generic build rules away from user servicable parts in the build system ==
 
== r5171: Move generic build rules away from user servicable parts in the build system ==
  
Applicable if: local changes/additions to mainboards
+
'''Applicable if:''' local changes/additions to mainboards
  
 
Various rules of object files that exist for every board, or that exist for every board with a given configuration option, are [http://www.coreboot.org/pipermail/coreboot/2010-February/056154.html moved to] <code>src/arch/i386/Makefile.inc</code>.
 
Various rules of object files that exist for every board, or that exist for every board with a given configuration option, are [http://www.coreboot.org/pipermail/coreboot/2010-February/056154.html moved to] <code>src/arch/i386/Makefile.inc</code>.
Line 91: Line 89:
 
* obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o
 
* obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o
  
Also, <code>include some_path/Makefile.k8_CAR.inc</code> or <code>include some_path/Makefile.k8_ck804.inc</code> must be dropped, as these files were removed.
+
Also, <code>include some_path/Makefile.k8_CAR.inc</code> or <code>include some_path/Makefile.k8_ck804.inc</code> must be dropped, as these files were removed. If your mainboard's Makefile is empty after these changes, or only contains comments, you can remove it completely.
 
+
If your mainboard's Makefile is empty after these changes, or only contains comments, you can remove it completely.
+
  
 
== r5176: Automate SSDT pull-in ==
 
== r5176: Automate SSDT pull-in ==
  
Applicable if: using ssdtX.asl files and ACPI_SSDTX_NUM config variable
+
'''Applicable if:''' using <code>ssdtX.asl</code> files and <code>ACPI_SSDTX_NUM</code> config variable.
  
ACPI_SSDTX_NUM must be 4 or 5 (the only values found in the tree so far, but this could be extended), and means the highest number in ssdtX.asl in the mainboard tree (numbering starts at 2). ssdt[2..X].asl are automatically pulled in by the build system then.
+
<code>ACPI_SSDTX_NUM</code> must be 4 or 5 (the only values found in the tree so far, but this could be extended), and means the highest number in <code>ssdtX.asl</code> in the mainboard tree (numbering starts at 2). <code>ssdt[2..X].asl</code> are automatically pulled in by the build system then. To adapt, please check that <code>ACPI_SSDTX_NUM</code> is 4 or 5, then remove the SSDT related rules in the mainboard's <code>Makefile</code>.
  
To adapt, please check that ACPI_SSDTX_NUM is 4 or 5, then remove the ssdt related rules in the mainboard's Makefile.
+
If <code>ACPI_SSDTX_NUM</code> should be some other value, please report to the list, so we can adapt the build system for your case.
 
+
If ACPI_SSDTX_NUM should be some other value, please report to the list, so we can adapt the build system for your case.
+
  
 
== r5259: Remove config variables related to newconfig ==
 
== r5259: Remove config variables related to newconfig ==
  
Applicable if: local additions to mainboards (and CPUs in some cases)
+
'''Applicable if:''' local additions to mainboards (and CPUs in some cases).
  
 
Uses of <code>HAVE_FAILOVER_BOOT</code>, <code>HAVE_FALLBACK_BOOT</code>, <code>USE_FAILOVER_IMAGE</code>, <code>USE_FALLBACK_IMAGE</code> must be removed as they were dropped from the build system and might lead to wrong behaviour.
 
Uses of <code>HAVE_FAILOVER_BOOT</code>, <code>HAVE_FALLBACK_BOOT</code>, <code>USE_FAILOVER_IMAGE</code>, <code>USE_FALLBACK_IMAGE</code> must be removed as they were dropped from the build system and might lead to wrong behaviour.
Line 115: Line 109:
 
== r5266: Replace printk_*(...) by printk(BIOS_*, ...) ==
 
== r5266: Replace printk_*(...) by printk(BIOS_*, ...) ==
  
Applicable if: local additions
+
'''Applicable if:''' local additions.
  
 
<code>printk_*</code> calls are replaced by <code>printk(BIOS_*, ...)</code>.
 
<code>printk_*</code> calls are replaced by <code>printk(BIOS_*, ...)</code>.
  
To adapt, you can use something like
+
To adapt, you can use something like this (thanks go to Zheng Bao for this command):
sed -i 's/printk_\([a-z]*\)(/printk(BIOS_\U\1\E, /g' *.c
+
  
Thanks go to Zheng Bao for this command.
+
sed -i 's/printk_\([a-z]*\)(/printk(BIOS_\U\1\E, /g' *.c
  
 
== r5311: unify quadcore.h and dualcore.h to multicore.h ==
 
== r5311: unify quadcore.h and dualcore.h to multicore.h ==
  
Applicable if: local additions
+
'''Applicable if:''' local additions to mainboards.
  
 
  #include <cpu/amd/dualcore.h>
 
  #include <cpu/amd/dualcore.h>
Line 137: Line 130:
  
 
  #include <cpu/amd/multicore.h>
 
  #include <cpu/amd/multicore.h>
 +
 +
The files were often included in <code>get_bus_conf.c</code> and <code>mptable.c</code>.
 +
 +
== r5313: drop LB_CKS_* from Kconfig ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
CMOS option handling does no longer keep information on where the coreboot checksums are stored twice.
 +
 +
<code>LB_CKS_RANGE_START</code>, <code>LB_CKS_RANGE_END</code> and <code>LB_CKS_LOC</code> should no longer be defined in Kconfig anymore. <code>build_opt_tbl</code> will do the job automatically.
 +
 +
In C code, all variants of <code>CONFIG_LB_CKS_*</code> are now called <code>LB_CKS_*</code> again as they're no longer config variables.
 +
 +
In addition, there is a new requirement for <code>cmos.layout</code> files now: There has to be a checksum description:
 +
 +
# -----------------------------------------------------------------
 +
checksums
 +
 +
checksum 392 983 984
 +
 +
== r5341: arch/i386/lib/console.c dropped ==
 +
 +
'''Applicable if:''' local additions.
 +
 +
If your (<code>romstage.c</code>) code included <code>arch/i386/lib/console.c</code> until now, it should include <code>console/console.c</code> instead.
 +
 +
== r5511: asm.h dropped. ==
 +
 +
The #define <code>ASSEMBLY</code> is now passed by the Makefile for assembler files. The <code>asm.h</code> construct is no longer needed. Just drop <code>asm.h</code> includes from your code. If you use the <code>post_code()</code> macro, you can now include <code><cpu/x86/post_code.h></code>.
 +
 +
== r5525: devicetree.cb: APIC rename ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
In <code>devicetree.cb</code> rename "apic" to "lapic" and "apic_cluster" to "lapic_cluster".
 +
 +
== r5528: Remove C-includes from romstages ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
Replace any <code>console/console.c</code> #include in <code>romstage.c</code> with <code>console/console.h</code>. For CAR-boards, also remove the <code>pc80/serial.c</code> #include.
 +
 +
== r5538: Remove C-includes from romstage ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
Remove <code>pc80/serial.c</code> #include in <code>romstage.c</code> on ROMCC-boards, too.
 +
 +
== r5548: Remove C-includes from romstages ==
 +
 +
'''Applicable if:''' local additions to mainboards based on Fam10h.
 +
 +
Remove <code>northbridge/amd/amdht/ht_wrapper.c</code>, <code>northbridge/amd/amdfam10/raminit_amdmct.c</code>, <code>cpu/amd/model_10xxx/fidvid.c</code>, <code>pc80/mc146818rtc_early.c</code> from your mainboard's <code>romstage.c</code>.
 +
 +
== r5647: Build mptable entries for buses from device tree ==
 +
 +
'''Applicable if:''' Board not adapted yet.
 +
 +
r5647 adds a new function <code>mptable_write_buses</code>, which acts as a replacement for all <code>smp_write_bus</code> calls in boards' mptable.c. So far, only <code>kontron/986lcd-m</code> uses it, but all boards should do so in future.
 +
 +
Most boards do the following for the bus entries in mptable:
 +
* Determine the highest PCI bus ID (either hardcoded or by reading out some known device).
 +
* Register PCI buses numbered 0 to highest.
 +
* Register ISA bus numbered highest+1.
 +
 +
Alternatively, some boards simply hardcode a number of calls to register each bus.
 +
 +
Identify that code and replace it with something like:
 +
<code>mptable_write_buses(mc, &max_pci_bus, &isa_bus);</code>
 +
where <code>mc</code> is the <code>struct mp_config_table *</code> used in your <code>mptable.c</code>. The variables <code>max_pci_bus</code> and <code>isa_bus</code> (sometimes called <code>bus_isa</code>) are set to the respective values by <code>mptable_write_buses</code>. If you don't need those variables in your board's <code>smp_write_config_table</code> function pass <code>NULL</code> instead.
 +
 +
== r5682: Drop USE_PRINTK_IN_CAR, USE_INIT ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
Drop <code>USE_PRINTK_IN_CAR</code> in your board's </code>Kconfig</code> file, if it exists. Its functionality is automatically enabled if CAR is enabled. Drop <code>USE_INIT</code>. This wasn't used, so dropping it doesn't change any behavior.
 +
 +
== r5745: Drop HAVE_HIGH_TABLES, HAVE_LOW_TABLES, FALLBACK_SIZE ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
These config options have no effect anymore, so simply drop them.
 +
 +
== r5754: Rework mainboard handling in Kconfig ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
<code>src/mainboard/*/*/Kconfig</code> got seriously reworked. Basically, list your board in the applicable <code>src/mainboard/*/Kconfig</code> file, rename the BOARD_vendor_boardname option to <code>BOARD_SPECIFIC_OPTIONS</code> (or somesuch, it's a dummy), and mark its type as "def_bool y". Then guard the entire <code>Kconfig</code> file of your mainboard with "if BOARD_vendor_boardname" .... "endif".
 +
 +
See other mainboards for examples.
 +
 +
== r5756: Rename USE_DCACHE_RAM to CACHE_AS_RAM ==
 +
 +
'''Applicable if:''' local additions to mainboards.
 +
 +
Rename <code>USE_DCACHE_RAM</code> to <code>CACHE_AS_RAM</code> in your board's <code>Kconfig</code> (if applicable).
 +
 +
== r5779: Use standard RAMBASE on Geode LX ==
 +
 +
'''Applicable if:''' new Geode LX based boards in tree.
 +
 +
Drop the <code>RAMBASE</code> config setting it to 0x4000, so coreboot uses the default of 1MB. Eventually, <code>RAMBASE</code> will be dropped completely.
 +
 +
== r5781: Drop SB600/SB700 configuration flags ==
 +
 +
'''Applicable if:''' new SB600/SB700 boards in tree.
 +
 +
Drop <code>ide0_enable</code>, <code>sata0_enable</code>, and <code>hda_viddid</code> from your board's <code>devicetree.cb</code>.
 +
 +
== r5787: HEADS UP: TSC based timer might fail ==
 +
 +
'''Applicable if:''' board uses TSC based timer, and PIT2 is unusable.
 +
 +
r5787 changes the default time source for calibrating the TSC based routines from I/O port accesses to PIT2, to increase boot speed. Should r5787 fail on your system, and <code>UDELAY_TSC</code> is enabled, you can try to add <code>select TSC_CALIBRATE_WITH_IO</code> to your board's <code>Kconfig</code>. If that fixes your board, please report to coreboot@coreboot.org.
 +
 +
== r5791+r5792: HEADS UP: Fix slow decompression on AMD Fam10 based boards ==
 +
 +
'''Applicable if:''' board uses Fam10.
 +
 +
Many users of Fam10 based boards disabled compression of the ramstage to massively improve boot time. Following r5792, this should not be necessary anymore.
 +
 +
== r5800: Move DIMM_SUPPORT out of the sockets ==
 +
 +
'''Applicable if:''' new local K8/Fam10 based board.
 +
 +
r5800 moves the memory type determination out of the sockets as it has been shown that a single CPU socket can be used for multiple memory types. Now, boards have to define the RAM they accept in Kconfig.
 +
 +
To get the older behaviour back, here's a list of sockets and what must be '''select'''ed in the boards to get the same configuration:
 +
* socket_AM2: <code>DIMM_DDR2</code>
 +
* socket_AM3: <code>DIMM_DDR3, DIMM_REGISTERED</code>
 +
* socket_AM2r2: <code>DIMM_DDR2, DIMM_REGISTERED</code>
 +
* socket_F: <code>DIMM_DDR2, DIMM_REGISTERED</code>
 +
* socket_ASB2: <code>DIMM_DDR3, DIMM_REGISTERED</code>
 +
* socket_F_1207: <code>DIMM_DDR2, DIMM_REGISTERED</code>
 +
 +
== r5803: Remove kludge for reserved resources on i945 ==
 +
 +
'''Applicable if:''' new local i945 based board.
 +
 +
Before r5803, some northbridge specific resources had to be added with a board specific handler. This is not necessary in r5803+.
 +
Remove the call to <code>add_northbridge_resources()</code> in <code>add_mainboard_resources()</code>.
 +
If this was the only action in <code>add_mainboard_resources()</code>, you can remove the function altogether '''and''' remove <code>HAVE_MAINBOARD_RESOURCES</code> in your board's <code>Kconfig</code>.
 +
 +
== r5825: New method for specifying SATA phys values on AMD SB700 ==
 +
 +
'''Applicable if:''' new local SB700 based board.
 +
 +
r5825 introduces a new API on SB700 to specify SATA phys values. The SB700 code defines some default values in <code>src/southbridge/amd/sb700/sb700_sata.c:sb700_setup_sata_phys()</code>. As this function is declared "weak", you can define your own function of the same name in your board's <code>mainboard.c</code> that writes the correct values for your board. See <code>src/mainboard/asrock/939a785gmh/mainboard.c</code> as an example.
 +
 +
== r5841: HEADSUP: Building romstage with global variables will fail ==
 +
 +
'''Applicable if:''' local changes.
 +
 +
Starting r5841 we let the build break if global variables are found in the romstage. As they're assigned addresses in ROM space, writing them would fail. To prevent such unobvious errors, we detect that condition and the build fails with the error message "'''Do not use global variables in romstage'''". It doesn't look if those are written to, so it might fail on code that would work (and it did).
 +
 +
To find the global variable, use <code>objdump -x</code> on your object files (for romstage, they're usually suffixed with <code>.initobj.o</code>) to find which has a <code>.bss</code> or <code>.data</code> section with content (more than 0 bytes). The symbol table printed by <code>objdump -x</code> also tells you what the variable is called.
 +
 +
== r5886: Change buildsystem to require source file names instead of object files ==
 +
 +
'''Applicable if:''' local changes or additions to the build system (particularily Makefile.inc).
 +
 +
Various build system variables are renamed, and their use has changed too:
 +
* initobjs-y is now romstage-y
 +
* objs-y is now ramstage-y
 +
* driver-y keeps the name but changes meaning
 +
* smmobj-y is now smm-y
 +
All of these variables must be filled with ''source'' filenames, not ''object'' filenames as it used to be.
 +
For most scenarios, it will be sufficient to change (for example) <code>initobjs-y += foo.o</code> in <code>romstage-y += foo.c</code>.
 +
 +
== r5891: Move configuration values from romstage.c to Kconfig ==
 +
 +
'''Applicable if:''' local changes or additions to i945 based boards.
 +
 +
Values were moved to Kconfig to have them available in all compilation units, not just <code>romstage.c</code>. In particular:
 +
* <code>CHIPSET_I945GM</code> -> <code>CONFIG_I945GM</code>
 +
* <code>CHIPSET_I945GC</code> -> <code>CONFIG_I945GC</code>
 +
* <code>CHANNEL_XOR_RANDOMIZATION</code>, <code>OVERRIDE_CLOCK_DISABLE</code>, <code>MAXIMUM_SUPPORTED_FREQUENCY</code> -> <code>CONFIG_*</code>
 +
 +
If your changes or additions use them, you'll have to adapt your changes. If you define the old variants in a <code>romstage.c</code>, you'll have to move them to <code>Kconfig</code>. See <code>kontron/986lcd-m</code> as a model.
 +
 +
== r5893: Split I945 northbridge to I945GC and I945GM ==
 +
 +
'''Applicable if:''' local changes or additions to i945 based boards.
 +
 +
To simplify configuration, we now support two northbridges, i945GC and i945GM in the Kconfig system, instead of i945 with the GM or GC modifiers as separate attribute. The code is still shared as it's mostly the same.
 +
 +
To adapt boards, change <code>NORTHBRIDGE_INTEL_I945</code> in <code>Kconfig</code> to <code>NORTHBRIDGE_INTEL_I945GC</code> or <code>NORTHBRIDGE_INTEL_I945GM</code> as appropriate and remove the I945GC or I945GM attribute (introduced in r5891).
 +
 +
== r5898: Rename CACHE_AS_RAM_ADDRESS_DEBUG to CONFIG_DEBUG_CAR ==
 +
 +
'''Applicable if:''' local changes or additions to AMD based boards.
 +
 +
If you set <code>CACHE_AS_RAM_ADDRESS_DEBUG</code> in your <code>romstage.c</code> to get verbose output in CAR setup, you now have to select <code>DEBUG_CAR</code> in <code>Kconfig</code> instead.
 +
 +
== r5910: Move out .c includes from i945 (and some other boards) ==
 +
 +
'''Applicable if:''' local changes or additions to CAR boards.
 +
 +
Instead of including sources in <code>romstage.c</code>, they're now compiled as separate units. r5910 does this for i945 based boards and on all CAR boards for <code>src/lib/ramtest.c</code>.
 +
To adapt, remove the corresponding includes from your <code>romstage.c</code>. You might have to include header files instead, as replacement to <code>ramtest.c</code> <code>lib.h</code> is a likely candidate.
 +
 +
== r5911: Move out usbdebug .c includes from CAR boards ==
 +
 +
'''Applicable if:''' local changes or additions to CAR boards.
 +
 +
If your board supports the USB debug port, you will have to remove the related source include statements (two: one for the chipset, one for the generic code) and include <code>usbdebug.h</code> instead.
 +
 +
== r6149/r6150: Drop duplicate prefixing from component filenames ==
 +
 +
'''Applicable if:''' adding any new components.
 +
 +
coreboot used to call its filenames <code>src/southbridge/intel/i82801gx/i82801gx_lpc.c</code>. This convention has been dropped and the component name is not supposed to be part of the file name anymore, as it is sufficiently described by the location of the file. Please drop the component prefix from filenames for all new components.
 +
 +
== r6161: Rename src/arch/i386 to src/arch/x86 ==
 +
 +
'''Applicable if:''' you have local changes in <code>src/arch/i386</code>.
 +
 +
If you have local changes in <code>src/arch/i386</code>, please make sure to apply them to <code>src/arch/x86</code> instead.
 +
 +
== r6513: Don't call usb debug console init from romstage.c ==
 +
 +
'''Applicable if:''' adding any new southbridges or mainboards.
 +
 +
USB debug console initialization has been moved to generic code. Drop any initialization calls from your romstage.c. Also, the init code in the southbridge drivers has been renamed to avoid massive preprocessor mangling in generic console init code.
 +
 +
i.e. from
 +
sb800_enable_usbdebug();
 +
to
 +
enable_usbdebug();
 +
 +
Please follow this principle when adding new south bridges with USBDEBUG support.
 +
 +
== r6521: Don't initialize the UARTs' baud rate in SuperI/O drivers ==
 +
 +
'''Applicable if:''' adding any new SuperI/O drivers and/or mainboards.
 +
 +
init_uart8250() has been removed completely to drop some of the many uart initialization functions. Also, SuperI/O drivers don't provide com1/com2 in their config structures anymore. Be sure to remove references in your devicetree.cb, too, if needed. Just remove the code, it never served a purpose.
 +
 +
== r6530: Don't call uart_init() from romstage.c anymore ==
 +
 +
'''Applicable if:''' you have a new, uncommitted mainboard.
 +
 +
Remove the call to uart_init() in romstage.c. It is no longer needed. Instead, console_init() takes care of that for you if you have serial console support enabled in Kconfig.

Revision as of 20:13, 21 April 2011

This page collects sweeping changes on the tree that might have an impact on boards that weren't tested by the developer, or on uncommitted development. It's sorted by revision (and thus date) and provides a Changelog to anyone who needs to update older trees.

To prevent inaccuracies, changes prior to the creation of this page aren't logged. The head revision at the time of creation of this page was r5151.

Contents

r5152: Change in PS/2 keyboard API

Applicable if: local changes/additions to Super I/Os.

The name and function prototype of the PS/2 keyboard initialization function changed:

-void init_pc_keyboard(unsigned port0, unsigned port1, struct pc_keyboard *kbd);
+void pc_keyboard_init(struct pc_keyboard *keyboard);

This dismisses the first two arguments (which had to be the constant values 0x60, 0x64 before). This should only have an impact on locally developed Super I/O code that might require to follow this change. The changes required for porting old code are usually of the form:

-init_pc_keyboard(0x60, 0x64, 0);
+pc_keyboard_init(0);

or

-init_pc_keyboard(res0->base, res1->base, &conf->keyboard);
+pc_keyboard_init(&conf->keyboard);

r5162: Move crt0s away from user servicable parts in the build system

Applicable if: local changes/additions to mainboards.

The crt0s variable in the buildsystem, which collects the various parts that are combined to crt0.o, is setup generically now.

This change must be replicated with local mainboard changes/additions. It should be enough to simply remove all crt0s entries from src/mainboard/$(MAINBOARDDIR)/Makefile.inc.

If you want to check the behaviour:

  • apply the Makefile patch (which adds the printcrt0s rule) to your tree
  • run "make printcrt0s", note the result
  • apply the entire patch
  • run "make printcrt0s", and compare the results

r5164: Move ldscripts away from user servicable parts in the build system

Applicable if: local changes/additions to mainboards

The ldscripts variable in the buildsystem, which collects the various parts of the linker script used to link coreboot, is setup generically now.

This change must be replicated with local mainboard changes/additions. It should be enough to simply remove all ldscripts entries from src/mainboard/$(MAINBOARDDIR)/Makefile.inc.

r5167: Reorganize i82801 southbridge drivers

Applicable if: your mainboard uses the i82801xx, i82801dbm, i82801ca or i82801er driver (Intel ICH).

The drivers have been unified and split up.

  • If your mainboard has an ICH0 or ICH (ie. i810 based boards) use the i82801ax driver
  • If your mainboard has an ICH2 driver (ie. i815 based boards) use the i82801bx driver
  • If your mainboard used the i82801ca driver before use the i82801cx driver
  • If your mainboard used the i82801dbm driver before use the i82801dx driver
  • If your mainboard used the i82801er driver before use the i82801ex driver

r5168: Move generic build rules away from user servicable parts in the build system

Applicable if: local changes/additions to mainboards.

Various rules of object files that exist for every board, or that exist for every board with a given configuration option, are moved to src/arch/i386/Makefile.inc.

If your mainboard uses a custom reset.c file, which provides a hard_reset() function, you must add select BOARD_HAS_HARD_RESET to your board's Kconfig.

The following change only needs to be replicated with newly created local mainboards. It should be enough to remove the following lines from src/mainboard/$(MAINBOARDDIR)/Makefile.inc:

  • initobj-y += crt0.o
  • obj-y += mainboard.o
  • obj-$(CONFIG_GENERATE_MP_TABLE) += mptable.o
  • obj-$(CONFIG_GENERATE_PIRQ_TABLE) += irq_tables.o
  • obj-$(CONFIG_BOARD_HAS_HARD_RESET) += reset.o

Also, include some_path/Makefile.romccboard.inc must be dropped, as this file was removed. A statement to set ROMCCFLAGS must be kept. If your mainboard's Makefile is empty after these changes, or only contains comments, you can remove it completely.

r5171: Move generic build rules away from user servicable parts in the build system

Applicable if: local changes/additions to mainboards

Various rules of object files that exist for every board, or that exist for every board with a given configuration option, are moved to src/arch/i386/Makefile.inc.

If your mainboard uses a custom fadt.c file, you must add select BOARD_HAS_FADT to your board's Kconfig. Better yet, the FADTs related to that chipset should be consolidated (probably in the southbridge)

If your mainboard uses a custom get_bus_conf.c file, you must add select HAVE_BUS_CONFIG to your board's Kconfig.

The following change only needs to be replicated with newly created local mainboards. It should be enough to remove the following lines from src/mainboard/$(MAINBOARDDIR)/Makefile.inc:

  • obj-y += get_bus_conf.o
  • obj-$(CONFIG_GENERATE_ACPI_TABLES) += dsdt.o
  • obj-$(CONFIG_GENERATE_ACPI_TABLES) += acpi_tables.o
  • obj-$(CONFIG_GENERATE_ACPI_TABLES) += fadt.o

Also, include some_path/Makefile.k8_CAR.inc or include some_path/Makefile.k8_ck804.inc must be dropped, as these files were removed. If your mainboard's Makefile is empty after these changes, or only contains comments, you can remove it completely.

r5176: Automate SSDT pull-in

Applicable if: using ssdtX.asl files and ACPI_SSDTX_NUM config variable.

ACPI_SSDTX_NUM must be 4 or 5 (the only values found in the tree so far, but this could be extended), and means the highest number in ssdtX.asl in the mainboard tree (numbering starts at 2). ssdt[2..X].asl are automatically pulled in by the build system then. To adapt, please check that ACPI_SSDTX_NUM is 4 or 5, then remove the SSDT related rules in the mainboard's Makefile.

If ACPI_SSDTX_NUM should be some other value, please report to the list, so we can adapt the build system for your case.

r5259: Remove config variables related to newconfig

Applicable if: local additions to mainboards (and CPUs in some cases).

Uses of HAVE_FAILOVER_BOOT, HAVE_FALLBACK_BOOT, USE_FAILOVER_IMAGE, USE_FALLBACK_IMAGE must be removed as they were dropped from the build system and might lead to wrong behaviour.

To do this, keep the code wrapped in #if statements which evaluate to true, and remove code that the preprocessor would have left out.

r5266: Replace printk_*(...) by printk(BIOS_*, ...)

Applicable if: local additions.

printk_* calls are replaced by printk(BIOS_*, ...).

To adapt, you can use something like this (thanks go to Zheng Bao for this command):

sed -i 's/printk_\([a-z]*\)(/printk(BIOS_\U\1\E, /g' *.c

r5311: unify quadcore.h and dualcore.h to multicore.h

Applicable if: local additions to mainboards.

#include <cpu/amd/dualcore.h>

and

#include <cpu/amd/quadcore.h>

have been replaced by

#include <cpu/amd/multicore.h>

The files were often included in get_bus_conf.c and mptable.c.

r5313: drop LB_CKS_* from Kconfig

Applicable if: local additions to mainboards.

CMOS option handling does no longer keep information on where the coreboot checksums are stored twice.

LB_CKS_RANGE_START, LB_CKS_RANGE_END and LB_CKS_LOC should no longer be defined in Kconfig anymore. build_opt_tbl will do the job automatically.

In C code, all variants of CONFIG_LB_CKS_* are now called LB_CKS_* again as they're no longer config variables.

In addition, there is a new requirement for cmos.layout files now: There has to be a checksum description:

# -----------------------------------------------------------------
checksums

checksum 392 983 984

r5341: arch/i386/lib/console.c dropped

Applicable if: local additions.

If your (romstage.c) code included arch/i386/lib/console.c until now, it should include console/console.c instead.

r5511: asm.h dropped.

The #define ASSEMBLY is now passed by the Makefile for assembler files. The asm.h construct is no longer needed. Just drop asm.h includes from your code. If you use the post_code() macro, you can now include <cpu/x86/post_code.h>.

r5525: devicetree.cb: APIC rename

Applicable if: local additions to mainboards.

In devicetree.cb rename "apic" to "lapic" and "apic_cluster" to "lapic_cluster".

r5528: Remove C-includes from romstages

Applicable if: local additions to mainboards.

Replace any console/console.c #include in romstage.c with console/console.h. For CAR-boards, also remove the pc80/serial.c #include.

r5538: Remove C-includes from romstage

Applicable if: local additions to mainboards.

Remove pc80/serial.c #include in romstage.c on ROMCC-boards, too.

r5548: Remove C-includes from romstages

Applicable if: local additions to mainboards based on Fam10h.

Remove northbridge/amd/amdht/ht_wrapper.c, northbridge/amd/amdfam10/raminit_amdmct.c, cpu/amd/model_10xxx/fidvid.c, pc80/mc146818rtc_early.c from your mainboard's romstage.c.

r5647: Build mptable entries for buses from device tree

Applicable if: Board not adapted yet.

r5647 adds a new function mptable_write_buses, which acts as a replacement for all smp_write_bus calls in boards' mptable.c. So far, only kontron/986lcd-m uses it, but all boards should do so in future.

Most boards do the following for the bus entries in mptable:

  • Determine the highest PCI bus ID (either hardcoded or by reading out some known device).
  • Register PCI buses numbered 0 to highest.
  • Register ISA bus numbered highest+1.

Alternatively, some boards simply hardcode a number of calls to register each bus.

Identify that code and replace it with something like: mptable_write_buses(mc, &max_pci_bus, &isa_bus); where mc is the struct mp_config_table * used in your mptable.c. The variables max_pci_bus and isa_bus (sometimes called bus_isa) are set to the respective values by mptable_write_buses. If you don't need those variables in your board's smp_write_config_table function pass NULL instead.

r5682: Drop USE_PRINTK_IN_CAR, USE_INIT

Applicable if: local additions to mainboards.

Drop USE_PRINTK_IN_CAR in your board's </code>Kconfig</code> file, if it exists. Its functionality is automatically enabled if CAR is enabled. Drop USE_INIT. This wasn't used, so dropping it doesn't change any behavior.

r5745: Drop HAVE_HIGH_TABLES, HAVE_LOW_TABLES, FALLBACK_SIZE

Applicable if: local additions to mainboards.

These config options have no effect anymore, so simply drop them.

r5754: Rework mainboard handling in Kconfig

Applicable if: local additions to mainboards.

src/mainboard/*/*/Kconfig got seriously reworked. Basically, list your board in the applicable src/mainboard/*/Kconfig file, rename the BOARD_vendor_boardname option to BOARD_SPECIFIC_OPTIONS (or somesuch, it's a dummy), and mark its type as "def_bool y". Then guard the entire Kconfig file of your mainboard with "if BOARD_vendor_boardname" .... "endif".

See other mainboards for examples.

r5756: Rename USE_DCACHE_RAM to CACHE_AS_RAM

Applicable if: local additions to mainboards.

Rename USE_DCACHE_RAM to CACHE_AS_RAM in your board's Kconfig (if applicable).

r5779: Use standard RAMBASE on Geode LX

Applicable if: new Geode LX based boards in tree.

Drop the RAMBASE config setting it to 0x4000, so coreboot uses the default of 1MB. Eventually, RAMBASE will be dropped completely.

r5781: Drop SB600/SB700 configuration flags

Applicable if: new SB600/SB700 boards in tree.

Drop ide0_enable, sata0_enable, and hda_viddid from your board's devicetree.cb.

r5787: HEADS UP: TSC based timer might fail

Applicable if: board uses TSC based timer, and PIT2 is unusable.

r5787 changes the default time source for calibrating the TSC based routines from I/O port accesses to PIT2, to increase boot speed. Should r5787 fail on your system, and UDELAY_TSC is enabled, you can try to add select TSC_CALIBRATE_WITH_IO to your board's Kconfig. If that fixes your board, please report to coreboot@coreboot.org.

r5791+r5792: HEADS UP: Fix slow decompression on AMD Fam10 based boards

Applicable if: board uses Fam10.

Many users of Fam10 based boards disabled compression of the ramstage to massively improve boot time. Following r5792, this should not be necessary anymore.

r5800: Move DIMM_SUPPORT out of the sockets

Applicable if: new local K8/Fam10 based board.

r5800 moves the memory type determination out of the sockets as it has been shown that a single CPU socket can be used for multiple memory types. Now, boards have to define the RAM they accept in Kconfig.

To get the older behaviour back, here's a list of sockets and what must be selected in the boards to get the same configuration:

  • socket_AM2: DIMM_DDR2
  • socket_AM3: DIMM_DDR3, DIMM_REGISTERED
  • socket_AM2r2: DIMM_DDR2, DIMM_REGISTERED
  • socket_F: DIMM_DDR2, DIMM_REGISTERED
  • socket_ASB2: DIMM_DDR3, DIMM_REGISTERED
  • socket_F_1207: DIMM_DDR2, DIMM_REGISTERED

r5803: Remove kludge for reserved resources on i945

Applicable if: new local i945 based board.

Before r5803, some northbridge specific resources had to be added with a board specific handler. This is not necessary in r5803+. Remove the call to add_northbridge_resources() in add_mainboard_resources(). If this was the only action in add_mainboard_resources(), you can remove the function altogether and remove HAVE_MAINBOARD_RESOURCES in your board's Kconfig.

r5825: New method for specifying SATA phys values on AMD SB700

Applicable if: new local SB700 based board.

r5825 introduces a new API on SB700 to specify SATA phys values. The SB700 code defines some default values in src/southbridge/amd/sb700/sb700_sata.c:sb700_setup_sata_phys(). As this function is declared "weak", you can define your own function of the same name in your board's mainboard.c that writes the correct values for your board. See src/mainboard/asrock/939a785gmh/mainboard.c as an example.

r5841: HEADSUP: Building romstage with global variables will fail

Applicable if: local changes.

Starting r5841 we let the build break if global variables are found in the romstage. As they're assigned addresses in ROM space, writing them would fail. To prevent such unobvious errors, we detect that condition and the build fails with the error message "Do not use global variables in romstage". It doesn't look if those are written to, so it might fail on code that would work (and it did).

To find the global variable, use objdump -x on your object files (for romstage, they're usually suffixed with .initobj.o) to find which has a .bss or .data section with content (more than 0 bytes). The symbol table printed by objdump -x also tells you what the variable is called.

r5886: Change buildsystem to require source file names instead of object files

Applicable if: local changes or additions to the build system (particularily Makefile.inc).

Various build system variables are renamed, and their use has changed too:

  • initobjs-y is now romstage-y
  • objs-y is now ramstage-y
  • driver-y keeps the name but changes meaning
  • smmobj-y is now smm-y

All of these variables must be filled with source filenames, not object filenames as it used to be. For most scenarios, it will be sufficient to change (for example) initobjs-y += foo.o in romstage-y += foo.c.

r5891: Move configuration values from romstage.c to Kconfig

Applicable if: local changes or additions to i945 based boards.

Values were moved to Kconfig to have them available in all compilation units, not just romstage.c. In particular:

  • CHIPSET_I945GM -> CONFIG_I945GM
  • CHIPSET_I945GC -> CONFIG_I945GC
  • CHANNEL_XOR_RANDOMIZATION, OVERRIDE_CLOCK_DISABLE, MAXIMUM_SUPPORTED_FREQUENCY -> CONFIG_*

If your changes or additions use them, you'll have to adapt your changes. If you define the old variants in a romstage.c, you'll have to move them to Kconfig. See kontron/986lcd-m as a model.

r5893: Split I945 northbridge to I945GC and I945GM

Applicable if: local changes or additions to i945 based boards.

To simplify configuration, we now support two northbridges, i945GC and i945GM in the Kconfig system, instead of i945 with the GM or GC modifiers as separate attribute. The code is still shared as it's mostly the same.

To adapt boards, change NORTHBRIDGE_INTEL_I945 in Kconfig to NORTHBRIDGE_INTEL_I945GC or NORTHBRIDGE_INTEL_I945GM as appropriate and remove the I945GC or I945GM attribute (introduced in r5891).

r5898: Rename CACHE_AS_RAM_ADDRESS_DEBUG to CONFIG_DEBUG_CAR

Applicable if: local changes or additions to AMD based boards.

If you set CACHE_AS_RAM_ADDRESS_DEBUG in your romstage.c to get verbose output in CAR setup, you now have to select DEBUG_CAR in Kconfig instead.

r5910: Move out .c includes from i945 (and some other boards)

Applicable if: local changes or additions to CAR boards.

Instead of including sources in romstage.c, they're now compiled as separate units. r5910 does this for i945 based boards and on all CAR boards for src/lib/ramtest.c. To adapt, remove the corresponding includes from your romstage.c. You might have to include header files instead, as replacement to ramtest.c lib.h is a likely candidate.

r5911: Move out usbdebug .c includes from CAR boards

Applicable if: local changes or additions to CAR boards.

If your board supports the USB debug port, you will have to remove the related source include statements (two: one for the chipset, one for the generic code) and include usbdebug.h instead.

r6149/r6150: Drop duplicate prefixing from component filenames

Applicable if: adding any new components.

coreboot used to call its filenames src/southbridge/intel/i82801gx/i82801gx_lpc.c. This convention has been dropped and the component name is not supposed to be part of the file name anymore, as it is sufficiently described by the location of the file. Please drop the component prefix from filenames for all new components.

r6161: Rename src/arch/i386 to src/arch/x86

Applicable if: you have local changes in src/arch/i386.

If you have local changes in src/arch/i386, please make sure to apply them to src/arch/x86 instead.

r6513: Don't call usb debug console init from romstage.c

Applicable if: adding any new southbridges or mainboards.

USB debug console initialization has been moved to generic code. Drop any initialization calls from your romstage.c. Also, the init code in the southbridge drivers has been renamed to avoid massive preprocessor mangling in generic console init code.

i.e. from

sb800_enable_usbdebug(); 

to

enable_usbdebug();

Please follow this principle when adding new south bridges with USBDEBUG support.

r6521: Don't initialize the UARTs' baud rate in SuperI/O drivers

Applicable if: adding any new SuperI/O drivers and/or mainboards.

init_uart8250() has been removed completely to drop some of the many uart initialization functions. Also, SuperI/O drivers don't provide com1/com2 in their config structures anymore. Be sure to remove references in your devicetree.cb, too, if needed. Just remove the code, it never served a purpose.

r6530: Don't call uart_init() from romstage.c anymore

Applicable if: you have a new, uncommitted mainboard.

Remove the call to uart_init() in romstage.c. It is no longer needed. Instead, console_init() takes care of that for you if you have serial console support enabled in Kconfig.