mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-30 15:49:34 +00:00
feat(drivers/rcar3): add extra offset if booting B-side
In case MFISBTSTSR bit 4 is 1, that means the loader was started as B-side. Load the remaining boot components from 8 MiB offset. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Change-Id: I11d882f30ca4f0cf55fd28d3470ff1063d350d10
This commit is contained in:
parent
5460f82806
commit
993d809cc1
1 changed files with 6 additions and 0 deletions
|
@ -151,6 +151,9 @@ int32_t rcar_get_certificate(const int32_t name, uint32_t *cert)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MFISBTSTSR (0xE6260604U)
|
||||||
|
#define MFISBTSTSR_BOOT_PARTITION (0x00000010U)
|
||||||
|
|
||||||
static int32_t file_to_offset(const int32_t name, uintptr_t *offset,
|
static int32_t file_to_offset(const int32_t name, uintptr_t *offset,
|
||||||
uint32_t *cert, uint32_t *no_load,
|
uint32_t *cert, uint32_t *no_load,
|
||||||
uintptr_t *partition)
|
uintptr_t *partition)
|
||||||
|
@ -169,6 +172,9 @@ static int32_t file_to_offset(const int32_t name, uintptr_t *offset,
|
||||||
}
|
}
|
||||||
|
|
||||||
*offset = rcar_image_header[addr];
|
*offset = rcar_image_header[addr];
|
||||||
|
|
||||||
|
if (mmio_read_32(MFISBTSTSR) & MFISBTSTSR_BOOT_PARTITION)
|
||||||
|
*offset += 0x800000;
|
||||||
*cert = RCAR_CERT_SIZE;
|
*cert = RCAR_CERT_SIZE;
|
||||||
*cert *= RCAR_ATTR_GET_CERTOFF(name_offset[i].attr);
|
*cert *= RCAR_ATTR_GET_CERTOFF(name_offset[i].attr);
|
||||||
*cert += RCAR_SDRAM_certESS;
|
*cert += RCAR_SDRAM_certESS;
|
||||||
|
|
Loading…
Add table
Reference in a new issue