Skip to content

Commit

Permalink
DEBUG - demo killing core thread
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ab committed Feb 5, 2025
1 parent 6bb7383 commit 4b5ed85
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions repos/base/src/core/spec/x86/io_port_session_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ using namespace Core;

unsigned char Io_port_session_component::inb(unsigned short address)
{
error(__func__);
asm volatile ("ud2a");

/* check boundaries */
if (!_in_bounds(address, sizeof(unsigned char))) return 0;

Expand All @@ -34,6 +37,9 @@ unsigned char Io_port_session_component::inb(unsigned short address)

unsigned short Io_port_session_component::inw(unsigned short address)
{
error(__func__);
asm volatile ("ud2a");

/* check boundaries */
if (!_in_bounds(address, sizeof(unsigned short))) return 0;

Expand All @@ -45,6 +51,9 @@ unsigned short Io_port_session_component::inw(unsigned short address)

unsigned Io_port_session_component::inl(unsigned short address)
{
error(__func__);
asm volatile ("ud2a");

/* check boundaries */
if (!_in_bounds(address, sizeof(unsigned))) return 0;

Expand All @@ -56,6 +65,9 @@ unsigned Io_port_session_component::inl(unsigned short address)

void Io_port_session_component::outb(unsigned short address, unsigned char value)
{
error(__func__);
asm volatile ("ud2a");

/* check boundaries */
if (!_in_bounds(address, sizeof(unsigned char))) return;

Expand All @@ -65,6 +77,9 @@ void Io_port_session_component::outb(unsigned short address, unsigned char value

void Io_port_session_component::outw(unsigned short address, unsigned short value)
{
error(__func__);
asm volatile ("ud2a");

/* check boundaries */
if (!_in_bounds(address, sizeof(unsigned short))) return;

Expand All @@ -74,6 +89,9 @@ void Io_port_session_component::outw(unsigned short address, unsigned short valu

void Io_port_session_component::outl(unsigned short address, unsigned value)
{
error(__func__);
asm volatile ("ud2a");

/* check boundaries */
if (!_in_bounds(address, sizeof(unsigned))) return;

Expand Down

0 comments on commit 4b5ed85

Please sign in to comment.