]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/PlatformInitPei/LegacySpeaker.h
UefiCpuPkg/PiSmmCpuDxeSmm: patch "gSmiCr3" with PatchInstructionX86()
[mirror_edk2.git] / Vlv2TbltDevicePkg / PlatformInitPei / LegacySpeaker.h
1 /*++
2
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14
15 Module Name:
16
17 LegacySpeaker.h
18
19 Abstract:
20
21 Speaker enabling related data
22
23 --*/
24
25 #ifndef _PEI_LEGACY_SPEAKER_H
26 #define _PEI_LEGACY_SPEAKER_H
27
28
29 //
30 // Speaker Related Port Information
31 //
32 #define EFI_TIMER_COUNTER_PORT 0x40
33 #define EFI_TIMER_CONTROL_PORT 0x43
34 #define EFI_TIMER_2_PORT 0x42
35 #define EFI_SPEAKER_CONTROL_PORT 0x61
36
37 #define EFI_SPEAKER_OFF_MASK 0xFC
38
39 #define EFI_DEFAULT_BEEP_FREQUENCY 0x500
40
41 //
42 // Default Intervals/Beep Duration
43 //
44 #define EFI_DEFAULT_LONG_BEEP_DURATION 0x70000
45 #define EFI_DEFAULT_SHORT_BEEP_DURATION 0x50000
46 #define EFI_DEFAULT_BEEP_TIME_INTERVAL 0x20000
47
48
49 EFI_STATUS
50 EFIAPI
51 ProgramToneFrequency (
52 IN CONST EFI_PEI_SERVICES **PeiServices,
53 IN UINT16 Frequency
54 );
55
56
57 EFI_STATUS
58 EFIAPI
59 GenerateBeepTone (
60 IN CONST EFI_PEI_SERVICES **PeiServices,
61 IN UINTN NumberOfBeeps,
62 IN UINTN BeepDuration,
63 IN UINTN TimeInterval
64 );
65
66 EFI_STATUS
67 TurnOnSpeaker (
68 IN CONST EFI_PEI_SERVICES **PeiServices
69 );
70
71 EFI_STATUS
72 TurnOffSpeaker (
73 IN CONST EFI_PEI_SERVICES **PeiServices
74 );
75
76 #endif