diff options
author | Bob Moore <robert.moore@intel.com> | 2007-02-02 11:48:20 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:24 -0500 |
commit | b89b71a0019660d73e3c9671205c49e443d7085c (patch) | |
tree | 562463b563af49731b894c76acde6173015dbd86 /drivers/acpi/utilities | |
parent | 0eaa14c02809cc93386b907846da5c024fd73012 (diff) |
ACPICA: Cleanup of FADT verification function.
Removed offset display, not needed.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r-- | drivers/acpi/utilities/utinit.c | 65 |
1 files changed, 23 insertions, 42 deletions
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c index 2d2c4a3aeaae..5079f1943a3b 100644 --- a/drivers/acpi/utilities/utinit.c +++ b/drivers/acpi/utilities/utinit.c | |||
@@ -50,8 +50,7 @@ | |||
50 | ACPI_MODULE_NAME("utinit") | 50 | ACPI_MODULE_NAME("utinit") |
51 | 51 | ||
52 | /* Local prototypes */ | 52 | /* Local prototypes */ |
53 | static void | 53 | static void acpi_ut_fadt_register_error(char *register_name, u32 value); |
54 | acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset); | ||
55 | 54 | ||
56 | static void acpi_ut_terminate(void); | 55 | static void acpi_ut_terminate(void); |
57 | 56 | ||
@@ -61,21 +60,18 @@ static void acpi_ut_terminate(void); | |||
61 | * | 60 | * |
62 | * PARAMETERS: register_name - Pointer to string identifying register | 61 | * PARAMETERS: register_name - Pointer to string identifying register |
63 | * Value - Actual register contents value | 62 | * Value - Actual register contents value |
64 | * Offset - Byte offset in the FADT | ||
65 | * | 63 | * |
66 | * RETURN: AE_BAD_VALUE | 64 | * RETURN: None |
67 | * | 65 | * |
68 | * DESCRIPTION: Display failure message | 66 | * DESCRIPTION: Display failure message |
69 | * | 67 | * |
70 | ******************************************************************************/ | 68 | ******************************************************************************/ |
71 | 69 | ||
72 | static void | 70 | static void acpi_ut_fadt_register_error(char *register_name, u32 value) |
73 | acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset) | ||
74 | { | 71 | { |
75 | 72 | ||
76 | ACPI_WARNING((AE_INFO, | 73 | ACPI_WARNING((AE_INFO, "Invalid FADT value %s = %X", |
77 | "Invalid FADT value %s=%X at offset %X in FADT=%p", | 74 | register_name, value)); |
78 | register_name, value, offset, &acpi_gbl_FADT)); | ||
79 | } | 75 | } |
80 | 76 | ||
81 | /****************************************************************************** | 77 | /****************************************************************************** |
@@ -98,69 +94,54 @@ acpi_status acpi_ut_validate_fadt(void) | |||
98 | * but don't abort on any problems, just display error | 94 | * but don't abort on any problems, just display error |
99 | */ | 95 | */ |
100 | if (acpi_gbl_FADT.pm1_event_length < 4) { | 96 | if (acpi_gbl_FADT.pm1_event_length < 4) { |
101 | acpi_ut_fadt_register_error("PM1_EVT_LEN", | 97 | acpi_ut_fadt_register_error("Pm1EventLength", |
102 | (u32) acpi_gbl_FADT. | 98 | (u32) acpi_gbl_FADT. |
103 | pm1_event_length, | 99 | pm1_event_length); |
104 | ACPI_FADT_OFFSET(pm1_event_length)); | 100 | } |
101 | |||
102 | if (acpi_gbl_FADT.pm_timer_length < 4) { | ||
103 | acpi_ut_fadt_register_error("PmTimerLength", | ||
104 | (u32) acpi_gbl_FADT. | ||
105 | pm_timer_length); | ||
105 | } | 106 | } |
106 | 107 | ||
107 | if (!acpi_gbl_FADT.pm1_control_length) { | 108 | if (!acpi_gbl_FADT.pm1_control_length) { |
108 | acpi_ut_fadt_register_error("PM1_CNT_LEN", 0, | 109 | acpi_ut_fadt_register_error("Pm1ControlLength", 0); |
109 | ACPI_FADT_OFFSET | ||
110 | (pm1_control_length)); | ||
111 | } | 110 | } |
112 | 111 | ||
113 | if (!acpi_gbl_FADT.xpm1a_event_block.address) { | 112 | if (!acpi_gbl_FADT.xpm1a_event_block.address) { |
114 | acpi_ut_fadt_register_error("X_PM1a_EVT_BLK", 0, | 113 | acpi_ut_fadt_register_error("XPm1aEventBlock.Address", 0); |
115 | ACPI_FADT_OFFSET(xpm1a_event_block. | ||
116 | address)); | ||
117 | } | 114 | } |
118 | 115 | ||
119 | if (!acpi_gbl_FADT.xpm1a_control_block.address) { | 116 | if (!acpi_gbl_FADT.xpm1a_control_block.address) { |
120 | acpi_ut_fadt_register_error("X_PM1a_CNT_BLK", 0, | 117 | acpi_ut_fadt_register_error("XPm1aControlBlock.Address", 0); |
121 | ACPI_FADT_OFFSET | ||
122 | (xpm1a_control_block.address)); | ||
123 | } | 118 | } |
124 | 119 | ||
125 | if (!acpi_gbl_FADT.xpm_timer_block.address) { | 120 | if (!acpi_gbl_FADT.xpm_timer_block.address) { |
126 | acpi_ut_fadt_register_error("X_PM_TMR_BLK", 0, | 121 | acpi_ut_fadt_register_error("XPmTimerBlock.Address", 0); |
127 | ACPI_FADT_OFFSET(xpm_timer_block. | ||
128 | address)); | ||
129 | } | 122 | } |
130 | 123 | ||
131 | if ((acpi_gbl_FADT.xpm2_control_block.address && | 124 | if ((acpi_gbl_FADT.xpm2_control_block.address && |
132 | !acpi_gbl_FADT.pm2_control_length)) { | 125 | !acpi_gbl_FADT.pm2_control_length)) { |
133 | acpi_ut_fadt_register_error("PM2_CNT_LEN", | 126 | acpi_ut_fadt_register_error("Pm2ControlLength", |
134 | (u32) acpi_gbl_FADT. | 127 | (u32) acpi_gbl_FADT. |
135 | pm2_control_length, | 128 | pm2_control_length); |
136 | ACPI_FADT_OFFSET | ||
137 | (pm2_control_length)); | ||
138 | } | ||
139 | |||
140 | if (acpi_gbl_FADT.pm_timer_length < 4) { | ||
141 | acpi_ut_fadt_register_error("PM_TM_LEN", | ||
142 | (u32) acpi_gbl_FADT.pm_timer_length, | ||
143 | ACPI_FADT_OFFSET(pm_timer_length)); | ||
144 | } | 129 | } |
145 | 130 | ||
146 | /* Length of GPE blocks must be a multiple of 2 */ | 131 | /* Length of GPE blocks must be a multiple of 2 */ |
147 | 132 | ||
148 | if (acpi_gbl_FADT.xgpe0_block.address && | 133 | if (acpi_gbl_FADT.xgpe0_block.address && |
149 | (acpi_gbl_FADT.gpe0_block_length & 1)) { | 134 | (acpi_gbl_FADT.gpe0_block_length & 1)) { |
150 | acpi_ut_fadt_register_error("(x)GPE0_BLK_LEN", | 135 | acpi_ut_fadt_register_error("Gpe0BlockLength", |
151 | (u32) acpi_gbl_FADT. | 136 | (u32) acpi_gbl_FADT. |
152 | gpe0_block_length, | 137 | gpe0_block_length); |
153 | ACPI_FADT_OFFSET | ||
154 | (gpe0_block_length)); | ||
155 | } | 138 | } |
156 | 139 | ||
157 | if (acpi_gbl_FADT.xgpe1_block.address && | 140 | if (acpi_gbl_FADT.xgpe1_block.address && |
158 | (acpi_gbl_FADT.gpe1_block_length & 1)) { | 141 | (acpi_gbl_FADT.gpe1_block_length & 1)) { |
159 | acpi_ut_fadt_register_error("(x)GPE1_BLK_LEN", | 142 | acpi_ut_fadt_register_error("Gpe1BlockLength", |
160 | (u32) acpi_gbl_FADT. | 143 | (u32) acpi_gbl_FADT. |
161 | gpe1_block_length, | 144 | gpe1_block_length); |
162 | ACPI_FADT_OFFSET | ||
163 | (gpe1_block_length)); | ||
164 | } | 145 | } |
165 | 146 | ||
166 | return (AE_OK); | 147 | return (AE_OK); |