coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
northbridge.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
5 #include <acpi/acpi.h>
6 #include <device/pci_ops.h>
7 #include <stdint.h>
8 #include <delay.h>
9 #include <device/device.h>
10 #include <device/pci.h>
11 #include <device/pci_ids.h>
12 #include <soc/acpi.h>
13 #include <soc/iomap.h>
14 #include <soc/pci_devs.h>
15 #include <soc/refcode.h>
16 #include <soc/systemagent.h>
17 
19 {
20  struct device *sa_dev = pcidev_path_on_root(SA_DEVFN_ROOT);
21  return pci_read_config8(sa_dev, PCI_REVISION_ID);
22 }
23 
24 static int get_pcie_bar(struct device *dev, unsigned int index, u32 *base,
25  u32 *len)
26 {
27  u32 pciexbar_reg;
28 
29  *base = 0;
30  *len = 0;
31 
32  pciexbar_reg = pci_read_config32(dev, index);
33 
34  if (!(pciexbar_reg & (1 << 0)))
35  return 0;
36 
37  switch ((pciexbar_reg >> 1) & 3) {
38  case 0: // 256MB
39  *base = pciexbar_reg & ((1 << 31)|(1 << 30)|(1 << 29)|
40  (1 << 28));
41  *len = 256 * 1024 * 1024;
42  return 1;
43  case 1: // 128M
44  *base = pciexbar_reg & ((1 << 31)|(1 << 30)|(1 << 29)|
45  (1 << 28)|(1 << 27));
46  *len = 128 * 1024 * 1024;
47  return 1;
48  case 2: // 64M
49  *base = pciexbar_reg & ((1 << 31)|(1 << 30)|(1 << 29)|
50  (1 << 28)|(1 << 27)|(1 << 26));
51  *len = 64 * 1024 * 1024;
52  return 1;
53  }
54 
55  return 0;
56 }
57 
58 static int get_bar(struct device *dev, unsigned int index, u32 *base, u32 *len)
59 {
60  u32 bar;
61 
62  bar = pci_read_config32(dev, index);
63 
64  /* If not enabled don't report it. */
65  if (!(bar & 0x1))
66  return 0;
67 
68  /* Knock down the enable bit. */
69  *base = bar & ~1;
70 
71  return 1;
72 }
73 
74 /* There are special BARs that actually are programmed in the MCHBAR. These
75  * Intel special features, but they do consume resources that need to be
76  * accounted for. */
77 static int get_bar_in_mchbar(struct device *dev, unsigned int index, u32 *base,
78  u32 *len)
79 {
80  u32 bar;
81 
82  bar = mchbar_read32(index);
83 
84  /* If not enabled don't report it. */
85  if (!(bar & 0x1))
86  return 0;
87 
88  /* Knock down the enable bit. */
89  *base = bar & ~1;
90 
91  return 1;
92 }
93 
94 struct fixed_mmio_descriptor {
95  unsigned int index;
96  u32 size;
97  int (*get_resource)(struct device *dev, unsigned int index,
98  u32 *base, u32 *size);
99  const char *description;
100 };
101 
103  { PCIEXBAR, 0, get_pcie_bar, "PCIEXBAR" },
104  { MCHBAR, MCH_BASE_SIZE, get_bar, "MCHBAR" },
105  { DMIBAR, DMI_BASE_SIZE, get_bar, "DMIBAR" },
106  { EPBAR, EP_BASE_SIZE, get_bar, "EPBAR" },
107  { GDXCBAR, GDXC_BASE_SIZE, get_bar_in_mchbar, "GDXCBAR" },
108  { EDRAMBAR, EDRAM_BASE_SIZE, get_bar_in_mchbar, "EDRAMBAR" },
109 };
110 
111 /*
112  * Add all known fixed MMIO ranges that hang off the host bridge/memory
113  * controller device.
114  */
115 static void mc_add_fixed_mmio_resources(struct device *dev)
116 {
117  int i;
118 
119  for (i = 0; i < ARRAY_SIZE(mc_fixed_resources); i++) {
120  u32 base;
121  u32 size;
122  struct resource *resource;
123  unsigned int index;
124 
127  if (!mc_fixed_resources[i].get_resource(dev, index,
128  &base, &size))
129  continue;
130 
135  resource->base = base;
136  resource->size = size;
137  printk(BIOS_DEBUG, "%s: Adding %s @ %x 0x%08lx-0x%08lx.\n",
138  __func__, mc_fixed_resources[i].description, index,
139  (unsigned long)base, (unsigned long)(base + size - 1));
140  }
141 }
142 
143 /* Host Memory Map:
144  *
145  * +--------------------------+ TOUUD
146  * | |
147  * +--------------------------+ 4GiB
148  * | PCI Address Space |
149  * +--------------------------+ TOLUD (also maps into MC address space)
150  * | iGD |
151  * +--------------------------+ BDSM
152  * | GTT |
153  * +--------------------------+ BGSM
154  * | TSEG |
155  * +--------------------------+ TSEGMB
156  * | Usage DRAM |
157  * +--------------------------+ 0
158  *
159  * Some of the base registers above can be equal making the size of those
160  * regions 0. The reason is because the memory controller internally subtracts
161  * the base registers from each other to determine sizes of the regions. In
162  * other words, the memory map is in a fixed order no matter what.
163  */
164 
165 struct map_entry {
166  int reg;
167  int is_64_bit;
168  int is_limit;
169  const char *description;
170 };
171 
172 static void read_map_entry(struct device *dev, struct map_entry *entry,
173  uint64_t *result)
174 {
175  uint64_t value;
176  uint64_t mask;
177 
178  /* All registers are on a 1MiB granularity. */
179  mask = ((1ULL<<20)-1);
180  mask = ~mask;
181 
182  value = 0;
183 
184  if (entry->is_64_bit) {
185  value = pci_read_config32(dev, entry->reg + 4);
186  value <<= 32;
187  }
188 
189  value |= pci_read_config32(dev, entry->reg);
190  value &= mask;
191 
192  if (entry->is_limit)
193  value |= ~mask;
194 
195  *result = value;
196 }
197 
198 #define MAP_ENTRY(reg_, is_64_, is_limit_, desc_) \
199  { \
200  .reg = reg_, \
201  .is_64_bit = is_64_, \
202  .is_limit = is_limit_, \
203  .description = desc_, \
204  }
205 
206 #define MAP_ENTRY_BASE_64(reg_, desc_) \
207  MAP_ENTRY(reg_, 1, 0, desc_)
208 #define MAP_ENTRY_LIMIT_64(reg_, desc_) \
209  MAP_ENTRY(reg_, 1, 1, desc_)
210 #define MAP_ENTRY_BASE_32(reg_, desc_) \
211  MAP_ENTRY(reg_, 0, 0, desc_)
212 
213 enum {
224  // Must be last.
226 };
227 
228 static struct map_entry memory_map[NUM_MAP_ENTRIES] = {
229  [TOM_REG] = MAP_ENTRY_BASE_64(TOM, "TOM"),
230  [TOUUD_REG] = MAP_ENTRY_BASE_64(TOUUD, "TOUUD"),
231  [MESEG_BASE_REG] = MAP_ENTRY_BASE_64(MESEG_BASE, "MESEG_BASE"),
232  [MESEG_LIMIT_REG] = MAP_ENTRY_LIMIT_64(MESEG_LIMIT, "MESEG_LIMIT"),
233  [REMAP_BASE_REG] = MAP_ENTRY_BASE_64(REMAPBASE, "REMAP_BASE"),
234  [REMAP_LIMIT_REG] = MAP_ENTRY_LIMIT_64(REMAPLIMIT, "REMAP_LIMIT"),
235  [TOLUD_REG] = MAP_ENTRY_BASE_32(TOLUD, "TOLUD"),
236  [BDSM_REG] = MAP_ENTRY_BASE_32(BDSM, "BDSM"),
237  [BGSM_REG] = MAP_ENTRY_BASE_32(BGSM, "BGSM"),
238  [TSEG_REG] = MAP_ENTRY_BASE_32(TSEG, "TSEGMB"),
239 };
240 
241 static void mc_read_map_entries(struct device *dev, uint64_t *values)
242 {
243  int i;
244  for (i = 0; i < NUM_MAP_ENTRIES; i++)
245  read_map_entry(dev, &memory_map[i], &values[i]);
246 }
247 
248 static void mc_report_map_entries(struct device *dev, uint64_t *values)
249 {
250  int i;
251  for (i = 0; i < NUM_MAP_ENTRIES; i++) {
252  printk(BIOS_DEBUG, "MC MAP: %s: 0x%llx\n",
253  memory_map[i].description, values[i]);
254  }
255  /* One can validate the BDSM and BGSM against the GGC. */
256  printk(BIOS_DEBUG, "MC MAP: GGC: 0x%x\n", pci_read_config16(dev, GGC));
257 }
258 
259 static void mc_add_dram_resources(struct device *dev, int *resource_cnt)
260 {
261  unsigned long base_k, size_k;
262  unsigned long touud_k;
263  unsigned long index;
264  struct resource *resource;
265  uint64_t mc_values[NUM_MAP_ENTRIES];
266  unsigned long dpr_size = 0;
267  u32 dpr_reg;
268 
269  /* Read in the MAP registers and report their values. */
270  mc_read_map_entries(dev, &mc_values[0]);
271  mc_report_map_entries(dev, &mc_values[0]);
272 
273  /*
274  * DMA Protected Range can be reserved below TSEG for PCODE patch
275  * or TXT/Boot Guard related data. Rather than report a base address
276  * the DPR register reports the TOP of the region, which is the same
277  * as TSEG base. The region size is reported in MiB in bits 11:4.
278  */
279  dpr_reg = pci_read_config32(dev, DPR);
280  if (dpr_reg & DPR_EPM) {
281  dpr_size = (dpr_reg & DPR_SIZE_MASK) << 16;
282  printk(BIOS_INFO, "DPR SIZE: 0x%lx\n", dpr_size);
283  }
284 
285  /*
286  * These are the host memory ranges that should be added:
287  * - 0 -> 0xa0000: cacheable
288  * - 0xc0000 -> TSEG : cacheable
289  * - TESG -> BGSM: cacheable with standard MTRRs and reserved
290  * - BGSM -> TOLUD: not cacheable with standard MTRRs and reserved
291  * - 4GiB -> TOUUD: cacheable
292  *
293  * The default SMRAM space is reserved so that the range doesn't
294  * have to be saved during S3 Resume. Once marked reserved the OS
295  * cannot use the memory. This is a bit of an odd place to reserve
296  * the region, but the CPU devices don't have dev_ops->read_resources()
297  * called on them.
298  *
299  * The range 0xa0000 -> 0xc0000 does not have any resources
300  * associated with it to handle legacy VGA memory. If this range
301  * is not omitted the mtrr code will setup the area as cacheable
302  * causing VGA access to not work.
303  *
304  * The TSEG region is mapped as cacheable so that one can perform
305  * SMRAM relocation faster. Once the SMRR is enabled the SMRR takes
306  * precedence over the existing MTRRs covering this region.
307  *
308  * It should be noted that cacheable entry types need to be added in
309  * order. The reason is that the current MTRR code assumes this and
310  * falls over itself if it isn't.
311  *
312  * The resource index starts low and should not meet or exceed
313  * PCI_BASE_ADDRESS_0.
314  */
315  index = *resource_cnt;
316 
317  /* 0 - > 0xa0000 */
318  base_k = 0;
319  size_k = (0xa0000 >> 10) - base_k;
320  ram_resource(dev, index++, base_k, size_k);
321 
322  /* 0xc0000 -> TSEG - DPR */
323  base_k = 0xc0000 >> 10;
324  size_k = (unsigned long)(mc_values[TSEG_REG] >> 10) - base_k;
325  size_k -= dpr_size >> 10;
326  ram_resource(dev, index++, base_k, size_k);
327 
328  /* TSEG - DPR -> BGSM */
329  resource = new_resource(dev, index++);
330  resource->base = mc_values[TSEG_REG] - dpr_size;
331  resource->size = mc_values[BGSM_REG] - resource->base;
335 
336  /* BGSM -> TOLUD */
337  resource = new_resource(dev, index++);
338  resource->base = mc_values[BGSM_REG];
339  resource->size = mc_values[TOLUD_REG] - resource->base;
343 
344  /* 4GiB -> TOUUD */
345  base_k = 4096 * 1024; /* 4GiB */
346  touud_k = mc_values[TOUUD_REG] >> 10;
347  size_k = touud_k - base_k;
348  if (touud_k > base_k)
349  ram_resource(dev, index++, base_k, size_k);
350 
351  /* Reserve everything between A segment and 1MB:
352  *
353  * 0xa0000 - 0xbffff: legacy VGA
354  * 0xc0000 - 0xfffff: RAM
355  */
356  mmio_resource(dev, index++, (0xa0000 >> 10), (0xc0000 - 0xa0000) >> 10);
357  reserved_ram_resource(dev, index++, (0xc0000 >> 10),
358  (0x100000 - 0xc0000) >> 10);
359 
360  *resource_cnt = index;
361 }
362 
363 static void systemagent_read_resources(struct device *dev)
364 {
365  int index = 0;
366  const bool vtd_capable =
368 
369  /* Read standard PCI resources. */
371 
372  /* Add all fixed MMIO resources. */
374 
375  /* Add VT-d MMIO resources if capable */
376  if (vtd_capable) {
378  GFXVT_BASE_SIZE / KiB);
380  VTVC0_BASE_SIZE / KiB);
381  }
382 
383  /* Calculate and add DRAM resources. */
385 }
386 
387 static void systemagent_init(struct device *dev)
388 {
389  /* Enable Power Aware Interrupt Routing. */
390  mchbar_clrsetbits8(MCH_PAIR, 0x7, 0x4); /* Clear 2:0, set Fixed Priority */
391 
392  /*
393  * Set bits 0+1 of BIOS_RESET_CPL to indicate to the CPU
394  * that BIOS has initialized memory and power management
395  */
397  printk(BIOS_DEBUG, "Set BIOS_RESET_CPL\n");
398 
399  /* Configure turbo power limits 1ms after reset complete bit */
400  mdelay(1);
401  set_power_limits(28);
402 }
403 
404 static struct device_operations systemagent_ops = {
406  .acpi_fill_ssdt = generate_cpu_entries,
407  .set_resources = pci_dev_set_resources,
408  .enable_resources = pci_dev_enable_resources,
409  .init = systemagent_init,
410  .ops_pci = &pci_dev_ops_pci,
411 };
412 
413 static const unsigned short systemagent_ids[] = {
414  0x0a04, /* Haswell ULT */
415  0x1604, /* Broadwell-U/Y */
416  0x1610, /* Broadwell-H Desktop */
417  0x1614, /* Broadwell-H Mobile */
418  0
419 };
420 
421 static const struct pci_driver systemagent_driver __pci_driver = {
422  .ops = &systemagent_ops,
423  .vendor = PCI_VID_INTEL,
424  .devices = systemagent_ids
425 };
426 
427 static struct device_operations pci_domain_ops = {
429  .set_resources = &pci_domain_set_resources,
430  .scan_bus = &pci_domain_scan_bus,
431 #if CONFIG(HAVE_ACPI_TABLES)
432  .write_acpi_tables = &northbridge_write_acpi_tables,
433 #endif
434 };
435 
436 static struct device_operations cpu_bus_ops = {
438  .set_resources = noop_set_resources,
439  .init = mp_cpu_bus_init,
440 };
441 
442 static void broadwell_enable(struct device *dev)
443 {
444  /* Set the operations if it is a special bus type */
445  if (dev->path.type == DEVICE_PATH_DOMAIN) {
446  dev->ops = &pci_domain_ops;
447  } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
448  dev->ops = &cpu_bus_ops;
449  }
450 }
451 
452 static void broadwell_init_pre_device(void *chip_info)
453 {
455 }
456 
458  CHIP_NAME("Intel Broadwell")
459  .enable_dev = &broadwell_enable,
460  .init = &broadwell_init_pre_device,
461 };
pte_t value
Definition: mmu.c:91
#define MCH_PAIR
Definition: systemagent.h:98
void broadwell_run_reference_code(void)
Definition: refcode.c:42
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define KiB
Definition: helpers.h:75
#define printk(level,...)
Definition: stdlib.h:16
void generate_cpu_entries(const struct device *device)
Definition: acpi.c:334
void set_power_limits(u8 power_limit_1_time)
Definition: haswell_init.c:313
void mdelay(unsigned int msecs)
Definition: delay.c:2
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
Definition: device_const.c:255
struct resource * new_resource(struct device *dev, unsigned int index)
See if a resource structure already exists for a given index and if not allocate one.
Definition: device_util.c:346
#define REMAPLIMIT
Definition: e7505.h:36
#define REMAPBASE
Definition: e7505.h:35
static __always_inline void mchbar_clrsetbits8(uintptr_t offset, uint8_t clear, uint8_t set)
Definition: fixed_bars.h:41
#define mchbar_setbits8(addr, set)
Definition: fixed_bars.h:56
static __always_inline uint32_t mchbar_read32(const uintptr_t offset)
Definition: fixed_bars.h:21
#define GGC
Definition: host_bridge.h:9
#define MESEG_LIMIT
Definition: host_bridge.h:36
#define CAPID0_A
Definition: host_bridge.h:65
#define MCHBAR
Definition: host_bridge.h:7
#define TOLUD
Definition: host_bridge.h:61
#define MESEG_BASE
Definition: host_bridge.h:35
#define PCIEXBAR
Definition: host_bridge.h:32
#define DPR_SIZE_MASK
Definition: host_bridge.h:30
#define TOUUD
Definition: host_bridge.h:57
#define VTD_DISABLE
Definition: host_bridge.h:67
#define TSEG
Definition: host_bridge.h:60
#define BDSM
Definition: host_bridge.h:58
#define DMIBAR
Definition: host_bridge.h:33
#define EPBAR
Definition: host_bridge.h:6
#define DPR_EPM
Definition: host_bridge.h:28
#define TOM
Definition: host_bridge.h:56
#define DPR
Definition: host_bridge.h:27
#define BGSM
Definition: host_bridge.h:59
#define EDRAMBAR
Definition: mchbar.h:19
#define GDXCBAR
Definition: mchbar.h:22
#define BIOS_RESET_CPL
Definition: mchbar.h:62
#define CHIP_NAME(X)
Definition: device.h:32
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static void mp_cpu_bus_init(struct device *dev)
Definition: device.h:240
#define ram_resource(dev, idx, basek, sizek)
Definition: device.h:321
#define mmio_resource(dev, idx, basek, sizek)
Definition: device.h:334
#define reserved_ram_resource(dev, idx, basek, sizek)
Definition: device.h:324
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
Definition: pci_ops.h:52
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
Definition: pci_ops.h:58
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
Definition: pci_ops.h:46
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
unsigned long northbridge_write_acpi_tables(struct device *device, unsigned long start)
result
Definition: mrc_cache.c:35
#define GFXVT_BASE_ADDRESS
Definition: memmap.h:18
#define DMI_BASE_SIZE
Definition: memmap.h:8
#define EP_BASE_SIZE
Definition: memmap.h:10
#define GDXC_BASE_SIZE
Definition: memmap.h:16
#define GFXVT_BASE_SIZE
Definition: memmap.h:19
#define VTVC0_BASE_ADDRESS
Definition: memmap.h:21
#define MCH_BASE_SIZE
Definition: memmap.h:6
#define VTVC0_BASE_SIZE
Definition: memmap.h:22
#define EDRAM_BASE_SIZE
Definition: memmap.h:13
@ TOM_REG
Definition: northbridge.c:192
@ TSEG_REG
Definition: northbridge.c:201
@ BDSM_REG
Definition: northbridge.c:200
@ BGSM_REG
Definition: northbridge.c:199
@ MESEG_LIMIT_REG
Definition: northbridge.c:195
@ TOUUD_REG
Definition: northbridge.c:193
@ NUM_MAP_ENTRIES
Definition: northbridge.c:203
@ MESEG_BASE_REG
Definition: northbridge.c:194
@ REMAP_BASE_REG
Definition: northbridge.c:196
@ TOLUD_REG
Definition: northbridge.c:198
@ REMAP_LIMIT_REG
Definition: northbridge.c:197
struct fixed_mmio_descriptor mc_fixed_resources[]
Definition: northbridge.c:84
@ DEVICE_PATH_CPU_CLUSTER
Definition: path.h:14
@ DEVICE_PATH_DOMAIN
Definition: path.h:13
#define PCI_REVISION_ID
Definition: pci_def.h:41
void pci_domain_read_resources(struct device *dev)
Definition: pci_device.c:547
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_domain_set_resources(struct device *dev)
Definition: pci_device.c:564
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
void pci_domain_scan_bus(struct device *dev)
Scan a PCI domain.
Definition: pci_device.c:1610
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
#define IORESOURCE_RESERVE
Definition: resource.h:30
#define IORESOURCE_MEM
Definition: resource.h:10
#define IORESOURCE_CACHEABLE
Definition: resource.h:19
#define IORESOURCE_STORED
Definition: resource.h:32
#define IORESOURCE_ASSIGNED
Definition: resource.h:34
#define IORESOURCE_FIXED
Definition: resource.h:36
uintptr_t base
Definition: uart.c:17
#define SA_DEVFN_ROOT
Definition: pci_devs.h:23
static struct map_entry memory_map[NUM_MAP_ENTRIES]
Definition: northbridge.c:228
static void systemagent_init(struct device *dev)
Definition: northbridge.c:387
u8 systemagent_revision(void)
Definition: northbridge.c:18
static struct device_operations cpu_bus_ops
Definition: northbridge.c:436
static struct device_operations systemagent_ops
Definition: northbridge.c:404
static int get_bar_in_mchbar(struct device *dev, unsigned int index, u32 *base, u32 *len)
Definition: northbridge.c:77
static const struct pci_driver systemagent_driver __pci_driver
Definition: northbridge.c:421
#define MAP_ENTRY_LIMIT_64(reg_, desc_)
Definition: northbridge.c:208
struct chip_operations soc_intel_broadwell_ops
Definition: northbridge.c:457
static struct device_operations pci_domain_ops
Definition: northbridge.c:427
static void mc_report_map_entries(struct device *dev, uint64_t *values)
Definition: northbridge.c:248
static void broadwell_init_pre_device(void *chip_info)
Definition: northbridge.c:452
static void mc_add_fixed_mmio_resources(struct device *dev)
Definition: northbridge.c:115
#define MAP_ENTRY_BASE_64(reg_, desc_)
Definition: northbridge.c:206
static void mc_read_map_entries(struct device *dev, uint64_t *values)
Definition: northbridge.c:241
static void broadwell_enable(struct device *dev)
Definition: northbridge.c:442
#define MAP_ENTRY_BASE_32(reg_, desc_)
Definition: northbridge.c:210
static void read_map_entry(struct device *dev, struct map_entry *entry, uint64_t *result)
Definition: northbridge.c:172
static int get_pcie_bar(struct device *dev, unsigned int index, u32 *base, u32 *len)
Definition: northbridge.c:24
static void systemagent_read_resources(struct device *dev)
Definition: northbridge.c:363
static int get_bar(struct device *dev, unsigned int index, u32 *base, u32 *len)
Definition: northbridge.c:58
static const unsigned short systemagent_ids[]
Definition: northbridge.c:413
static void mc_add_dram_resources(struct device *dev, int *resource_cnt)
Definition: northbridge.c:259
static const int mask[4]
Definition: gpio.c:308
uint32_t u32
Definition: stdint.h:51
unsigned long long uint64_t
Definition: stdint.h:17
uint8_t u8
Definition: stdint.h:45
void(* read_resources)(struct device *dev)
Definition: device.h:39
enum device_path_type type
Definition: path.h:114
Definition: device.h:107
struct device_path path
Definition: device.h:115
struct device_operations * ops
Definition: device.h:143
const char * description
Definition: northbridge.c:81
int(* get_resource)(struct device *dev, unsigned int index, u32 *base, u32 *size)
Definition: northbridge.c:80
unsigned int index
Definition: northbridge.c:78
Definition: northbridge.c:147
int is_64_bit
Definition: northbridge.c:149
const char * description
Definition: northbridge.c:151
int reg
Definition: northbridge.c:148
int is_limit
Definition: northbridge.c:150
unsigned long flags
Definition: resource.h:49
resource_t base
Definition: resource.h:45
unsigned long index
Definition: resource.h:50
resource_t size
Definition: resource.h:46