-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dv] Add ROT_AUTH configuration test.
This test exercises the ROT AUTH programming sequence performed during FT stages. The ROT AUTH partitions are used to store the ROM (e.g. root keys) of the Earl Grey top level. Signed-off-by: Miguel Osorio <[email protected]>
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 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 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,32 @@ | ||
// Copyright lowRISC contributors (OpenTitan project). | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#include <stdint.h> | ||
|
||
#include "sw/device/lib/arch/device.h" | ||
#include "sw/device/lib/base/abs_mmio.h" | ||
#include "sw/device/lib/dif/dif_otp_ctrl.h" | ||
#include "sw/device/lib/runtime/ibex.h" | ||
#include "sw/device/lib/runtime/log.h" | ||
#include "sw/device/lib/runtime/print.h" | ||
#include "sw/device/lib/testing/otp_ctrl_testutils.h" | ||
#include "sw/device/lib/testing/test_framework/check.h" | ||
#include "sw/device/lib/testing/test_framework/ottf_test_config.h" | ||
#include "sw/device/silicon_creator/manuf/lib/individualize.h" | ||
#include "sw/device/silicon_creator/manuf/lib/individualize_sw_cfg.h" | ||
#include "sw/device/silicon_creator/manuf/lib/otp_fields.h" | ||
|
||
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" | ||
|
||
OTTF_DEFINE_TEST_CONFIG(); | ||
|
||
bool test_main(void) { | ||
static dif_otp_ctrl_t otp_ctrl; | ||
CHECK_DIF_OK(dif_otp_ctrl_init( | ||
mmio_region_from_addr(TOP_EARLGREY_OTP_CTRL_CORE_BASE_ADDR), &otp_ctrl)); | ||
CHECK_STATUS_OK( | ||
manuf_individualize_device_rot_creator_auth_codesign(&otp_ctrl)); | ||
CHECK_STATUS_OK(manuf_individualize_device_rot_creator_auth_state(&otp_ctrl)); | ||
return true; | ||
} |