Browse Source

Implement reboot via PCI

Fabian 3 years ago
parent
commit
ad22c98247
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/pci.js

+ 7 - 0
src/pci.js

@@ -117,6 +117,13 @@ function PCI(cpu)
         },
         function(out_byte)
         {
+            if((this.pci_addr[1] & 0x06) === 0x02 && (out_byte & 0x06) === 0x06)
+            {
+                dbg_log("CPU reboot via PCI");
+                cpu.reboot_internal();
+                return;
+            }
+
             this.pci_addr[1] = out_byte;
         },
         function(out_byte)