VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X86DisablePaging32.c@ 107675

最後變更 在這個檔案從107675是 99404,由 vboxsync 提交於 2 年 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.2 KB
 
1/** @file
2 IA-32/x64 AsmDisablePaging32()
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include "BaseLibInternals.h"
10
11/**
12 Disables the 32-bit paging mode on the CPU.
13
14 Disables the 32-bit paging mode on the CPU and returns to 32-bit protected
15 mode. This function assumes the current execution mode is 32-paged protected
16 mode. This function is only available on IA-32. After the 32-bit paging mode
17 is disabled, control is transferred to the function specified by EntryPoint
18 using the new stack specified by NewStack and passing in the parameters
19 specified by Context1 and Context2. Context1 and Context2 are optional and
20 may be NULL. The function EntryPoint must never return.
21
22 If the current execution mode is not 32-bit paged mode, then ASSERT().
23 If EntryPoint is NULL, then ASSERT().
24 If NewStack is NULL, then ASSERT().
25
26 There are a number of constraints that must be followed before calling this
27 function:
28 1) Interrupts must be disabled.
29 2) The caller must be in 32-bit paged mode.
30 3) CR0, CR3, and CR4 must be compatible with 32-bit paged mode.
31 4) CR3 must point to valid page tables that guarantee that the pages for
32 this function and the stack are identity mapped.
33
34 @param EntryPoint A pointer to function to call with the new stack after
35 paging is disabled.
36 @param Context1 A pointer to the context to pass into the EntryPoint
37 function as the first parameter after paging is disabled.
38 @param Context2 A pointer to the context to pass into the EntryPoint
39 function as the second parameter after paging is
40 disabled.
41 @param NewStack A pointer to the new stack to use for the EntryPoint
42 function after paging is disabled.
43
44**/
45VOID
46EFIAPI
47AsmDisablePaging32 (
48 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
49 IN VOID *Context1 OPTIONAL,
50 IN VOID *Context2 OPTIONAL,
51 IN VOID *NewStack
52 )
53{
54 ASSERT (EntryPoint != NULL);
55 ASSERT (NewStack != NULL);
56 InternalX86DisablePaging32 (EntryPoint, Context1, Context2, NewStack);
57}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette