Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | |
| 2 | /****************************************************************************** |
| 3 | * |
| 4 | * Module Name: exstore - AML Interpreter object store support |
| 5 | * |
| 6 | *****************************************************************************/ |
| 7 | |
| 8 | /* |
Bob Moore | 6c9deb7 | 2007-02-02 19:48:24 +0300 | [diff] [blame] | 9 | * Copyright (C) 2000 - 2007, R. Byron Moore |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | * All rights reserved. |
| 11 | * |
| 12 | * Redistribution and use in source and binary forms, with or without |
| 13 | * modification, are permitted provided that the following conditions |
| 14 | * are met: |
| 15 | * 1. Redistributions of source code must retain the above copyright |
| 16 | * notice, this list of conditions, and the following disclaimer, |
| 17 | * without modification. |
| 18 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer |
| 19 | * substantially similar to the "NO WARRANTY" disclaimer below |
| 20 | * ("Disclaimer") and any redistribution must be conditioned upon |
| 21 | * including a substantially similar Disclaimer requirement for further |
| 22 | * binary redistribution. |
| 23 | * 3. Neither the names of the above-listed copyright holders nor the names |
| 24 | * of any contributors may be used to endorse or promote products derived |
| 25 | * from this software without specific prior written permission. |
| 26 | * |
| 27 | * Alternatively, this software may be distributed under the terms of the |
| 28 | * GNU General Public License ("GPL") version 2 as published by the Free |
| 29 | * Software Foundation. |
| 30 | * |
| 31 | * NO WARRANTY |
| 32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 33 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 34 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR |
| 35 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 36 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 37 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 38 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 39 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 40 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 41 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 42 | * POSSIBILITY OF SUCH DAMAGES. |
| 43 | */ |
| 44 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #include <acpi/acpi.h> |
| 46 | #include <acpi/acdispat.h> |
| 47 | #include <acpi/acinterp.h> |
| 48 | #include <acpi/amlcode.h> |
| 49 | #include <acpi/acnamesp.h> |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 50 | #include <acpi/acparser.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | #define _COMPONENT ACPI_EXECUTER |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 53 | ACPI_MODULE_NAME("exstore") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 55 | /* Local prototypes */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 56 | static void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 57 | acpi_ex_do_debug_object(union acpi_operand_object *source_desc, |
| 58 | u32 level, u32 index); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 59 | |
| 60 | static acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 61 | acpi_ex_store_object_to_index(union acpi_operand_object *val_desc, |
| 62 | union acpi_operand_object *dest_desc, |
| 63 | struct acpi_walk_state *walk_state); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 64 | |
| 65 | /******************************************************************************* |
| 66 | * |
| 67 | * FUNCTION: acpi_ex_do_debug_object |
| 68 | * |
| 69 | * PARAMETERS: source_desc - Value to be stored |
| 70 | * Level - Indentation level (used for packages) |
| 71 | * Index - Current package element, zero if not pkg |
| 72 | * |
| 73 | * RETURN: None |
| 74 | * |
| 75 | * DESCRIPTION: Handles stores to the Debug Object. |
| 76 | * |
| 77 | ******************************************************************************/ |
| 78 | |
| 79 | static void |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 80 | acpi_ex_do_debug_object(union acpi_operand_object *source_desc, |
| 81 | u32 level, u32 index) |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 82 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 83 | u32 i; |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 84 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 85 | ACPI_FUNCTION_TRACE_PTR(ex_do_debug_object, source_desc); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 86 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 87 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s", |
| 88 | level, " ")); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 89 | |
| 90 | /* Display index for package output only */ |
| 91 | |
| 92 | if (index > 0) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 93 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
| 94 | "(%.2u) ", index - 1)); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | if (!source_desc) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 98 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "<Null Object>\n")); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 99 | return_VOID; |
| 100 | } |
| 101 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 102 | if (ACPI_GET_DESCRIPTOR_TYPE(source_desc) == ACPI_DESC_TYPE_OPERAND) { |
| 103 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "%s: ", |
| 104 | acpi_ut_get_object_type_name |
| 105 | (source_desc))); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 106 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 107 | if (!acpi_ut_valid_internal_object(source_desc)) { |
| 108 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
| 109 | "%p, Invalid Internal Object!\n", |
| 110 | source_desc)); |
| 111 | return_VOID; |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 112 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 113 | } else if (ACPI_GET_DESCRIPTOR_TYPE(source_desc) == |
| 114 | ACPI_DESC_TYPE_NAMED) { |
| 115 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "%s: %p\n", |
| 116 | acpi_ut_get_type_name(((struct |
| 117 | acpi_namespace_node |
| 118 | *)source_desc)-> |
| 119 | type), |
| 120 | source_desc)); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 121 | return_VOID; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 122 | } else { |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 123 | return_VOID; |
| 124 | } |
| 125 | |
Bob Moore | 61ce421 | 2008-04-10 19:06:39 +0400 | [diff] [blame] | 126 | /* source_desc is of type ACPI_DESC_TYPE_OPERAND */ |
| 127 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 128 | switch (ACPI_GET_OBJECT_TYPE(source_desc)) { |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 129 | case ACPI_TYPE_INTEGER: |
| 130 | |
| 131 | /* Output correct integer width */ |
| 132 | |
| 133 | if (acpi_gbl_integer_byte_width == 4) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 134 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "0x%8.8X\n", |
| 135 | (u32) source_desc->integer. |
| 136 | value)); |
| 137 | } else { |
| 138 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
| 139 | "0x%8.8X%8.8X\n", |
| 140 | ACPI_FORMAT_UINT64(source_desc-> |
| 141 | integer. |
| 142 | value))); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 143 | } |
| 144 | break; |
| 145 | |
| 146 | case ACPI_TYPE_BUFFER: |
| 147 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 148 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[0x%.2X]\n", |
| 149 | (u32) source_desc->buffer.length)); |
| 150 | ACPI_DUMP_BUFFER(source_desc->buffer.pointer, |
| 151 | (source_desc->buffer.length < |
Bob Moore | 422f4f9 | 2008-04-10 19:06:37 +0400 | [diff] [blame] | 152 | 256) ? source_desc->buffer.length : 256); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 153 | break; |
| 154 | |
| 155 | case ACPI_TYPE_STRING: |
| 156 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 157 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[0x%.2X] \"%s\"\n", |
| 158 | source_desc->string.length, |
| 159 | source_desc->string.pointer)); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 160 | break; |
| 161 | |
| 162 | case ACPI_TYPE_PACKAGE: |
| 163 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 164 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
| 165 | "[0x%.2X Elements]\n", |
| 166 | source_desc->package.count)); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 167 | |
| 168 | /* Output the entire contents of the package */ |
| 169 | |
| 170 | for (i = 0; i < source_desc->package.count; i++) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 171 | acpi_ex_do_debug_object(source_desc->package. |
| 172 | elements[i], level + 4, i + 1); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 173 | } |
| 174 | break; |
| 175 | |
| 176 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 177 | |
| 178 | if (source_desc->reference.opcode == AML_INDEX_OP) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 179 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
| 180 | "[%s, 0x%X]\n", |
| 181 | acpi_ps_get_opcode_name |
| 182 | (source_desc->reference.opcode), |
| 183 | source_desc->reference.offset)); |
| 184 | } else { |
Bob Moore | 61ce421 | 2008-04-10 19:06:39 +0400 | [diff] [blame] | 185 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[%s]", |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 186 | acpi_ps_get_opcode_name |
| 187 | (source_desc->reference.opcode))); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 188 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 189 | |
Bob Moore | 61ce421 | 2008-04-10 19:06:39 +0400 | [diff] [blame] | 190 | if (source_desc->reference.opcode == AML_LOAD_OP) { /* Load and load_table */ |
| 191 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
Bob Moore | b7f9f04 | 2008-04-10 19:06:40 +0400 | [diff] [blame] | 192 | " Table OwnerId %p\n", |
Bob Moore | 61ce421 | 2008-04-10 19:06:39 +0400 | [diff] [blame] | 193 | source_desc->reference.object)); |
| 194 | break; |
| 195 | } |
| 196 | |
| 197 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "\n")); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 198 | if (source_desc->reference.object) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 199 | if (ACPI_GET_DESCRIPTOR_TYPE |
| 200 | (source_desc->reference.object) == |
| 201 | ACPI_DESC_TYPE_NAMED) { |
| 202 | acpi_ex_do_debug_object(((struct |
| 203 | acpi_namespace_node *) |
| 204 | source_desc->reference. |
| 205 | object)->object, |
| 206 | level + 4, 0); |
| 207 | } else { |
| 208 | acpi_ex_do_debug_object(source_desc->reference. |
| 209 | object, level + 4, 0); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 210 | } |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 211 | } else if (source_desc->reference.node) { |
Bob Moore | d884164 | 2008-04-10 19:06:39 +0400 | [diff] [blame] | 212 | if (ACPI_GET_DESCRIPTOR_TYPE |
| 213 | (source_desc->reference.node) != |
| 214 | ACPI_DESC_TYPE_NAMED) { |
| 215 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
Bob Moore | b7f9f04 | 2008-04-10 19:06:40 +0400 | [diff] [blame] | 216 | " %p - Not a valid namespace node\n", |
| 217 | source_desc->reference. |
| 218 | node)); |
Bob Moore | d884164 | 2008-04-10 19:06:39 +0400 | [diff] [blame] | 219 | } else { |
| 220 | acpi_ex_do_debug_object((source_desc->reference. |
| 221 | node)->object, |
| 222 | level + 4, 0); |
| 223 | } |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 224 | } |
| 225 | break; |
| 226 | |
| 227 | default: |
| 228 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 229 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "%p %s\n", |
| 230 | source_desc, |
| 231 | acpi_ut_get_object_type_name |
| 232 | (source_desc))); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 233 | break; |
| 234 | } |
| 235 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 236 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, "\n")); |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 237 | return_VOID; |
| 238 | } |
| 239 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 240 | /******************************************************************************* |
| 241 | * |
| 242 | * FUNCTION: acpi_ex_store |
| 243 | * |
| 244 | * PARAMETERS: *source_desc - Value to be stored |
| 245 | * *dest_desc - Where to store it. Must be an NS node |
| 246 | * or an union acpi_operand_object of type |
| 247 | * Reference; |
| 248 | * walk_state - Current walk state |
| 249 | * |
| 250 | * RETURN: Status |
| 251 | * |
| 252 | * DESCRIPTION: Store the value described by source_desc into the location |
| 253 | * described by dest_desc. Called by various interpreter |
| 254 | * functions to store the result of an operation into |
| 255 | * the destination operand -- not just simply the actual "Store" |
| 256 | * ASL operator. |
| 257 | * |
| 258 | ******************************************************************************/ |
| 259 | |
| 260 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 261 | acpi_ex_store(union acpi_operand_object *source_desc, |
| 262 | union acpi_operand_object *dest_desc, |
| 263 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 264 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 265 | acpi_status status = AE_OK; |
| 266 | union acpi_operand_object *ref_desc = dest_desc; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 268 | ACPI_FUNCTION_TRACE_PTR(ex_store, dest_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | |
| 270 | /* Validate parameters */ |
| 271 | |
| 272 | if (!source_desc || !dest_desc) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 273 | ACPI_ERROR((AE_INFO, "Null parameter")); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 274 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | } |
| 276 | |
| 277 | /* dest_desc can be either a namespace node or an ACPI object */ |
| 278 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 279 | if (ACPI_GET_DESCRIPTOR_TYPE(dest_desc) == ACPI_DESC_TYPE_NAMED) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 280 | /* |
| 281 | * Dest is a namespace node, |
| 282 | * Storing an object into a Named node. |
| 283 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 284 | status = acpi_ex_store_object_to_node(source_desc, |
| 285 | (struct |
| 286 | acpi_namespace_node *) |
| 287 | dest_desc, walk_state, |
| 288 | ACPI_IMPLICIT_CONVERSION); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 289 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 290 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | } |
| 292 | |
| 293 | /* Destination object must be a Reference or a Constant object */ |
| 294 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 295 | switch (ACPI_GET_OBJECT_TYPE(dest_desc)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 297 | break; |
| 298 | |
| 299 | case ACPI_TYPE_INTEGER: |
| 300 | |
| 301 | /* Allow stores to Constants -- a Noop as per ACPI spec */ |
| 302 | |
| 303 | if (dest_desc->common.flags & AOPOBJ_AML_CONSTANT) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 304 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | /*lint -fallthrough */ |
| 308 | |
| 309 | default: |
| 310 | |
| 311 | /* Destination is not a Reference object */ |
| 312 | |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 313 | ACPI_ERROR((AE_INFO, |
| 314 | "Target is not a Reference or Constant object - %s [%p]", |
| 315 | acpi_ut_get_object_type_name(dest_desc), |
| 316 | dest_desc)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 317 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 318 | ACPI_DUMP_STACK_ENTRY(source_desc); |
| 319 | ACPI_DUMP_STACK_ENTRY(dest_desc); |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 320 | ACPI_DUMP_OPERANDS(&dest_desc, ACPI_IMODE_EXECUTE, "ExStore", |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 321 | 2, |
| 322 | "Target is not a Reference or Constant object"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 323 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 324 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | /* |
| 328 | * Examine the Reference opcode. These cases are handled: |
| 329 | * |
| 330 | * 1) Store to Name (Change the object associated with a name) |
| 331 | * 2) Store to an indexed area of a Buffer or Package |
| 332 | * 3) Store to a Method Local or Arg |
| 333 | * 4) Store to the debug object |
| 334 | */ |
| 335 | switch (ref_desc->reference.opcode) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 336 | case AML_REF_OF_OP: |
| 337 | |
| 338 | /* Storing an object into a Name "container" */ |
| 339 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 340 | status = acpi_ex_store_object_to_node(source_desc, |
| 341 | ref_desc->reference. |
| 342 | object, walk_state, |
| 343 | ACPI_IMPLICIT_CONVERSION); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 344 | break; |
| 345 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | case AML_INDEX_OP: |
| 347 | |
| 348 | /* Storing to an Index (pointer into a packager or buffer) */ |
| 349 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 350 | status = |
| 351 | acpi_ex_store_object_to_index(source_desc, ref_desc, |
| 352 | walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | break; |
| 354 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 355 | case AML_LOCAL_OP: |
| 356 | case AML_ARG_OP: |
| 357 | |
| 358 | /* Store to a method local/arg */ |
| 359 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 360 | status = |
| 361 | acpi_ds_store_object_to_local(ref_desc->reference.opcode, |
| 362 | ref_desc->reference.offset, |
| 363 | source_desc, walk_state); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 364 | break; |
| 365 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 366 | case AML_DEBUG_OP: |
| 367 | |
| 368 | /* |
| 369 | * Storing to the Debug object causes the value stored to be |
| 370 | * displayed and otherwise has no effect -- see ACPI Specification |
| 371 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 372 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 373 | "**** Write to Debug Object: Object %p %s ****:\n\n", |
| 374 | source_desc, |
| 375 | acpi_ut_get_object_type_name(source_desc))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 377 | acpi_ex_do_debug_object(source_desc, 0, 0); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 378 | break; |
| 379 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 380 | default: |
| 381 | |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 382 | ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X", |
| 383 | ref_desc->reference.opcode)); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 384 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 385 | |
| 386 | status = AE_AML_INTERNAL; |
| 387 | break; |
| 388 | } |
| 389 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 390 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 391 | } |
| 392 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 393 | /******************************************************************************* |
| 394 | * |
| 395 | * FUNCTION: acpi_ex_store_object_to_index |
| 396 | * |
| 397 | * PARAMETERS: *source_desc - Value to be stored |
| 398 | * *dest_desc - Named object to receive the value |
| 399 | * walk_state - Current walk state |
| 400 | * |
| 401 | * RETURN: Status |
| 402 | * |
| 403 | * DESCRIPTION: Store the object to indexed Buffer or Package element |
| 404 | * |
| 405 | ******************************************************************************/ |
| 406 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 407 | static acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 408 | acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, |
| 409 | union acpi_operand_object *index_desc, |
| 410 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 412 | acpi_status status = AE_OK; |
| 413 | union acpi_operand_object *obj_desc; |
| 414 | union acpi_operand_object *new_desc; |
| 415 | u8 value = 0; |
| 416 | u32 i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 417 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 418 | ACPI_FUNCTION_TRACE(ex_store_object_to_index); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 419 | |
| 420 | /* |
| 421 | * Destination must be a reference pointer, and |
| 422 | * must point to either a buffer or a package |
| 423 | */ |
| 424 | switch (index_desc->reference.target_type) { |
| 425 | case ACPI_TYPE_PACKAGE: |
| 426 | /* |
| 427 | * Storing to a package element. Copy the object and replace |
| 428 | * any existing object with the new object. No implicit |
| 429 | * conversion is performed. |
| 430 | * |
| 431 | * The object at *(index_desc->Reference.Where) is the |
| 432 | * element within the package that is to be modified. |
| 433 | * The parent package object is at index_desc->Reference.Object |
| 434 | */ |
| 435 | obj_desc = *(index_desc->reference.where); |
| 436 | |
Lin Ming | bc7a36a | 2008-04-10 19:06:42 +0400 | [diff] [blame^] | 437 | if (ACPI_GET_OBJECT_TYPE(source_desc) == |
| 438 | ACPI_TYPE_LOCAL_REFERENCE |
| 439 | && source_desc->reference.opcode == AML_LOAD_OP) { |
| 440 | |
| 441 | /* This is a DDBHandle, just add a reference to it */ |
| 442 | |
| 443 | acpi_ut_add_reference(source_desc); |
| 444 | new_desc = source_desc; |
| 445 | } else { |
| 446 | /* Normal object, copy it */ |
| 447 | |
| 448 | status = |
| 449 | acpi_ut_copy_iobject_to_iobject(source_desc, |
| 450 | &new_desc, |
| 451 | walk_state); |
| 452 | if (ACPI_FAILURE(status)) { |
| 453 | return_ACPI_STATUS(status); |
| 454 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 455 | } |
| 456 | |
| 457 | if (obj_desc) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 458 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 459 | /* Decrement reference count by the ref count of the parent package */ |
| 460 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 461 | for (i = 0; i < ((union acpi_operand_object *) |
| 462 | index_desc->reference.object)->common. |
| 463 | reference_count; i++) { |
| 464 | acpi_ut_remove_reference(obj_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 465 | } |
| 466 | } |
| 467 | |
| 468 | *(index_desc->reference.where) = new_desc; |
| 469 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 470 | /* Increment ref count by the ref count of the parent package-1 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 471 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 472 | for (i = 1; i < ((union acpi_operand_object *) |
| 473 | index_desc->reference.object)->common. |
| 474 | reference_count; i++) { |
| 475 | acpi_ut_add_reference(new_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | } |
| 477 | |
| 478 | break; |
| 479 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 480 | case ACPI_TYPE_BUFFER_FIELD: |
| 481 | |
| 482 | /* |
| 483 | * Store into a Buffer or String (not actually a real buffer_field) |
| 484 | * at a location defined by an Index. |
| 485 | * |
| 486 | * The first 8-bit element of the source object is written to the |
| 487 | * 8-bit Buffer location defined by the Index destination object, |
| 488 | * according to the ACPI 2.0 specification. |
| 489 | */ |
| 490 | |
| 491 | /* |
| 492 | * Make sure the target is a Buffer or String. An error should |
| 493 | * not happen here, since the reference_object was constructed |
| 494 | * by the INDEX_OP code. |
| 495 | */ |
| 496 | obj_desc = index_desc->reference.object; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 497 | if ((ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_BUFFER) && |
| 498 | (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_STRING)) { |
| 499 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 500 | } |
| 501 | |
| 502 | /* |
| 503 | * The assignment of the individual elements will be slightly |
| 504 | * different for each source type. |
| 505 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 506 | switch (ACPI_GET_OBJECT_TYPE(source_desc)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 507 | case ACPI_TYPE_INTEGER: |
| 508 | |
| 509 | /* Use the least-significant byte of the integer */ |
| 510 | |
| 511 | value = (u8) (source_desc->integer.value); |
| 512 | break; |
| 513 | |
| 514 | case ACPI_TYPE_BUFFER: |
| 515 | case ACPI_TYPE_STRING: |
| 516 | |
| 517 | /* Note: Takes advantage of common string/buffer fields */ |
| 518 | |
| 519 | value = source_desc->buffer.pointer[0]; |
| 520 | break; |
| 521 | |
| 522 | default: |
| 523 | |
| 524 | /* All other types are invalid */ |
| 525 | |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 526 | ACPI_ERROR((AE_INFO, |
| 527 | "Source must be Integer/Buffer/String type, not %s", |
| 528 | acpi_ut_get_object_type_name(source_desc))); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 529 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 530 | } |
| 531 | |
| 532 | /* Store the source value into the target buffer byte */ |
| 533 | |
| 534 | obj_desc->buffer.pointer[index_desc->reference.offset] = value; |
| 535 | break; |
| 536 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 537 | default: |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 538 | ACPI_ERROR((AE_INFO, "Target is not a Package or BufferField")); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 539 | status = AE_AML_OPERAND_TYPE; |
| 540 | break; |
| 541 | } |
| 542 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 543 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 544 | } |
| 545 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 546 | /******************************************************************************* |
| 547 | * |
| 548 | * FUNCTION: acpi_ex_store_object_to_node |
| 549 | * |
| 550 | * PARAMETERS: source_desc - Value to be stored |
| 551 | * Node - Named object to receive the value |
| 552 | * walk_state - Current walk state |
| 553 | * implicit_conversion - Perform implicit conversion (yes/no) |
| 554 | * |
| 555 | * RETURN: Status |
| 556 | * |
| 557 | * DESCRIPTION: Store the object to the named object. |
| 558 | * |
| 559 | * The Assignment of an object to a named object is handled here |
| 560 | * The value passed in will replace the current value (if any) |
| 561 | * with the input value. |
| 562 | * |
| 563 | * When storing into an object the data is converted to the |
| 564 | * target object type then stored in the object. This means |
| 565 | * that the target object type (for an initialized target) will |
| 566 | * not be changed by a store operation. |
| 567 | * |
| 568 | * Assumes parameters are already validated. |
| 569 | * |
| 570 | ******************************************************************************/ |
| 571 | |
| 572 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 573 | acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, |
| 574 | struct acpi_namespace_node *node, |
| 575 | struct acpi_walk_state *walk_state, |
| 576 | u8 implicit_conversion) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 577 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 578 | acpi_status status = AE_OK; |
| 579 | union acpi_operand_object *target_desc; |
| 580 | union acpi_operand_object *new_desc; |
| 581 | acpi_object_type target_type; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 582 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 583 | ACPI_FUNCTION_TRACE_PTR(ex_store_object_to_node, source_desc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 584 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 585 | /* Get current type of the node, and object attached to Node */ |
| 586 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 587 | target_type = acpi_ns_get_type(node); |
| 588 | target_desc = acpi_ns_get_attached_object(node); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 589 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 590 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Storing %p(%s) into node %p(%s)\n", |
| 591 | source_desc, |
| 592 | acpi_ut_get_object_type_name(source_desc), node, |
| 593 | acpi_ut_get_type_name(target_type))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 594 | |
| 595 | /* |
| 596 | * Resolve the source object to an actual value |
| 597 | * (If it is a reference object) |
| 598 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 599 | status = acpi_ex_resolve_object(&source_desc, target_type, walk_state); |
| 600 | if (ACPI_FAILURE(status)) { |
| 601 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 602 | } |
| 603 | |
| 604 | /* If no implicit conversion, drop into the default case below */ |
| 605 | |
Robert Moore | 6f42ccf | 2005-05-13 00:00:00 -0400 | [diff] [blame] | 606 | if ((!implicit_conversion) || (walk_state->opcode == AML_COPY_OP)) { |
Bob Moore | 52fc0b0 | 2006-10-02 00:00:00 -0400 | [diff] [blame] | 607 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 608 | /* Force execution of default (no implicit conversion) */ |
| 609 | |
| 610 | target_type = ACPI_TYPE_ANY; |
| 611 | } |
| 612 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 613 | /* Do the actual store operation */ |
| 614 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 615 | switch (target_type) { |
| 616 | case ACPI_TYPE_BUFFER_FIELD: |
| 617 | case ACPI_TYPE_LOCAL_REGION_FIELD: |
| 618 | case ACPI_TYPE_LOCAL_BANK_FIELD: |
| 619 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
| 620 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 621 | /* For fields, copy the source data to the target field. */ |
| 622 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 623 | status = acpi_ex_write_data_to_field(source_desc, target_desc, |
| 624 | &walk_state->result_obj); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 625 | break; |
| 626 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 627 | case ACPI_TYPE_INTEGER: |
| 628 | case ACPI_TYPE_STRING: |
| 629 | case ACPI_TYPE_BUFFER: |
| 630 | |
| 631 | /* |
| 632 | * These target types are all of type Integer/String/Buffer, and |
| 633 | * therefore support implicit conversion before the store. |
| 634 | * |
| 635 | * Copy and/or convert the source object to a new target object |
| 636 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 637 | status = |
| 638 | acpi_ex_store_object_to_object(source_desc, target_desc, |
| 639 | &new_desc, walk_state); |
| 640 | if (ACPI_FAILURE(status)) { |
| 641 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 642 | } |
| 643 | |
| 644 | if (new_desc != target_desc) { |
| 645 | /* |
| 646 | * Store the new new_desc as the new value of the Name, and set |
| 647 | * the Name's type to that of the value being stored in it. |
| 648 | * source_desc reference count is incremented by attach_object. |
| 649 | * |
| 650 | * Note: This may change the type of the node if an explicit store |
| 651 | * has been performed such that the node/object type has been |
| 652 | * changed. |
| 653 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 654 | status = |
| 655 | acpi_ns_attach_object(node, new_desc, |
| 656 | new_desc->common.type); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 657 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 658 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 659 | "Store %s into %s via Convert/Attach\n", |
| 660 | acpi_ut_get_object_type_name |
| 661 | (source_desc), |
| 662 | acpi_ut_get_object_type_name |
| 663 | (new_desc))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 664 | } |
| 665 | break; |
| 666 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 667 | default: |
| 668 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 669 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 670 | "Storing %s (%p) directly into node (%p) with no implicit conversion\n", |
| 671 | acpi_ut_get_object_type_name(source_desc), |
| 672 | source_desc, node)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 673 | |
| 674 | /* No conversions for all other types. Just attach the source object */ |
| 675 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 676 | status = acpi_ns_attach_object(node, source_desc, |
| 677 | ACPI_GET_OBJECT_TYPE |
| 678 | (source_desc)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 679 | break; |
| 680 | } |
| 681 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 682 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 683 | } |