Skip to content

XSM Unprivileged Mode Execution

XSM Unprivileged

What does PUSH operation do?

PUSH increments the SP, then pushes the desired value It has different behaviour in privileged and unprivileged mode, pushing either physical address or the logical address into the stack

XSM Paging Hardware and Address Translation

Basic Working of Virtual Machine Model

The application code is designed to be loaded by the OS to start execution from logical address 2056

The Write bit of the code section should be 0.

  • The valid bit must be set for the pages loaded
  • Logical page to physical page mapping be set up
  • PTBR register must be set to the start address of the page table.
  • Minimum of one page must be allocated for the stack with write bit set.

Important

Before an application is run for the first time, the stack pointer register SP is set to value 4095

  • The IP must be set to the entry point.
  • Place the entry point value of the top of the stack and set the stack pointer to this value.
  • Execute the IRET instruction.

XSM machine has an interrupt vector table that maps the interrupt numbers to a corresponding address. The vector table is stored starting from the physical address 492 of the memory. These values are hard-coded into the ROM code.

Interrupt Tutorial

Logical Address Translation

Pasted image 20260108114359.png