[RTEMS Project] #5004: amd64 BSP general protection fault

RTEMS trac trac at rtems.org
Mon Apr 1 19:27:09 UTC 2024


#5004: amd64 BSP general protection fault
-------------------------------+--------------------
  Reporter:  Matheus Pecoraro  |      Owner:  (none)
      Type:  defect            |     Status:  new
  Priority:  normal            |  Milestone:
 Component:  arch/x86_64       |    Version:
  Severity:  normal            |   Keywords:  x86_64
Blocked By:                    |   Blocking:
-------------------------------+--------------------
 I kept getting a general protection fault whenever attempting to execute
 the amd64 BSP while preparing for my GSOC proposal.

 The GPF was being caused by an instruction attempting to move an SSE
 register to an address on the stack not aligned to 16 bytes. After some
 debugging I noticed that the code for setting up the stack frame for a
 context would result in it being misaligned by 8 bytes as to what is
 expected by the x86-64 SysV ABI, thus leading the compiler to unknowingly
 cause the exception (when control is transferred to the function entry
 point RSP+8 is supposed to be a multiple of 16, without this patch RSP
 itself was a multiple of 16).

--
Ticket URL: <http://devel.rtems.org/ticket/5004>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list