![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/encoding.h>
#include <stdint.h>
#include <arch/pmp.h>
#include <console/console.h>
#include <commonlib/helpers.h>
Go to the source code of this file.
Data Structures | |
struct | pmpcfg_t |
Macros | |
#define | GRANULE (1 << PMP_SHIFT) |
Functions | |
static uintptr_t | read_pmpcfg (int idx) |
static void | write_pmpcfg (int idx, uintptr_t cfg) |
static uintptr_t | read_pmpaddr (int idx) |
static void | write_pmpaddr (int idx, uintptr_t val) |
static pmpcfg_t | generate_pmp_napot (uintptr_t base, uintptr_t size, uintptr_t flags) |
static pmpcfg_t | generate_pmp_range (uintptr_t base, uintptr_t size, uintptr_t flags) |
static pmpcfg_t | generate_pmp (uintptr_t base, uintptr_t size, uintptr_t flags) |
static int | find_empty_pmp_entry (int is_range) |
static void | mask_pmp_entry_used (int idx) |
void | reset_pmp (void) |
void | setup_pmp (uintptr_t base, uintptr_t size, uintptr_t flags) |
Variables | |
static uintptr_t | pmp_entry_used_mask |
|
static |
Definition at line 247 of file pmp.c.
References die(), pmp_entries_num(), and pmp_entry_used_mask.
Referenced by setup_pmp().
Definition at line 234 of file pmp.c.
References base, generate_pmp_napot(), generate_pmp_range(), and IS_POWER_OF_2.
Referenced by setup_pmp().
Definition at line 210 of file pmp.c.
References pmpcfg_t::address, base, pmpcfg_t::cfg, GRANULE, PMP_L, PMP_NA4, PMP_NAPOT, PMP_R, PMP_SHIFT, PMP_W, PMP_X, and pmpcfg_t::previous_address.
Referenced by generate_pmp().
Definition at line 222 of file pmp.c.
References pmpcfg_t::address, base, pmpcfg_t::cfg, PMP_L, PMP_R, PMP_SHIFT, PMP_TOR, PMP_W, PMP_X, and pmpcfg_t::previous_address.
Referenced by generate_pmp().
|
static |
Definition at line 272 of file pmp.c.
References pmp_entry_used_mask.
Referenced by setup_pmp().
|
static |
Definition at line 113 of file pmp.c.
Referenced by write_pmpaddr().
|
static |
Definition at line 32 of file pmp.c.
Referenced by reset_pmp(), and write_pmpcfg().
Definition at line 278 of file pmp.c.
References die(), pmp_entries_num(), PMP_L, read_pmpcfg(), write_pmpaddr(), and write_pmpcfg().
Definition at line 290 of file pmp.c.
References pmpcfg_t::address, base, pmpcfg_t::cfg, find_empty_pmp_entry(), generate_pmp(), mask_pmp_entry_used(), PMP_A, PMP_TOR, pmpcfg_t::previous_address, write_pmpaddr(), and write_pmpcfg().
Definition at line 153 of file pmp.c.
References die(), read_pmpaddr(), and val.
Referenced by reset_pmp(), and setup_pmp().
Definition at line 59 of file pmp.c.
References die(), and read_pmpcfg().
Referenced by reset_pmp(), and setup_pmp().
|
static |
Definition at line 29 of file pmp.c.
Referenced by find_empty_pmp_entry(), and mask_pmp_entry_used().