Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added error check to 8259
Jack Lange [Fri, 27 Jul 2012 19:06:45 +0000 (15:06 -0400)]
palacios/src/devices/8259a.c

index bfe90e5..0521c51 100644 (file)
@@ -493,7 +493,7 @@ static int write_master_port1(struct guest_info * core, ushort_t port, void * sr
                         state->master_isr &= ~(0x01 << i);
                         break;
                     }
-                }      
+                }
                 PrintDebug("8259 PIC: Post ISR = %x (wr_Master1)\n", state->master_isr);
             } else if (!(cw2->EOI) && (cw2->R) && (cw2->SL)) {
                 PrintDebug("8259 PIC: Ignoring set-priority, priorities not implemented (level=%d, wr_Master1)\n", cw2->level);
@@ -504,6 +504,13 @@ static int write_master_port1(struct guest_info * core, ushort_t port, void * sr
                 return -1;
             }
 
+           if (cw2->EOI) {
+               if (pic_get_intr_number(core,  state) != -1) {
+                   PrintError("Interrupt pending after EOI\n");
+               }
+           }
+
+
             state->master_ocw2 = cw;
         } else if (IS_OCW3(cw)) {
             PrintDebug("8259 PIC: Handling OCW3 = %x (wr_Master1)\n", cw);
@@ -627,6 +634,14 @@ static int write_slave_port1(struct guest_info * core, ushort_t port, void * src
                return -1;
            }
 
+           if (cw2->EOI) {
+               if (pic_get_intr_number(core,  state) != -1) {
+                   PrintError("Interrupt pending after EOI\n");
+               }
+           }
+
+
+
            state->slave_ocw2 = cw;
        } else if (IS_OCW3(cw)) {
            // Basically sets the IRR/ISR read flag