SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
sys-sid.c File Reference
#include <barrier.h>
#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <log.h>
#include <common.h>
#include "sys-sid.h"
Include dependency graph for sys-sid.c:

Classes

struct  sid_section_t
 

Enumerations

enum  {
  SID_PRCTL = SUNXI_SID_BASE + 0x040 , SID_PRKEY = SUNXI_SID_BASE + 0x050 , SID_RDKEY = SUNXI_SID_BASE + 0x060 , SJTAG_AT0 = SUNXI_SID_BASE + 0x080 ,
  SJTAG_AT1 = SUNXI_SID_BASE + 0x084 , SJTAG_S = SUNXI_SID_BASE + 0x088 , SID_EFUSE = SUNXI_SID_BASE + 0x200 , SID_SECURE_MODE = SUNXI_SID_BASE + 0xA0 ,
  EFUSE_HV_SWITCH = SUNXI_RTC_BASE + 0x204
}
 

Functions

uint32_t syter_efuse_read (uint32_t offset)
 Read a value from the eFuse memory.
 
void syter_efuse_write (uint32_t offset, uint32_t value)
 Write a value to the eFuse memory.
 
void syter_efuse_dump (void)
 Dump the contents of the eFuse memory.
 

Variables

const struct sid_section_t sids []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SID_PRCTL 
SID_PRKEY 
SID_RDKEY 
SJTAG_AT0 
SJTAG_AT1 
SJTAG_S 
SID_EFUSE 
SID_SECURE_MODE 
EFUSE_HV_SWITCH 

Function Documentation

◆ syter_efuse_dump()

void syter_efuse_dump ( void  )

Dump the contents of the eFuse memory.

This function outputs the current contents of the eFuse memory for diagnostic purposes. The format of the output is implementation-dependent.

◆ syter_efuse_read()

uint32_t syter_efuse_read ( uint32_t  offset)

Read a value from the eFuse memory.

This function reads a 32-bit value from the specified eFuse offset.

Parameters
offsetThe offset in the eFuse memory from which to read the value.
Returns
The 32-bit value read from the specified eFuse offset.

◆ syter_efuse_write()

void syter_efuse_write ( uint32_t  offset,
uint32_t  value 
)

Write a value to the eFuse memory.

This function writes a 32-bit value to the specified eFuse offset.

Parameters
offsetThe offset in the eFuse memory to which the value will be written.
valueThe 32-bit value to be written to the eFuse memory.

Variable Documentation

◆ sids

const struct sid_section_t sids[]
Initial value:
= {
{"chipid", 0x0000, 128},
{"brom-conf", 0x0010, 32},
{"thermal-sensor", 0x0014, 64},
{"ft-zone", 0x001c, 128},
{"oem", 0x002c, 160},
{"write-protect", 0x0040, 32},
{"read-protect", 0x0044, 32},
{"jtag-lcjs", 0x0048, 32},
{"jtag-attr", 0x004C, 32},
{"efuse-huk", 0x0050, 192},
{"efuse-ind", 0x0068, 32},
{"efuse-id", 0x006c, 32},
{"rotpk", 0x0070, 256},
{"ssk", 0x0090, 128},
{"rssk", 0x00a0, 256},
{"sn", 0x00b0, 192},
{"nv1", 0x00c8, 32},
{"nv2", 0x00cc, 32},
{"hdcp-hash", 0x00d0, 128},
{"backup-key0", 0x00e0, 192},
{"backup-key1", 0x00f8, 72},
}