The Replay Protected Memory Block (RPMB) is available since eMMC 4.4 which has been obsoleted by 4.41. Therefore lift the provided EXT_CSD_REV to 5 (4.41) and provide the basic logic to implement basic support for it. This allows to set the authentication key, read the write counter and authenticated perform data read and write requests. Those aren't actually authenticated yet, support for that will be added later. The RPMB image needs to be added to backing block images after potential boot partitions and before the user data. It's size is controlled by the rpmb-partition-size property. Also missing in this version (and actually not only for RPMB bits) is persistence of registers that are supposed to survive power cycles. Most prominent are the write counters or the authentication key. This feature can be added later, e.g. by append a state structure to the backing block image. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <d57388b599e47f5c95f30be7571b77f9016289eb.1762261430.git.jan.kiszka@siemens.com> Tested-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
77 lines
5 KiB
Text
77 lines
5 KiB
Text
# See docs/devel/tracing.rst for syntax documentation.
|
|
|
|
# allwinner-sdhost.c
|
|
allwinner_sdhost_set_inserted(bool inserted) "inserted %u"
|
|
allwinner_sdhost_process_desc(uint64_t desc_addr, uint32_t desc_size, bool is_write, uint32_t max_bytes) "desc_addr 0x%" PRIx64 " desc_size %" PRIu32 " is_write %u max_bytes %" PRIu32
|
|
allwinner_sdhost_read(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32
|
|
allwinner_sdhost_write(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32
|
|
allwinner_sdhost_update_irq(uint32_t irq) "IRQ bits 0x%" PRIx32
|
|
|
|
# bcm2835_sdhost.c
|
|
bcm2835_sdhost_read(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u"
|
|
bcm2835_sdhost_write(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u"
|
|
bcm2835_sdhost_edm_change(const char *why, uint32_t edm) "(%s) EDM now 0x%x"
|
|
bcm2835_sdhost_update_irq(uint32_t irq) "IRQ bits 0x%x"
|
|
|
|
# core.c
|
|
sdbus_command(const char *bus_name, uint8_t cmd, uint32_t arg) "@%s CMD%02d arg 0x%08x"
|
|
sdbus_read(const char *bus_name, uint8_t value) "@%s value 0x%02x"
|
|
sdbus_write(const char *bus_name, uint8_t value) "@%s value 0x%02x"
|
|
sdbus_set_voltage(const char *bus_name, uint16_t millivolts) "@%s %u (mV)"
|
|
sdbus_get_dat_lines(const char *bus_name, uint8_t dat_lines) "@%s dat_lines: %u"
|
|
sdbus_get_cmd_line(const char *bus_name, bool cmd_line) "@%s cmd_line: %u"
|
|
|
|
# sdhci.c
|
|
sdhci_set_inserted(const char *level) "card state changed: %s"
|
|
sdhci_send_command(uint8_t cmd, uint32_t arg) "CMD%02u ARG[0x%08x]"
|
|
sdhci_error(const char *msg) "%s"
|
|
sdhci_response4(uint32_t r0) "RSPREG[31..0]=0x%08x"
|
|
sdhci_response16(uint32_t r3, uint32_t r2, uint32_t r1, uint32_t r0) "RSPREG[127..96]=0x%08x, RSPREG[95..64]=0x%08x, RSPREG[63..32]=0x%08x, RSPREG[31..0]=0x%08x"
|
|
sdhci_end_transfer(uint8_t cmd, uint32_t arg) "Automatically issue CMD%02u 0x%08x"
|
|
sdhci_adma(const char *desc, uint32_t sysad) "%s: admasysaddr=0x%" PRIx32
|
|
sdhci_adma_loop(uint64_t addr, uint16_t length, uint8_t attr) "addr=0x%08" PRIx64 ", len=%d, attr=0x%x"
|
|
sdhci_adma_transfer_completed(void) ""
|
|
sdhci_access(const char *access, unsigned int size, uint64_t offset, const char *dir, uint64_t val, uint64_t val2) "%s%u: addr[0x%04" PRIx64 "] %s 0x%08" PRIx64 " (%" PRIu64 ")"
|
|
sdhci_read_dataport(uint16_t data_count) "all %u bytes of data have been read from input buffer"
|
|
sdhci_write_dataport(uint16_t data_count) "write buffer filled with %u bytes of data"
|
|
sdhci_capareg(const char *desc, uint16_t val) "%s: %u"
|
|
|
|
# sd.c
|
|
sdcard_normal_command(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t arg, const char *mode, const char *state) "%s %20s/ CMD%02d arg 0x%08x (mode %s, state %s)"
|
|
sdcard_app_command(const char *proto, const char *acmd_desc, uint8_t acmd, uint32_t arg, const char *mode, const char *state) "%s %23s/ACMD%02d arg 0x%08x (mode %s, state %s)"
|
|
sdcard_response(const char *rspdesc, int rsplen) "%s (sz:%d)"
|
|
sdcard_powerup(void) ""
|
|
sdcard_inquiry_cmd41(void) ""
|
|
sdcard_reset(void) ""
|
|
sdcard_set_rca(uint16_t value) "new RCA: 0x%04x"
|
|
sdcard_set_blocklen(uint16_t length) "block len 0x%03x"
|
|
sdcard_set_block_count(uint32_t cnt) "block cnt 0x%"PRIx32
|
|
sdcard_inserted(bool readonly) "read_only: %u"
|
|
sdcard_ejected(void) ""
|
|
sdcard_erase(uint32_t first, uint32_t last) "addr first 0x%" PRIx32" last 0x%" PRIx32
|
|
sdcard_lock(void) ""
|
|
sdcard_unlock(void) ""
|
|
sdcard_req_addr(uint32_t req_arg, uint64_t addr) "req 0x%" PRIx32 " addr 0x%" PRIx64
|
|
sdcard_read_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x"
|
|
sdcard_write_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x"
|
|
sdcard_write_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint8_t value) "%s %20s/ CMD%02d ofs %"PRIu32" value 0x%02x"
|
|
sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t offset, uint64_t size, uint32_t blklen) "%s %20s/ CMD%02d ofs %"PRIu32" size %"PRIu64" blklen %" PRIu32
|
|
sdcard_set_voltage(uint16_t millivolts) "%u mV"
|
|
sdcard_ext_csd_update(unsigned index, uint8_t oval, uint8_t nval) "index %u: 0x%02x -> 0x%02x"
|
|
sdcard_switch(unsigned access, unsigned index, unsigned value, unsigned set) "SWITCH acc:%u idx:%u val:%u set:%u"
|
|
sdcard_rpmb_read_block(uint16_t resp, uint16_t read_addr, uint16_t result) "resp 0x%x read_addr 0x%x result 0x%x"
|
|
sdcard_rpmb_write_block(uint16_t req, uint16_t result) "req 0x%x result 0x%x"
|
|
|
|
# pl181.c
|
|
pl181_command_send(uint8_t cmd, uint32_t arg) "sending CMD%02d arg 0x%08" PRIx32
|
|
pl181_command_sent(void) "command sent"
|
|
pl181_command_response_pending(void) "response received"
|
|
pl181_command_timeout(void) "command timeouted"
|
|
pl181_fifo_push(uint32_t data) "FIFO push 0x%08" PRIx32
|
|
pl181_fifo_pop(uint32_t data) "FIFO pop 0x%08" PRIx32
|
|
pl181_fifo_transfer_complete(void) "FIFO transfer complete"
|
|
pl181_data_engine_idle(void) "data engine idle"
|
|
|
|
# aspeed_sdhci.c
|
|
aspeed_sdhci_read(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx64 " size %u: 0x%" PRIx64
|
|
aspeed_sdhci_write(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx64 " size %u: 0x%" PRIx64
|