https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
63 lines
1.4 KiB
NASM
63 lines
1.4 KiB
NASM
;; @file
|
|
; This is the assembly code for transferring to control to OS S3 waking vector
|
|
; for IA32 platform
|
|
;
|
|
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
|
;
|
|
; SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
;
|
|
;;
|
|
SECTION .text
|
|
|
|
global ASM_PFX(AsmFixAddress16)
|
|
global ASM_PFX(AsmJmpAddr32)
|
|
|
|
;-----------------------------------------
|
|
;VOID
|
|
;AsmTransferControl (
|
|
; IN UINT32 S3WakingVector,
|
|
; IN UINT32 AcpiLowMemoryBase
|
|
; );
|
|
;-----------------------------------------
|
|
|
|
global ASM_PFX(AsmTransferControl)
|
|
ASM_PFX(AsmTransferControl):
|
|
; S3WakingVector :DWORD
|
|
; AcpiLowMemoryBase :DWORD
|
|
push ebp
|
|
mov ebp, esp
|
|
lea eax, [.0]
|
|
push 0x28 ; CS
|
|
push eax
|
|
mov ecx, [ebp + 8]
|
|
shrd ebx, ecx, 20
|
|
and ecx, 0xf
|
|
mov bx, cx
|
|
mov [@jmp_addr + 1], ebx
|
|
retf
|
|
|
|
BITS 16
|
|
.0:
|
|
mov ax, 0x30
|
|
o32 mov ds, eax
|
|
o32 mov es, eax
|
|
o32 mov fs, eax
|
|
o32 mov gs, eax
|
|
o32 mov ss, eax
|
|
mov eax, cr0 ; Get control register 0
|
|
and eax, 0x0fffffffe ; Clear PE bit (bit #0)
|
|
mov cr0, eax ; Activate real mode
|
|
@jmp_addr:
|
|
jmp 0x0:0x0
|
|
|
|
global ASM_PFX(AsmTransferControl32)
|
|
ASM_PFX(AsmTransferControl32):
|
|
jmp ASM_PFX(AsmTransferControl)
|
|
|
|
; dummy
|
|
global ASM_PFX(AsmTransferControl16)
|
|
ASM_PFX(AsmTransferControl16):
|
|
ASM_PFX(AsmFixAddress16): DD 0
|
|
ASM_PFX(AsmJmpAddr32): DD 0
|
|
|