]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ia32/WriteIdt.asm
Maintainers.txt: Remove EdkCompatibilityPkg information
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / Ia32 / WriteIdt.asm
CommitLineData
3eb9473e 1;------------------------------------------------------------------------------\r
2;\r
4ea9375a
HT
3; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
4; This program and the accompanying materials\r
3eb9473e 5; are licensed and made available under the terms and conditions of the BSD License\r
6; which accompanies this distribution. The full text of the license may be found at\r
7; http://opensource.org/licenses/bsd-license.php\r
8;\r
9; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11;\r
12; Module Name:\r
13;\r
14; WriteIdt.Asm\r
15;\r
16; Abstract:\r
17;\r
18; SetIdtBase function\r
19;\r
20; Notes:\r
21;\r
22;------------------------------------------------------------------------------\r
23\r
24 .586p\r
25 .model flat,C\r
26 .mmx\r
27 .code\r
28\r
29;------------------------------------------------------------------------------\r
30; void\r
31; SetIdtBase (\r
32; UINT32 IdtBase,\r
33; UINT16 IdtLimit \r
34; )\r
35;\r
36; Abstract: Set IDTR with the given physical address\r
37;\r
38SetIdtBase PROC C PUBLIC IdtBase:DWORD, IdtLimit:WORD\r
39 LOCAL IdtrBuf:FWORD\r
40\r
41 mov eax, IdtBase\r
42 mov cx, IdtLimit\r
43 mov DWORD PTR IdtrBuf + 2, eax ; write IDT base address\r
44 mov WORD PTR IdtrBuf, cx ; write ITD limit\r
45 lidt FWORD PTR IdtrBuf\r
46 ret\r
47SetIdtBase ENDP\r
48\r
49 END