1209ff23fSmrg/*
2209ff23fSmrg * Copyright 2006-2007 Advanced Micro Devices, Inc.
3209ff23fSmrg *
4209ff23fSmrg * Permission is hereby granted, free of charge, to any person obtaining a
5209ff23fSmrg * copy of this software and associated documentation files (the "Software"),
6209ff23fSmrg * to deal in the Software without restriction, including without limitation
7209ff23fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8209ff23fSmrg * and/or sell copies of the Software, and to permit persons to whom the
9209ff23fSmrg * Software is furnished to do so, subject to the following conditions:
10209ff23fSmrg *
11209ff23fSmrg * The above copyright notice and this permission notice shall be included in
12209ff23fSmrg * all copies or substantial portions of the Software.
13209ff23fSmrg *
14209ff23fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15209ff23fSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16209ff23fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17209ff23fSmrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18209ff23fSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19209ff23fSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20209ff23fSmrg * OTHER DEALINGS IN THE SOFTWARE.
21209ff23fSmrg */
22209ff23fSmrg
23209ff23fSmrg#ifdef NT_BUILD
24209ff23fSmrg#ifdef LH_BUILD
25209ff23fSmrg#include <ntddk.h>
26209ff23fSmrg#else
27209ff23fSmrg#include <miniport.h>
28209ff23fSmrg#endif // LH_BUILD
29209ff23fSmrg#endif // NT_BUILD
30209ff23fSmrg
31209ff23fSmrg
32209ff23fSmrg#if ((defined DBG) || (defined DEBUG))
33209ff23fSmrg#define DEBUG_PARSER				1   // enable parser debug output
34209ff23fSmrg#endif
35209ff23fSmrg
36209ff23fSmrg#define USE_SWITCH_COMMAND			1
37209ff23fSmrg#define	DRIVER_TYPE_PARSER		0x48
38209ff23fSmrg
39209ff23fSmrg#define PARSER_TYPE DRIVER_TYPE_PARSER
40209ff23fSmrg
41209ff23fSmrg#define AllocateWorkSpace(x,y)      AllocateMemory(pDeviceData,y)
42209ff23fSmrg#define FreeWorkSpace(x,y)          ReleaseMemory(x,y)
43209ff23fSmrg
44209ff23fSmrg#define RELATIVE_TO_BIOS_IMAGE( x ) ((ULONG_PTR)x + (ULONG_PTR)((DEVICE_DATA*)pParserTempData->pDeviceData->pBIOS_Image))
45209ff23fSmrg#define RELATIVE_TO_TABLE( x )      (x + (UCHAR *)(pParserTempData->pWorkingTableData->pTableHead))
46209ff23fSmrg
47