blob: 42df9cb0da62c6197dff2bfb2b8da81d7fdf9968 [file] [log] [blame]
#ifndef _CACHE_DPDL2_H
#define _CACHE_DPDL2_H
#include "kal_general_types.h"
#include "dl2cmgr.h"
/*****************************************************************************
* Symbol/Type Definition *
*****************************************************************************/
typedef enum {
SIZE_None = 0,
L2CACHE_Size_32KB, L2CACHE_Size_64KB, L2CACHE_Size_96KB, L2CACHE_Size_128KB, L2CACHE_Size_160KB,
L2CACHE_Size_192KB, L2CACHE_Size_224KB, L2CACHE_Size_256KB, L2CACHE_Size_288KB, L2CACHE_Size_320KB,
L2CACHE_Size_352KB, L2CACHE_Size_384KB, L2CACHE_Size_416KB, L2CACHE_Size_448KB, L2CACHE_Size_480KB,
L2CACHE_Size_512KB, L2CACHE_Size_544KB, L2CACHE_Size_576KB, L2CACHE_Size_608KB, L2CACHE_Size_640KB,
L2CACHE_Size_672KB, L2CACHE_Size_704KB, L2CACHE_Size_736KB, L2CACHE_Size_768KB, L2CACHE_Size_800KB,
L2CACHE_Size_832KB, L2CACHE_Size_864KB, L2CACHE_Size_896KB, L2CACHE_Size_928KB, L2CACHE_Size_960KB,
L2CACHE_Size_992KB, L2CACHE_Size_1024KB, L2CACHE_Size_1056KB, L2CACHE_Size_1088KB, L2CACHE_Size_1120KB,
L2CACHE_Size_1152KB, L2CACHE_Size_1184KB, L2CACHE_Size_1216KB, L2CACHE_Size_1248KB, L2CACHE_Size_1280KB,
L2CACHE_Size_1312KB, L2CACHE_Size_1344KB, L2CACHE_Size_1376KB, L2CACHE_Size_1408KB, L2CACHE_Size_1440KB,
L2CACHE_Size_1472KB, L2CACHE_Size_1504KB, L2CACHE_Size_1536KB, L2CACHE_Size_1568KB, L2CACHE_Size_1600KB,
L2CACHE_Size_1632KB, L2CACHE_Size_1664KB, L2CACHE_Size_1696KB, L2CACHE_Size_1728KB, L2CACHE_Size_1760KB,
L2CACHE_Size_1792KB, L2CACHE_Size_1824KB, L2CACHE_Size_1856KB, L2CACHE_Size_1888KB, L2CACHE_Size_1920KB,
L2CACHE_Size_1952KB, L2CACHE_Size_1984KB, L2CACHE_Size_2016KB, L2CACHE_Size_2048KB = 64,
L2CACHE_Size_Min = L2CACHE_Size_32KB,
L2CACHE_Size_Max = L2CACHE_Size_2048KB,
} DPDL2_SIZE;
typedef enum {
CASE_None = 0,
PDN_Fail = 0x10,
PDN_Case = 0x10,
PDN_1Way = 0x11,
PDN_2Way = 0x12,
PDN_3Way = 0x13,
PDN_4Way = 0x14,
PDN_5Way = 0x15,
PDN_6Way = 0x16,
PDN_7Way = 0x17,
PDN_8Way = 0x18,
PO_Fail = 0x20,
PO_Case = 0x20,
PO_1Way = 0x21,
PO_2Way = 0x22,
PO_3Way = 0x23,
PO_4Way = 0x24,
PO_5Way = 0x25,
PO_6Way = 0x26,
PO_7Way = 0x27,
PO_8Way = 0x28,
PDN_Aborted_Case = 0x30,
PDN_Aborted_PO_1Way = 0x31,
PDN_Aborted_PO_2Way = 0x32,
PDN_Aborted_PO_3Way = 0x33,
PDN_Aborted_PO_4Way = 0x34,
PDN_Aborted_PO_5Way = 0x35,
PDN_Aborted_PO_6Way = 0x36,
PDN_Aborted_PO_7Way = 0x37,
PDN_Aborted_PO_8Way = 0x38,
CASE_Mask = 0xF0,
CASE_Fail = 0xFF,
} DPDL2_RETURN_CASE;
typedef enum {
STATUS_None = 0,
PDN_Processing = 1,
PDN_Done = 2,
PO_Processing = 3,
PO_Done = 4,
} DPDL2_STATUS;
/*******************************************************************************
* function prototypes
*******************************************************************************/
extern DPDL2_RETURN_CASE dpdl2_change_l2cache_size(DPDL2_SIZE l2cache_size);
extern DPDL2_STATUS dpdl2_query_status(void);
extern DPDL2_SIZE dpdl2_query_po_l2cache_size(void);
extern kal_uint32 lock_l2cache_excludeway(kal_uint32 addr, kal_uint32 len, dl2cm_section_id lock_section);
extern void dpdl2_polling_status_done(void);
#endif /* _CACHE_DPDL2_H */