Skip to content

Commit

Permalink
Merge pull request #57 from comparch-security/expose-normalize
Browse files Browse the repository at this point in the history
expose address normalize API to user
  • Loading branch information
wsong83 authored Jan 29, 2024
2 parents aa0fca9 + b591f80 commit 721b028
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cache/coherence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,12 @@ typedef InnerCohPortT<InnerCohPortUncached> InnerCohPort;

// interface with the processing core is a special InnerCohPort
class CoreInterface : public InnerCohPortUncached {
protected:
uint64_t normalize(uint64_t addr) const { return addr & ~0x3full ;}

public:
CoreInterface(CohPolicyBase *policy) : InnerCohPortUncached(policy) {}
virtual ~CoreInterface() {}

uint64_t normalize(uint64_t addr) const { return addr & ~0x3full; }

virtual const CMDataBase *read(uint64_t addr, uint64_t *delay) {
addr = normalize(addr);
auto cmd = policy->cmd_for_read();
Expand Down

0 comments on commit 721b028

Please sign in to comment.