diff options
author | Aurora zuma automerger <aurora-zuma-automerger@google.com> | 2022-12-01 23:58:14 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-12-05 16:37:27 -0800 |
commit | 52c07f728e8f5b7d5ddb4878faf60912a2aaf8f8 (patch) | |
tree | fd52163f0e370aa117db2f6e0068271611326176 /gxp-firmware.c | |
parent | 70e76ccdc0547f3e8f70c3238174ba0da695bb16 (diff) | |
download | zuma-52c07f728e8f5b7d5ddb4878faf60912a2aaf8f8.tar.gz |
gxp: [Copybara Auto Merge] Merge branch 'zuma' into 'android13-gs-pixel-5.15'
gxp: move mcu mmap handler to mcu-fs
Bug: 249918544
gxp: platforms adopt gxp-mcu-fs
Bug: 249918544 (repeat)
gxp: Allocate telemetry buffers during init
Bug: 247955426
gxp: introduce gxp-mcu-fs
Bug: 249918544 (repeat)
gxp: move client_has_vd check to client.c
Bug: 249918544 (repeat)
gxp: use entry point in elf header instead of fixed IOVA
Bug: 260647260
gxp: Add _legacy postfix to telemetry function
Bug: 247955426 (repeat)
gcip: Add remapped_data_{start,size} to image config
Bug: 257212385
GCIP_HEADERS_REV_ID: d065c7fb4db9182e11b3cfd0dec2b43395b4aa5c
gxp: Refactor LPM to accommodate new chips
Bug: 254168276
gxp: support PM_QOS_BTS reverse KCI
Bug: 239638427
gxp: introduce gxp_pm_update_pm_qos
Bug: 239638427 (repeat)
Revert "gxp: callisto: Correct DVFS numbers"
Bug: 260550440
gxp: callisto: Correct DVFS numbers
Bug: 258154981
GitOrigin-RevId: 0c75dad022b5969b956119fb9249ec7d9bf93d50
Change-Id: Ic7ca1f7edc389f2ee5470151e26a8ce8357d476d
Diffstat (limited to 'gxp-firmware.c')
-rw-r--r-- | gxp-firmware.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gxp-firmware.c b/gxp-firmware.c index 57b3583..d755f84 100644 --- a/gxp-firmware.c +++ b/gxp-firmware.c @@ -131,6 +131,15 @@ static int elf_load_segments(struct gxp_dev *gxp, const u8 *elf_data, return ret; } +static void elf_fetch_entry_point(struct gxp_dev *gxp, const u8 *elf_data, + uint core) +{ + struct elf32_hdr *ehdr; + + ehdr = (struct elf32_hdr *)elf_data; + gxp->firmware_mgr->entry_points[core] = ehdr->e_entry; +} + static int gxp_firmware_authenticate(struct gxp_dev *gxp, const struct firmware *firmwares[GXP_NUM_CORES]) @@ -339,11 +348,11 @@ static void gxp_program_reset_vector(struct gxp_dev *gxp, uint core, bool verbos "Current Aurora reset vector for core %u: 0x%x\n", core, reset_vec); gxp_write_32(gxp, GXP_CORE_REG_ALT_RESET_VECTOR(core), - gxp->fwbufs[core].daddr); + gxp->firmware_mgr->entry_points[core]); if (verbose) dev_notice(gxp->dev, - "New Aurora reset vector for core %u: 0x%llx\n", - core, gxp->fwbufs[core].daddr); + "New Aurora reset vector for core %u: 0x%x\n", + core, gxp->firmware_mgr->entry_points[core]); } static int gxp_firmware_load(struct gxp_dev *gxp, uint core) @@ -366,6 +375,10 @@ static int gxp_firmware_load(struct gxp_dev *gxp, uint core) goto out_firmware_unload; } + elf_fetch_entry_point(gxp, + mgr->firmwares[core]->data + FW_HEADER_SIZE, + core); + memset(gxp->fwbufs[core].vaddr + AURORA_SCRATCHPAD_OFF, 0, AURORA_SCRATCHPAD_LEN); |