mirror of https://github.com/wolfSSL/wolfBoot.git
Address more copilot remarks
parent
39d1507f06
commit
af94d676b6
|
|
@ -4593,7 +4593,6 @@ not interact with the RISC-V coprocessor.
|
|||
Two configurations are available at `config/examples`:
|
||||
|
||||
- `nrf54l15.config`: TrustZone disabled; wolfBoot and the application always run in secure mode.
|
||||
Delta updates are enabled.
|
||||
|
||||
- `nrf54l15-wolfcrypt-tz.config`: TrustZone enabled; wolfBoot runs in secure mode and boots the
|
||||
application as non-secure code. Includes a non-secure callable (NSC) wolfPKCS11 API for
|
||||
|
|
|
|||
54
hal/nrf54l.c
54
hal/nrf54l.c
|
|
@ -308,60 +308,6 @@ void uart_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static uintptr_t ext_flash_addr_calc(uintptr_t address)
|
||||
{
|
||||
/* offset external flash addresses by the update partition address */
|
||||
if (address < WOLFBOOT_PARTITION_UPDATE_ADDRESS) {
|
||||
return 0;
|
||||
}
|
||||
address -= WOLFBOOT_PARTITION_UPDATE_ADDRESS;
|
||||
return address;
|
||||
}
|
||||
|
||||
int ext_flash_write(uintptr_t address, const uint8_t *data, int len)
|
||||
{
|
||||
#ifdef DEBUG_FLASH
|
||||
uintptr_t addr = ext_flash_addr_calc(address);
|
||||
wolfBoot_printf("Ext Write: Len %d, Addr 0x%" PRIxPTR " (off 0x%" PRIxPTR
|
||||
") -> %p\n",
|
||||
len, address, addr, data);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ext_flash_read(uintptr_t address, uint8_t *data, int len)
|
||||
{
|
||||
#ifdef DEBUG_FLASH
|
||||
uintptr_t addr = ext_flash_addr_calc(address);
|
||||
wolfBoot_printf("Ext Read: Len %d, Addr 0x%" PRIxPTR " (off 0x%" PRIxPTR
|
||||
") -> %p\n",
|
||||
len, address, addr, data);
|
||||
#endif
|
||||
memset(data, FLASH_BYTE_ERASED, len);
|
||||
return len;
|
||||
}
|
||||
|
||||
int ext_flash_erase(uintptr_t address, int len)
|
||||
{
|
||||
#ifdef DEBUG_FLASH
|
||||
uintptr_t addr = ext_flash_addr_calc(address);
|
||||
wolfBoot_printf("Ext Erase: Len %d, Addr 0x%" PRIxPTR " (off 0x%" PRIxPTR
|
||||
")\n",
|
||||
len, address, addr);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ext_flash_lock(void)
|
||||
{
|
||||
/* no op */
|
||||
}
|
||||
|
||||
void ext_flash_unlock(void)
|
||||
{
|
||||
/* no op */
|
||||
}
|
||||
|
||||
static void high_freq_clock_init(void)
|
||||
{
|
||||
/* Start the HFXO and wait until it is running */
|
||||
|
|
|
|||
|
|
@ -95,7 +95,9 @@ void RAMFUNCTION spi_write(const char byte)
|
|||
SPI_EVENTS_DMA_TX_BUSERROR == 0)
|
||||
;
|
||||
SPI_EVENTS_STOPPED = 0;
|
||||
spi_rx_ready = 1;
|
||||
|
||||
if (SPI_EVENTS_DMA_RX_BUSERROR == 0 && SPI_EVENTS_DMA_RX_BUSERROR == 0)
|
||||
spi_rx_ready = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -113,9 +115,9 @@ void spi_init(int polarity, int phase)
|
|||
GPIO_PIN_CNF(SPI_MISO_PORT, SPI_MISO_PIN) =
|
||||
(GPIO_CNF_IN | GPIO_CNF_PULL_UP);
|
||||
|
||||
GPIO_OUTSET(SPI_CS_PORT) = (1 << SPI_CS_PIN);
|
||||
GPIO_OUTCLR(SPI_SCK_PORT) = (1 << SPI_SCK_PIN);
|
||||
GPIO_OUTCLR(SPI_MOSI_PORT) = (1 << SPI_MOSI_PIN);
|
||||
GPIO_OUTSET(SPI_CS_PORT) = (1U << SPI_CS_PIN);
|
||||
GPIO_OUTCLR(SPI_SCK_PORT) = (1U << SPI_SCK_PIN);
|
||||
GPIO_OUTCLR(SPI_MOSI_PORT) = (1U << SPI_MOSI_PIN);
|
||||
|
||||
SPI_ENABLE_REG = SPIM_ENABLE_ENABLE_Disabled;
|
||||
SPI_PSEL_MISO = (PSEL_PORT(SPI_MISO_PORT) | SPI_MISO_PIN);
|
||||
|
|
|
|||
|
|
@ -24,28 +24,28 @@
|
|||
|
||||
/* Default pin-mux matches the nRF54L15-DK */
|
||||
#ifndef SPI_CS_PORT
|
||||
#define SPI_CS_PORT 0
|
||||
#define SPI_CS_PORT 2
|
||||
#endif
|
||||
#ifndef SPI_CS_PIN
|
||||
#define SPI_CS_PIN 25
|
||||
#define SPI_CS_PIN 5
|
||||
#endif
|
||||
#ifndef SPI_SCK_PORT
|
||||
#define SPI_SCK_PORT 0
|
||||
#define SPI_SCK_PORT 2
|
||||
#endif
|
||||
#ifndef SPI_SCK_PIN
|
||||
#define SPI_SCK_PIN 29
|
||||
#define SPI_SCK_PIN 1
|
||||
#endif
|
||||
#ifndef SPI_MOSI_PORT
|
||||
#define SPI_MOSI_PORT 0
|
||||
#define SPI_MOSI_PORT 2
|
||||
#endif
|
||||
#ifndef SPI_MOSI_PIN
|
||||
#define SPI_MOSI_PIN 28
|
||||
#define SPI_MOSI_PIN 2
|
||||
#endif
|
||||
#ifndef SPI_MISO_PORT
|
||||
#define SPI_MISO_PORT 0
|
||||
#define SPI_MISO_PORT 2
|
||||
#endif
|
||||
#ifndef SPI_MISO_PIN
|
||||
#define SPI_MISO_PIN 27
|
||||
#define SPI_MISO_PIN 4
|
||||
#endif
|
||||
|
||||
#ifndef SPI_CS_TPM
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ void WEAKFUNCTION RAMFUNCTION arch_reboot(void)
|
|||
AIRCR = AIRCR_SYSRESETREQ | AIRCR_VKEY;
|
||||
while(1)
|
||||
;
|
||||
wolfBoot_panic();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue