From 1edd448001d553a55ab838fd1b04091cb7cb9f1b Mon Sep 17 00:00:00 2001
From: Eduardo TOMASI RIBEIRO ET269621 <et269621@gre063281>
Date: Mon, 31 Mar 2025 11:54:50 +0200
Subject: [PATCH] Removing unused files

---
 app/Makefile               |  6 +---
 app/entry.S                |  4 ---
 app/include/gmc_driver.h   | 69 --------------------------------------
 app/include/iommu_driver.h |  4 ---
 app/include/nic_driver.h   |  4 ---
 app/main.c                 | 20 ++++++++---
 app/merge_sort_shmem.c     |  4 ---
 app/vm.c                   |  4 ---
 8 files changed, 17 insertions(+), 98 deletions(-)
 delete mode 100644 app/include/gmc_driver.h

diff --git a/app/Makefile b/app/Makefile
index af588da..ceff37c 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -1,5 +1,5 @@
 ##
-#  Copyright 2023,2024 CEA*
+#  Copyright 2025 CEA*
 #  Commissariat a l'Energie Atomique et aux Energies Alternatives
 #
 #  Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,10 +14,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 ##
-##
-#  @file   Makefile
-#  @author Eduardo Tomasi
-##
 
 PATH := /home/et269621/.local/riscv64-unknown-elf-11.2.0/bin:$(PATH)
 LD_LIBRARY_PATH := /home/et269621/.local/riscv64-unknown-elf-11.2.0/lib:$(LD_LIBRARY_PATH)
diff --git a/app/entry.S b/app/entry.S
index 9866071..2bc6fe3 100644
--- a/app/entry.S
+++ b/app/entry.S
@@ -14,10 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/**
- *  @file   app/entry.S
- *  @author Eduardo Tomasi
- */
 
 
 #include "v/riscv_test.h"
diff --git a/app/include/gmc_driver.h b/app/include/gmc_driver.h
deleted file mode 100644
index fbf3b66..0000000
--- a/app/include/gmc_driver.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef __GMC_DRIVER_H_
-#define __GMC_DRIVER_H_
-
-#include <stdio.h>
-#include <stddef.h>
-
-#include "gmc_defs.h"
-
-#define VNODE_OFFSET 34
-
-extern uintptr_t GMC_BASE;
-
-static uint64_t global_id = 0;
-
-GMCRegs create_gmcread(uint64_t pnode, uint64_t vaddr, uint64_t dest_addr, uint64_t remote_asid) {
-    GMCRegs data = {
-        .id = global_id++,
-        .vaddr = vaddr,
-        .pnode = pnode,
-        .dest_addr = dest_addr,
-        .remote_asid = remote_asid
-    };
-    data.control.type = READ;
-    data.control.size = GMC_DATA_SIZE;
-    return data;
-}
-
-GMCRegs create_gmcwrite(uint64_t pnode, uint64_t vaddr, uint64_t dest_addr, uint64_t remote_asid, uint8_t* data_in) {
-    GMCRegs data = {
-        .id = global_id++,
-        .vaddr = vaddr,
-        .pnode = pnode,
-        .dest_addr = dest_addr,
-        .remote_asid = remote_asid
-    };
-    data.control.type = WRITE;
-    data.control.size = GMC_DATA_SIZE;
-    for (int i = 0; i < data.control.size; i++) {
-        data.data_in[i] = *(data_in + i);
-    }
-    return data;
-}
-
-void startOperation() {
-    GMCRegs* gmc = (GMCRegs*) &GMC_BASE;
-    gmc->input_ready = 1;
-}
-
-void remote_write(uint64_t pnode, uint64_t vaddr, uint64_t dest_addr, uint64_t remote_asid, uint8_t* data_in) {
-    GMCRegs* gmc = (GMCRegs*) &GMC_BASE;
-    GMCRegs write = create_gmcwrite(pnode, vaddr, dest_addr, remote_asid, data_in);
-
-    while (gmc->status != GMC_FREE) {}
-    *gmc = write;
-    startOperation();
-}
-
-void remote_read(uint64_t pnode, uint64_t vaddr, uint64_t dest_addr, uint64_t remote_asid, uint64_t* response) {
-    GMCRegs* gmc = (GMCRegs*) &GMC_BASE;
-    GMCRegs read = create_gmcread(pnode, vaddr, dest_addr, remote_asid);
-
-    while (gmc->status != GMC_FREE) {}
-    *gmc = read;
-    startOperation();
-
-    while(gmc->status != GMC_READY) {}
-}
-
-#endif  // __GMC_DRIVER_H_
\ No newline at end of file
diff --git a/app/include/iommu_driver.h b/app/include/iommu_driver.h
index 0e3083f..c852bb7 100644
--- a/app/include/iommu_driver.h
+++ b/app/include/iommu_driver.h
@@ -14,10 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/**
- *  @file   app/include/iommu_driver.h
- *  @author Eduardo Tomasi
- */
 
 #ifndef __IOMMU_DRIVER_H
 #define __IOMMU_DRIVER_H
diff --git a/app/include/nic_driver.h b/app/include/nic_driver.h
index 6a1a2a9..d956007 100644
--- a/app/include/nic_driver.h
+++ b/app/include/nic_driver.h
@@ -14,10 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/**
- *  @file   app/include/nic_driver.h
- *  @author Eduardo Tomasi
- */
 
 #ifndef __NIC_DRIVER_H
 #define __NIC_DRIVER_H
diff --git a/app/main.c b/app/main.c
index 2d996a1..e6f22bc 100644
--- a/app/main.c
+++ b/app/main.c
@@ -1,4 +1,19 @@
-// See LICENSE for information
+/**
+ * Copyright 2025 CEA*
+ * Commissariat a l'Energie Atomique et aux Energies Alternatives
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 
 #include <stdio.h>
 #include <assert.h>
@@ -8,15 +23,12 @@
 #include "common/threads.h"
 #include "common/trap_handler.h"
 
-#include "gmc_driver.h"
 #include "nic_driver.h"
 #include "encoding.h"
 #include "v/riscv_test.h"
 
 #include "gem5/m5ops.h"
 
-#define NODES 1
-
 #define PLIC_IOMMU_INDEX 0x9
 
 extern void vm_boot(uintptr_t test_addr);
diff --git a/app/merge_sort_shmem.c b/app/merge_sort_shmem.c
index 5066f9b..d7aa0bb 100644
--- a/app/merge_sort_shmem.c
+++ b/app/merge_sort_shmem.c
@@ -14,10 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/**
- *  @file   app/merge_sort_shmem.c
- *  @author Eduardo Tomasi
- */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/app/vm.c b/app/vm.c
index ca55ed1..c0b68e3 100644
--- a/app/vm.c
+++ b/app/vm.c
@@ -14,10 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-/**
- *  @file   app/vm.c
- *  @author Eduardo Tomasi
- */
 
 
 #include <stdint.h>
-- 
GitLab