coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
apusys_devapc.c File Reference
#include <console/console.h>
#include <soc/apusys_devapc.h>
#include <soc/devapc.h>
#include <soc/devapc_common.h>
Include dependency graph for apusys_devapc.c:

Go to the source code of this file.

Macros

#define DAPC_APU_AO_SYS0_ATTR(...)
 
#define DAPC_APU_NOC_AO_SYS0_ATTR(...)
 

Functions

 _Static_assert (ARRAY_SIZE(apusys_noc_dapc)==APUSYS_NOC_DAPC_AO_SLAVE_NUM, "Wrong size on apusys_noc_dapc")
 
 _Static_assert (ARRAY_SIZE(apusys_ao_apc)==APUSYS_APC_SYS0_AO_SLAVE_NUM, "Wrong size on apusys_ao_apc")
 
static int set_slave_noc_dapc (u32 slave, enum domain_id domain_id, enum devapc_perm_type perm)
 
static void dump_apusys_noc_dapc (void)
 
static int set_slave_apc (u32 slave, enum domain_id domain_id, enum devapc_perm_type perm)
 
static void dump_apusys_ao_apc (void)
 
static int set_apusys_noc_dapc (void)
 
static int32_t set_apusys_ao_apc (void)
 
void start_apusys_devapc (void)
 

Variables

static enum domain_id domain_map []
 
static const struct apc_apu_dom_16 apusys_noc_dapc []
 
static const struct apc_apu_dom_16 apusys_ao_apc []
 

Macro Definition Documentation

◆ DAPC_APU_AO_SYS0_ATTR

#define DAPC_APU_AO_SYS0_ATTR (   ...)
Value:
{ \
{ \
DAPC_PERM_ATTR_16(__VA_ARGS__) \
} \
}

Definition at line 13 of file apusys_devapc.c.

◆ DAPC_APU_NOC_AO_SYS0_ATTR

#define DAPC_APU_NOC_AO_SYS0_ATTR (   ...)
Value:
{ \
{ \
DAPC_PERM_ATTR_16(__VA_ARGS__) \
} \
}

Definition at line 19 of file apusys_devapc.c.

Function Documentation

◆ _Static_assert() [1/2]

_Static_assert ( ARRAY_SIZE(apusys_ao_apc = =APUSYS_APC_SYS0_AO_SLAVE_NUM,
"Wrong size on apusys_ao_apc  
)

◆ _Static_assert() [2/2]

_Static_assert ( ARRAY_SIZE(apusys_noc_dapc = =APUSYS_NOC_DAPC_AO_SLAVE_NUM,
"Wrong size on apusys_noc_dapc  
)

◆ dump_apusys_ao_apc()

static void dump_apusys_ao_apc ( void  )
static

Definition at line 216 of file apusys_devapc.c.

References apusys_ao_apc, APUSYS_APC_AO_BASE, APUSYS_APC_CON, APUSYS_APC_SYS0_AO_DOM_NUM, APUSYS_APC_SYS0_AO_SLAVE_NUM_IN_1_DOM, ARRAY_SIZE, BIOS_DEBUG, DIV_ROUND_UP, printk, and read32().

Referenced by start_apusys_devapc().

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

◆ dump_apusys_noc_dapc()

static void dump_apusys_noc_dapc ( void  )
static

Definition at line 175 of file apusys_devapc.c.

References apusys_noc_dapc, APUSYS_NOC_DAPC_AO_BASE, APUSYS_NOC_DAPC_AO_DOM_NUM, APUSYS_NOC_DAPC_AO_SLAVE_NUM_IN_1_DOM, APUSYS_NOC_DAPC_CON, ARRAY_SIZE, BIOS_DEBUG, DIV_ROUND_UP, printk, and read32().

Referenced by start_apusys_devapc().

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

◆ set_apusys_ao_apc()

static int32_t set_apusys_ao_apc ( void  )
static

Definition at line 247 of file apusys_devapc.c.

References apusys_ao_apc, APUSYS_APC_OK, ARRAY_SIZE, BIOS_ERR, apc_apu_dom_16::d_permission, domain_map, printk, and set_slave_apc().

Referenced by start_apusys_devapc().

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

◆ set_apusys_noc_dapc()

static int set_apusys_noc_dapc ( void  )
static

Definition at line 231 of file apusys_devapc.c.

References APUSYS_APC_OK, apusys_noc_dapc, ARRAY_SIZE, BIOS_ERR, apc_apu_dom_16::d_permission, printk, and set_slave_noc_dapc().

Referenced by start_apusys_devapc().

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

◆ set_slave_apc()

static int set_slave_apc ( u32  slave,
enum domain_id  domain_id,
enum devapc_perm_type  perm 
)
static

◆ set_slave_noc_dapc()

static int set_slave_noc_dapc ( u32  slave,
enum domain_id  domain_id,
enum devapc_perm_type  perm 
)
static

◆ start_apusys_devapc()

void start_apusys_devapc ( void  )

Definition at line 263 of file apusys_devapc.c.

References APU_SCTRL_REVISER, APUSYS_APC_CON, APUSYS_APC_OK, APUSYS_SYS0_APC_LOCK_0, BIOS_DEBUG, DEVAPC_AO_WRAPPER, dump_apusys_ao_apc(), dump_apusys_noc_dapc(), printk, read32(), set_apusys_ao_apc(), set_apusys_noc_dapc(), and write32().

Referenced by dapc_init().

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

Variable Documentation

◆ apusys_ao_apc

const struct apc_apu_dom_16 apusys_ao_apc[]
static

Definition at line 47 of file apusys_devapc.c.

Referenced by dump_apusys_ao_apc(), and set_apusys_ao_apc().

◆ apusys_noc_dapc

◆ domain_map

enum domain_id domain_map[]
static
Initial value:
= {
}
@ DOMAIN_0
Definition: devapc.h:40
@ DOMAIN_3
Definition: devapc.h:43
@ DOMAIN_1
Definition: devapc.h:41
@ DOMAIN_5
Definition: devapc.h:45
@ DOMAIN_7
Definition: devapc.h:47
@ DOMAIN_15
Definition: devapc.h:55
@ DOMAIN_2
Definition: devapc.h:42
@ DOMAIN_6
Definition: devapc.h:46
@ DOMAIN_14
Definition: devapc.h:54
@ DOMAIN_11
Definition: devapc.h:51
@ DOMAIN_12
Definition: devapc.h:52
@ DOMAIN_9
Definition: devapc.h:49
@ DOMAIN_8
Definition: devapc.h:48
@ DOMAIN_10
Definition: devapc.h:50
@ DOMAIN_13
Definition: devapc.h:53
@ DOMAIN_4
Definition: devapc.h:44

Definition at line 1 of file apusys_devapc.c.

Referenced by set_apusys_ao_apc().