OpenBIC
OpenSource Bridge-IC
plat_pcc.c File Reference
#include "plat_pcc.h"
#include "pcc.h"
#include <zephyr.h>
#include <logging/log.h>
#include <string.h>
Include dependency graph for plat_pcc.c:

Macros

#define POSTCODE_PREFIX_BL   0xEE000000ul
 
#define POSTCODE_PREFIX_DDEE   0xDD000000ul
 
#define POSTCODE_PREFIX_ABL_ERROR   0xEA000000ul
 
#define POSTCODE_PREFIX_AGESA_ERROR   0xB0000000ul
 
#define POSTCODE_PREFIX_UNEXPECTED   0x00000000ul
 
#define GET_POSTCODE_PREFIX(code)   ((code) & 0xFF000000ul)
 
#define GET_HIGH_WORD(code)   (((code) >> 16) & 0xFFFF)
 
#define GET_LOW_WORD(code)   ((code) & 0xFFFF)
 
#define GET_24BIT_VALUE(code)   ((code) & 0x00FFFFFF)
 
#define BL_POSTCODE_MAX   0x009F
 
#define POSTCODE_EXCLUDE_ZERO   0x00000000
 
#define POSTCODE_EXCLUDE_ABCD   0x0000ABCD
 
#define FILTERED_POSTCODE_BUFFER_SIZE   15
 

Functions

 LOG_MODULE_REGISTER (plat_pcc)
 
void pcc_platform_store_postcode (uint32_t postcode)
 
void pcc_platform_filter_init (void)
 
bool pcc_platform_filter_postcode (uint32_t postcode)
 
void plat_pcc_set_filter_enable (bool enable)
 
bool plat_pcc_get_filter_enable (void)
 
uint8_t plat_pcc_copy_filtered_postcodes (uint32_t *buffer, uint8_t buffer_size)
 

Macro Definition Documentation

◆ BL_POSTCODE_MAX

#define BL_POSTCODE_MAX   0x009F

◆ FILTERED_POSTCODE_BUFFER_SIZE

#define FILTERED_POSTCODE_BUFFER_SIZE   15

◆ GET_24BIT_VALUE

#define GET_24BIT_VALUE (   code)    ((code) & 0x00FFFFFF)

◆ GET_HIGH_WORD

#define GET_HIGH_WORD (   code)    (((code) >> 16) & 0xFFFF)

◆ GET_LOW_WORD

#define GET_LOW_WORD (   code)    ((code) & 0xFFFF)

◆ GET_POSTCODE_PREFIX

#define GET_POSTCODE_PREFIX (   code)    ((code) & 0xFF000000ul)

◆ POSTCODE_EXCLUDE_ABCD

#define POSTCODE_EXCLUDE_ABCD   0x0000ABCD

◆ POSTCODE_EXCLUDE_ZERO

#define POSTCODE_EXCLUDE_ZERO   0x00000000

◆ POSTCODE_PREFIX_ABL_ERROR

#define POSTCODE_PREFIX_ABL_ERROR   0xEA000000ul

◆ POSTCODE_PREFIX_AGESA_ERROR

#define POSTCODE_PREFIX_AGESA_ERROR   0xB0000000ul

◆ POSTCODE_PREFIX_BL

#define POSTCODE_PREFIX_BL   0xEE000000ul

◆ POSTCODE_PREFIX_DDEE

#define POSTCODE_PREFIX_DDEE   0xDD000000ul

◆ POSTCODE_PREFIX_UNEXPECTED

#define POSTCODE_PREFIX_UNEXPECTED   0x00000000ul

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_pcc  )

◆ pcc_platform_filter_init()

void pcc_platform_filter_init ( void  )

◆ pcc_platform_filter_postcode()

bool pcc_platform_filter_postcode ( uint32_t  postcode)

◆ pcc_platform_store_postcode()

void pcc_platform_store_postcode ( uint32_t  postcode)

◆ plat_pcc_copy_filtered_postcodes()

uint8_t plat_pcc_copy_filtered_postcodes ( uint32_t *  buffer,
uint8_t  buffer_size 
)

◆ plat_pcc_get_filter_enable()

bool plat_pcc_get_filter_enable ( void  )

◆ plat_pcc_set_filter_enable()

void plat_pcc_set_filter_enable ( bool  enable)