coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ramdetect.c File Reference
#include <types.h>
#include <symbols.h>
#include <device/mmio.h>
#include <ramdetect.h>
#include <console/console.h>
Include dependency graph for ramdetect.c:

Go to the source code of this file.

Macros

#define OVERLAP(a, b, s, e)   ((b) > (s) && (a) < (e))
 
#define MAX_ADDRESSABLE_SPACE   (sizeof(size_t) * 8 - 20 - 1)
 

Functions

int __weak probe_mb (const uintptr_t dram_start, const uintptr_t size)
 
size_t probe_ramsize (const uintptr_t dram_start, const size_t probe_size)
 

Macro Definition Documentation

◆ MAX_ADDRESSABLE_SPACE

#define MAX_ADDRESSABLE_SPACE   (sizeof(size_t) * 8 - 20 - 1)

Definition at line 37 of file ramdetect.c.

◆ OVERLAP

#define OVERLAP (   a,
  b,
  s,
 
)    ((b) > (s) && (a) < (e))

Definition at line 9 of file ramdetect.c.

Function Documentation

◆ probe_mb()

int __weak probe_mb ( const uintptr_t  dram_start,
const uintptr_t  size 
)

Definition at line 11 of file ramdetect.c.

References addr, ARRAY_SIZE, MiB, OVERLAP, read32(), and write32().

Here is the call graph for this function:

◆ probe_ramsize()

size_t probe_ramsize ( const uintptr_t  dram_start,
const size_t  probe_size 
)

Definition at line 40 of file ramdetect.c.

References BIOS_DEBUG, MAX_ADDRESSABLE_SPACE, MIN, printk, and probe_mb().

Referenced by cbmem_top_chipset(), and mainboard_enable().

Here is the call graph for this function:
Here is the caller graph for this function: