From 0d290b91117fb0002e247b7a48a38eb40fc48fbd Mon Sep 17 00:00:00 2001 From: Test_User Date: Thu, 5 Jan 2023 03:29:26 -0500 Subject: Add hardware task switching, get rid of software interrupts --- cpu/task_switching/tdt.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cpu/task_switching/tdt.txt (limited to 'cpu/task_switching/tdt.txt') diff --git a/cpu/task_switching/tdt.txt b/cpu/task_switching/tdt.txt new file mode 100644 index 0000000..d7c7858 --- /dev/null +++ b/cpu/task_switching/tdt.txt @@ -0,0 +1,23 @@ +Each entry is n*(5 + number_of_registers) bits long, where n is the current mode in bits + +Each entry uses the following format: + width: same number of bits as current mode + (higher address) + +----------------------------------------------------------------------------------+ + | array of register's contents on last switch | + +-----------------------------------+----------------------------------------------+ + | upper 1/2: number of segments | lower 1/2: pointer to segments | + +-----------------------------------+----------------------------------------------+ + | upper 1/2: callable segment index | lower 1/2: current process being executed as | + +-----------------------------------+----------------------------------------------+ + | PR to be used when called | + +----------------------------------------------------------------------------------+ + | reserved for specifying where it's being executed | + +-----------------------------------+---------------------+------------------------+ + | upper 1/2: custom id | n bits below: flags | remaining: unused | + +-----------------------------------+---------------------+------------------------+ + (lower address) + +Flags: + 0: Valid + 1: Currently running -- cgit v1.2.3