-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sw/silicon_creator] ROM digest and chip_info #14892
Comments
sorry i think i'm a little confused. So are we saying today during build, we insert chip_info into the top 128B, but during the |
ooo wait i see we subtract the digest size in test_rom.. |
yeah it feels like this would be good to have in the real rom. |
From ROM sync: Remove chip_info, use 32-bit truncated commit hash, print during shutdown. Use |
Assigning to M2.5 with
Priority:P2
(I came across this while triaging |
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: e3fe 72cd 3230 3233 2d30 342d 3230 2031 ..r.2023-04-20 1 00007f90: 363a 3533 3a34 3800 6:53:48. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 0000 0000 633e 05dd e3fe 72cd 3230 3233 ....c>....r.2023 00007f90: 2d30 342d 3231 2031 353a 3237 3a30 3100 -04-21 15:27:01. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 0000 0000 633e 05dd e3fe 72cd 3230 3233 ....c>....r.2023 00007f90: 2d30 342d 3231 2031 353a 3237 3a30 3100 -04-21 15:27:01. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. ... 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 0000 0000 633e 05dd e3fe 72cd 3230 3233 ....c>....r.2023 00007f90: 2d30 342d 3231 2031 353a 3237 3a30 3100 -04-21 15:27:01. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. 00007f80: 0000 0000 0000 0000 633e 05dd e3fe 72cd ........c>....r. 00007f90: 3230 3233 2d30 342d 3231 2031 353a 3237 2023-04-21 15:27 00007fa0: 3a30 3100 0000 0000 :01..... Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 633e 05dd e3fe 72cd 0000 0000 3230 3233 c>....r.....2023 00007f90: 2d30 342d 3235 2031 353a 3133 3a32 3900 -04-25 15:13:29. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 633e 05dd e3fe 72cd 0000 0000 3230 3233 c>....r.....2023 00007f90: 2d30 342d 3235 2031 353a 3133 3a32 3900 -04-25 15:13:29. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 9461 ce0e c828 0d91 0000 0000 0000 0000 .a...(.......... Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 9461 ce0e c828 0d91 0000 0000 0000 0000 .a...(.......... Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. Note that it contains 32 bits of a git commit hash starting at 0x7f80, followed by a human-readable timestamp. 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: 9461 ce0e c828 0d91 0000 0000 0000 0000 .a...(.......... Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. At 0x7f80, there are 64 bits of a Git commit hash (e20871e1cf102bf6). 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: f62b 10cf e171 08e2 .+...q.. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. At 0x7f80, there are 64 bits of a Git commit hash (e20871e1cf102bf6). 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: f62b 10cf e171 08e2 .+...q.. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. At 0x7f80, there are 64 bits of a Git commit hash (e20871e1cf102bf6). 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: f62b 10cf e171 08e2 .+...q.. Issue lowRISC#14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This commit adds a new `chip_info_t` struct that contains info about the ROM's provenance. The ROM now prints the Git commit hash on shutdown after the "VER:" prefix. The ROM linker script was already configured to place the .chip_info section at the top of ROM, but I'm not confident that it worked as expected. The autogenerated header contained a static constant, so I think a copy would be inlined at some arbitrary location into any compilation unit that used it, rather than being placed by the linker script. To verify that the ROM prints the Git commit hash on shutdown: ./bazelisk.sh test --test_output=streamed \ //sw/device/silicon_creator/rom/e2e:shutdown_output_dev_fpga_cw310_rom To verify that the .chip_info section contains data from chip_info.o: ./bazelisk.sh build-then 'less %s' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_map To see the value of `kChipInfo` at the end of ROM: ./bazelisk.sh build-then 'xxd %s | less' --config riscv32 \ //sw/device/silicon_creator/rom:rom_with_fake_keys_fpga_cw310_bin For example, here's the end of the ROM from the previous command. At 0x7f80, there are 64 bits of a Git commit hash (e20871e1cf102bf6). 00007f70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00007f80: f62b 10cf e171 08e2 .+...q.. Issue #14892 Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
Noticed while working on #14884
From the rom_ctrl spec:
chip_info
in ROM?test_rom.ld
.@moidx @cfrantz @tjaychen
The text was updated successfully, but these errors were encountered: