Added 2000 to the copyright in the legal header

date	2000.12.08.20.55.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 19:01:46 +00:00
parent 30d3760e36
commit 49a0b8c218
18 changed files with 926 additions and 767 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmalloc - local memory allocation routines
* $Revision: 1.79 $
* $Revision: 1.80 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmclib - Local implementation of C library functions
* $Revision: 1.24 $
* $Revision: 1.29 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -134,10 +134,6 @@
MODULE_NAME ("cmclib")
#ifdef _MSC_VER /* disable some level-4 warnings for VC++ */
#pragma warning(disable:4706) /* warning C4706: assignment within conditional expression */
#endif
#ifndef ACPI_USE_SYSTEM_CLIBRARY
/*******************************************************************************
@ -479,146 +475,146 @@ AcpiCmMemset (
#define POSITIVE 0
#define _XA 0x00 /* extra alphabetic - not supported */
#define _XS 0x40 /* extra space */
#define _BB 0x00 /* BEL, BS, etc. - not supported */
#define _CN 0x20 /* CR, FF, HT, NL, VT */
#define _DI 0x04 /* '0'-'9' */
#define _LO 0x02 /* 'a'-'z' */
#define _PU 0x10 /* punctuation */
#define _SP 0x08 /* space */
#define _UP 0x01 /* 'A'-'Z' */
#define _XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
#define _ACPI_XS 0x40 /* extra space */
#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
#define _ACPI_DI 0x04 /* '0'-'9' */
#define _ACPI_LO 0x02 /* 'a'-'z' */
#define _ACPI_PU 0x10 /* punctuation */
#define _ACPI_SP 0x08 /* space */
#define _ACPI_UP 0x01 /* 'A'-'Z' */
#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
const UINT8 _ctype[257] = {
_CN, /* 0x0 0. */
_CN, /* 0x1 1. */
_CN, /* 0x2 2. */
_CN, /* 0x3 3. */
_CN, /* 0x4 4. */
_CN, /* 0x5 5. */
_CN, /* 0x6 6. */
_CN, /* 0x7 7. */
_CN, /* 0x8 8. */
_CN|_SP, /* 0x9 9. */
_CN|_SP, /* 0xA 10. */
_CN|_SP, /* 0xB 11. */
_CN|_SP, /* 0xC 12. */
_CN|_SP, /* 0xD 13. */
_CN, /* 0xE 14. */
_CN, /* 0xF 15. */
_CN, /* 0x10 16. */
_CN, /* 0x11 17. */
_CN, /* 0x12 18. */
_CN, /* 0x13 19. */
_CN, /* 0x14 20. */
_CN, /* 0x15 21. */
_CN, /* 0x16 22. */
_CN, /* 0x17 23. */
_CN, /* 0x18 24. */
_CN, /* 0x19 25. */
_CN, /* 0x1A 26. */
_CN, /* 0x1B 27. */
_CN, /* 0x1C 28. */
_CN, /* 0x1D 29. */
_CN, /* 0x1E 30. */
_CN, /* 0x1F 31. */
_XS|_SP, /* 0x20 32. ' ' */
_PU, /* 0x21 33. '!' */
_PU, /* 0x22 34. '"' */
_PU, /* 0x23 35. '#' */
_PU, /* 0x24 36. '$' */
_PU, /* 0x25 37. '%' */
_PU, /* 0x26 38. '&' */
_PU, /* 0x27 39. ''' */
_PU, /* 0x28 40. '(' */
_PU, /* 0x29 41. ')' */
_PU, /* 0x2A 42. '*' */
_PU, /* 0x2B 43. '+' */
_PU, /* 0x2C 44. ',' */
_PU, /* 0x2D 45. '-' */
_PU, /* 0x2E 46. '.' */
_PU, /* 0x2F 47. '/' */
_XD|_DI, /* 0x30 48. '0' */
_XD|_DI, /* 0x31 49. '1' */
_XD|_DI, /* 0x32 50. '2' */
_XD|_DI, /* 0x33 51. '3' */
_XD|_DI, /* 0x34 52. '4' */
_XD|_DI, /* 0x35 53. '5' */
_XD|_DI, /* 0x36 54. '6' */
_XD|_DI, /* 0x37 55. '7' */
_XD|_DI, /* 0x38 56. '8' */
_XD|_DI, /* 0x39 57. '9' */
_PU, /* 0x3A 58. ':' */
_PU, /* 0x3B 59. ';' */
_PU, /* 0x3C 60. '<' */
_PU, /* 0x3D 61. '=' */
_PU, /* 0x3E 62. '>' */
_PU, /* 0x3F 63. '?' */
_PU, /* 0x40 64. '@' */
_XD|_UP, /* 0x41 65. 'A' */
_XD|_UP, /* 0x42 66. 'B' */
_XD|_UP, /* 0x43 67. 'C' */
_XD|_UP, /* 0x44 68. 'D' */
_XD|_UP, /* 0x45 69. 'E' */
_XD|_UP, /* 0x46 70. 'F' */
_UP, /* 0x47 71. 'G' */
_UP, /* 0x48 72. 'H' */
_UP, /* 0x49 73. 'I' */
_UP, /* 0x4A 74. 'J' */
_UP, /* 0x4B 75. 'K' */
_UP, /* 0x4C 76. 'L' */
_UP, /* 0x4D 77. 'M' */
_UP, /* 0x4E 78. 'N' */
_UP, /* 0x4F 79. 'O' */
_UP, /* 0x50 80. 'P' */
_UP, /* 0x51 81. 'Q' */
_UP, /* 0x52 82. 'R' */
_UP, /* 0x53 83. 'S' */
_UP, /* 0x54 84. 'T' */
_UP, /* 0x55 85. 'U' */
_UP, /* 0x56 86. 'V' */
_UP, /* 0x57 87. 'W' */
_UP, /* 0x58 88. 'X' */
_UP, /* 0x59 89. 'Y' */
_UP, /* 0x5A 90. 'Z' */
_PU, /* 0x5B 91. '[' */
_PU, /* 0x5C 92. '\' */
_PU, /* 0x5D 93. ']' */
_PU, /* 0x5E 94. '^' */
_PU, /* 0x5F 95. '_' */
_PU, /* 0x60 96. '`' */
_XD|_LO, /* 0x61 97. 'a' */
_XD|_LO, /* 0x62 98. 'b' */
_XD|_LO, /* 0x63 99. 'c' */
_XD|_LO, /* 0x64 100. 'd' */
_XD|_LO, /* 0x65 101. 'e' */
_XD|_LO, /* 0x66 102. 'f' */
_LO, /* 0x67 103. 'g' */
_LO, /* 0x68 104. 'h' */
_LO, /* 0x69 105. 'i' */
_LO, /* 0x6A 106. 'j' */
_LO, /* 0x6B 107. 'k' */
_LO, /* 0x6C 108. 'l' */
_LO, /* 0x6D 109. 'm' */
_LO, /* 0x6E 110. 'n' */
_LO, /* 0x6F 111. 'o' */
_LO, /* 0x70 112. 'p' */
_LO, /* 0x71 113. 'q' */
_LO, /* 0x72 114. 'r' */
_LO, /* 0x73 115. 's' */
_LO, /* 0x74 116. 't' */
_LO, /* 0x75 117. 'u' */
_LO, /* 0x76 118. 'v' */
_LO, /* 0x77 119. 'w' */
_LO, /* 0x78 120. 'x' */
_LO, /* 0x79 121. 'y' */
_LO, /* 0x7A 122. 'z' */
_PU, /* 0x7B 123. '{' */
_PU, /* 0x7C 124. '|' */
_PU, /* 0x7D 125. '}' */
_PU, /* 0x7E 126. '~' */
_CN, /* 0x7F 127. */
static const UINT8 _acpi_ctype[257] = {
_ACPI_CN, /* 0x0 0. */
_ACPI_CN, /* 0x1 1. */
_ACPI_CN, /* 0x2 2. */
_ACPI_CN, /* 0x3 3. */
_ACPI_CN, /* 0x4 4. */
_ACPI_CN, /* 0x5 5. */
_ACPI_CN, /* 0x6 6. */
_ACPI_CN, /* 0x7 7. */
_ACPI_CN, /* 0x8 8. */
_ACPI_CN|_ACPI_SP, /* 0x9 9. */
_ACPI_CN|_ACPI_SP, /* 0xA 10. */
_ACPI_CN|_ACPI_SP, /* 0xB 11. */
_ACPI_CN|_ACPI_SP, /* 0xC 12. */
_ACPI_CN|_ACPI_SP, /* 0xD 13. */
_ACPI_CN, /* 0xE 14. */
_ACPI_CN, /* 0xF 15. */
_ACPI_CN, /* 0x10 16. */
_ACPI_CN, /* 0x11 17. */
_ACPI_CN, /* 0x12 18. */
_ACPI_CN, /* 0x13 19. */
_ACPI_CN, /* 0x14 20. */
_ACPI_CN, /* 0x15 21. */
_ACPI_CN, /* 0x16 22. */
_ACPI_CN, /* 0x17 23. */
_ACPI_CN, /* 0x18 24. */
_ACPI_CN, /* 0x19 25. */
_ACPI_CN, /* 0x1A 26. */
_ACPI_CN, /* 0x1B 27. */
_ACPI_CN, /* 0x1C 28. */
_ACPI_CN, /* 0x1D 29. */
_ACPI_CN, /* 0x1E 30. */
_ACPI_CN, /* 0x1F 31. */
_ACPI_XS|_ACPI_SP, /* 0x20 32. ' ' */
_ACPI_PU, /* 0x21 33. '!' */
_ACPI_PU, /* 0x22 34. '"' */
_ACPI_PU, /* 0x23 35. '#' */
_ACPI_PU, /* 0x24 36. '$' */
_ACPI_PU, /* 0x25 37. '%' */
_ACPI_PU, /* 0x26 38. '&' */
_ACPI_PU, /* 0x27 39. ''' */
_ACPI_PU, /* 0x28 40. '(' */
_ACPI_PU, /* 0x29 41. ')' */
_ACPI_PU, /* 0x2A 42. '*' */
_ACPI_PU, /* 0x2B 43. '+' */
_ACPI_PU, /* 0x2C 44. ',' */
_ACPI_PU, /* 0x2D 45. '-' */
_ACPI_PU, /* 0x2E 46. '.' */
_ACPI_PU, /* 0x2F 47. '/' */
_ACPI_XD|_ACPI_DI, /* 0x30 48. '0' */
_ACPI_XD|_ACPI_DI, /* 0x31 49. '1' */
_ACPI_XD|_ACPI_DI, /* 0x32 50. '2' */
_ACPI_XD|_ACPI_DI, /* 0x33 51. '3' */
_ACPI_XD|_ACPI_DI, /* 0x34 52. '4' */
_ACPI_XD|_ACPI_DI, /* 0x35 53. '5' */
_ACPI_XD|_ACPI_DI, /* 0x36 54. '6' */
_ACPI_XD|_ACPI_DI, /* 0x37 55. '7' */
_ACPI_XD|_ACPI_DI, /* 0x38 56. '8' */
_ACPI_XD|_ACPI_DI, /* 0x39 57. '9' */
_ACPI_PU, /* 0x3A 58. ':' */
_ACPI_PU, /* 0x3B 59. ';' */
_ACPI_PU, /* 0x3C 60. '<' */
_ACPI_PU, /* 0x3D 61. '=' */
_ACPI_PU, /* 0x3E 62. '>' */
_ACPI_PU, /* 0x3F 63. '?' */
_ACPI_PU, /* 0x40 64. '@' */
_ACPI_XD|_ACPI_UP, /* 0x41 65. 'A' */
_ACPI_XD|_ACPI_UP, /* 0x42 66. 'B' */
_ACPI_XD|_ACPI_UP, /* 0x43 67. 'C' */
_ACPI_XD|_ACPI_UP, /* 0x44 68. 'D' */
_ACPI_XD|_ACPI_UP, /* 0x45 69. 'E' */
_ACPI_XD|_ACPI_UP, /* 0x46 70. 'F' */
_ACPI_UP, /* 0x47 71. 'G' */
_ACPI_UP, /* 0x48 72. 'H' */
_ACPI_UP, /* 0x49 73. 'I' */
_ACPI_UP, /* 0x4A 74. 'J' */
_ACPI_UP, /* 0x4B 75. 'K' */
_ACPI_UP, /* 0x4C 76. 'L' */
_ACPI_UP, /* 0x4D 77. 'M' */
_ACPI_UP, /* 0x4E 78. 'N' */
_ACPI_UP, /* 0x4F 79. 'O' */
_ACPI_UP, /* 0x50 80. 'P' */
_ACPI_UP, /* 0x51 81. 'Q' */
_ACPI_UP, /* 0x52 82. 'R' */
_ACPI_UP, /* 0x53 83. 'S' */
_ACPI_UP, /* 0x54 84. 'T' */
_ACPI_UP, /* 0x55 85. 'U' */
_ACPI_UP, /* 0x56 86. 'V' */
_ACPI_UP, /* 0x57 87. 'W' */
_ACPI_UP, /* 0x58 88. 'X' */
_ACPI_UP, /* 0x59 89. 'Y' */
_ACPI_UP, /* 0x5A 90. 'Z' */
_ACPI_PU, /* 0x5B 91. '[' */
_ACPI_PU, /* 0x5C 92. '\' */
_ACPI_PU, /* 0x5D 93. ']' */
_ACPI_PU, /* 0x5E 94. '^' */
_ACPI_PU, /* 0x5F 95. '_' */
_ACPI_PU, /* 0x60 96. '`' */
_ACPI_XD|_ACPI_LO, /* 0x61 97. 'a' */
_ACPI_XD|_ACPI_LO, /* 0x62 98. 'b' */
_ACPI_XD|_ACPI_LO, /* 0x63 99. 'c' */
_ACPI_XD|_ACPI_LO, /* 0x64 100. 'd' */
_ACPI_XD|_ACPI_LO, /* 0x65 101. 'e' */
_ACPI_XD|_ACPI_LO, /* 0x66 102. 'f' */
_ACPI_LO, /* 0x67 103. 'g' */
_ACPI_LO, /* 0x68 104. 'h' */
_ACPI_LO, /* 0x69 105. 'i' */
_ACPI_LO, /* 0x6A 106. 'j' */
_ACPI_LO, /* 0x6B 107. 'k' */
_ACPI_LO, /* 0x6C 108. 'l' */
_ACPI_LO, /* 0x6D 109. 'm' */
_ACPI_LO, /* 0x6E 110. 'n' */
_ACPI_LO, /* 0x6F 111. 'o' */
_ACPI_LO, /* 0x70 112. 'p' */
_ACPI_LO, /* 0x71 113. 'q' */
_ACPI_LO, /* 0x72 114. 'r' */
_ACPI_LO, /* 0x73 115. 's' */
_ACPI_LO, /* 0x74 116. 't' */
_ACPI_LO, /* 0x75 117. 'u' */
_ACPI_LO, /* 0x76 118. 'v' */
_ACPI_LO, /* 0x77 119. 'w' */
_ACPI_LO, /* 0x78 120. 'x' */
_ACPI_LO, /* 0x79 121. 'y' */
_ACPI_LO, /* 0x7A 122. 'z' */
_ACPI_PU, /* 0x7B 123. '{' */
_ACPI_PU, /* 0x7C 124. '|' */
_ACPI_PU, /* 0x7D 125. '}' */
_ACPI_PU, /* 0x7E 126. '~' */
_ACPI_CN, /* 0x7F 127. */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x80 to 0x8F */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x90 to 0x9F */
@ -630,10 +626,10 @@ const UINT8 _ctype[257] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* 0xF0 to 0x100 */
};
#define IS_UPPER(c) (_ctype[(unsigned char)(c)] & (_UP))
#define IS_LOWER(c) (_ctype[(unsigned char)(c)] & (_LO))
#define IS_DIGIT(c) (_ctype[(unsigned char)(c)] & (_DI))
#define IS_SPACE(c) (_ctype[(unsigned char)(c)] & (_SP))
#define IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
#define IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
#define IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
#define IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
/*******************************************************************************
@ -738,7 +734,7 @@ AcpiCmStrstr (
return (NULL);
}
/* Walk entire string, uppercasing the letters */
/* Walk entire string, comparing the letters */
for (String = String1; *String2; )
{

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmcopy - Internal to external object translation utilities
* $Revision: 1.59 $
* $Revision: 1.60 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmdebug - Debug print routines
* $Revision: 1.61 $
* $Revision: 1.62 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmdelete - object deletion and reference count utilities
* $Revision: 1.60 $
* $Revision: 1.61 $
*
******************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmeval - Object evaluation
* $Revision: 1.19 $
* $Revision: 1.20 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmglobal - Global variables for the ACPI subsystem
* $Revision: 1.98 $
* $Revision: 1.113 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -121,6 +121,7 @@
#include "acevents.h"
#include "acnamesp.h"
#include "acinterp.h"
#include "amlcode.h"
#define _COMPONENT MISCELLANEOUS
@ -148,7 +149,7 @@ UINT32 AcpiDbgLevel = NORMAL_DEFAULT;
/* Debug switch - layer (component) mask */
UINT32 AcpiDbgLayer = ALL_COMPONENTS;
UINT32 AcpiDbgLayer = COMPONENT_DEFAULT;
UINT32 AcpiGbl_NestingLevel = 0;
@ -166,6 +167,9 @@ UINT32 AcpiGbl_StartupFlags = 0;
BOOLEAN AcpiGbl_Shutdown = TRUE;
UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128};
/******************************************************************************
*
* Namespace globals
@ -222,31 +226,25 @@ UINT8 AcpiGbl_NsProperties[] =
NSP_NEWSCOPE | NSP_LOCAL, /* 13 Thermal */
NSP_NORMAL, /* 14 BufferField */
NSP_NORMAL, /* 15 DdbHandle */
NSP_NORMAL, /* 16 reserved */
NSP_NORMAL, /* 17 reserved */
NSP_NORMAL, /* 18 reserved */
NSP_NORMAL, /* 19 reserved */
NSP_NORMAL, /* 20 reserved */
NSP_NORMAL, /* 21 reserved */
NSP_NORMAL, /* 22 reserved */
NSP_NORMAL, /* 23 reserved */
NSP_NORMAL, /* 24 reserved */
NSP_NORMAL, /* 25 DefField */
NSP_NORMAL, /* 26 BankField */
NSP_NORMAL, /* 27 IndexField */
NSP_NORMAL, /* 28 DefFieldDefn */
NSP_NORMAL, /* 29 BankFieldDefn */
NSP_NORMAL, /* 30 IndexFieldDefn */
NSP_NORMAL, /* 31 If */
NSP_NORMAL, /* 32 Else */
NSP_NORMAL, /* 33 While */
NSP_NEWSCOPE, /* 34 Scope */
NSP_LOCAL, /* 35 DefAny */
NSP_NORMAL, /* 36 Reference */
NSP_NORMAL, /* 37 Alias */
NSP_NORMAL, /* 38 Notify */
NSP_NORMAL, /* 39 Address Handler */
NSP_NORMAL /* 40 Invalid */
NSP_NORMAL, /* 16 Debug Object */
NSP_NORMAL, /* 17 DefField */
NSP_NORMAL, /* 18 BankField */
NSP_NORMAL, /* 19 IndexField */
NSP_NORMAL, /* 20 Reference */
NSP_NORMAL, /* 21 Alias */
NSP_NORMAL, /* 22 Notify */
NSP_NORMAL, /* 23 Address Handler */
NSP_NEWSCOPE | NSP_LOCAL, /* 24 Resource */
NSP_NORMAL, /* 25 DefFieldDefn */
NSP_NORMAL, /* 26 BankFieldDefn */
NSP_NORMAL, /* 27 IndexFieldDefn */
NSP_NORMAL, /* 28 If */
NSP_NORMAL, /* 29 Else */
NSP_NORMAL, /* 30 While */
NSP_NEWSCOPE, /* 31 Scope */
NSP_LOCAL, /* 32 DefAny */
NSP_NORMAL, /* 33 Extra */
NSP_NORMAL /* 34 Invalid */
};
@ -254,6 +252,10 @@ UINT8 AcpiGbl_NsProperties[] =
*
* Table globals
*
* NOTE: This table includes ONLY the ACPI tables that the subsystem consumes.
* it is NOT an exhaustive list of all possible ACPI tables. All ACPI tables
* that are not used by the subsystem are simply ignored.
*
******************************************************************************/
@ -262,22 +264,17 @@ ACPI_TABLE_DESC AcpiGbl_AcpiTables[NUM_ACPI_TABLES];
ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES] =
{
/* Name, Signature, Signature size, How many allowed?, Supported? Global typed pointer */
/*********** Name, Signature, Signature size, How many allowed?, Supported? Global typed pointer */
/* RSDP 0 */ {"RSDP", RSDP_SIG, sizeof (RSDP_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL},
/* APIC 1 */ {APIC_SIG, APIC_SIG, sizeof (APIC_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_APIC},
/* DSDT 2 */ {DSDT_SIG, DSDT_SIG, sizeof (DSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_DSDT},
/* FACP 3 */ {FACP_SIG, FACP_SIG, sizeof (FACP_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_FACP},
/* FACS 4 */ {FACS_SIG, FACS_SIG, sizeof (FACS_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_FACS},
/* PSDT 5 */ {PSDT_SIG, PSDT_SIG, sizeof (PSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL},
/* RSDT 6 */ {RSDT_SIG, RSDT_SIG, sizeof (RSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL},
/* SSDT 7 */ {SSDT_SIG, SSDT_SIG, sizeof (SSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL},
/* SBST 8 */ {SBST_SIG, SBST_SIG, sizeof (SBST_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_SBST},
/* BOOT 9 */ {BOOT_SIG, BOOT_SIG, sizeof (BOOT_SIG)-1, ACPI_TABLE_SINGLE, AE_SUPPORT, NULL}
/* RSDP 0 */ {RSDP_NAME, RSDP_SIG, sizeof (RSDP_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL},
/* DSDT 1 */ {DSDT_SIG, DSDT_SIG, sizeof (DSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_DSDT},
/* FADT 2 */ {FADT_SIG, FADT_SIG, sizeof (FADT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_FADT},
/* FACS 3 */ {FACS_SIG, FACS_SIG, sizeof (FACS_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &AcpiGbl_FACS},
/* PSDT 4 */ {PSDT_SIG, PSDT_SIG, sizeof (PSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL},
/* SSDT 5 */ {SSDT_SIG, SSDT_SIG, sizeof (SSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL},
/* XSDT 6 */ {XSDT_SIG, XSDT_SIG, sizeof (RSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL},
};
ACPI_INIT_DATA AcpiGbl_AcpiInitData;
#ifdef ACPI_DEBUG
@ -330,47 +327,41 @@ static NATIVE_CHAR AcpiGbl_BadType[] = "UNDEFINED";
static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */
{
"Untyped",
"Number",
"String",
"Buffer",
"Package",
"FieldUnit",
"Device",
"Event",
"Method",
"Mutex",
"Region",
"Power",
"Processor",
"Thermal",
"BufferFld",
"DdbHandle",
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
AcpiGbl_BadType,
"DefField",
"BnkField",
"IdxField",
"DefFldDfn",
"BnkFldDfn",
"IdxFldDfn",
"If",
"Else",
"While",
"Scope",
"DefAny",
"Reference",
"Alias",
"Notify",
"AddrHndlr",
"Invalid"
/* 00 */ "Untyped",
/* 01 */ "Number",
/* 02 */ "String",
/* 03 */ "Buffer",
/* 04 */ "Package",
/* 05 */ "FieldUnit",
/* 06 */ "Device",
/* 07 */ "Event",
/* 08 */ "Method",
/* 09 */ "Mutex",
/* 10 */ "Region",
/* 11 */ "Power",
/* 12 */ "Processor",
/* 13 */ "Thermal",
/* 14 */ "BufferFld",
/* 15 */ "DdbHandle",
/* 16 */ "DebugObj",
/* 17 */ "DefField",
/* 18 */ "BnkField",
/* 19 */ "IdxField",
/* 20 */ "Reference",
/* 21 */ "Alias",
/* 22 */ "Notify",
/* 23 */ "AddrHndlr",
/* 24 */ "Resource",
/* 25 */ "DefFldDfn",
/* 26 */ "BnkFldDfn",
/* 27 */ "IdxFldDfn",
/* 28 */ "If",
/* 29 */ "Else",
/* 30 */ "While",
/* 31 */ "Scope",
/* 32 */ "DefAny",
/* 33 */ "Extra",
/* 34 */ "Invalid"
};
@ -399,6 +390,96 @@ AcpiCmGetTypeName (
return (AcpiGbl_NsTypeNames[Type]);
}
/* Region type decoding */
NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
{
"SystemMemory",
"SystemIO",
"PCIConfig",
"EmbeddedControl",
"SMBus",
"CMOS",
"PCIBarTarget",
};
/*****************************************************************************
*
* FUNCTION: AcpiCmGetRegionName
*
* PARAMETERS: None.
*
* RETURN: Status
*
* DESCRIPTION: Translate a Space ID into a name string (Debug only)
*
****************************************************************************/
NATIVE_CHAR *
AcpiCmGetRegionName (
UINT8 SpaceId)
{
if (SpaceId >= USER_REGION_BEGIN)
{
return ("UserDefinedRegion");
}
else if (SpaceId >= NUM_REGION_TYPES)
{
return ("InvalidSpaceID");
}
return (AcpiGbl_RegionTypes[SpaceId]);
}
/* Data used in keeping track of fields */
NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
{
"skip",
"?access?"
}; /* FE = Field Element */
NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
{
"Error",
"MTR",
"MEQ",
"MLE",
"MLT",
"MGE",
"MGT"
};
/* Access type decoding */
NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
{
"AnyAcc",
"ByteAcc",
"WordAcc",
"DWordAcc",
"BlockAcc",
"SMBSendRecvAcc",
"SMBQuickAcc"
};
/* Update rule decoding */
NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
{
"Preserve",
"WriteAsOnes",
"WriteAsZeros"
};
#endif
@ -573,26 +654,18 @@ AcpiCmAllocateOwnerId (
***************************************************************************/
void
AcpiCmInitGlobals (ACPI_INIT_DATA *InitData)
AcpiCmInitGlobals (
void)
{
UINT32 i;
FUNCTION_TRACE ("CmInitGlobals");
if (InitData)
{
MEMCPY (&AcpiGbl_AcpiInitData, InitData, sizeof (ACPI_INIT_DATA));
}
else
{
MEMSET (&AcpiGbl_AcpiInitData, 0, sizeof (ACPI_INIT_DATA));
}
/* ACPI table structure */
for (i = 0; i < ACPI_TABLE_MAX; i++)
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
AcpiGbl_AcpiTables[i].Prev = &AcpiGbl_AcpiTables[i];
AcpiGbl_AcpiTables[i].Next = &AcpiGbl_AcpiTables[i];
@ -605,7 +678,7 @@ AcpiCmInitGlobals (ACPI_INIT_DATA *InitData)
/* Address Space handler array */
for (i = 0; i < ACPI_MAX_ADDRESS_SPACE; i++)
for (i = 0; i < ACPI_NUM_ADDRESS_SPACES; i++)
{
AcpiGbl_AddressSpaces[i].Handler = NULL;
AcpiGbl_AddressSpaces[i].Context = NULL;
@ -628,12 +701,10 @@ AcpiCmInitGlobals (ACPI_INIT_DATA *InitData)
/* Global "typed" ACPI table pointers */
AcpiGbl_RSDP = NULL;
AcpiGbl_RSDT = NULL;
AcpiGbl_XSDT = NULL;
AcpiGbl_FACS = NULL;
AcpiGbl_FACP = NULL;
AcpiGbl_APIC = NULL;
AcpiGbl_FADT = NULL;
AcpiGbl_DSDT = NULL;
AcpiGbl_SBST = NULL;
/* Global Lock support */
@ -647,7 +718,6 @@ AcpiCmInitGlobals (ACPI_INIT_DATA *InitData)
AcpiGbl_StartupFlags = 0;
AcpiGbl_GlobalLockSet = FALSE;
AcpiGbl_RsdpOriginalLocation = 0;
AcpiGbl_WhenToParseMethods = METHOD_PARSE_CONFIGURATION;
AcpiGbl_CmSingleStep = FALSE;
AcpiGbl_DbTerminateThreads = FALSE;
AcpiGbl_Shutdown = FALSE;
@ -685,15 +755,6 @@ AcpiCmInitGlobals (ACPI_INIT_DATA *InitData)
AcpiGbl_WalkStateCacheRequests = 0;
AcpiGbl_WalkStateCacheHits = 0;
/* Interpreter */
AcpiGbl_BufSeq = 0;
AcpiGbl_NodeErr = FALSE;
/* Parser */
AcpiGbl_ParsedNamespaceRoot = NULL;
/* Hardware oriented */
AcpiGbl_Gpe0EnableRegisterSave = NULL;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cminit - Common ACPI subsystem initialization
* $Revision: 1.79 $
* $Revision: 1.90 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -130,276 +130,119 @@
/*******************************************************************************
*
* FUNCTION: AcpiCmFacpRegisterError
* FUNCTION: AcpiCmFadtRegisterError
*
* PARAMETERS: *RegisterName - Pointer to string identifying register
* Value - Actual register contents value
* AcpiTestSpecSection - TDS section containing assertion
* AcpiAssertion - Assertion number being tested
*
* RETURN: none
* RETURN: AE_BAD_VALUE
*
* DESCRIPTION: Display failure message and link failure to TDS assertion
*
******************************************************************************/
void
AcpiCmFacpRegisterError (
static ACPI_STATUS
AcpiCmFadtRegisterError (
NATIVE_CHAR *RegisterName,
UINT32 Value)
UINT64 Value)
{
REPORT_ERROR ("Invalid FACP register value");
REPORT_ERROR (
("Invalid FADT register value, %s=%X (FADT=%p)\n",
RegisterName, Value, AcpiGbl_FADT));
DEBUG_PRINT (ACPI_ERROR,
("Invalid FACP register value, %s = 0x%X (FACP=0x%X)\n",
RegisterName, Value, AcpiGbl_FACP));
return (AE_BAD_VALUE);
}
/******************************************************************************
*
* FUNCTION: AcpiCmHardwareInitialize
* FUNCTION: AcpiCmValidateFadt
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Initialize and validate various ACPI registers
* DESCRIPTION: Validate various ACPI registers in the FADT
*
******************************************************************************/
ACPI_STATUS
AcpiCmHardwareInitialize (void)
AcpiCmValidateFadt (
void)
{
ACPI_STATUS Status = AE_OK;
UINT32 Index;
ACPI_STATUS Status = AE_OK;
FUNCTION_TRACE ("CmHardwareInitialize");
/*
* Verify Fixed ACPI Description Table fields,
* but don't abort on any problems, just display error
*/
/* Are we running on the actual hardware */
if (!AcpiGbl_AcpiHardwarePresent)
if (AcpiGbl_FADT->Pm1EvtLen < 4)
{
/* No, just return */
return_ACPI_STATUS (AE_OK);
Status = AcpiCmFadtRegisterError ("PM1_EVT_LEN",
(UINT32) AcpiGbl_FADT->Pm1EvtLen);
}
/* We must have the ACPI tables by the time we get here */
if (!AcpiGbl_FACP)
if (!AcpiGbl_FADT->Pm1CntLen)
{
AcpiGbl_RestoreAcpiChipset = FALSE;
DEBUG_PRINT (ACPI_ERROR, ("CmHardwareInitialize: No FACP!\n"));
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
Status = AcpiCmFadtRegisterError ("PM1_CNT_LEN",
(UINT32) AcpiGbl_FADT->Pm1CntLen);
}
/* Must support *some* mode! */
/*
if (!(SystemFlags & SYS_MODES_MASK))
if (!AcpiGbl_FADT->XPm1aEvtBlk.Address)
{
RestoreAcpiChipset = FALSE;
DEBUG_PRINT (ACPI_ERROR,
("CmHardwareInitialize: Supported modes uninitialized!\n"));
return_ACPI_STATUS (AE_ERROR);
Status = AcpiCmFadtRegisterError ("PM1a_EVT_BLK",
AcpiGbl_FADT->XPm1aEvtBlk.Address);
}
*/
switch (AcpiGbl_SystemFlags & SYS_MODES_MASK)
if (!AcpiGbl_FADT->XPm1aCntBlk.Address)
{
/* Identify current ACPI/legacy mode */
case (SYS_MODE_ACPI):
AcpiGbl_OriginalMode = SYS_MODE_ACPI;
DEBUG_PRINT (ACPI_INFO, ("System supports ACPI mode only.\n"));
break;
case (SYS_MODE_LEGACY):
AcpiGbl_OriginalMode = SYS_MODE_LEGACY;
DEBUG_PRINT (ACPI_INFO,
("Tables loaded from buffer, hardware assumed to support LEGACY mode only.\n"));
break;
case (SYS_MODE_ACPI | SYS_MODE_LEGACY):
if (AcpiHwGetMode () == SYS_MODE_ACPI)
{
AcpiGbl_OriginalMode = SYS_MODE_ACPI;
}
else
{
AcpiGbl_OriginalMode = SYS_MODE_LEGACY;
}
DEBUG_PRINT (ACPI_INFO,
("System supports both ACPI and LEGACY modes.\n"));
DEBUG_PRINT (ACPI_INFO,
("System is currently in %s mode.\n",
(AcpiGbl_OriginalMode == SYS_MODE_ACPI) ? "ACPI" : "LEGACY"));
break;
Status = AcpiCmFadtRegisterError ("PM1a_CNT_BLK",
AcpiGbl_FADT->XPm1aCntBlk.Address);
}
if (AcpiGbl_SystemFlags & SYS_MODE_ACPI)
if (!AcpiGbl_FADT->XPmTmrBlk.Address)
{
/* Target system supports ACPI mode */
/*
* The purpose of this block of code is to save the initial state
* of the ACPI event enable registers. An exit function will be
* registered which will restore this state when the application
* exits. The exit function will also clear all of the ACPI event
* status bits prior to restoring the original mode.
*
* The location of the PM1aEvtBlk enable registers is defined as the
* base of PM1aEvtBlk + PM1aEvtBlkLength / 2. Since the spec further
* fully defines the PM1aEvtBlk to be a total of 4 bytes, the offset
* for the enable registers is always 2 from the base. It is hard
* coded here. If this changes in the spec, this code will need to
* be modified. The PM1bEvtBlk behaves as expected.
*/
AcpiGbl_Pm1EnableRegisterSave =
AcpiOsIn16 ((AcpiGbl_FACP->Pm1aEvtBlk + 2));
if (AcpiGbl_FACP->Pm1bEvtBlk)
{
AcpiGbl_Pm1EnableRegisterSave |=
AcpiOsIn16 ((AcpiGbl_FACP->Pm1bEvtBlk + 2));
}
/*
* The GPEs behave similarly, except that the length of the register
* block is not fixed, so the buffer must be allocated with malloc
*/
if (AcpiGbl_FACP->Gpe0Blk && AcpiGbl_FACP->Gpe0BlkLen)
{
/* GPE0 specified in FACP */
AcpiGbl_Gpe0EnableRegisterSave =
AcpiCmAllocate (DIV_2 (AcpiGbl_FACP->Gpe0BlkLen));
if (!AcpiGbl_Gpe0EnableRegisterSave)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Save state of GPE0 enable bits */
for (Index = 0; Index < DIV_2 (AcpiGbl_FACP->Gpe0BlkLen); Index++)
{
AcpiGbl_Gpe0EnableRegisterSave[Index] =
AcpiOsIn8 (AcpiGbl_FACP->Gpe0Blk +
DIV_2 (AcpiGbl_FACP->Gpe0BlkLen));
}
}
else
{
AcpiGbl_Gpe0EnableRegisterSave = NULL;
}
if (AcpiGbl_FACP->Gpe1Blk && AcpiGbl_FACP->Gpe1BlkLen)
{
/* GPE1 defined */
AcpiGbl_Gpe1EnableRegisterSave =
AcpiCmAllocate (DIV_2 (AcpiGbl_FACP->Gpe1BlkLen));
if (!AcpiGbl_Gpe1EnableRegisterSave)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* save state of GPE1 enable bits */
for (Index = 0; Index < DIV_2 (AcpiGbl_FACP->Gpe1BlkLen); Index++)
{
AcpiGbl_Gpe1EnableRegisterSave[Index] =
AcpiOsIn8 (AcpiGbl_FACP->Gpe1Blk +
DIV_2 (AcpiGbl_FACP->Gpe1BlkLen));
}
}
else
{
AcpiGbl_Gpe1EnableRegisterSave = NULL;
}
/*
* Verify Fixed ACPI Description Table fields,
* but don't abort on any problems, just display error
*/
if (AcpiGbl_FACP->Pm1EvtLen < 4)
{
AcpiCmFacpRegisterError ("PM1_EVT_LEN",
(UINT32) AcpiGbl_FACP->Pm1EvtLen);
}
if (!AcpiGbl_FACP->Pm1CntLen)
{
AcpiCmFacpRegisterError ("PM1_CNT_LEN",
(UINT32) AcpiGbl_FACP->Pm1CntLen);
}
if (!AcpiGbl_FACP->Pm1aEvtBlk)
{
AcpiCmFacpRegisterError ("PM1a_EVT_BLK", AcpiGbl_FACP->Pm1aEvtBlk);
}
if (!AcpiGbl_FACP->Pm1aCntBlk)
{
AcpiCmFacpRegisterError ("PM1a_CNT_BLK", AcpiGbl_FACP->Pm1aCntBlk);
}
if (!AcpiGbl_FACP->PmTmrBlk)
{
AcpiCmFacpRegisterError ("PM_TMR_BLK", AcpiGbl_FACP->PmTmrBlk);
}
if (AcpiGbl_FACP->Pm2CntBlk && !AcpiGbl_FACP->Pm2CntLen)
{
AcpiCmFacpRegisterError ("PM2_CNT_LEN",
(UINT32) AcpiGbl_FACP->Pm2CntLen);
}
if (AcpiGbl_FACP->PmTmLen < 4)
{
AcpiCmFacpRegisterError ("PM_TM_LEN",
(UINT32) AcpiGbl_FACP->PmTmLen);
}
/* length not multiple of 2 */
if (AcpiGbl_FACP->Gpe0Blk && (AcpiGbl_FACP->Gpe0BlkLen & 1))
{
AcpiCmFacpRegisterError ("GPE0_BLK_LEN",
(UINT32) AcpiGbl_FACP->Gpe0BlkLen);
}
/* length not multiple of 2 */
if (AcpiGbl_FACP->Gpe1Blk && (AcpiGbl_FACP->Gpe1BlkLen & 1))
{
AcpiCmFacpRegisterError ("GPE1_BLK_LEN",
(UINT32) AcpiGbl_FACP->Gpe1BlkLen);
}
Status = AcpiCmFadtRegisterError ("PM_TMR_BLK",
AcpiGbl_FADT->XPmTmrBlk.Address);
}
if ((AcpiGbl_FADT->XPm2CntBlk.Address &&
!AcpiGbl_FADT->Pm2CntLen))
{
Status = AcpiCmFadtRegisterError ("PM2_CNT_LEN",
(UINT32) AcpiGbl_FADT->Pm2CntLen);
}
return_ACPI_STATUS (Status);
if (AcpiGbl_FADT->PmTmLen < 4)
{
Status = AcpiCmFadtRegisterError ("PM_TM_LEN",
(UINT32) AcpiGbl_FADT->PmTmLen);
}
/* length of GPE blocks must be a multiple of 2 */
if (AcpiGbl_FADT->XGpe0Blk.Address &&
(AcpiGbl_FADT->Gpe0BlkLen & 1))
{
Status = AcpiCmFadtRegisterError ("GPE0_BLK_LEN",
(UINT32) AcpiGbl_FADT->Gpe0BlkLen);
}
if (AcpiGbl_FADT->XGpe1Blk.Address &&
(AcpiGbl_FADT->Gpe1BlkLen & 1))
{
Status = AcpiCmFadtRegisterError ("GPE1_BLK_LEN",
(UINT32) AcpiGbl_FADT->Gpe1BlkLen);
}
return (Status);
}
@ -501,8 +344,6 @@ AcpiCmSubsystemShutdown (void)
AcpiCmDumpCurrentAllocations (ACPI_UINT32_MAX, NULL);
#endif
BREAKPOINT3;
return_ACPI_STATUS (AE_OK);
}

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmutils - common utility procedures
* $Revision: 1.17 $
* $Revision: 1.22 $
*
******************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -404,7 +404,7 @@ AcpiCmReleaseMutex (
ACPI_STATUS Status;
DEBUG_PRINT (TRACE_MUTEX,
DEBUG_PRINT (TRACE_MUTEX,
("Releasing Mutex [%s]\n", AcpiCmGetMutexName (MutexId)));
if (MutexId > MAX_MTX)
@ -448,7 +448,7 @@ AcpiCmReleaseMutex (
ACPI_STATUS
AcpiCmCreateUpdateStateAndPush (
ACPI_OBJECT_INTERNAL *Object,
ACPI_OPERAND_OBJECT *Object,
UINT16 Action,
ACPI_GENERIC_STATE **StateList)
{
@ -608,7 +608,7 @@ AcpiCmCreateGenericState (void)
*
* FUNCTION: AcpiCmCreateUpdateState
*
* PARAMETERS: Object - Initial Object to be installed in the
* PARAMETERS: Object - Initial Object to be installed in the
* state
* Action - Update action to be performed
*
@ -622,7 +622,7 @@ AcpiCmCreateGenericState (void)
ACPI_GENERIC_STATE *
AcpiCmCreateUpdateState (
ACPI_OBJECT_INTERNAL *Object,
ACPI_OPERAND_OBJECT *Object,
UINT16 Action)
{
ACPI_GENERIC_STATE *State;
@ -777,6 +777,63 @@ AcpiCmDeleteGenericStateCache (
}
/*******************************************************************************
*
* FUNCTION: AcpiCmResolvePackageReferences
*
* PARAMETERS: ObjDesc - The Package object on which to resolve refs
*
* RETURN: Status
*
* DESCRIPTION: Walk through a package and turn internal references into values
*
******************************************************************************/
ACPI_STATUS
AcpiCmResolvePackageReferences (
ACPI_OPERAND_OBJECT *ObjDesc)
{
UINT32 Count;
ACPI_OPERAND_OBJECT *SubObject;
FUNCTION_TRACE ("AcpiCmResolvePackageReferences");
if (ObjDesc->Common.Type != ACPI_TYPE_PACKAGE)
{
/* Must be a package */
REPORT_ERROR (("Must resolve Package Refs on a Package\n"));
return_ACPI_STATUS(AE_ERROR);
}
for (Count = 0; Count < ObjDesc->Package.Count; Count++)
{
SubObject = ObjDesc->Package.Elements[Count];
if (SubObject->Common.Type == INTERNAL_TYPE_REFERENCE)
{
if (SubObject->Reference.OpCode == AML_ZERO_OP)
{
SubObject->Common.Type = ACPI_TYPE_NUMBER;
SubObject->Number.Value = 0;
}
else if (SubObject->Reference.OpCode == AML_ONE_OP)
{
SubObject->Common.Type = ACPI_TYPE_NUMBER;
SubObject->Number.Value = 1;
}
else if (SubObject->Reference.OpCode == AML_ONES_OP)
{
SubObject->Common.Type = ACPI_TYPE_NUMBER;
SubObject->Number.Value = ACPI_INTEGER_MAX;
}
}
}
return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
*
* FUNCTION: _ReportError
@ -796,13 +853,11 @@ void
_ReportError (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *Message)
UINT32 ComponentId)
{
DebugPrint (ModuleName, LineNumber, ComponentId, ACPI_ERROR,
"*** Error: %s\n", Message);
AcpiOsPrintf ("%8s-%04d: *** Error: ", ModuleName, LineNumber);
}
@ -825,13 +880,10 @@ void
_ReportWarning (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *Message)
UINT32 ComponentId)
{
DebugPrint (ModuleName, LineNumber, ComponentId, ACPI_WARN,
"*** Warning: %s\n", Message);
AcpiOsPrintf ("%8s-%04d: *** Warning: ", ModuleName, LineNumber);
}
@ -854,13 +906,10 @@ void
_ReportInfo (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *Message)
UINT32 ComponentId)
{
DebugPrint (ModuleName, LineNumber, ComponentId, ACPI_INFO,
"*** Info: %s\n", Message);
AcpiOsPrintf ("%8s-%04d: *** Info: ", ModuleName, LineNumber);
}

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmobject - ACPI object create/delete/size/cache routines
* $Revision: 1.24 $
* $Revision: 1.33 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -149,14 +149,14 @@
*
******************************************************************************/
ACPI_OBJECT_INTERNAL *
ACPI_OPERAND_OBJECT *
_CmCreateInternalObject (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
OBJECT_TYPE_INTERNAL Type)
{
ACPI_OBJECT_INTERNAL *Object;
ACPI_OPERAND_OBJECT *Object;
FUNCTION_TRACE_STR ("CmCreateInternalObject", AcpiCmGetTypeName (Type));
@ -175,7 +175,6 @@ _CmCreateInternalObject (
/* Save the object type in the object descriptor */
Object->Common.Type = Type;
Object->Common.Size = (UINT8) sizeof (ACPI_OBJECT_INTERNAL);
/* Init the reference count */
@ -194,7 +193,7 @@ _CmCreateInternalObject (
*
* PARAMETERS: Operand - Object to be validated
*
* RETURN: Validate a pointer to be an ACPI_OBJECT_INTERNAL
* RETURN: Validate a pointer to be an ACPI_OPERAND_OBJECT
*
*****************************************************************************/
@ -252,7 +251,7 @@ AcpiCmValidInternalObject (
}
/* The object appears to be a valid ACPI_OBJECT_INTERNAL */
/* The object appears to be a valid ACPI_OPERAND_OBJECT */
return (TRUE);
}
@ -280,7 +279,7 @@ _CmAllocateObjectDesc (
UINT32 LineNumber,
UINT32 ComponentId)
{
ACPI_OBJECT_INTERNAL *Object;
ACPI_OPERAND_OBJECT *Object;
FUNCTION_TRACE ("_AllocateObjectDesc");
@ -297,8 +296,8 @@ _CmAllocateObjectDesc (
/* There is an object available, use it */
Object = AcpiGbl_ObjectCache;
AcpiGbl_ObjectCache = Object->Common.Next;
Object->Common.Next = NULL;
AcpiGbl_ObjectCache = Object->Cache.Next;
Object->Cache.Next = NULL;
AcpiGbl_ObjectCacheHits++;
AcpiGbl_ObjectCacheDepth--;
@ -314,29 +313,29 @@ _CmAllocateObjectDesc (
/* Attempt to allocate new descriptor */
Object = _CmCallocate (sizeof (ACPI_OBJECT_INTERNAL), ComponentId,
Object = _CmCallocate (sizeof (ACPI_OPERAND_OBJECT), ComponentId,
ModuleName, LineNumber);
if (!Object)
{
/* Allocation failed */
_REPORT_ERROR (ModuleName, LineNumber, ComponentId,
"Could not allocate Object Descriptor");
("Could not allocate an object descriptor\n"));
return_PTR (NULL);
}
/* Memory allocation metrics - compiled out in non debug mode. */
INCREMENT_OBJECT_METRICS (sizeof (ACPI_OBJECT_INTERNAL));
INCREMENT_OBJECT_METRICS (sizeof (ACPI_OPERAND_OBJECT));
}
/* Mark the descriptor type */
Object->Common.DataType = ACPI_DESC_TYPE_INTERNAL;
DEBUG_PRINT (TRACE_ALLOCATIONS, ("AllocateObjectDesc: %p Size 0x%x\n",
Object, sizeof (ACPI_OBJECT_INTERNAL)));
DEBUG_PRINT (TRACE_ALLOCATIONS, ("AllocateObjectDesc: %p Size %X\n",
Object, sizeof (ACPI_OPERAND_OBJECT)));
return_PTR (Object);
}
@ -356,13 +355,23 @@ _CmAllocateObjectDesc (
void
AcpiCmDeleteObjectDesc (
ACPI_OBJECT_INTERNAL *Object)
ACPI_OPERAND_OBJECT *Object)
{
FUNCTION_TRACE ("AcpiCmDeleteObjectDesc");
FUNCTION_TRACE_PTR ("AcpiCmDeleteObjectDesc", Object);
/* Object must be an ACPI_OBJECT_INTERNAL */
/* Make sure that the object isn't already in the cache */
if (Object->Common.DataType == (ACPI_DESC_TYPE_INTERNAL | ACPI_CACHED_OBJECT))
{
DEBUG_PRINT (ACPI_ERROR,
("CmDeleteObjectDesc: Obj %p is already in the object cache\n",
Object));
return_VOID;
}
/* Object must be an ACPI_OPERAND_OBJECT */
if (Object->Common.DataType != ACPI_DESC_TYPE_INTERNAL)
{
@ -371,21 +380,6 @@ AcpiCmDeleteObjectDesc (
return_VOID;
}
/* Make sure that the object isn't already in the cache */
if (Object->Common.Next)
{
/* Some objects actually use the Next link field */
if (Object->Common.Type != ACPI_TYPE_REGION)
{
DEBUG_PRINT (ACPI_ERROR,
("CmDeleteObjectDesc: Obj %p is already in the object cache\n",
Object));
return_VOID;
}
}
/* If cache is full, just free this object */
@ -395,7 +389,7 @@ AcpiCmDeleteObjectDesc (
* Memory allocation metrics. Call the macro here since we only
* care about dynamically allocated objects.
*/
DECREMENT_OBJECT_METRICS (sizeof (ACPI_OBJECT_INTERNAL));
DECREMENT_OBJECT_METRICS (sizeof (ACPI_OPERAND_OBJECT));
AcpiCmFree (Object);
return_VOID;
@ -405,12 +399,12 @@ AcpiCmDeleteObjectDesc (
/* Clear the entire object. This is important! */
MEMSET (Object, 0, sizeof (ACPI_OBJECT_INTERNAL));
Object->Common.DataType = ACPI_DESC_TYPE_INTERNAL;
MEMSET (Object, 0, sizeof (ACPI_OPERAND_OBJECT));
Object->Common.DataType = ACPI_DESC_TYPE_INTERNAL | ACPI_CACHED_OBJECT;
/* Put the object at the head of the global cache list */
Object->Common.Next = AcpiGbl_ObjectCache;
Object->Cache.Next = AcpiGbl_ObjectCache;
AcpiGbl_ObjectCache = Object;
AcpiGbl_ObjectCacheDepth++;
@ -437,7 +431,7 @@ void
AcpiCmDeleteObjectCache (
void)
{
ACPI_OBJECT_INTERNAL *Next;
ACPI_OPERAND_OBJECT *Next;
FUNCTION_TRACE ("CmDeleteObjectCache");
@ -449,14 +443,14 @@ AcpiCmDeleteObjectCache (
{
/* Delete one cached state object */
Next = AcpiGbl_ObjectCache->Common.Next;
AcpiGbl_ObjectCache->Common.Next = NULL;
Next = AcpiGbl_ObjectCache->Cache.Next;
AcpiGbl_ObjectCache->Cache.Next = NULL;
/*
* Memory allocation metrics. Call the macro here since we only
* care about dynamically allocated objects.
*/
DECREMENT_OBJECT_METRICS (sizeof (ACPI_OBJECT_INTERNAL));
DECREMENT_OBJECT_METRICS (sizeof (ACPI_OPERAND_OBJECT));
AcpiCmFree (AcpiGbl_ObjectCache);
AcpiGbl_ObjectCache = Next;
@ -483,7 +477,7 @@ AcpiCmDeleteObjectCache (
void
AcpiCmInitStaticObject (
ACPI_OBJECT_INTERNAL *ObjDesc)
ACPI_OPERAND_OBJECT *ObjDesc)
{
FUNCTION_TRACE_PTR ("CmInitStaticObject", ObjDesc);
@ -498,12 +492,12 @@ AcpiCmInitStaticObject (
/*
* Clear the entire descriptor
*/
MEMSET ((void *) ObjDesc, 0, sizeof (ACPI_OBJECT_INTERNAL));
MEMSET ((void *) ObjDesc, 0, sizeof (ACPI_OPERAND_OBJECT));
/*
* Initialize the header fields
* 1) This is an ACPI_OBJECT_INTERNAL descriptor
* 1) This is an ACPI_OPERAND_OBJECT descriptor
* 2) The size is the full object (worst case)
* 3) The flags field indicates static allocation
* 4) Reference count starts at one (not really necessary since the
@ -511,8 +505,7 @@ AcpiCmInitStaticObject (
*/
ObjDesc->Common.DataType = ACPI_DESC_TYPE_INTERNAL;
ObjDesc->Common.Size = sizeof (ACPI_OBJECT_INTERNAL);
ObjDesc->Common.Flags = AO_STATIC_ALLOCATION;
ObjDesc->Common.Flags = AOPOBJ_STATIC_ALLOCATION;
ObjDesc->Common.ReferenceCount = 1;
return_VOID;
@ -538,7 +531,7 @@ AcpiCmInitStaticObject (
ACPI_STATUS
AcpiCmGetSimpleObjectSize (
ACPI_OBJECT_INTERNAL *InternalObj,
ACPI_OPERAND_OBJECT *InternalObj,
UINT32 *ObjLength)
{
UINT32 Length;
@ -612,7 +605,7 @@ AcpiCmGetSimpleObjectSize (
if (InternalObj->Reference.OpCode != AML_NAMEPATH_OP)
{
DEBUG_PRINT (ACPI_ERROR,
("CmGetSimpleObjectSize: Unsupported Reference opcode=0x%X in object %p\n",
("CmGetSimpleObjectSize: Unsupported Reference opcode=%X in object %p\n",
InternalObj->Reference.OpCode, InternalObj));
Status = AE_TYPE;
}
@ -622,7 +615,7 @@ AcpiCmGetSimpleObjectSize (
default:
DEBUG_PRINT (ACPI_ERROR,
("CmGetSimpleObjectSize: Unsupported type=0x%X in object %p\n",
("CmGetSimpleObjectSize: Unsupported type=%X in object %p\n",
InternalObj->Common.Type, InternalObj));
Status = AE_TYPE;
break;
@ -660,15 +653,15 @@ AcpiCmGetSimpleObjectSize (
ACPI_STATUS
AcpiCmGetPackageObjectSize (
ACPI_OBJECT_INTERNAL *InternalObj,
ACPI_OPERAND_OBJECT *InternalObj,
UINT32 *ObjLength)
{
ACPI_OBJECT_INTERNAL *ThisInternalObj;
ACPI_OBJECT_INTERNAL *ParentObj[MAX_PACKAGE_DEPTH] = { 0,0,0,0,0 };
ACPI_OBJECT_INTERNAL *ThisParent;
ACPI_OPERAND_OBJECT *ThisInternalObj;
ACPI_OPERAND_OBJECT *ParentObj[MAX_PACKAGE_DEPTH];
ACPI_OPERAND_OBJECT *ThisParent;
UINT32 ThisIndex;
UINT32 Index[MAX_PACKAGE_DEPTH] = { 0,0,0,0,0 };
UINT32 Index[MAX_PACKAGE_DEPTH];
UINT32 Length = 0;
UINT32 ObjectSpace;
UINT32 CurrentDepth = 0;
@ -679,6 +672,11 @@ AcpiCmGetPackageObjectSize (
FUNCTION_TRACE_PTR ("CmGetPackageObjectSize", InternalObj);
/* Init the package stack TBD: replace with linked list */
MEMSET(ParentObj, 0, MAX_PACKAGE_DEPTH);
MEMSET(Index, 0, MAX_PACKAGE_DEPTH);
ParentObj[0] = InternalObj;
while (1)
@ -689,7 +687,7 @@ AcpiCmGetPackageObjectSize (
/*
* Check for 1) An unitialized package element. It is completely
* Check for 1) An uninitialized package element. It is completely
* legal to declare a package and leave it uninitialized
* 2) Any type other than a package. Packages are handled
* below.
@ -774,7 +772,7 @@ AcpiCmGetPackageObjectSize (
*/
DEBUG_PRINT (ACPI_ERROR,
("CmGetPackageObjectSize: Pkg nested too deep (max %d)\n",
("CmGetPackageObjectSize: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
@ -799,7 +797,7 @@ AcpiCmGetPackageObjectSize (
ACPI_STATUS
AcpiCmGetObjectSize(
ACPI_OBJECT_INTERNAL *InternalObj,
ACPI_OPERAND_OBJECT *InternalObj,
UINT32 *ObjLength)
{
ACPI_STATUS Status;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmxface - External interfaces for "global" ACPI functions
* $Revision: 1.43 $
* $Revision: 1.56 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -132,7 +132,7 @@
/*******************************************************************************
*
* FUNCTION: AcpiInitialize
* FUNCTION: AcpiInitializeSubsystem
*
* PARAMETERS: None
*
@ -144,12 +144,13 @@
******************************************************************************/
ACPI_STATUS
AcpiInitialize (ACPI_INIT_DATA *InitData)
AcpiInitializeSubsystem (
void)
{
ACPI_STATUS Status;
FUNCTION_TRACE ("AcpiInitialize");
FUNCTION_TRACE ("AcpiInitializeSubsystem");
DEBUG_PRINT_RAW (ACPI_OK,
("ACPI Subsystem version [%s]\n", ACPI_CA_VERSION));
@ -158,16 +159,15 @@ AcpiInitialize (ACPI_INIT_DATA *InitData)
/* Initialize all globals used by the subsystem */
AcpiCmInitGlobals (InitData);
AcpiCmInitGlobals ();
/* Initialize the OS-Dependent layer */
Status = AcpiOsInitialize ();
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
("OSD failed to initialize, %s\n", AcpiCmFormatException (Status)));
REPORT_ERROR ("OSD Initialization Failure");
REPORT_ERROR (("OSD failed to initialize, %s\n",
AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
}
@ -176,12 +176,25 @@ AcpiInitialize (ACPI_INIT_DATA *InitData)
Status = AcpiCmMutexInitialize ();
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
("Global mutex creation failure, %s\n", AcpiCmFormatException (Status)));
REPORT_ERROR ("Global Mutex Initialization Failure");
REPORT_ERROR (("Global mutex creation failure, %s\n",
AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
}
/*
* Initialize the namespace manager and
* the root of the namespace tree
*/
Status = AcpiNsRootInitialize ();
if (ACPI_FAILURE (Status))
{
REPORT_ERROR (("Namespace initialization failure, %s\n",
AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
}
/* If configured, initialize the AML debugger */
DEBUGGER_EXEC (AcpiDbInitialize ());
@ -190,6 +203,145 @@ AcpiInitialize (ACPI_INIT_DATA *InitData)
}
/*******************************************************************************
*
* FUNCTION: AcpiEnableSubsystem
*
* PARAMETERS: Flags - Init/enable Options
*
* RETURN: Status
*
* DESCRIPTION: Completes the subsystem initialization including hardware.
* Puts system into ACPI mode if it isn't already.
*
******************************************************************************/
ACPI_STATUS
AcpiEnableSubsystem (
UINT32 Flags)
{
ACPI_STATUS Status = AE_OK;
FUNCTION_TRACE ("AcpiEnableSubsystem");
/* Sanity check the FADT for valid values */
Status = AcpiCmValidateFadt ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
/*
* Install the default OpRegion handlers. These are
* installed unless other handlers have already been
* installed via the InstallAddressSpaceHandler interface
*/
if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
{
DEBUG_PRINT (TRACE_EXEC, ("[Init] Installing default address space handlers\n"));
Status = AcpiEvInstallDefaultAddressSpaceHandlers ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
}
/*
* We must initialize the hardware before we can enable ACPI.
*/
if (!(Flags & ACPI_NO_HARDWARE_INIT))
{
DEBUG_PRINT (TRACE_EXEC, ("[Init] Initializing ACPI hardware\n"));
Status = AcpiHwInitialize ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
}
/*
* Enable ACPI on this platform
*/
if (!(Flags & ACPI_NO_ACPI_ENABLE))
{
DEBUG_PRINT (TRACE_EXEC, ("[Init] Going into ACPI mode\n"));
Status = AcpiEnable ();
if (ACPI_FAILURE (Status))
{
/* TBD: workaround. Old Lions don't enable properly */
DEBUG_PRINT(ACPI_WARN, ("AcpiEnable failed.\n"));
/*return_ACPI_STATUS (Status);*/
}
}
/*
* Note:
* We must have the hardware AND events initialized before we can execute
* ANY control methods SAFELY. Any control method can require ACPI hardware
* support, so the hardware MUST be initialized before execution!
*/
if (!(Flags & ACPI_NO_EVENT_INIT))
{
DEBUG_PRINT (TRACE_EXEC, ("[Init] Initializing ACPI events\n"));
Status = AcpiEvInitialize ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
}
/*
* Initialize all device objects in the namespace
* This runs the _STA, _INI, and _HID methods, and detects
* the PCI root bus(es)
*/
if (!(Flags & ACPI_NO_DEVICE_INIT))
{
DEBUG_PRINT (TRACE_EXEC, ("[Init] Initializing ACPI Devices\n"));
Status = AcpiNsInitializeDevices (Flags & ACPI_NO_PCI_INIT);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
}
/*
* Initialize the objects that remain unitialized. This
* runs the executable AML that is part of the declaration of OpRegions
* and Fields.
*/
if (!(Flags & ACPI_NO_OBJECT_INIT))
{
DEBUG_PRINT (TRACE_EXEC, ("[Init] Initializing ACPI Objects\n"));
Status = AcpiNsInitializeObjects ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
}
return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiTerminate
@ -210,7 +362,7 @@ AcpiTerminate (void)
/* Terminate the AML Debuger if present */
AcpiGbl_DbTerminateThreads = TRUE;
DEBUGGER_EXEC(AcpiGbl_DbTerminateThreads = TRUE);
/* TBD: [Investigate] This is no longer needed?*/
/* AcpiCmReleaseMutex (ACPI_MTX_DEBUG_CMD_READY); */
@ -314,7 +466,7 @@ AcpiGetSystemInfo (
/* Current status of the ACPI tables, per table type */
InfoPtr->NumTableTypes = NUM_ACPI_TABLES;
for (i = 0; i < NUM_ACPI_TABLES; i++);
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
InfoPtr->TableInfo[i].Count = AcpiGbl_AcpiTables[i].Count;
}

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
* $Revision: 1.49 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -145,29 +146,6 @@
#define ACPI_CA_VERSION __DATE__
/* Name of host operating system (returned by the _OS_ namespace object) */
#ifdef _LINUX
#define ACPI_OS_NAME "Linux"
#else
#define ACPI_OS_NAME "Intel ACPI/CA Core Subsystem"
#endif
/*
* How and when control methods will be parsed
* The default action is to parse all methods at table load time to verify them, but delete the parse trees
* to conserve memory. Methods are parsed just in time before execution and the parse tree is deleted
* when execution completes.
*/
#define METHOD_PARSE_AT_INIT 0x0 /* Parse at table init, never delete the method parse tree */
#define METHOD_PARSE_JUST_IN_TIME 0x1 /* Parse only when a method is invoked */
#define METHOD_DELETE_AT_COMPLETION 0x2 /* Delete parse tree on method completion */
/* Default parsing configuration */
#define METHOD_PARSE_CONFIGURATION (METHOD_PARSE_JUST_IN_TIME | METHOD_DELETE_AT_COMPLETION)
/* Maximum objects in the various object caches */
@ -177,15 +155,6 @@
#define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */
#define MAX_WALK_CACHE_DEPTH 2 /* Objects for parse tree walks (method execution) */
/*
* NameSpace Table size
*
* All tables are the same size to simplify the implementation.
* Tables may be extended by allocating additional tables that
* are in turn linked together to form a chain of tables.
*/
#define NS_TABLE_SIZE 4
/* String size constants */
@ -254,14 +223,14 @@
/* Names within the namespace are 4 bytes long */
#define ACPI_NAME_SIZE 4
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */
#define PATH_SEPARATOR '.'
/* Constants used in searching for the RSDP in low memory */
#define LO_RSDP_WINDOW_BASE (void *) 0
#define HI_RSDP_WINDOW_BASE (void *) 0xE0000
#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */
#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */
#define LO_RSDP_WINDOW_SIZE 0x400
#define HI_RSDP_WINDOW_SIZE 0x20000
#define RSDP_SCAN_STEP 16

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
* $Revision: 1.38 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -155,7 +156,7 @@ extern UINT32 NumAliases;
extern UINT32 NumDevices;
extern UINT32 NumFieldDefs;
extern UINT32 NumThermalZones;
extern UINT32 NumNamedObjects;
extern UINT32 NumNodes;
extern UINT32 NumGrammarElements;
extern UINT32 NumMethodElements ;
extern UINT32 NumMutexes;
@ -217,7 +218,7 @@ AcpiDbInitialize (
ACPI_STATUS
AcpiDbSingleStep (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op,
ACPI_PARSE_OBJECT *Op,
UINT8 OpType);
@ -239,16 +240,16 @@ void
AcpiDbSetMethodBreakpoint (
NATIVE_CHAR *Location,
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
void
AcpiDbSetMethodCallBreakpoint (
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDisassembleAml (
NATIVE_CHAR *Statements,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDumpNamespace (
@ -295,7 +296,8 @@ AcpiDbFindReferences (
void
AcpiDbDisplayOp (
ACPI_GENERIC_OP *origin,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Origin,
UINT32 NumOpcodes);
void
@ -304,11 +306,16 @@ AcpiDbDisplayNamestring (
void
AcpiDbDisplayPath (
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDisplayOpcode (
ACPI_GENERIC_OP *Op);
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDecodeInternalObject (
ACPI_OPERAND_OBJECT *ObjDesc);
/*
@ -318,7 +325,7 @@ AcpiDbDisplayOpcode (
void
AcpiDbDisplayMethodInfo (
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
void
AcpiDbDecodeAndDisplayObject (
@ -327,7 +334,7 @@ AcpiDbDecodeAndDisplayObject (
void
AcpiDbDisplayResultObject (
ACPI_OBJECT_INTERNAL *ObjDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
@ -336,7 +343,7 @@ AcpiDbDisplayAllMethods (
void
AcpiDbDisplayInternalObject (
ACPI_OBJECT_INTERNAL *ObjDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState);
void
@ -357,7 +364,7 @@ AcpiDbDisplayCallingTree (
void
AcpiDbDisplayArgumentObject (
ACPI_OBJECT_INTERNAL *ObjDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState);
@ -425,7 +432,7 @@ ACPI_STATUS
AcpiDbCommandDispatch (
NATIVE_CHAR *InputBuffer,
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
void
AcpiDbExecuteThread (
@ -434,7 +441,7 @@ AcpiDbExecuteThread (
ACPI_STATUS
AcpiDbUserCommands (
NATIVE_CHAR Prompt,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
/*
@ -443,7 +450,7 @@ AcpiDbUserCommands (
void
AcpiDbGenerateStatistics (
ACPI_GENERIC_OP *Root,
ACPI_PARSE_OBJECT *Root,
BOOLEAN IsMethod);
@ -476,9 +483,9 @@ AcpiDbPrepNamestring (
ACPI_STATUS
AcpiDbSecondPassParse (
ACPI_GENERIC_OP *Root);
ACPI_PARSE_OBJECT *Root);
ACPI_NAMED_OBJECT*
ACPI_NAMESPACE_NODE *
AcpiDbLocalNsLookup (
NATIVE_CHAR *Name);

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
* $Revision: 1.34 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -147,15 +148,19 @@ AcpiDsObjStackGetValue (
ACPI_STATUS
AcpiDsObjStackPopObject (
ACPI_OBJECT_INTERNAL **Object,
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState);
/* dsregion - Op region support */
/* dsopcode - support for late evaluation */
ACPI_STATUS
AcpiDsGetFieldUnitArguments (
ACPI_OPERAND_OBJECT *ObjDesc);
ACPI_STATUS
AcpiDsGetRegionArguments (
ACPI_OBJECT_INTERNAL *RgnDesc);
ACPI_OPERAND_OBJECT *RgnDesc);
/* dsctrl - Parser/Interpreter interface, control stack routines */
@ -164,27 +169,34 @@ AcpiDsGetRegionArguments (
ACPI_STATUS
AcpiDsExecBeginControlOp (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
AcpiDsExecEndControlOp (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
/* dsexec - Parser/Interpreter interface, method execution callbacks */
ACPI_STATUS
AcpiDsGetPredicateValue (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
UINT32 HasResultObj);
ACPI_STATUS
AcpiDsExecBeginOp (
UINT16 Opcode,
ACPI_GENERIC_OP *Op,
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP **OutOp);
ACPI_PARSE_OBJECT **OutOp);
ACPI_STATUS
AcpiDsExecEndOp (
ACPI_WALK_STATE *State,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
/* dsfield - Parser/Interpreter interface for AML fields */
@ -192,20 +204,20 @@ AcpiDsExecEndOp (
ACPI_STATUS
AcpiDsCreateField (
ACPI_GENERIC_OP *Op,
ACPI_NAMED_OBJECT *Region,
ACPI_PARSE_OBJECT *Op,
ACPI_NAMESPACE_NODE *RegionNode,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsCreateBankField (
ACPI_GENERIC_OP *Op,
ACPI_NAMED_OBJECT *Region,
ACPI_PARSE_OBJECT *Op,
ACPI_NAMESPACE_NODE *RegionNode,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsCreateIndexField (
ACPI_GENERIC_OP *Op,
ACPI_HANDLE Region,
ACPI_PARSE_OBJECT *Op,
ACPI_HANDLE RegionNode,
ACPI_WALK_STATE *WalkState);
@ -214,26 +226,38 @@ AcpiDsCreateIndexField (
ACPI_STATUS
AcpiDsLoad1BeginOp (
UINT16 Opcode,
ACPI_GENERIC_OP *Op,
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP **OutOp);
ACPI_PARSE_OBJECT **OutOp);
ACPI_STATUS
AcpiDsLoad1EndOp (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
AcpiDsLoad2BeginOp (
UINT16 Opcode,
ACPI_GENERIC_OP *Op,
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP **OutOp);
ACPI_PARSE_OBJECT **OutOp);
ACPI_STATUS
AcpiDsLoad2EndOp (
ACPI_WALK_STATE *State,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
AcpiDsLoad3BeginOp (
UINT16 Opcode,
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT **OutOp);
ACPI_STATUS
AcpiDsLoad3EndOp (
ACPI_WALK_STATE *State,
ACPI_PARSE_OBJECT *Op);
/* dsmthdat - method data (locals/args) */
@ -244,7 +268,7 @@ AcpiDsMethodDataGetEntry (
UINT32 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState,
ACPI_OBJECT_INTERNAL ***Entry);
ACPI_OPERAND_OBJECT ***Node);
ACPI_STATUS
AcpiDsMethodDataDeleteAll (
@ -252,7 +276,7 @@ AcpiDsMethodDataDeleteAll (
BOOLEAN
AcpiDsIsMethodValue (
ACPI_OBJECT_INTERNAL *ObjDesc);
ACPI_OPERAND_OBJECT *ObjDesc);
OBJECT_TYPE_INTERNAL
AcpiDsMethodDataGetType (
@ -265,13 +289,13 @@ AcpiDsMethodDataGetValue (
UINT32 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState,
ACPI_OBJECT_INTERNAL **DestDesc);
ACPI_OPERAND_OBJECT **DestDesc);
ACPI_STATUS
AcpiDsMethodDataSetValue (
UINT32 Type,
UINT32 Index,
ACPI_OBJECT_INTERNAL *SrcDesc,
ACPI_OPERAND_OBJECT *SrcDesc,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
@ -282,11 +306,11 @@ AcpiDsMethodDataDeleteValue (
ACPI_STATUS
AcpiDsMethodDataInitArgs (
ACPI_OBJECT_INTERNAL **Params,
ACPI_OPERAND_OBJECT **Params,
UINT32 MaxParamCount,
ACPI_WALK_STATE *WalkState);
ACPI_NAMED_OBJECT*
ACPI_NAMESPACE_NODE *
AcpiDsMethodDataGetNte (
UINT32 Type,
UINT32 Index,
@ -300,7 +324,7 @@ ACPI_STATUS
AcpiDsMethodDataSetEntry (
UINT32 Type,
UINT32 Index,
ACPI_OBJECT_INTERNAL *Object,
ACPI_OPERAND_OBJECT *Object,
ACPI_WALK_STATE *WalkState);
@ -314,12 +338,12 @@ ACPI_STATUS
AcpiDsCallControlMethod (
ACPI_WALK_LIST *WalkList,
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
AcpiDsRestartControlMethod (
ACPI_WALK_STATE *WalkState,
ACPI_OBJECT_INTERNAL *ReturnDesc);
ACPI_OPERAND_OBJECT *ReturnDesc);
ACPI_STATUS
AcpiDsTerminateControlMethod (
@ -327,8 +351,8 @@ AcpiDsTerminateControlMethod (
ACPI_STATUS
AcpiDsBeginMethodExecution (
ACPI_NAMED_OBJECT *MethodEntry,
ACPI_OBJECT_INTERNAL *ObjDesc);
ACPI_NAMESPACE_NODE *MethodNode,
ACPI_OPERAND_OBJECT *ObjDesc);
/* dsobj - Parser/Interpreter interface - object initialization and conversion */
@ -343,40 +367,45 @@ AcpiDsInitOneObject (
ACPI_STATUS
AcpiDsInitializeObjects (
ACPI_TABLE_DESC *TableDesc,
ACPI_NAMED_OBJECT *StartEntry);
ACPI_NAMESPACE_NODE *StartNode);
ACPI_STATUS
AcpiDsBuildInternalPackageObj (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *op,
ACPI_OBJECT_INTERNAL **ObjDesc);
ACPI_PARSE_OBJECT *op,
ACPI_OPERAND_OBJECT **ObjDesc);
ACPI_STATUS
AcpiDsBuildInternalObject (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *op,
ACPI_OBJECT_INTERNAL **ObjDescPtr);
ACPI_PARSE_OBJECT *op,
ACPI_OPERAND_OBJECT **ObjDescPtr);
ACPI_STATUS
AcpiDsInitObjectFromOp (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op,
ACPI_PARSE_OBJECT *Op,
UINT16 Opcode,
ACPI_OBJECT_INTERNAL **ObjDesc);
ACPI_OPERAND_OBJECT **ObjDesc);
ACPI_STATUS
AcpiDsCreateNamedObject (
AcpiDsCreateNode (
ACPI_WALK_STATE *WalkState,
ACPI_NAMED_OBJECT *Entry,
ACPI_GENERIC_OP *Op);
ACPI_NAMESPACE_NODE *Node,
ACPI_PARSE_OBJECT *Op);
/* dsregn - Parser/Interpreter interface - Op Region parsing */
ACPI_STATUS
AcpiDsEvalFieldUnitOperands (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
AcpiDsEvalRegionOperands (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
AcpiDsInitializeRegion (
@ -387,23 +416,25 @@ AcpiDsInitializeRegion (
BOOLEAN
AcpiDsIsResultUsed (
ACPI_GENERIC_OP *Op);
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState);
void
AcpiDsDeleteResultIfNotUsed (
ACPI_GENERIC_OP *Op,
ACPI_OBJECT_INTERNAL *ResultObj,
ACPI_PARSE_OBJECT *Op,
ACPI_OPERAND_OBJECT *ResultObj,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsCreateOperand (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *Arg);
ACPI_PARSE_OBJECT *Arg,
UINT32 ArgsRemaining);
ACPI_STATUS
AcpiDsCreateOperands (
ACPI_WALK_STATE *WalkState,
ACPI_GENERIC_OP *FirstArg);
ACPI_PARSE_OBJECT *FirstArg);
ACPI_STATUS
AcpiDsResolveOperands (
@ -425,7 +456,7 @@ AcpiDsMapNamedOpcodeToDataType (
ACPI_STATUS
AcpiDsScopeStackPush (
ACPI_NAMED_OBJECT *NewScope,
ACPI_NAMESPACE_NODE *Node,
OBJECT_TYPE_INTERNAL Type,
ACPI_WALK_STATE *WalkState);
@ -444,8 +475,8 @@ AcpiDsScopeStackClear (
ACPI_WALK_STATE *
AcpiDsCreateWalkState (
ACPI_OWNER_ID OwnerId,
ACPI_GENERIC_OP *Origin,
ACPI_OBJECT_INTERNAL *MthDesc,
ACPI_PARSE_OBJECT *Origin,
ACPI_OPERAND_OBJECT *MthDesc,
ACPI_WALK_LIST *WalkList);
ACPI_STATUS
@ -467,12 +498,10 @@ AcpiDsPopWalkState (
ACPI_STATUS
AcpiDsResultStackPop (
ACPI_OBJECT_INTERNAL **Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultStackPush (
void *Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
@ -487,5 +516,31 @@ void
AcpiDsDeleteWalkStateCache (
void);
ACPI_STATUS
AcpiDsResultInsert (
void *Object,
UINT32 Index,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultRemove (
ACPI_OPERAND_OBJECT **Object,
UINT32 Index,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultPop (
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultPush (
ACPI_OPERAND_OBJECT *Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultPopFromBottom (
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState);
#endif /* _ACDISPAT_H_ */

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
* $Revision: 1.61 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -117,6 +118,11 @@
#define __ACEVENTS_H__
ACPI_STATUS
AcpiEvInitialize (
void);
/*
* AcpiEvfixed - Fixed event handling
*/
@ -192,9 +198,9 @@ AcpiEvInstallDefaultAddressSpaceHandlers (
ACPI_STATUS
AcpiEvAddressSpaceDispatch (
ACPI_OBJECT_INTERNAL *RegionObj,
ACPI_OPERAND_OBJECT *RegionObj,
UINT32 Function,
UINT32 Address,
ACPI_PHYSICAL_ADDRESS Address,
UINT32 BitWidth,
UINT32 *Value);
@ -208,13 +214,13 @@ AcpiEvAddrHandlerHelper (
void
AcpiEvDisassociateRegionFromHandler(
ACPI_OBJECT_INTERNAL *RegionObj);
ACPI_OPERAND_OBJECT *RegionObj);
ACPI_STATUS
AcpiEvAssociateRegionAndHandler (
ACPI_OBJECT_INTERNAL *HandlerObj,
ACPI_OBJECT_INTERNAL *RegionObj,
ACPI_OPERAND_OBJECT *HandlerObj,
ACPI_OPERAND_OBJECT *RegionObj,
BOOLEAN AcpiNsIsLocked);
@ -252,7 +258,7 @@ AcpiEvDefaultRegionSetup (
ACPI_STATUS
AcpiEvInitializeRegion (
ACPI_OBJECT_INTERNAL *RegionObj,
ACPI_OPERAND_OBJECT *RegionObj,
BOOLEAN AcpiNsLocked);

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
* $Revision: 1.38 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -161,7 +162,7 @@
#define AE_CODE_ENV_MAX 0x0014
/*
/*
* Programmer exceptions
*/
#define AE_BAD_PARAMETER (ACPI_STATUS) (0x0001 | AE_CODE_PROGRAMMER)
@ -179,6 +180,7 @@
#define AE_BAD_SIGNATURE (ACPI_STATUS) (0x0001 | AE_CODE_ACPI_TABLES)
#define AE_BAD_HEADER (ACPI_STATUS) (0x0002 | AE_CODE_ACPI_TABLES)
#define AE_BAD_CHECKSUM (ACPI_STATUS) (0x0003 | AE_CODE_ACPI_TABLES)
#define AE_BAD_VALUE (ACPI_STATUS) (0x0004 | AE_CODE_ACPI_TABLES)
#define AE_CODE_TBL_MAX 0x0003
@ -204,8 +206,9 @@
#define AE_AML_BAD_NAME (ACPI_STATUS) (0x000F | AE_CODE_AML)
#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x0010 | AE_CODE_AML)
#define AE_AML_INTERNAL (ACPI_STATUS) (0x0011 | AE_CODE_AML)
#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0012 | AE_CODE_AML)
#define AE_CODE_AML_MAX 0x0011
#define AE_CODE_AML_MAX 0x0012
/*
* Internal exceptions used for control
@ -222,7 +225,6 @@
#define AE_CODE_CTRL_MAX 0x0008
#ifdef DEFINE_ACPI_GLOBALS
/*
@ -268,6 +270,7 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Tbl[] =
"AE_BAD_SIGNATURE",
"AE_BAD_HEADER",
"AE_BAD_CHECKSUM",
"AE_BAD_VALUE",
};
static NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
@ -289,6 +292,7 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_BAD_NAME",
"AE_AML_NAME_NOT_FOUND",
"AE_AML_INTERNAL",
"AE_AML_INVALID_SPACE_ID",
};
static NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
@ -304,8 +308,6 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
};
#endif /* DEFINE_ACPI_GLOBALS */

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
* $Revision: 1.93 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -164,13 +165,12 @@ extern UINT32 AcpiGbl_NestingLevel;
* of each in the system. Each global points to the actual table.
*
*/
ACPI_EXTERN ROOT_SYSTEM_DESCRIPTOR_POINTER *AcpiGbl_RSDP;
ACPI_EXTERN ROOT_SYSTEM_DESCRIPTION_TABLE *AcpiGbl_RSDT;
ACPI_EXTERN FIRMWARE_ACPI_CONTROL_STRUCTURE *AcpiGbl_FACS;
ACPI_EXTERN FIXED_ACPI_DESCRIPTION_TABLE *AcpiGbl_FACP;
ACPI_EXTERN APIC_TABLE *AcpiGbl_APIC;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_SBST;
ACPI_EXTERN RSDP_DESCRIPTOR *AcpiGbl_RSDP;
ACPI_EXTERN XSDT_DESCRIPTOR *AcpiGbl_XSDT;
ACPI_EXTERN FADT_DESCRIPTOR *AcpiGbl_FADT;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT;
ACPI_EXTERN ACPI_COMMON_FACS *AcpiGbl_FACS;
/*
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
* sufficient; Therefore, there isn't one!
@ -189,7 +189,6 @@ extern ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES];
* (The table maps local handles to the real OS handles)
*/
ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_AcpiMutexInfo [NUM_MTX];
extern ACPI_INIT_DATA AcpiGbl_AcpiInitData;
/*****************************************************************************
@ -203,9 +202,9 @@ ACPI_EXTERN UINT8 *AcpiGbl_Gpe0EnableRegisterSave;
ACPI_EXTERN UINT8 *AcpiGbl_Gpe1EnableRegisterSave;
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_BreakpointWalk;
ACPI_EXTERN ACPI_GENERIC_STATE *AcpiGbl_GenericStateCache;
ACPI_EXTERN ACPI_GENERIC_OP *AcpiGbl_ParseCache;
ACPI_EXTERN ACPI_EXTENDED_OP *AcpiGbl_ExtParseCache;
ACPI_EXTERN ACPI_OBJECT_INTERNAL *AcpiGbl_ObjectCache;
ACPI_EXTERN ACPI_PARSE_OBJECT *AcpiGbl_ParseCache;
ACPI_EXTERN ACPI_PARSE2_OBJECT *AcpiGbl_ExtParseCache;
ACPI_EXTERN ACPI_OPERAND_OBJECT *AcpiGbl_ObjectCache;
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_WalkStateCache;
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GlobalLockSemaphore;
@ -254,6 +253,7 @@ ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_SystemFlags;
extern UINT32 AcpiGbl_StartupFlags;
extern UINT8 AcpiGbl_DecodeTo8bit[];
/*****************************************************************************
@ -266,8 +266,8 @@ extern UINT32 AcpiGbl_StartupFlags;
#define NUM_PREDEFINED_NAMES 9
ACPI_EXTERN ACPI_NAMED_OBJECT AcpiGbl_RootNamedObject;
ACPI_EXTERN ACPI_NAMED_OBJECT *AcpiGbl_RootObject;
ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct;
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode;
extern UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
extern PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
@ -288,23 +288,8 @@ ACPI_EXTERN ALLOCATION_INFO *AcpiGbl_TailAllocPtr;
****************************************************************************/
ACPI_EXTERN UINT32 AcpiGbl_WhenToParseMethods;
ACPI_EXTERN ACPI_WALK_LIST *AcpiGbl_CurrentWalkList;
/* Base of AML block, and pointer to current location in it */
ACPI_EXTERN UINT8 *AcpiGbl_PCodeBase;
ACPI_EXTERN UINT8 *AcpiGbl_PCode;
/*
* Length of AML block, and remaining length of current package.
*/
ACPI_EXTERN UINT32 AcpiGbl_PCodeBlockLen;
ACPI_EXTERN UINT32 AcpiGbl_PCodeLen;
ACPI_EXTERN UINT32 AcpiGbl_BufSeq; /* Counts allocated Buffer descriptors */
ACPI_EXTERN UINT32 AcpiGbl_NamedObjectErr; /* Indicate if inc_error should be called */
/*
* Handle to the last method found - used during pass1 of load
*/
@ -328,11 +313,7 @@ ACPI_EXTERN UINT8 AcpiGbl_CmSingleStep;
*
****************************************************************************/
ACPI_EXTERN ACPI_GENERIC_OP *AcpiGbl_ParsedNamespaceRoot;
extern ACPI_OP_INFO AcpiGbl_AmlOpInfo[];
extern UINT8 AcpiGbl_AmlOpInfoIndex[256];
ACPI_EXTERN ACPI_PARSE_OBJECT *AcpiGbl_ParsedNamespaceRoot;
/*****************************************************************************
*
@ -380,9 +361,10 @@ ACPI_EXTERN UINT32 AcpiGbl_EventCount[NUM_FIXED_EVENTS];
*
****************************************************************************/
#ifdef ENABLE_DEBUGGER
ACPI_EXTERN BOOLEAN AcpiGbl_MethodExecuting;
ACPI_EXTERN BOOLEAN AcpiGbl_DbTerminateThreads;
#endif
/* Memory allocation metrics - Debug Only! */
@ -400,9 +382,9 @@ ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentObjectSize;
ACPI_EXTERN UINT32 AcpiGbl_RunningObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_RunningObjectSize;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNamedObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNamedObjectSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNamedObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
#endif

View File

@ -1,6 +1,7 @@
/******************************************************************************
*
* Name: achware.h -- hardware specific interfaces
* $Revision: 1.49 $
*
*****************************************************************************/
@ -8,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -121,15 +122,15 @@
ACPI_STATUS
AcpiHwInitialize(
AcpiHwInitialize (
void);
ACPI_STATUS
AcpiHwShutdown(
AcpiHwShutdown (
void);
ACPI_STATUS
AcpiHwInitializeSystemInfo(
AcpiHwInitializeSystemInfo (
void);
ACPI_STATUS
@ -146,11 +147,37 @@ AcpiHwGetModeCapabilities (
/* Register I/O Prototypes */
UINT32
AcpiHwRegisterAccess (
AcpiHwRegisterBitAccess (
NATIVE_UINT ReadWrite,
BOOLEAN UseLock,
UINT32 RegisterId, ... /* DWORD Value */);
UINT32 RegisterId,
... /* DWORD Write Value */);
UINT32
AcpiHwRegisterRead (
BOOLEAN UseLock,
UINT32 RegisterId);
void
AcpiHwRegisterWrite (
BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 Value);
UINT32
AcpiHwLowLevelRead (
UINT32 Width,
ACPI_GAS *Reg,
UINT32 Offset);
void
AcpiHwLowLevelWrite (
UINT32 Width,
UINT32 Value,
ACPI_GAS *Reg,
UINT32 Offset);
void
AcpiHwClearAcpiStatus (
@ -215,6 +242,16 @@ ACPI_STATUS
AcpiHwGetCxInfo (
UINT32 CxStates[]);
ACPI_STATUS
AcpiHwGetCxHandler (
UINT32 CxState,
ACPI_C_STATE_HANDLER *Handler);
ACPI_STATUS
AcpiHwSetCxHandler (
UINT32 CxState,
ACPI_C_STATE_HANDLER Handler);
/* Throttling Prototypes */
@ -255,5 +292,9 @@ UINT32
AcpiHwPmtResolution (
void);
ACPI_STATUS
AcpiGetTimer (
UINT32 *OutTicks);
#endif /* __ACHWARE_H__ */