bf0_hal_patch.h

Handle patch for BCPU core.

Author

Sifli software development team

Defines

PATCH_AON
MAX_PATCH_ENTRIES
QUOTE_ME(X)
PATCH(address, offset, func)
PATCH_DATA(address, offset, data)
PATCH_TAG

Functions

int HAL_PATCH_install2(struct patch_entry_desc *patch_entries, uint32_t size, int cer)

Advanced API to install patches for LCPU/BCPU.

参数:
  • patch_entries – Patch descriptor arrays

  • size – size of patch_entries in bytes.

  • cer – Previous patch enable register value, used in restore patch from standby.

返回值:

32-bit – value, each bit represent on patch installed.

int HAL_PATCH_install(void)

Install patches LCPU/BCPU.

返回值:

32-bit – value, each bit represent on patch installed.

int HAL_PATCH_save(struct patch_entry_desc *patch_entries, uint32_t size, uint32_t *cer)

Save patches.

参数:
  • patch_entries – Patch descriptor arrays

  • size – size of patch_entries in bytes.

  • cer[out] Previous patch enable register value, used in restore patch from standby.

返回值:

Save – patch numbers.

void HAL_PATCH_Entry(void)

Patch image entry, used to install hooks.

struct patch_entry_desc

Public Members

uint32_t break_addr
uint32_t data