MOS Source Code
Loading...
Searching...
No Matches
plic.c File Reference
#include "mos/riscv64/cpu/plic.h"
#include "mos/mm/mm.h"
#include <mos/types.h>
+ Include dependency graph for plic.c:

Go to the source code of this file.

Macros

#define PLIC   pa_va(0x0c000000L)
 
#define PLIC_PRIORITY   (PLIC + 0x0)
 
#define PLIC_PENDING   (PLIC + 0x1000)
 
#define PLIC_MENABLE(hart)
 
#define PLIC_SENABLE(hart)
 
#define PLIC_MPRIORITY(hart)
 
#define PLIC_SPRIORITY(hart)
 
#define PLIC_MCLAIM(hart)
 
#define PLIC_SCLAIM(hart)
 
#define PLIC_IRQPRIO(irq)
 

Functions

u32 plic_claim_irq ()
 
void plic_complete (u32 irq)
 
void plic_enable_irq (u32 irq)
 

Macro Definition Documentation

◆ PLIC

#define PLIC   pa_va(0x0c000000L)

Definition at line 10 of file plic.c.

◆ PLIC_PRIORITY

#define PLIC_PRIORITY   (PLIC + 0x0)

Definition at line 11 of file plic.c.

◆ PLIC_PENDING

#define PLIC_PENDING   (PLIC + 0x1000)

Definition at line 12 of file plic.c.

◆ PLIC_MENABLE

#define PLIC_MENABLE ( hart)
Value:
(PLIC + 0x2000 + (hart) * 0x100)
#define PLIC
Definition plic.c:10

Definition at line 13 of file plic.c.

◆ PLIC_SENABLE

#define PLIC_SENABLE ( hart)
Value:
(PLIC + 0x2080 + (hart) * 0x100)

Definition at line 14 of file plic.c.

Referenced by plic_enable_irq().

◆ PLIC_MPRIORITY

#define PLIC_MPRIORITY ( hart)
Value:
(PLIC + 0x200000 + (hart) * 0x2000)

Definition at line 15 of file plic.c.

◆ PLIC_SPRIORITY

#define PLIC_SPRIORITY ( hart)
Value:
(PLIC + 0x201000 + (hart) * 0x2000)

Definition at line 16 of file plic.c.

Referenced by plic_enable_irq().

◆ PLIC_MCLAIM

#define PLIC_MCLAIM ( hart)
Value:
(PLIC + 0x200004 + (hart) * 0x2000)

Definition at line 17 of file plic.c.

◆ PLIC_SCLAIM

#define PLIC_SCLAIM ( hart)
Value:
(PLIC + 0x201004 + (hart) * 0x2000)

Definition at line 18 of file plic.c.

Referenced by plic_claim_irq(), and plic_complete().

◆ PLIC_IRQPRIO

#define PLIC_IRQPRIO ( irq)
Value:
(PLIC + irq * 4)

Definition at line 20 of file plic.c.

Referenced by plic_enable_irq().

Function Documentation

◆ plic_claim_irq()

u32 plic_claim_irq ( )

Definition at line 22 of file plic.c.

Referenced by riscv64_trap_handler().

◆ plic_complete()

void plic_complete ( u32 irq)

Definition at line 27 of file plic.c.

Referenced by riscv64_trap_handler().

◆ plic_enable_irq()

void plic_enable_irq ( u32 irq)

Definition at line 32 of file plic.c.

Referenced by platform_startup_late().