-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge changes I277b37ef,I41c330c1,I22e730b3 into integration
* changes: feat(tools/cbmc): add option to test a single testbench feat(tools/cbmc): add testbench for RMI_REALM_ACTIVATE refactor(lib/realm): rename realm states according to spec
- Loading branch information
Showing
34 changed files
with
645 additions
and
56 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
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
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
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,13 @@ | ||
/* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* SPDX-FileCopyrightText: Copyright TF-RMM Contributors. | ||
*/ | ||
|
||
#ifndef TB_MEASUREMENT_H | ||
#define TB_MEASUREMENT_H | ||
|
||
#include "measurement.h" | ||
|
||
bool valid_hash_algo(enum hash_algo value); | ||
|
||
#endif /* !TB_MEASUREMENT_H */ |
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,65 @@ | ||
/* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* SPDX-FileCopyrightText: Copyright TF-RMM Contributors. | ||
*/ | ||
|
||
#ifndef TB_REALM_H | ||
#define TB_REALM_H | ||
|
||
#include <measurement.h> | ||
#include <realm.h> | ||
#include <smc-rmi.h> | ||
#include <tb_granules.h> | ||
|
||
#define DESTROYED RIPAS_DESTROYED | ||
#define EMPTY RIPAS_EMPTY | ||
#define RAM RIPAS_RAM | ||
|
||
extern unsigned long vmids[]; | ||
|
||
enum rmm_rtt_entry_state { | ||
ASSIGNED, | ||
ASSIGNED_NS, | ||
TABLE, | ||
UNASSIGNED, | ||
UNASSIGNED_NS, | ||
}; | ||
|
||
struct rmm_realm { | ||
uint64_t ipa_width; | ||
uint64_t measurements[MEASUREMENT_SLOT_NR]; | ||
uint64_t hash_algo; | ||
uint64_t rec_index; | ||
uint64_t rtt_base; | ||
uint64_t rtt_level_start; | ||
uint64_t rtt_num_start; | ||
uint64_t state; | ||
uint64_t vmid; | ||
uint8_t rpv[RPV_SIZE]; | ||
}; | ||
|
||
struct rmi_realm_params_buffer { | ||
uint8_t flags; | ||
uint8_t s2sz; | ||
uint8_t sve_vl; | ||
uint8_t num_bps; | ||
uint8_t num_wps; | ||
uint8_t pmu_num_ctrs; | ||
uint8_t hash_algo; | ||
uint8_t rpv[RPV_SIZE]; | ||
uint16_t vmid; | ||
uint64_t rtt_base; | ||
int64_t rtt_level_start; | ||
uint32_t rtt_num_start; | ||
}; | ||
|
||
bool VmidIsFree(uint16_t vmid); | ||
struct rmm_realm Realm(uint64_t rd); | ||
|
||
struct rd nondet_struct_rd(void); | ||
struct rmm_realm nondet_struct_rmm_realm(void); | ||
|
||
struct granule *init_realm_descriptor_page(void); | ||
|
||
#endif /* TB_REALM_H */ | ||
|
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,12 @@ | ||
/* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* SPDX-FileCopyrightText: Copyright TF-RMM Contributors. | ||
*/ | ||
|
||
#ifndef TB_RTT_H | ||
#define TB_RTT_H | ||
|
||
bool valid_num_root_rtts(unsigned int num_root_rtts); | ||
struct granule *init_rtt_root_page(unsigned int num_root_rtts); | ||
|
||
#endif |
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
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,13 @@ | ||
/* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* SPDX-FileCopyrightText: Copyright TF-RMM Contributors. | ||
*/ | ||
|
||
#include "measurement.h" | ||
#include "tb_measurement.h" | ||
|
||
bool valid_hash_algo(enum hash_algo value) | ||
{ | ||
return value == RMI_HASH_SHA_256 || | ||
value == RMI_HASH_SHA_512; | ||
} |
Oops, something went wrong.