coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
transition.h File Reference
#include <stdint.h>
#include <arch/lib_helpers.h>
Include dependency graph for transition.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  regs
 
struct  elx_state
 
struct  exc_state
 

Macros

#define STACK_POP_BYTES   16
 
#define STACK_PUSH_BYTES   -16
 
#define EXC_VID_CUR_SP_EL0_SYNC   0
 
#define EXC_VID_CUR_SP_EL0_IRQ   1
 
#define EXC_VID_CUR_SP_EL0_FIRQ   2
 
#define EXC_VID_CUR_SP_EL0_SERR   3
 
#define EXC_VID_CUR_SP_ELX_SYNC   4
 
#define EXC_VID_CUR_SP_ELX_IRQ   5
 
#define EXC_VID_CUR_SP_ELX_FIQ   6
 
#define EXC_VID_CUR_SP_ELX_SERR   7
 
#define EXC_VID_LOW64_SYNC   8
 
#define EXC_VID_LOW64_IRQ   9
 
#define EXC_VID_LOW64_FIQ   10
 
#define EXC_VID_LOW64_SERR   11
 
#define EXC_VID_LOW32_SYNC   12
 
#define EXC_VID_LOW32_IRQ   13
 
#define EXC_VID_LOW32_FIQ   14
 
#define EXC_VID_LOW32_SERR   15
 
#define NUM_EXC_VIDS   16
 
#define XI_INDEX(i)   X##i##_INDEX = i
 

Enumerations

enum  {
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) ,
  XI_INDEX =(0) , XI_INDEX =(0) , XI_INDEX =(0) , XMAX_INDEX
}
 

Functions

static uint8_t get_eret_el (uint8_t el, uint8_t l_or_h)
 
static uint8_t get_el_from_spsr (uint64_t spsr)
 
static uint8_t get_mode_from_spsr (uint64_t spsr)
 
void transition_to_el2 (void *entry, void *arg, uint64_t spsr)
 
void exc_exit (struct regs *regs)
 
void trans_switch (struct regs *regs)
 
void exc_set_vbar (void)
 
void exc_dispatch (struct exc_state *exc_state, uint64_t id)
 
void exc_entry (struct exc_state *exc_state, uint64_t id)
 

Macro Definition Documentation

◆ EXC_VID_CUR_SP_EL0_FIRQ

#define EXC_VID_CUR_SP_EL0_FIRQ   2

Definition at line 30 of file transition.h.

◆ EXC_VID_CUR_SP_EL0_IRQ

#define EXC_VID_CUR_SP_EL0_IRQ   1

Definition at line 29 of file transition.h.

◆ EXC_VID_CUR_SP_EL0_SERR

#define EXC_VID_CUR_SP_EL0_SERR   3

Definition at line 31 of file transition.h.

◆ EXC_VID_CUR_SP_EL0_SYNC

#define EXC_VID_CUR_SP_EL0_SYNC   0

Definition at line 28 of file transition.h.

◆ EXC_VID_CUR_SP_ELX_FIQ

#define EXC_VID_CUR_SP_ELX_FIQ   6

Definition at line 34 of file transition.h.

◆ EXC_VID_CUR_SP_ELX_IRQ

#define EXC_VID_CUR_SP_ELX_IRQ   5

Definition at line 33 of file transition.h.

◆ EXC_VID_CUR_SP_ELX_SERR

#define EXC_VID_CUR_SP_ELX_SERR   7

Definition at line 35 of file transition.h.

◆ EXC_VID_CUR_SP_ELX_SYNC

#define EXC_VID_CUR_SP_ELX_SYNC   4

Definition at line 32 of file transition.h.

◆ EXC_VID_LOW32_FIQ

#define EXC_VID_LOW32_FIQ   14

Definition at line 42 of file transition.h.

◆ EXC_VID_LOW32_IRQ

#define EXC_VID_LOW32_IRQ   13

Definition at line 41 of file transition.h.

◆ EXC_VID_LOW32_SERR

#define EXC_VID_LOW32_SERR   15

Definition at line 43 of file transition.h.

◆ EXC_VID_LOW32_SYNC

#define EXC_VID_LOW32_SYNC   12

Definition at line 40 of file transition.h.

◆ EXC_VID_LOW64_FIQ

#define EXC_VID_LOW64_FIQ   10

Definition at line 38 of file transition.h.

◆ EXC_VID_LOW64_IRQ

#define EXC_VID_LOW64_IRQ   9

Definition at line 37 of file transition.h.

◆ EXC_VID_LOW64_SERR

#define EXC_VID_LOW64_SERR   11

Definition at line 39 of file transition.h.

◆ EXC_VID_LOW64_SYNC

#define EXC_VID_LOW64_SYNC   8

Definition at line 36 of file transition.h.

◆ NUM_EXC_VIDS

#define NUM_EXC_VIDS   16

Definition at line 44 of file transition.h.

◆ STACK_POP_BYTES

#define STACK_POP_BYTES   16

Definition at line 25 of file transition.h.

◆ STACK_PUSH_BYTES

#define STACK_PUSH_BYTES   -16

Definition at line 26 of file transition.h.

◆ XI_INDEX

#define XI_INDEX (   i)    X##i##_INDEX = i

Definition at line 51 of file transition.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XI_INDEX 
XMAX_INDEX 

Definition at line 53 of file transition.h.

Function Documentation

◆ exc_dispatch()

void exc_dispatch ( struct exc_state exc_state,
uint64_t  id 
)

Definition at line 141 of file exception.c.

References BIOS_DEBUG, exc_exit(), EXC_RET_ABORT, EXC_RET_HANDLED_DUMP_STATE, EXC_RET_IGNORED, handle_exception(), NUM_EXC_VIDS, print_exception_and_die(), print_exception_info(), and printk.

Referenced by exc_entry().

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

◆ exc_entry()

void exc_entry ( struct exc_state exc_state,
uint64_t  id 
)

Definition at line 14 of file transition.c.

References elx_state::elr, exc_state::elx, exc_dispatch(), get_mode_from_spsr(), exc_state::regs, regs::sp, elx_state::spsr, and SPSR_USE_H.

Here is the call graph for this function:

◆ exc_exit()

void exc_exit ( struct regs regs)

Referenced by exc_dispatch().

Here is the caller graph for this function:

◆ exc_set_vbar()

void exc_set_vbar ( void  )

◆ get_el_from_spsr()

static uint8_t get_el_from_spsr ( uint64_t  spsr)
inlinestatic

Definition at line 134 of file transition.h.

References CURRENT_EL_MASK, and CURRENT_EL_SHIFT.

Referenced by transition_to_el2().

Here is the caller graph for this function:

◆ get_eret_el()

static uint8_t get_eret_el ( uint8_t  el,
uint8_t  l_or_h 
)
inlinestatic

Definition at line 125 of file transition.h.

References CURRENT_EL_SHIFT.

Referenced by run_bl31(), and run_payload().

Here is the caller graph for this function:

◆ get_mode_from_spsr()

static uint8_t get_mode_from_spsr ( uint64_t  spsr)
inlinestatic

Definition at line 139 of file transition.h.

References SPSR_L_H_MASK.

Referenced by exc_entry().

Here is the caller graph for this function:

◆ trans_switch()

void trans_switch ( struct regs regs)

Referenced by transition_to_el2().

Here is the caller graph for this function:

◆ transition_to_el2()

void transition_to_el2 ( void entry,
void arg,
uint64_t  spsr 
)