Difference between revisions of "Creating A devicetree.cb"

From coreboot
Jump to: navigation, search
(Keywords)
(Grammar)
Line 25: Line 25:
 
== Grammar ==
 
== Grammar ==
  
..
+
=== Literals ===
 +
Literal values types are defined and thus consumed by the following regular expressions:
 +
 
 +
* Hex
 +
<source lang="reg">
 +
0x[0-9a-fA-F.]+
 +
</source>
 +
 
 +
* Decimals
 +
<source lang="reg">
 +
[0-9.]+
 +
</source>
 +
 
 +
* PCI Interrupts
 +
<source lang="reg">
 +
INT[A-D]
 +
</source>
 +
 
 +
* Strings
 +
<source lang="reg">
 +
\"[^\"]+\"
 +
</source>
 +
<source lang="reg">
 +
[^ \n\t]+
 +
<source>
  
 
== Examples ==
 
== Examples ==

Revision as of 10:58, 18 February 2014

This article should help people who are writting a devicetree.cb for their system.

What you will need

  • lspci -nvvv output

Introduction

The mainboard's devicetree.cb file contains many build and platform configuration settings. One of the most important items is the mainboard device list.

A device needs to be listed in the mainboard devicetree.cb if it requires more setup than standard PCI initialization (resource allocation). Typically, that includes the CPU, northbridge, southbridge, and Super I/O. These devices are usually required for system specific configuration as well as indicate the system bus structure (pci_domain).

When a device in devicetree.cb is found during the coreboot PCI/system scan process the functions to do customized initialization are called via the device_operations and the chip_operations structures. You will find these structures in the devices source files.

Keywords & Symbols

chip, device, register,on,off,pci,ioapic,pnp,i2c,lapic,cpu_cluster,domain,irq,drq,io,ioapic_irq,inherit,subsystemid,end,=

Syntax

..

Grammar

Literals

Literal values types are defined and thus consumed by the following regular expressions:

  • Hex
0x[0-9a-fA-F.]+
  • Decimals
[0-9.]+
  • PCI Interrupts
INT[A-D]
  • Strings
\"[^\"]+\"

<source lang="reg"> [^ \n\t]+ <source>

Examples

NorthBridge

..

Super I/O

Creative Commons License
Creative Commons Attribution icon
This file is licensed under Creative Commons Attribution 2.5 License.
In short: you are free to distribute and modify the file as long as you attribute its author(s) or licensor(s).