blob: 4dc43b018517a21310effd1fda6e9e05769b2128 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2/*******************************************************************************
3 *
4 * Module Name: hwregs - Read/write access functions for the various ACPI
5 * control and status registers.
6 *
7 ******************************************************************************/
8
9/*
Len Brown75a44ce2008-04-23 23:00:13 -040010 * Copyright (C) 2000 - 2008, Intel Corp.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 * All rights reserved.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions, and the following disclaimer,
18 * without modification.
19 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
20 * substantially similar to the "NO WARRANTY" disclaimer below
21 * ("Disclaimer") and any redistribution must be conditioned upon
22 * including a substantially similar Disclaimer requirement for further
23 * binary redistribution.
24 * 3. Neither the names of the above-listed copyright holders nor the names
25 * of any contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * Alternatively, this software may be distributed under the terms of the
29 * GNU General Public License ("GPL") version 2 as published by the Free
30 * Software Foundation.
31 *
32 * NO WARRANTY
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
36 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
41 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
42 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
43 * POSSIBILITY OF SUCH DAMAGES.
44 */
45
Linus Torvalds1da177e2005-04-16 15:20:36 -070046#include <acpi/acpi.h>
Len Browne2f7a772009-01-09 00:30:03 -050047#include "accommon.h"
48#include "acnamesp.h"
49#include "acevents.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
51#define _COMPONENT ACPI_HARDWARE
Len Brown4be44fc2005-08-05 00:44:28 -040052ACPI_MODULE_NAME("hwregs")
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
54/*******************************************************************************
55 *
56 * FUNCTION: acpi_hw_clear_acpi_status
57 *
Bob Moored8c71b62007-02-02 19:48:21 +030058 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -070059 *
Bob Moore7db5d822008-12-30 11:04:48 +080060 * RETURN: Status
Linus Torvalds1da177e2005-04-16 15:20:36 -070061 *
62 * DESCRIPTION: Clears all fixed and general purpose status bits
63 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
64 *
65 ******************************************************************************/
Bob Moored8c71b62007-02-02 19:48:21 +030066acpi_status acpi_hw_clear_acpi_status(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070067{
Len Brown4be44fc2005-08-05 00:44:28 -040068 acpi_status status;
Bob Moore4c90ece2006-06-08 16:29:00 -040069 acpi_cpu_flags lock_flags = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
Bob Mooreb229cf92006-04-21 17:15:00 -040071 ACPI_FUNCTION_TRACE(hw_clear_acpi_status);
Linus Torvalds1da177e2005-04-16 15:20:36 -070072
Len Brown4be44fc2005-08-05 00:44:28 -040073 ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %04X\n",
74 ACPI_BITMASK_ALL_FIXED_STATUS,
Bob Mooref3d2e782007-02-02 19:48:18 +030075 (u16) acpi_gbl_FADT.xpm1a_event_block.address));
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Bob Moore4c90ece2006-06-08 16:29:00 -040077 lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
Linus Torvalds1da177e2005-04-16 15:20:36 -070078
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +040079 status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS,
Len Brown4be44fc2005-08-05 00:44:28 -040080 ACPI_BITMASK_ALL_FIXED_STATUS);
81 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -070082 goto unlock_and_exit;
83 }
84
85 /* Clear the fixed events */
86
Bob Mooref3d2e782007-02-02 19:48:18 +030087 if (acpi_gbl_FADT.xpm1b_event_block.address) {
Bob Mooreecfbbc72008-12-31 02:55:32 +080088 status = acpi_write(ACPI_BITMASK_ALL_FIXED_STATUS,
89 &acpi_gbl_FADT.xpm1b_event_block);
Len Brown4be44fc2005-08-05 00:44:28 -040090 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -070091 goto unlock_and_exit;
92 }
93 }
94
95 /* Clear the GPE Bits in all GPE registers in all GPE blocks */
96
Bob Mooree97d6bf2008-12-30 09:45:17 +080097 status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -070098
Len Brown4be44fc2005-08-05 00:44:28 -040099 unlock_and_exit:
Bob Moore4c90ece2006-06-08 16:29:00 -0400100 acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags);
Len Brown4be44fc2005-08-05 00:44:28 -0400101 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102}
103
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104/*******************************************************************************
105 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 * FUNCTION: acpi_hw_get_register_bit_mask
107 *
108 * PARAMETERS: register_id - Index of ACPI Register to access
109 *
Robert Moore44f6c012005-04-18 22:49:35 -0400110 * RETURN: The bitmask to be used when accessing the register
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 *
Robert Moore44f6c012005-04-18 22:49:35 -0400112 * DESCRIPTION: Map register_id into a register bitmask.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113 *
114 ******************************************************************************/
Bob Moore7db5d822008-12-30 11:04:48 +0800115
Len Brown4be44fc2005-08-05 00:44:28 -0400116struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117{
Bob Moore4a90c7e2006-01-13 16:22:00 -0500118 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119
120 if (register_id > ACPI_BITREG_MAX) {
Bob Mooreb229cf92006-04-21 17:15:00 -0400121 ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: %X",
Bob Mooreb8e4d892006-01-27 16:43:00 -0500122 register_id));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123 return (NULL);
124 }
125
126 return (&acpi_gbl_bit_register_info[register_id]);
127}
128
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129/******************************************************************************
130 *
131 * FUNCTION: acpi_hw_register_read
132 *
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400133 * PARAMETERS: register_id - ACPI Register ID
Robert Moore44f6c012005-04-18 22:49:35 -0400134 * return_value - Where the register value is returned
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135 *
136 * RETURN: Status and the value read.
137 *
Bob Moore967440e2006-06-23 17:04:00 -0400138 * DESCRIPTION: Read from the specified ACPI register
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 *
140 ******************************************************************************/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141acpi_status
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400142acpi_hw_register_read(u32 register_id, u32 * return_value)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143{
Len Brown4be44fc2005-08-05 00:44:28 -0400144 u32 value1 = 0;
145 u32 value2 = 0;
146 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700147
Bob Mooreb229cf92006-04-21 17:15:00 -0400148 ACPI_FUNCTION_TRACE(hw_register_read);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 switch (register_id) {
Len Brown4be44fc2005-08-05 00:44:28 -0400151 case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152
Bob Mooreecfbbc72008-12-31 02:55:32 +0800153 status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_event_block);
Len Brown4be44fc2005-08-05 00:44:28 -0400154 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400155 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700156 }
157
158 /* PM1B is optional */
159
Bob Mooreecfbbc72008-12-31 02:55:32 +0800160 status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_event_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 value1 |= value2;
162 break;
163
Len Brown4be44fc2005-08-05 00:44:28 -0400164 case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165
Bob Mooreecfbbc72008-12-31 02:55:32 +0800166 status = acpi_read(&value1, &acpi_gbl_xpm1a_enable);
Len Brown4be44fc2005-08-05 00:44:28 -0400167 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400168 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169 }
170
171 /* PM1B is optional */
172
Bob Mooreecfbbc72008-12-31 02:55:32 +0800173 status = acpi_read(&value2, &acpi_gbl_xpm1b_enable);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700174 value1 |= value2;
175 break;
176
Len Brown4be44fc2005-08-05 00:44:28 -0400177 case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700178
Bob Mooreecfbbc72008-12-31 02:55:32 +0800179 status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_control_block);
Len Brown4be44fc2005-08-05 00:44:28 -0400180 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400181 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182 }
183
Bob Mooreecfbbc72008-12-31 02:55:32 +0800184 status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700185 value1 |= value2;
186 break;
187
Len Brown4be44fc2005-08-05 00:44:28 -0400188 case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700189
Bob Mooreecfbbc72008-12-31 02:55:32 +0800190 status = acpi_read(&value1, &acpi_gbl_FADT.xpm2_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700191 break;
192
Len Brown4be44fc2005-08-05 00:44:28 -0400193 case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194
Bob Mooreecfbbc72008-12-31 02:55:32 +0800195 status = acpi_read(&value1, &acpi_gbl_FADT.xpm_timer_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196 break;
197
Len Brown4be44fc2005-08-05 00:44:28 -0400198 case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199
Bob Mooref3d2e782007-02-02 19:48:18 +0300200 status =
201 acpi_os_read_port(acpi_gbl_FADT.smi_command, &value1, 8);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202 break;
203
204 default:
Bob Mooreb8e4d892006-01-27 16:43:00 -0500205 ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206 status = AE_BAD_PARAMETER;
207 break;
208 }
209
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400210 exit:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700211
Len Brown4be44fc2005-08-05 00:44:28 -0400212 if (ACPI_SUCCESS(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213 *return_value = value1;
214 }
215
Len Brown4be44fc2005-08-05 00:44:28 -0400216 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217}
218
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219/******************************************************************************
220 *
221 * FUNCTION: acpi_hw_register_write
222 *
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400223 * PARAMETERS: register_id - ACPI Register ID
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224 * Value - The value to write
225 *
226 * RETURN: Status
227 *
Bob Moore967440e2006-06-23 17:04:00 -0400228 * DESCRIPTION: Write to the specified ACPI register
229 *
230 * NOTE: In accordance with the ACPI specification, this function automatically
231 * preserves the value of the following bits, meaning that these bits cannot be
232 * changed via this interface:
233 *
234 * PM1_CONTROL[0] = SCI_EN
235 * PM1_CONTROL[9]
236 * PM1_STATUS[11]
237 *
238 * ACPI References:
239 * 1) Hardware Ignored Bits: When software writes to a register with ignored
240 * bit fields, it preserves the ignored bit fields
241 * 2) SCI_EN: OSPM always preserves this bit position
Linus Torvalds1da177e2005-04-16 15:20:36 -0700242 *
243 ******************************************************************************/
244
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400245acpi_status acpi_hw_register_write(u32 register_id, u32 value)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246{
Len Brown4be44fc2005-08-05 00:44:28 -0400247 acpi_status status;
Bob Moore967440e2006-06-23 17:04:00 -0400248 u32 read_value;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249
Bob Mooreb229cf92006-04-21 17:15:00 -0400250 ACPI_FUNCTION_TRACE(hw_register_write);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700251
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252 switch (register_id) {
Len Brown4be44fc2005-08-05 00:44:28 -0400253 case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700254
Bob Moore967440e2006-06-23 17:04:00 -0400255 /* Perform a read first to preserve certain bits (per ACPI spec) */
256
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400257 status = acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS,
Bob Moore967440e2006-06-23 17:04:00 -0400258 &read_value);
259 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400260 goto exit;
Bob Moore967440e2006-06-23 17:04:00 -0400261 }
262
263 /* Insert the bits to be preserved */
264
265 ACPI_INSERT_BITS(value, ACPI_PM1_STATUS_PRESERVED_BITS,
266 read_value);
267
268 /* Now we can write the data */
269
Bob Mooreecfbbc72008-12-31 02:55:32 +0800270 status = acpi_write(value, &acpi_gbl_FADT.xpm1a_event_block);
Len Brown4be44fc2005-08-05 00:44:28 -0400271 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400272 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273 }
274
275 /* PM1B is optional */
276
Bob Mooreecfbbc72008-12-31 02:55:32 +0800277 status = acpi_write(value, &acpi_gbl_FADT.xpm1b_event_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278 break;
279
Len Brown4be44fc2005-08-05 00:44:28 -0400280 case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281
Bob Mooreecfbbc72008-12-31 02:55:32 +0800282 status = acpi_write(value, &acpi_gbl_xpm1a_enable);
Len Brown4be44fc2005-08-05 00:44:28 -0400283 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400284 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700285 }
286
287 /* PM1B is optional */
288
Bob Mooreecfbbc72008-12-31 02:55:32 +0800289 status = acpi_write(value, &acpi_gbl_xpm1b_enable);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700290 break;
291
Len Brown4be44fc2005-08-05 00:44:28 -0400292 case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700293
Bob Moore967440e2006-06-23 17:04:00 -0400294 /*
295 * Perform a read first to preserve certain bits (per ACPI spec)
Bob Moore967440e2006-06-23 17:04:00 -0400296 */
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400297 status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
Bob Moore967440e2006-06-23 17:04:00 -0400298 &read_value);
299 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400300 goto exit;
Bob Moore967440e2006-06-23 17:04:00 -0400301 }
302
303 /* Insert the bits to be preserved */
304
305 ACPI_INSERT_BITS(value, ACPI_PM1_CONTROL_PRESERVED_BITS,
306 read_value);
307
308 /* Now we can write the data */
309
Bob Mooreecfbbc72008-12-31 02:55:32 +0800310 status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block);
Len Brown4be44fc2005-08-05 00:44:28 -0400311 if (ACPI_FAILURE(status)) {
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400312 goto exit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700313 }
314
Bob Mooreecfbbc72008-12-31 02:55:32 +0800315 status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700316 break;
317
Len Brown4be44fc2005-08-05 00:44:28 -0400318 case ACPI_REGISTER_PM1A_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700319
Bob Mooreecfbbc72008-12-31 02:55:32 +0800320 status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321 break;
322
Len Brown4be44fc2005-08-05 00:44:28 -0400323 case ACPI_REGISTER_PM1B_CONTROL: /* 16-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700324
Bob Mooreecfbbc72008-12-31 02:55:32 +0800325 status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700326 break;
327
Len Brown4be44fc2005-08-05 00:44:28 -0400328 case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700329
Bob Mooreecfbbc72008-12-31 02:55:32 +0800330 status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331 break;
332
Len Brown4be44fc2005-08-05 00:44:28 -0400333 case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700334
Bob Mooreecfbbc72008-12-31 02:55:32 +0800335 status = acpi_write(value, &acpi_gbl_FADT.xpm_timer_block);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336 break;
337
Len Brown4be44fc2005-08-05 00:44:28 -0400338 case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700339
340 /* SMI_CMD is currently always in IO space */
341
Bob Mooref3d2e782007-02-02 19:48:18 +0300342 status =
343 acpi_os_write_port(acpi_gbl_FADT.smi_command, value, 8);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700344 break;
345
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346 default:
347 status = AE_BAD_PARAMETER;
348 break;
349 }
350
Alexey Starikovskiyd30dc9ab2007-09-30 22:39:36 +0400351 exit:
Len Brown4be44fc2005-08-05 00:44:28 -0400352 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700353}