summaryrefslogtreecommitdiff
path: root/ReferenceCode/RapidStart/Smm/x64/RapidStartAsm.asm
diff options
context:
space:
mode:
Diffstat (limited to 'ReferenceCode/RapidStart/Smm/x64/RapidStartAsm.asm')
-rw-r--r--ReferenceCode/RapidStart/Smm/x64/RapidStartAsm.asm56
1 files changed, 56 insertions, 0 deletions
diff --git a/ReferenceCode/RapidStart/Smm/x64/RapidStartAsm.asm b/ReferenceCode/RapidStart/Smm/x64/RapidStartAsm.asm
new file mode 100644
index 0000000..84c501f
--- /dev/null
+++ b/ReferenceCode/RapidStart/Smm/x64/RapidStartAsm.asm
@@ -0,0 +1,56 @@
+;
+; This file contains an 'Intel Peripheral Driver' and is
+; licensed for Intel CPUs and chipsets under the terms of your
+; license agreement with Intel or your vendor. This file may
+; be modified by the user, subject to additional terms of the
+; license agreement
+;
+ page ,132
+ title RapidStart ARCHITECTURAL SMM ASSEMBLY HOOKS
+;------------------------------------------------------------------------------
+;
+; Copyright (c) 2005 -2012 Intel Corporation. All rights reserved
+; This software and associated documentation (if any) is furnished
+; under a license and may only be used or copied in accordance
+; with the terms of the license. Except as permitted by such
+; license, no part of this software or documentation may be
+; reproduced, stored in a retrieval system, or transmitted in any
+; form or by any means without the express written consent of
+; Intel Corporation.
+;
+; Module Name:
+;
+; RapidStartAsm.asm
+;
+; Abstract:
+;
+; Assembly code of the implementation of X64 RapidStart
+;
+;------------------------------------------------------------------------------
+
+text SEGMENT
+
+;------------------------------------------------------------------------------
+; UINT64
+; ScanValueMem64 (
+; VOID* BaseAddress,
+; UINT64 PageSize,
+; UINT64 Index
+; )
+;------------------------------------------------------------------------------
+ScanValueMem64 PROC USES rbx rsi rdi
+ xor rsi, rsi
+ dec rsi
+ mov rdi, rcx
+ mov rax, r8
+ mov rcx, rdx
+ repe scasq
+ mov rax, rsi
+ lea rbx, [rdi - 8]
+ cmovne rax, rbx
+ ret
+ScanValueMem64 ENDP
+
+text ENDS
+END
+