summaryrefslogtreecommitdiff
path: root/DuetPkg/DxeIpl/X64
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-03 00:48:56 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-03 00:48:56 +0000
commit9008db4a285b14880d213a258d233da458dae8e3 (patch)
tree76018e0d76c88055d542b3db3873e241d1881082 /DuetPkg/DxeIpl/X64
parent3eb90413badc94ddeb9ebbda61e4d703e4a706d7 (diff)
downloadedk2-platforms-9008db4a285b14880d213a258d233da458dae8e3.tar.xz
Clean up DxeIpl:
1. Remove the assembly by using IoLib & BaseLib in MdePkg 2. Refine code to pass CYGWIN GCC tool chain build git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7404 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/DxeIpl/X64')
-rw-r--r--DuetPkg/DxeIpl/X64/CpuIoAccess.asm52
-rw-r--r--DuetPkg/DxeIpl/X64/EnterDxeCore.asm45
-rw-r--r--DuetPkg/DxeIpl/X64/EnterDxeCore.c32
3 files changed, 32 insertions, 97 deletions
diff --git a/DuetPkg/DxeIpl/X64/CpuIoAccess.asm b/DuetPkg/DxeIpl/X64/CpuIoAccess.asm
deleted file mode 100644
index f1515e8c84..0000000000
--- a/DuetPkg/DxeIpl/X64/CpuIoAccess.asm
+++ /dev/null
@@ -1,52 +0,0 @@
- title CpuIoAccess.asm
-;------------------------------------------------------------------------------
-;
-; Copyright (c) 2006 - 2007, Intel Corporation
-; All rights reserved. This program and the accompanying materials
-; are licensed and made available under the terms and conditions of the BSD License
-; which accompanies this distribution. The full text of the license may be found at
-; http://opensource.org/licenses/bsd-license.php
-;
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;
-; Module Name:
-; CpuIoAccess.asm
-;
-; Abstract:
-; CPU IO Abstraction
-;
-;------------------------------------------------------------------------------
-
-
-.code
-
-;------------------------------------------------------------------------------
-; UINT8
-; CpuIoRead8 (
-; UINT16 Port // rcx
-; )
-;------------------------------------------------------------------------------
-CpuIoRead8 PROC PUBLIC
- xor eax, eax
- mov dx, cx
- in al, dx
- ret
-CpuIoRead8 ENDP
-
-;------------------------------------------------------------------------------
-; VOID
-; CpuIoWrite8 (
-; UINT16 Port, // rcx
-; UINT32 Data // rdx
-; )
-;------------------------------------------------------------------------------
-CpuIoWrite8 PROC PUBLIC
- mov eax, edx
- mov dx, cx
- out dx, al
- ret
-CpuIoWrite8 ENDP
-
-
-END
diff --git a/DuetPkg/DxeIpl/X64/EnterDxeCore.asm b/DuetPkg/DxeIpl/X64/EnterDxeCore.asm
deleted file mode 100644
index a1eada3905..0000000000
--- a/DuetPkg/DxeIpl/X64/EnterDxeCore.asm
+++ /dev/null
@@ -1,45 +0,0 @@
- TITLE EnterDxeCore.asm: Assembly code for the entering DxeCore
-;------------------------------------------------------------------------------
-;*
-;* Copyright 2006, Intel Corporation
-;* All rights reserved. This program and the accompanying materials
-;* are licensed and made available under the terms and conditions of the BSD License
-;* which accompanies this distribution. The full text of the license may be found at
-;* http://opensource.org/licenses/bsd-license.php
-;*
-;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-;*
-;* EnterDxeCore.asm
-;*
-;* Abstract:
-;*
-;------------------------------------------------------------------------------
-
-.code
-
-;
-; VOID
-; EnterDxeMain (
-; IN VOID *StackTop, // rcx
-; IN VOID *DxeCoreEntryPoint, // rdx
-; IN VOID *Hob, // r8
-; IN VOID *PageTable // r9
-; )
-;
-EnterDxeMain PROC
-
- mov cr3, r9
- sub rcx, 32
- mov rsp, rcx
- mov rcx, r8
- push 0
- jmp rdx
-
-; should never get here
- jmp $
- ret
-
-EnterDxeMain ENDP
-
-END
diff --git a/DuetPkg/DxeIpl/X64/EnterDxeCore.c b/DuetPkg/DxeIpl/X64/EnterDxeCore.c
new file mode 100644
index 0000000000..0443041f24
--- /dev/null
+++ b/DuetPkg/DxeIpl/X64/EnterDxeCore.c
@@ -0,0 +1,32 @@
+/** @file
+ x64 specific code to enter DxeCore
+
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#include "DxeIpl.h"
+
+VOID
+EnterDxeMain (
+ IN VOID *StackTop,
+ IN VOID *DxeCoreEntryPoint,
+ IN VOID *Hob,
+ IN VOID *PageTable
+ )
+{
+ AsmWriteCr3 ((UINTN) PageTable);
+ SwitchStack (
+ (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
+ Hob,
+ NULL,
+ StackTop
+ );
+}