[ROM] Increase ROM size to 128 KiB#29654
Open
rroth-lowrisc wants to merge 5 commits intolowRISC:masterfrom
Open
[ROM] Increase ROM size to 128 KiB#29654rroth-lowrisc wants to merge 5 commits intolowRISC:masterfrom
rroth-lowrisc wants to merge 5 commits intolowRISC:masterfrom
Conversation
rroth-lowrisc
added a commit
to rroth-lowrisc/qemu_bk
that referenced
this pull request
Apr 2, 2026
[This PR](lowRISC/opentitan#29654) increases the size of the boot ROM from 32 kB to 64 kB. This commit changes all values in the qemu configuration to match the values in the PR.
vogelpi
reviewed
Apr 2, 2026
Contributor
vogelpi
left a comment
There was a problem hiding this comment.
Thanks @rroth-lowrisc for your PR, this looks mostly good to me!
I have some questions:
- @pamaury , @luismarques This PR just touches Earlgrey which is intended. But AFAIK, we build the same or a very similar ROM also for Darjeeling, so might run into similar issues there soon. Should we also extend the first ROM of Darjeeling?
- @pamaury , @luismarques It looks like we also need to extend QEMU accordingly to get CI to pass. Could someone please guide Raphael to get this done?
- @rroth-lowrisc There are quite some FPGA CI failures. It's probably more efficient to debug these locally using an FPGA board. People in the office can help you getting started with that.
| status_t hash_rom(void) { | ||
| hmac_digest_t rom_hash; | ||
| hmac_sha256((void *)TOP_EARLGREY_ROM_BASE_ADDR, kGoldenRomSizeBytes, | ||
| hmac_sha256((void *)TOP_EARLGREY_ROM_CTRL_ROM_BASE_ADDR, kGoldenRomSizeBytes, |
Contributor
There was a problem hiding this comment.
Are you sure using this different constant here is correct?
Author
There was a problem hiding this comment.
This commit changed the define-name from TOP_EARLGREY_ROM_BASE_ADDR to TOP_EARLGREY_ROM_CTRL_ROM_BASE_ADDR (hw/top_earlgrey/sw/autogen/top_earlgrey.h). Because the rom_e2e_self_hash_test is commented out I suspect nobody changed this define. However, to be fair, @jwnrt provided me with this fix.
Contributor
There was a problem hiding this comment.
Thanks for explaining, this is reasonable :-)
4371813 to
b0f9d34
Compare
rroth-lowrisc
added a commit
to rroth-lowrisc/qemu
that referenced
this pull request
Apr 14, 2026
[This PR](lowRISC/opentitan#29654) increases the size of the boot ROM from 32 kB to 128 kB. This commit changes all values in the qemu configuration to match the values in the PR. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
b0f9d34 to
a0a1ec1
Compare
fb13433 to
e4f659d
Compare
a632765 to
f7223f1
Compare
Increases the size of the boot rom from 32kB to 128kB to allow further code integration in the rom section. Moves the rom base address from 0x8000 to 0x20000 for power-of-two alignment to avoid TL-UL translation errors. To avoid conflict with the boot rom memory region the rv_dm base address moves to 0x40000 . Modify the physical-memory-protection (PMP) reset values to incorporate the new base addresses. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
Signed-off-by: Raphael Roth <rroth@lowrisc.org>
When building the FPGA image vivado utilizes BLOCKRAM as boot rom replacement. The name of these cells needs to be updated as otherwise this hook fails. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
Increasing the ROM to 128kB breaks the current version of qemu. For the record: the QEMU fork is set up to emulate earlgrey 1.0.0 as it was taped out and therefore any major change in the architecture will break it. I temporarily disable the qemu related tests in the ci until the SW team has time to update the lowRISC qemu fork (as agreed with the SW team). Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit introduces a manual fix, as the Vivado tool `updatemem` does not work otherwise. When the ROM is increased to 128kB, Vivado maps the ROM to the BRAM cells differently to how it does with 32kB / 64kB. The problem is that the address range defined in the header of the generated `memory.mmi` file no longer matches the file size of the ROM memory content file, which causes the updatemem tool to crash. Therefore, this commit artificially matches the size in the header with the known size of the memory content file. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
f7223f1 to
7ec0f39
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to increase the ROM size for Earl Grey from 32 kB to
64 kB128 KiB. Moves the ROM base address from 0x8000 to 0x20000for power-of-two alignment to avoid TL-UL translation errors. As consequence therv_dmbase address moves from 0x10000 to 0x40000 to avoid memory conflicts.Most of the changes are autogenerated from
top_earlgrey.hjsonhowever the default values inibex_pmp_reset_pkg.svand the size inrom_e2e_self_hash_test.cneeds to be updated manually. In order to run therom_e2e_self_hashtest, the relevant line in theBUILDfile needs to be uncommented.