Vishal Bhoj | 82c8071 | 2015-12-15 21:13:33 +0530 | [diff] [blame] | 1 | /**@file
|
| 2 |
|
| 3 | Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
| 4 | This program and the accompanying materials
|
| 5 | are licensed and made available under the terms and conditions of the BSD License
|
| 6 | which accompanies this distribution. The full text of the license may be found at
|
| 7 | http://opensource.org/licenses/bsd-license.php
|
| 8 |
|
| 9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
| 10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
| 11 |
|
| 12 | Module Name:
|
| 13 |
|
| 14 | Timer.h
|
| 15 |
|
| 16 | Abstract:
|
| 17 |
|
| 18 | NT Emulation Architectural Protocol Driver as defined in Tiano.
|
| 19 | This Timer module uses an NT Thread to simulate the timer-tick driven
|
| 20 | timer service.
|
| 21 |
|
| 22 | **/
|
| 23 |
|
| 24 | #ifndef _TIMER_H_
|
| 25 | #define _TIMER_H_
|
| 26 |
|
| 27 |
|
| 28 | #include <Uefi.h>
|
| 29 | #include <WinNtDxe.h>
|
| 30 | #include <Protocol/Timer.h>
|
| 31 | #include <Protocol/Cpu.h>
|
| 32 | #include <Library/DebugLib.h>
|
| 33 | #include <Library/UefiDriverEntryPoint.h>
|
| 34 | #include <Library/WinNtLib.h>
|
| 35 | #include <Library/UefiBootServicesTableLib.h>
|
| 36 |
|
| 37 |
|
| 38 | //
|
| 39 | // Legal timer value range in 100 ns units
|
| 40 | //
|
| 41 | #define TIMER_MINIMUM_VALUE 0
|
| 42 | #define TIMER_MAXIMUM_VALUE (0x100000000 - 1)
|
| 43 |
|
| 44 | //
|
| 45 | // Default timer value in 100 ns units (10 ms)
|
| 46 | //
|
| 47 | #define DEFAULT_TIMER_TICK_DURATION 100000
|
| 48 |
|
| 49 | //
|
| 50 | // Function Prototypes
|
| 51 | //
|
| 52 | EFI_STATUS
|
| 53 | EFIAPI
|
| 54 | WinNtTimerDriverInitialize (
|
| 55 | IN EFI_HANDLE ImageHandle,
|
| 56 | IN EFI_SYSTEM_TABLE *SystemTable
|
| 57 | )
|
| 58 | /*++
|
| 59 |
|
| 60 | Routine Description:
|
| 61 |
|
| 62 | TODO: Add function description
|
| 63 |
|
| 64 | Arguments:
|
| 65 |
|
| 66 | ImageHandle - TODO: add argument description
|
| 67 | SystemTable - TODO: add argument description
|
| 68 |
|
| 69 | Returns:
|
| 70 |
|
| 71 | TODO: add return values
|
| 72 |
|
| 73 | --*/
|
| 74 | ;
|
| 75 |
|
| 76 | EFI_STATUS
|
| 77 | EFIAPI
|
| 78 | WinNtTimerDriverRegisterHandler (
|
| 79 | IN EFI_TIMER_ARCH_PROTOCOL *This,
|
| 80 | IN EFI_TIMER_NOTIFY NotifyFunction
|
| 81 | )
|
| 82 | /*++
|
| 83 |
|
| 84 | Routine Description:
|
| 85 |
|
| 86 | TODO: Add function description
|
| 87 |
|
| 88 | Arguments:
|
| 89 |
|
| 90 | This - TODO: add argument description
|
| 91 | NotifyFunction - TODO: add argument description
|
| 92 |
|
| 93 | Returns:
|
| 94 |
|
| 95 | TODO: add return values
|
| 96 |
|
| 97 | --*/
|
| 98 | ;
|
| 99 |
|
| 100 | EFI_STATUS
|
| 101 | EFIAPI
|
| 102 | WinNtTimerDriverSetTimerPeriod (
|
| 103 | IN EFI_TIMER_ARCH_PROTOCOL *This,
|
| 104 | IN UINT64 TimerPeriod
|
| 105 | )
|
| 106 | /*++
|
| 107 |
|
| 108 | Routine Description:
|
| 109 |
|
| 110 | TODO: Add function description
|
| 111 |
|
| 112 | Arguments:
|
| 113 |
|
| 114 | This - TODO: add argument description
|
| 115 | TimerPeriod - TODO: add argument description
|
| 116 |
|
| 117 | Returns:
|
| 118 |
|
| 119 | TODO: add return values
|
| 120 |
|
| 121 | --*/
|
| 122 | ;
|
| 123 |
|
| 124 | EFI_STATUS
|
| 125 | EFIAPI
|
| 126 | WinNtTimerDriverGetTimerPeriod (
|
| 127 | IN EFI_TIMER_ARCH_PROTOCOL *This,
|
| 128 | OUT UINT64 *TimerPeriod
|
| 129 | )
|
| 130 | /*++
|
| 131 |
|
| 132 | Routine Description:
|
| 133 |
|
| 134 | TODO: Add function description
|
| 135 |
|
| 136 | Arguments:
|
| 137 |
|
| 138 | This - TODO: add argument description
|
| 139 | TimerPeriod - TODO: add argument description
|
| 140 |
|
| 141 | Returns:
|
| 142 |
|
| 143 | TODO: add return values
|
| 144 |
|
| 145 | --*/
|
| 146 | ;
|
| 147 |
|
| 148 | EFI_STATUS
|
| 149 | EFIAPI
|
| 150 | WinNtTimerDriverGenerateSoftInterrupt (
|
| 151 | IN EFI_TIMER_ARCH_PROTOCOL *This
|
| 152 | )
|
| 153 | /*++
|
| 154 |
|
| 155 | Routine Description:
|
| 156 |
|
| 157 | TODO: Add function description
|
| 158 |
|
| 159 | Arguments:
|
| 160 |
|
| 161 | This - TODO: add argument description
|
| 162 |
|
| 163 | Returns:
|
| 164 |
|
| 165 | TODO: add return values
|
| 166 |
|
| 167 | --*/
|
| 168 | ;
|
| 169 |
|
| 170 | #endif
|