Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 14: 80x86 Port.

Similar presentations


Presentation on theme: "Chapter 14: 80x86 Port."— Presentation transcript:

1 Chapter 14: 80x86 Port

2 Register Model and Addressing

3 OS_CPU.H

4 OS_CPU.H

5 OS_CPU_C.C OSTaskStkInit OSTaskStkInit_FPE_x86 Hook functions
Borland floating point emulator Hook functions OSTaskCreateHook() OSTaskDelHook() OSTaskSwHook() OSTaskIdleHook() OSTaskStatHook() OSTimeTickHook() OSInitHookBegin()

6 OS_CPU_C.C

7 OS_CPU.C – OSStkInit()

8 OS_CPU.C – OSStkInit() @OSTaskDel 0xFFFF

9 OS_CPU.C – OSStkInit() void OSTaskDelSelf() { OSTaskDel(OS_PRIO_SELF);
}

10 OS_CPU_A.ASM OSStartHighRdy OSCtxSw OSIntCtxSw OSTickISR

11 OSStartHighRdy()

12 LDS, LES, LFS, LGS, and LSS … AX 89 BX (6F2A) 30 … 6F 2A
DS:_OSTCBHighRdy CS DS(1000) ES(8930) 10000

13 OSCtxSw() The system call which change certain tasks state needs to activate the scheduler and throw an software interrupt. (the macro OS_TASK_SW) The software trap vectors to the OSCtxSw.

14 OSCtxSw()

15 OSCtxSw()

16

17 OSIntCtxSw() OSIntCtxSw is called by OSIntExit to perform a context switch from an ISR. All registers have been saved onto the interrupted task’s stack Stack pointer is also saved into the beginning of the ISR has already done that.

18 OSIntCtxSw()

19 OSTickISR() – the Setup Procedure
void main(): Call OSInit PC_DOSSaveReturn PC_VecSet //install switch vector at vector 0x80 Create at least one application Call OSStart The first task: Install OSTickISR (Change the tick rate)

20

21 Pseudocode

22 OSTickISR()

23 OSTickISR()

24 Using OSTaskStkInit_FPE_x86()

25

26 ptos ptos Size-384 size pbos pbos SS:0000 before after


Download ppt "Chapter 14: 80x86 Port."

Similar presentations


Ads by Google