-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[imm_rom_ext] Add linker scripts for slot A & B
As now we always link IMM_ROM_EXT into ROM_EXT, the address of IMM_ROM_EXT's linker for slot A/B ROM_EXT should be adjusted. Apply similar solution from ROM_EXT's linker scripts on IMM_ROM_EXT ones. Also cleaned up the hello-world ROM code as we do not need them anymore. Signed-off-by: Chia-Wei Liu <[email protected]>
- Loading branch information
Showing
12 changed files
with
206 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_slot_a.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Copyright lowRISC contributors (OpenTitan project). */ | ||
/* Licensed under the Apache License, Version 2.0, see LICENSE for details. */ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
/** | ||
* Linker script for an OpenTitan IMM_ROM_EXT. | ||
* | ||
* Portions of this file are Ibex-specific. | ||
* | ||
* The IMM_ROM_EXT is kept in the .rom_ext_immutable section in ROM, after the | ||
* .manifest section. This linker script targets to use slot A address, and | ||
* the addresses are similar to the linker script rom_ext_slot_a.ld that ROM_EXT | ||
* is using. | ||
*/ | ||
|
||
INCLUDE hw/top_earlgrey/sw/autogen/top_earlgrey_memory.ld | ||
|
||
/** | ||
* Symbols to be used in the setup of the address translation for IMM_ROM_EXT. | ||
*/ | ||
|
||
MEMORY { | ||
imm_rom_ext_slot_a(rx) : ORIGIN = ORIGIN(eflash) + 0x400, LENGTH = LENGTH(eflash) / 2 - 0x400 | ||
} | ||
REGION_ALIAS("rom_ext_flash", imm_rom_ext_slot_a); | ||
|
||
INCLUDE sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_common.ld |
28 changes: 28 additions & 0 deletions
28
sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_slot_b.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* Copyright lowRISC contributors (OpenTitan project). */ | ||
/* Licensed under the Apache License, Version 2.0, see LICENSE for details. */ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
/** | ||
* Linker script for an OpenTitan IMM_ROM_EXT. | ||
* | ||
* Portions of this file are Ibex-specific. | ||
* | ||
* The IMM_ROM_EXT is kept in the .rom_ext_immutable section in ROM, after the | ||
* .manifest section. This linker script targets to use slot B address, and | ||
* the addresses are similar to the linker script rom_ext_slot_b.ld that ROM_EXT | ||
* is using. | ||
*/ | ||
|
||
INCLUDE hw/top_earlgrey/sw/autogen/top_earlgrey_memory.ld | ||
|
||
/** | ||
* Symbols to be used in the setup of the address translation for IMM_ROM_EXT. | ||
*/ | ||
|
||
/* Slot B starts at the half-size mark of the eFlash. */ | ||
MEMORY { | ||
imm_rom_ext_slot_b(rx) : ORIGIN = ORIGIN(eflash) + LENGTH(eflash) / 2 + 0x400, LENGTH = LENGTH(eflash) / 2 - 0x400 | ||
} | ||
REGION_ALIAS("rom_ext_flash", imm_rom_ext_slot_b); | ||
|
||
INCLUDE sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_common.ld |
27 changes: 27 additions & 0 deletions
27
sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_slot_virtual.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Copyright lowRISC contributors (OpenTitan project). */ | ||
/* Licensed under the Apache License, Version 2.0, see LICENSE for details. */ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
/** | ||
* Linker script for an OpenTitan IMM_ROM_EXT. | ||
* | ||
* Portions of this file are Ibex-specific. | ||
* | ||
* The IMM_ROM_EXT is kept in the .rom_ext_immutable section in ROM, after the | ||
* .manifest section. This linker script targets to use virtual address, and | ||
* the addresses are similar to the linker script rom_ext_slot_virtual.ld that | ||
* ROM_EXT is using. | ||
*/ | ||
|
||
INCLUDE hw/top_earlgrey/sw/autogen/top_earlgrey_memory.ld | ||
|
||
/** | ||
* Symbols to be used in the setup of the address translation for IMM_ROM_EXT. | ||
*/ | ||
|
||
MEMORY { | ||
imm_rom_ext_virtual(rx) : ORIGIN = ORIGIN(rom_ext_virtual) + 0x400, LENGTH = 0x80000 - 0x400 | ||
} | ||
REGION_ALIAS("rom_ext_flash", imm_rom_ext_virtual); | ||
|
||
INCLUDE sw/device/silicon_creator/imm_rom_ext/imm_rom_ext_common.ld |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.