summaryrefslogtreecommitdiff
path: root/src/arch/vmpa.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-17 22:06:54 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-17 22:06:54 (GMT)
commit3dc843b3f7991dcd738a30821ff56c7fe13f1094 (patch)
tree22b40ef7cd933a57942bd01d61c9e6a07fdd80c6 /src/arch/vmpa.c
parent682159e73cfbf8ec61d2f2aba765be1016a30ded (diff)
Kept tracks of current active DB items.
Diffstat (limited to 'src/arch/vmpa.c')
-rw-r--r--src/arch/vmpa.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index 70ea52b..bf97a37 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -172,6 +172,33 @@ void copy_vmpa(vmpa2t *dest, const vmpa2t *src)
/******************************************************************************
* *
+* Paramètres : addr = position à consulter. *
+* *
+* Description : Calcule une empreinte de localisation dans l'espace mémoire. *
+* *
+* Retour : Condensat déterminé pour la localisation. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+uint32_t hash_vmpa(const vmpa2t *addr)
+{
+ uint32_t result; /* Empreinte à retourner */
+
+ result = addr->physical;
+ result ^= (addr->physical >> 32);
+
+ result ^= addr->virtual;
+ result ^= (addr->virtual >> 32);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : a = première définition à analyser. *
* b = seconde définition à analyser. *
* *