QuarkSocPkg/QncSmmDispatcher: Fix context passed to SMI handlers
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / Smm / DxeSmm / QncSmmDispatcher / QNCSmm.h
CommitLineData
9b6bbcdb
MK
1/** @file\r
2Prototypes and defines for the QNC SMM Dispatcher.\r
3\r
29f169d1 4Copyright (c) 2013-2016 Intel Corporation.\r
9b6bbcdb
MK
5\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef QNC_SMM_H\r
17#define QNC_SMM_H\r
18\r
19//\r
20// Include common header file for this module.\r
21//\r
22#include "CommonHeader.h"\r
23\r
24#include "QNCSmmRegisters.h"\r
25\r
26extern EFI_HANDLE mQNCSmmDispatcherImageHandle;\r
27\r
28\r
29//\r
30// /////////////////////////////////////////////////////////////////////////////\r
31// SUPPORTED PROTOCOLS\r
32//\r
33\r
34//\r
35// Define an enumeration for all the supported protocols\r
36//\r
37typedef enum {\r
38 // UsbType, DELETE:on QuarkNcSocId, there is no usb smi supported\r
39 SxType,\r
40 SwType,\r
41 GpiType,\r
42 QNCnType,\r
43 PowerButtonType,\r
44 PeriodicTimerType,\r
45 NUM_PROTOCOLS\r
46} QNC_SMM_PROTOCOL_TYPE;\r
47\r
48//\r
49// /////////////////////////////////////////////////////////////////////////////\r
50// SPECIFYING A REGISTER\r
51// We want a general way of referring to addresses. For this case, we'll only\r
52// need addresses in the ACPI table (and the TCO entries within the ACPI table).\r
53// However, it's interesting to consider what it would take to support other types\r
54// of addresses. To address Will's concern, I think it prudent to accommodate it\r
55// early on in the design.\r
56//\r
57// Addresses we need to consider:\r
58//\r
59// Type: Required:\r
60// I/O Yes\r
61// ACPI (special case of I/O) Only if we want to\r
62// TCO (special case of ACPI) Only if we want to\r
63// Memory (or Memory Mapped I/O) Only if we want to\r
64// PCI Yes, for BiosWp\r
65//\r
66typedef enum {\r
67 //\r
68 // IO_ADDR_TYPE, // unimplemented\r
69 //\r
70 ACPI_ADDR_TYPE,\r
71 GPE_ADDR_TYPE,\r
72 //\r
73 // MEMORY_ADDR_TYPE, // unimplemented\r
74 //\r
75 MEMORY_MAPPED_IO_ADDRESS_TYPE,\r
76 PCI_ADDR_TYPE,\r
77 NUM_ADDR_TYPES, // count of items in this enum\r
78 QNC_SMM_ADDR_TYPE_NULL = -1 // sentinel to indicate NULL or to signal end of arrays\r
79} ADDR_TYPE;\r
80\r
81//\r
82// Assumption: 32-bits -- enum's evaluate to integer\r
83// Assumption: This code will only run on IA-32. Justification: IA-64 doesn't have SMIs.\r
84// We don't have to worry about 64-bit addresses.\r
85// Typedef the size of addresses in case the numbers I'm using are wrong or in case\r
86// this changes. This is a good idea because PCI_ADDR will change, for example, when\r
87// we add support for PciExpress.\r
88//\r
89typedef UINT16 IO_ADDR;\r
90typedef IO_ADDR ACPI_ADDR; // can omit\r
91typedef IO_ADDR GPE_ADDR; // can omit\r
92typedef IO_ADDR TCO_ADDR; // can omit\r
93typedef VOID *MEM_ADDR;\r
94typedef MEM_ADDR MEMORY_MAPPED_IO_ADDRESS;\r
95typedef union {\r
96 UINT32 Raw;\r
97 struct {\r
98 UINT8 Reg;\r
99 UINT8 Fnc;\r
100 UINT8 Dev;\r
101 UINT8 Bus;\r
102 } Fields;\r
103} PCI_ADDR;\r
104\r
105typedef struct {\r
106 ADDR_TYPE Type;\r
107 union {\r
108 //\r
109 // used to initialize during declaration/definition\r
110 //\r
111 UINTN raw;\r
112\r
113 //\r
114 // used to access useful data\r
115 //\r
116 IO_ADDR io;\r
117 ACPI_ADDR acpi;\r
118 GPE_ADDR gpe;\r
119 TCO_ADDR tco;\r
120 MEM_ADDR mem;\r
121 MEMORY_MAPPED_IO_ADDRESS Mmio;\r
122 PCI_ADDR pci;\r
123\r
124 } Data;\r
125\r
126} QNC_SMM_ADDRESS;\r
127//\r
128// Assumption: total size is 64 bits (32 for type and 32 for data) or 8 bytes\r
129//\r
130#define EFI_PCI_ADDRESS_PORT 0xcf8\r
131#define EFI_PCI_DATA_PORT 0xcfc\r
132\r
133//\r
134// /////////////////////////////////////////////////////////////////////////////\r
135// SPECIFYING BITS WITHIN A REGISTER\r
136// Here's a struct that helps us specify a source or enable bit.\r
137//\r
138typedef struct {\r
139 QNC_SMM_ADDRESS Reg;\r
140 UINT8 SizeInBytes; // of the register\r
141 UINT8 Bit;\r
142} QNC_SMM_BIT_DESC;\r
143\r
144//\r
145// Sometimes, we'll have bit descriptions that are unused. It'd be great to have a\r
146// way to easily identify them:\r
147//\r
148#define IS_BIT_DESC_NULL(BitDesc) ((BitDesc).Reg.Type == QNC_SMM_ADDR_TYPE_NULL) // "returns" true when BitDesc is NULL\r
149#define NULL_THIS_BIT_DESC(BitDesc) ((BitDesc).Reg.Type = QNC_SMM_ADDR_TYPE_NULL) // will "return" an integer w/ value of 0\r
150#define NULL_BIT_DESC_INITIALIZER \\r
151 { \\r
152 { \\r
153 QNC_SMM_ADDR_TYPE_NULL, \\r
154 { \\r
155 0 \\r
156 } \\r
157 }, \\r
158 0, 0 \\r
159 }\r
160//\r
161// I'd like a type to specify the callback's Sts & En bits because they'll\r
162// be commonly used together:\r
163//\r
164#define NUM_EN_BITS 2\r
165#define NUM_STS_BITS 1\r
166\r
167//\r
168// Flags\r
169//\r
170typedef UINT8 QNC_SMM_SOURCE_FLAGS;\r
171\r
172//\r
173// Flags required today\r
174//\r
175#define QNC_SMM_NO_FLAGS 0\r
176#define QNC_SMM_SCI_EN_DEPENDENT (BIT0)\r
177#define QNC_SMM_CLEAR_WITH_ZERO (BIT6)\r
178\r
179//\r
180// Flags that might be required tomorrow\r
181// #define QNC_SMM_CLEAR_WITH_ONE 2 // may need to support bits that clear by writing 0\r
182// #define QNC_SMM_MULTIBIT_FIELD 3 // may need to support status/enable fields 2 bits wide\r
183//\r
184typedef struct {\r
185 QNC_SMM_SOURCE_FLAGS Flags;\r
186 QNC_SMM_BIT_DESC En[NUM_EN_BITS];\r
187 QNC_SMM_BIT_DESC Sts[NUM_STS_BITS];\r
188} QNC_SMM_SOURCE_DESC;\r
189//\r
190// 31 bytes, I think\r
191//\r
192#define NULL_SOURCE_DESC_INITIALIZER \\r
193 { \\r
194 QNC_SMM_NO_FLAGS, \\r
195 { \\r
196 NULL_BIT_DESC_INITIALIZER, NULL_BIT_DESC_INITIALIZER \\r
197 }, \\r
198 { \\r
199 NULL_BIT_DESC_INITIALIZER \\r
200 } \\r
201 }\r
202\r
203//\r
204// /////////////////////////////////////////////////////////////////////////////\r
205// CHILD CONTEXTS\r
206// To keep consistent w/ the architecture, we'll need to provide the context\r
207// to the child when we call its callback function. After talking with Will,\r
208// we agreed that we'll need functions to "dig" the context out of the hardware\r
209// in many cases (Sx, Trap, Gpi, etc), and we'll need a function to compare those\r
210// contexts to prevent unnecessary dispatches. I'd like a general type for these\r
211// "GetContext" functions, so I'll need a union of all the protocol contexts for\r
212// our internal use:\r
213//\r
214typedef union {\r
215 //\r
216 // (in no particular order)\r
217 //\r
218 EFI_SMM_ICHN_REGISTER_CONTEXT QNCn;\r
219 EFI_SMM_SX_REGISTER_CONTEXT Sx;\r
220 EFI_SMM_PERIODIC_TIMER_REGISTER_CONTEXT PeriodicTimer;\r
221 EFI_SMM_SW_REGISTER_CONTEXT Sw;\r
222 EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT PowerButton;\r
223 // EFI_SMM_USB_REGISTER_CONTEXT Usb; DELETE:on QuarkNcSocId, there is no usb smi supported\r
224 EFI_SMM_GPI_REGISTER_CONTEXT Gpi;\r
225} QNC_SMM_CONTEXT;\r
226\r
227typedef union {\r
228 //\r
229 // (in no particular order)\r
230 //\r
231 EFI_SMM_SW_CONTEXT Sw;\r
232 EFI_SMM_PERIODIC_TIMER_CONTEXT PeriodicTimer;\r
233} QNC_SMM_BUFFER;\r
234\r
235//\r
236// Assumption: PeriodicTimer largest at 3x64-bits or 24 bytes\r
237//\r
238typedef struct _DATABASE_RECORD DATABASE_RECORD;\r
239\r
240typedef\r
241VOID\r
242(EFIAPI *GET_CONTEXT) (\r
243 IN DATABASE_RECORD * Record,\r
244 OUT QNC_SMM_CONTEXT * Context\r
245 );\r
246//\r
247// Assumption: the GET_CONTEXT function will be as small and simple as possible.\r
248// Assumption: We don't need to pass in an enumeration for the protocol because each\r
249// GET_CONTEXT function is written for only one protocol.\r
250// We also need a function to compare contexts to see if the child should be dispatched\r
251//\r
252typedef\r
253BOOLEAN\r
254(EFIAPI *CMP_CONTEXT) (\r
255 IN QNC_SMM_CONTEXT * Context1,\r
256 IN QNC_SMM_CONTEXT * Context2\r
257 );\r
258\r
259/*\r
260 Returns: True when contexts are equivalent; False otherwise\r
261*/\r
262\r
263//\r
264// This function is used to get the content of CommBuffer that will be passed\r
265// to Callback function\r
266//\r
267typedef\r
268VOID\r
269(EFIAPI *GET_BUFFER) (\r
270 IN DATABASE_RECORD * Record\r
271 );\r
272\r
273//\r
274// Finally, every protocol will require a "Get Context", "Compare Context"\r
275// and "Get CommBuffer" call, so we may as well wrap that up in a table, too.\r
276//\r
277typedef struct {\r
278 GET_CONTEXT GetContext;\r
279 CMP_CONTEXT CmpContext;\r
280 GET_BUFFER GetBuffer;\r
281} CONTEXT_FUNCTIONS;\r
282\r
283extern CONTEXT_FUNCTIONS ContextFunctions[NUM_PROTOCOLS];\r
284\r
285//\r
286// /////////////////////////////////////////////////////////////////////////////\r
287// MAPPING CONTEXT TO BIT DESCRIPTIONS\r
288// I'd like to have a general approach to mapping contexts to bit descriptions.\r
289// Sometimes, we'll find that we can use table lookups or CONSTant assignments;\r
290// other times, we'll find that we'll need to use a function to perform the mapping.\r
291// If we define a macro to mask that process, we'll never have to change the code.\r
292// I don't know if this is desirable or not -- if it isn't, then we can get rid\r
293// of the macros and just use function calls or variable assignments. Doesn't matter\r
294// to me.\r
295// Mapping complex contexts requires a function\r
296//\r
297// DELETE:on QuarkNcSocId, there is no usb smi supported\r
298//EFI_STATUS\r
299//EFIAPI\r
300//MapUsbToSrcDesc (\r
301// IN QNC_SMM_CONTEXT *RegisterContext,\r
302// OUT QNC_SMM_SOURCE_DESC *SrcDesc\r
303// )\r
304/*++\r
305\r
306Routine Description:\r
307\r
308 GC_TODO: Add function description\r
309\r
310Arguments:\r
311\r
312 RegisterContext - GC_TODO: add argument description\r
313 SrcDesc - GC_TODO: add argument description\r
314\r
315Returns:\r
316\r
317 GC_TODO: add return values\r
318\r
319--*/\r
320;\r
321\r
322EFI_STATUS\r
323MapPeriodicTimerToSrcDesc (\r
324 IN QNC_SMM_CONTEXT *RegisterContext,\r
325 OUT QNC_SMM_SOURCE_DESC *SrcDesc\r
326 )\r
327/*++\r
328\r
329Routine Description:\r
330\r
331 GC_TODO: Add function description\r
332\r
333Arguments:\r
334\r
335 RegisterContext - GC_TODO: add argument description\r
336 SrcDesc - GC_TODO: add argument description\r
337\r
338Returns:\r
339\r
340 GC_TODO: add return values\r
341\r
342--*/\r
343;\r
344\r
345//\r
346// Mapping simple contexts can be done by assignment or lookup table\r
347//\r
348extern CONST QNC_SMM_SOURCE_DESC SW_SOURCE_DESC;\r
349extern CONST QNC_SMM_SOURCE_DESC SX_SOURCE_DESC;\r
350\r
351//\r
352// With the changes we've made to the protocols, we can now use table\r
353// lookups for the following protocols:\r
354//\r
355extern CONST QNC_SMM_SOURCE_DESC GPI_SOURCE_DESC;\r
356\r
357extern QNC_SMM_SOURCE_DESC QNCN_SOURCE_DESCS[NUM_ICHN_TYPES];\r
358\r
359\r
360//\r
361// For QNCx, APMC is UINT8 port, so the MAX SWI Value is 0xFF.\r
362//\r
363#define MAXIMUM_SWI_VALUE 0xFF\r
364\r
365\r
366//\r
367// Open: Need to make sure this kind of type cast will actually work.\r
368// May need an intermediate form w/ two VOID* arguments. I'll figure\r
369// that out when I start compiling.\r
370\r
371///////////////////////////////////////////////////////////////////////////////\r
372//\r
373typedef\r
374VOID\r
375(EFIAPI *QNC_SMM_CLEAR_SOURCE) (\r
376 QNC_SMM_SOURCE_DESC * SrcDesc\r
377 );\r
378\r
379//\r
380// /////////////////////////////////////////////////////////////////////////////\r
381// "DATABASE" RECORD\r
382// Linked list data structures\r
383//\r
384#define DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('D', 'B', 'R', 'C')\r
385\r
386struct _DATABASE_RECORD {\r
387 UINT32 Signature;\r
388 LIST_ENTRY Link;\r
389\r
390 //\r
391 // Status and Enable bit description\r
392 //\r
393 QNC_SMM_SOURCE_DESC SrcDesc;\r
394\r
395 //\r
396 // Callback function\r
397 //\r
398 EFI_SMM_HANDLER_ENTRY_POINT2 Callback;\r
29f169d1
MK
399 QNC_SMM_CONTEXT ChildContext;\r
400 VOID *CallbackContext;\r
401 QNC_SMM_BUFFER CommBuffer;\r
9b6bbcdb
MK
402 UINTN BufferSize;\r
403\r
404 //\r
405 // Special handling hooks -- init them to NULL if unused/unneeded\r
406 //\r
407 QNC_SMM_CLEAR_SOURCE ClearSource; // needed for SWSMI timer\r
408 // Functions required to make callback code general\r
409 //\r
410 CONTEXT_FUNCTIONS ContextFunctions;\r
411\r
412 //\r
413 // The protocol that this record dispatches\r
414 //\r
415 QNC_SMM_PROTOCOL_TYPE ProtocolType;\r
416\r
417};\r
418\r
419#define DATABASE_RECORD_FROM_LINK(_record) CR (_record, DATABASE_RECORD, Link, DATABASE_RECORD_SIGNATURE)\r
420#define DATABASE_RECORD_FROM_CONTEXT(_record) CR (_record, DATABASE_RECORD, ChildContext, DATABASE_RECORD_SIGNATURE)\r
421\r
422//\r
423// /////////////////////////////////////////////////////////////////////////////\r
424// HOOKING INTO THE ARCHITECTURE\r
425//\r
426typedef\r
427EFI_STATUS\r
428(EFIAPI *QNC_SMM_GENERIC_REGISTER) (\r
429 IN VOID **This,\r
430 IN VOID *DispatchFunction,\r
431 IN VOID *RegisterContext,\r
432 OUT EFI_HANDLE * DispatchHandle\r
433 );\r
434typedef\r
435EFI_STATUS\r
436(EFIAPI *QNC_SMM_GENERIC_UNREGISTER) (\r
437 IN VOID **This,\r
438 IN EFI_HANDLE DispatchHandle\r
439 );\r
440\r
441//\r
442// Define a memory "stamp" equivalent in size and function to most of the protocols\r
443//\r
444typedef struct {\r
445 QNC_SMM_GENERIC_REGISTER Register;\r
446 QNC_SMM_GENERIC_UNREGISTER Unregister;\r
447 UINTN Extra1;\r
448 UINTN Extra2; // may not need this one\r
449} QNC_SMM_GENERIC_PROTOCOL;\r
450\r
451EFI_STATUS\r
452QNCSmmCoreRegister (\r
453 IN QNC_SMM_GENERIC_PROTOCOL *This,\r
454 IN EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction,\r
455 IN QNC_SMM_CONTEXT *RegisterContext,\r
456 OUT EFI_HANDLE *DispatchHandle\r
457 )\r
458/*++\r
459\r
460Routine Description:\r
461\r
462 GC_TODO: Add function description\r
463\r
464Arguments:\r
465\r
466 This - GC_TODO: add argument description\r
467 DispatchFunction - GC_TODO: add argument description\r
468 RegisterContext - GC_TODO: add argument description\r
469 DispatchHandle - GC_TODO: add argument description\r
470\r
471Returns:\r
472\r
473 GC_TODO: add return values\r
474\r
475--*/\r
476;\r
477EFI_STATUS\r
478QNCSmmCoreUnRegister (\r
479 IN QNC_SMM_GENERIC_PROTOCOL *This,\r
480 IN EFI_HANDLE DispatchHandle\r
481 )\r
482/*++\r
483\r
484Routine Description:\r
485\r
486 GC_TODO: Add function description\r
487\r
488Arguments:\r
489\r
490 This - GC_TODO: add argument description\r
491 DispatchHandle - GC_TODO: add argument description\r
492\r
493Returns:\r
494\r
495 GC_TODO: add return values\r
496\r
497--*/\r
498;\r
499\r
500typedef union {\r
501 QNC_SMM_GENERIC_PROTOCOL Generic;\r
502\r
503 // EFI_SMM_USB_DISPATCH2_PROTOCOL Usb; DELETE:on QuarkNcSocId, there is no usb smi supported\r
504 EFI_SMM_SX_DISPATCH2_PROTOCOL Sx;\r
505 EFI_SMM_SW_DISPATCH2_PROTOCOL Sw;\r
506 EFI_SMM_GPI_DISPATCH2_PROTOCOL Gpi;\r
507 EFI_SMM_ICHN_DISPATCH2_PROTOCOL QNCn;\r
508 EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL PowerButton;\r
509 EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL PeriodicTimer;\r
510} QNC_SMM_PROTOCOL;\r
511\r
512//\r
513// Define a structure to help us identify the generic protocol\r
514//\r
515#define PROTOCOL_SIGNATURE SIGNATURE_32 ('P', 'R', 'O', 'T')\r
516\r
517typedef struct {\r
518 UINTN Signature;\r
519\r
520 QNC_SMM_PROTOCOL_TYPE Type;\r
521 EFI_GUID *Guid;\r
522 QNC_SMM_PROTOCOL Protocols;\r
523} QNC_SMM_QUALIFIED_PROTOCOL;\r
524\r
525#define QUALIFIED_PROTOCOL_FROM_GENERIC(_generic) \\r
526 CR (_generic, \\r
527 QNC_SMM_QUALIFIED_PROTOCOL, \\r
528 Protocols, \\r
529 PROTOCOL_SIGNATURE \\r
530 )\r
531\r
532//\r
533// Create private data for the protocols that we'll publish\r
534//\r
535typedef struct {\r
536 LIST_ENTRY CallbackDataBase;\r
537 EFI_HANDLE SmiHandle;\r
538 EFI_HANDLE InstallMultProtHandle;\r
539 QNC_SMM_QUALIFIED_PROTOCOL Protocols[NUM_PROTOCOLS];\r
540} PRIVATE_DATA;\r
541\r
542extern PRIVATE_DATA mPrivateData;\r
543\r
544//\r
545// /////////////////////////////////////////////////////////////////////////////\r
546//\r
547VOID\r
548EFIAPI\r
549SwGetContext (\r
550 IN DATABASE_RECORD *Record,\r
551 OUT QNC_SMM_CONTEXT *Context\r
552 )\r
553/*++\r
554\r
555Routine Description:\r
556\r
557 GC_TODO: Add function description\r
558\r
559Arguments:\r
560\r
561 Record - GC_TODO: add argument description\r
562 Context - GC_TODO: add argument description\r
563\r
564Returns:\r
565\r
566 GC_TODO: add return values\r
567\r
568--*/\r
569;\r
570\r
571BOOLEAN\r
572EFIAPI\r
573SwCmpContext (\r
574 IN QNC_SMM_CONTEXT *Context1,\r
575 IN QNC_SMM_CONTEXT *Context2\r
576 )\r
577/*++\r
578\r
579Routine Description:\r
580\r
581 GC_TODO: Add function description\r
582\r
583Arguments:\r
584\r
585 Context1 - GC_TODO: add argument description\r
586 Context2 - GC_TODO: add argument description\r
587\r
588Returns:\r
589\r
590 GC_TODO: add return values\r
591\r
592--*/\r
593;\r
594\r
595VOID\r
596SwGetBuffer (\r
597 IN DATABASE_RECORD * Record\r
598 )\r
599/*++\r
600\r
601Routine Description:\r
602\r
603 GC_TODO: Add function description\r
604\r
605Arguments:\r
606\r
607 Record - GC_TODO: add argument description\r
608\r
609Returns:\r
610\r
611 GC_TODO: add return values\r
612\r
613--*/\r
614;\r
615\r
616VOID\r
617EFIAPI\r
618SxGetContext (\r
619 IN DATABASE_RECORD *Record,\r
620 OUT QNC_SMM_CONTEXT *Context\r
621 )\r
622/*++\r
623\r
624Routine Description:\r
625\r
626 GC_TODO: Add function description\r
627\r
628Arguments:\r
629\r
630 Record - GC_TODO: add argument description\r
631 Context - GC_TODO: add argument description\r
632\r
633Returns:\r
634\r
635 GC_TODO: add return values\r
636\r
637--*/\r
638;\r
639\r
640BOOLEAN\r
641EFIAPI\r
642SxCmpContext (\r
643 IN QNC_SMM_CONTEXT *Context1,\r
644 IN QNC_SMM_CONTEXT *Context2\r
645 )\r
646/*++\r
647\r
648Routine Description:\r
649\r
650 GC_TODO: Add function description\r
651\r
652Arguments:\r
653\r
654 Context1 - GC_TODO: add argument description\r
655 Context2 - GC_TODO: add argument description\r
656\r
657Returns:\r
658\r
659 GC_TODO: add return values\r
660\r
661--*/\r
662;\r
663\r
664VOID\r
665EFIAPI\r
666PeriodicTimerGetContext (\r
667 IN DATABASE_RECORD *Record,\r
668 OUT QNC_SMM_CONTEXT *Context\r
669 )\r
670/*++\r
671\r
672Routine Description:\r
673\r
674 GC_TODO: Add function description\r
675\r
676Arguments:\r
677\r
678 Record - GC_TODO: add argument description\r
679 Context - GC_TODO: add argument description\r
680\r
681Returns:\r
682\r
683 GC_TODO: add return values\r
684\r
685--*/\r
686;\r
687\r
688BOOLEAN\r
689EFIAPI\r
690PeriodicTimerCmpContext (\r
691 IN QNC_SMM_CONTEXT *Context1,\r
692 IN QNC_SMM_CONTEXT *Context2\r
693 )\r
694/*++\r
695\r
696Routine Description:\r
697\r
698 GC_TODO: Add function description\r
699\r
700Arguments:\r
701\r
702 Context1 - GC_TODO: add argument description\r
703 Context2 - GC_TODO: add argument description\r
704\r
705Returns:\r
706\r
707 GC_TODO: add return values\r
708\r
709--*/\r
710;\r
711\r
712VOID\r
713PeriodicTimerGetBuffer (\r
714 IN DATABASE_RECORD * Record\r
715 )\r
716/*++\r
717\r
718Routine Description:\r
719\r
720 GC_TODO: Add function description\r
721\r
722Arguments:\r
723\r
724 Record - GC_TODO: add argument description\r
725\r
726Returns:\r
727\r
728 GC_TODO: add return values\r
729\r
730--*/\r
731;\r
732\r
733VOID\r
734EFIAPI\r
735PowerButtonGetContext (\r
736 IN DATABASE_RECORD *Record,\r
737 OUT QNC_SMM_CONTEXT *Context\r
738 )\r
739/*++\r
740\r
741Routine Description:\r
742\r
743 GC_TODO: Add function description\r
744\r
745Arguments:\r
746\r
747 Record - GC_TODO: add argument description\r
748 Context - GC_TODO: add argument description\r
749\r
750Returns:\r
751\r
752 GC_TODO: add return values\r
753\r
754--*/\r
755;\r
756\r
757BOOLEAN\r
758EFIAPI\r
759PowerButtonCmpContext (\r
760 IN QNC_SMM_CONTEXT *Context1,\r
761 IN QNC_SMM_CONTEXT *Context2\r
762 )\r
763/*++\r
764\r
765Routine Description:\r
766\r
767 GC_TODO: Add function description\r
768\r
769Arguments:\r
770\r
771 Context1 - GC_TODO: add argument description\r
772 Context2 - GC_TODO: add argument description\r
773\r
774Returns:\r
775\r
776 GC_TODO: add return values\r
777\r
778--*/\r
779;\r
780\r
781//\r
782// /////////////////////////////////////////////////////////////////////////////\r
783//\r
784VOID\r
785EFIAPI\r
786QNCSmmPeriodicTimerClearSource (\r
787 QNC_SMM_SOURCE_DESC *SrcDesc\r
788 )\r
789/*++\r
790\r
791Routine Description:\r
792\r
793 GC_TODO: Add function description\r
794\r
795Arguments:\r
796\r
797 SrcDesc - GC_TODO: add argument description\r
798\r
799Returns:\r
800\r
801 GC_TODO: add return values\r
802\r
803--*/\r
804;\r
805\r
806EFI_STATUS\r
807QNCSmmPeriodicTimerDispatchGetNextShorterInterval (\r
808 IN CONST EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL *This,\r
809 IN OUT UINT64 **SmiTickInterval\r
810 )\r
811/*++\r
812\r
813Routine Description:\r
814\r
815 GC_TODO: Add function description\r
816\r
817Arguments:\r
818\r
819 This - GC_TODO: add argument description\r
820 SmiTickInterval - GC_TODO: add argument description\r
821\r
822Returns:\r
823\r
824 GC_TODO: add return values\r
825\r
826--*/\r
827;\r
828\r
829VOID\r
830QNCSmmSxGoToSleep (\r
831 VOID\r
832 )\r
833/*++\r
834\r
835Routine Description:\r
836\r
837 GC_TODO: Add function description\r
838\r
839Arguments:\r
840\r
841 None\r
842\r
843Returns:\r
844\r
845 GC_TODO: add return values\r
846\r
847--*/\r
848;\r
849\r
850VOID\r
851EFIAPI\r
852QNCSmmQNCnClearSource (\r
853 QNC_SMM_SOURCE_DESC *SrcDesc\r
854 )\r
855/*++\r
856\r
857Routine Description:\r
858\r
859 GC_TODO: Add function description\r
860\r
861Arguments:\r
862\r
863 SrcDesc - GC_TODO: add argument description\r
864\r
865Returns:\r
866\r
867 GC_TODO: add return values\r
868\r
869--*/\r
870;\r
871\r
872#endif\r