x86: Switch from MessageReq and Resp to WriteReq and Resp.
authorGabe Black <gabeblack@google.com>
Wed, 11 Sep 2019 20:45:24 +0000 (13:45 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 2 Oct 2019 01:28:32 +0000 (01:28 +0000)
Originally MessageReq was intended to mark a packet as a holding a
message destined for a particular recipient and which would not
interact with other packets.

This is similar to the way a WriteReq would behave if writing to a
device register which needs to be updated atomically. Also, while the
memory system *could* recognize a MessageReq and know that it didn't
need to interact with other packets, that was never implemented.

Change-Id: Ie54301d1d8820e206d6bae96e200ae8c71d2d784
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20823
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/arch/x86/interrupts.cc
src/arch/x86/intmessage.hh
src/dev/x86/intdev.hh

index 402b9120030e62a9c20d4758b3b9b3272266185f..392135def206f98c412dbe98d9d5209ee8869483 100644 (file)
@@ -307,7 +307,7 @@ Tick
 X86ISA::Interrupts::recvMessage(PacketPtr pkt)
 {
     Addr offset = pkt->getAddr() - x86InterruptAddress(initialApicId, 0);
-    assert(pkt->cmd == MemCmd::MessageReq);
+    assert(pkt->cmd == MemCmd::WriteReq);
     switch(offset)
     {
       case 0:
@@ -335,7 +335,7 @@ bool
 X86ISA::Interrupts::recvResponse(PacketPtr pkt)
 {
     assert(!pkt->isError());
-    assert(pkt->cmd == MemCmd::MessageResp);
+    assert(pkt->cmd == MemCmd::WriteResp);
     if (--pendingIPIs == 0) {
         InterruptCommandRegLow low = regs[APIC_INTERRUPT_COMMAND_LOW];
         // Record that the ICR is now idle.
index 8ec60b2aaf9d6bffc208a6f3f9639cc557d887ad..429b0f9f65d211acbd90b5d75268409e54a0f1f1 100644 (file)
@@ -84,7 +84,7 @@ namespace X86ISA
             size, Request::UNCACHEABLE,
             Request::intMasterId);
 
-        PacketPtr pkt = new Packet(req, MemCmd::MessageReq);
+        PacketPtr pkt = new Packet(req, MemCmd::WriteReq);
         pkt->allocate();
         return pkt;
     }
index f71c9ff9ddd2aa70b5721908bef568802cbdd505..348ec57b81bdd4ec9dc8aacc86b2cb0747437006 100644 (file)
@@ -76,7 +76,7 @@ class IntSlavePort : public SimpleTimingPort
     Tick
     recvAtomic(PacketPtr pkt)
     {
-        panic_if(pkt->cmd != MemCmd::MessageReq,
+        panic_if(pkt->cmd != MemCmd::WriteReq,
                 "%s received unexpected command %s from %s.\n",
                 name(), pkt->cmd.toString(), getPeer());
         pkt->headerDelay = pkt->payloadDelay = 0;