General Protection - TPSP - Tareas - Segunda parte
Buenas! estamos teniendo un GP cuando hacemos el jump a la tarea IDLE,de las posibles causas que generan un GP (Adjunto abajo) puede ser un error de segmento o un acceso a descriptor nulo.
Intentamos debuggear con GDB la razón de la excepción y vimos si teniamos algun tema con los privilegios de la tarea,pero no nos llamo nada la atención.(especialmente cuando la diapo de la materia hace lo mismo que aca)
Adjunto vinculos relevantes
https://gitlab.exactas.uba.ar/jfigari/grupal-2c2024/-/blob/master/TPSP/src/kernel.asm#L231
https://gitlab.exactas.uba.ar/jfigari/grupal-2c2024/-/blob/master/TPSP/src/tss.c#L37
General Protection Fault
A General Protection Fault may occur for various reasons. The most common are:
-Segment error (privilege, type, limit, read/write rights).
-Executing a privileged instruction while CPL != 0.
-Writing a 1 in a reserved register field or writing invalid value combinations (e.g. CR0 with PE=0 and PG=1).
-Referencing or accessing a null-descriptor.
-Accessing a memory address with bits 48-63 not matching bit 47 (e.g. 0x_0000_8000_0000_0000 instead of 0x_ffff_8000_0000_0000) in 64 bit mode.
-Executing an instruction that requires memory operands to be aligned (e.g. movaps) without the proper alignment.
The saved instruction pointer points to the instruction which caused the exception.
Error code: The General Protection Fault sets an error code, which is the segment selector index when the exception is segment related. Otherwise, 0.