Deleted Added
full compact
dbfileio.c (99679) dbfileio.c (100966)
1/*******************************************************************************
2 *
3 * Module Name: dbfileio - Debugger file I/O commands. These can't usually
4 * be used when running the debugger in Ring 0 (Kernel mode)
1/*******************************************************************************
2 *
3 * Module Name: dbfileio - Debugger file I/O commands. These can't usually
4 * be used when running the debugger in Ring 0 (Kernel mode)
5 * $Revision: 63 $
5 * $Revision: 67 $
6 *
7 ******************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.

--- 102 unchanged lines hidden (view full) ---

116 *****************************************************************************/
117
118
119#include "acpi.h"
120#include "acdebug.h"
121#include "acnamesp.h"
122#include "actables.h"
123
6 *
7 ******************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.

--- 102 unchanged lines hidden (view full) ---

116 *****************************************************************************/
117
118
119#include "acpi.h"
120#include "acdebug.h"
121#include "acnamesp.h"
122#include "actables.h"
123
124#ifdef ENABLE_DEBUGGER
124#if (defined ENABLE_DEBUGGER || defined ACPI_DISASSEMBLER)
125
126#define _COMPONENT ACPI_DEBUGGER
127 ACPI_MODULE_NAME ("dbfileio")
128
129
130/*
131 * NOTE: this is here for lack of a better place. It is used in all
132 * flavors of the debugger, need LCD file

--- 42 unchanged lines hidden (view full) ---

175 }
176
177 /* Argument not recognized */
178
179 return (ACPI_TYPE_NOT_FOUND);
180}
181
182
125
126#define _COMPONENT ACPI_DEBUGGER
127 ACPI_MODULE_NAME ("dbfileio")
128
129
130/*
131 * NOTE: this is here for lack of a better place. It is used in all
132 * flavors of the debugger, need LCD file

--- 42 unchanged lines hidden (view full) ---

175 }
176
177 /* Argument not recognized */
178
179 return (ACPI_TYPE_NOT_FOUND);
180}
181
182
183#ifdef ENABLE_DEBUGGER
183/*******************************************************************************
184 *
185 * FUNCTION: AcpiDbCloseDebugFile
186 *
187 * PARAMETERS: None
188 *
189 * RETURN: Status
190 *

--- 49 unchanged lines hidden (view full) ---

240 }
241 else
242 {
243 AcpiOsPrintf ("Could not open debug file %s\n", Name);
244 }
245
246#endif
247}
184/*******************************************************************************
185 *
186 * FUNCTION: AcpiDbCloseDebugFile
187 *
188 * PARAMETERS: None
189 *
190 * RETURN: Status
191 *

--- 49 unchanged lines hidden (view full) ---

241 }
242 else
243 {
244 AcpiOsPrintf ("Could not open debug file %s\n", Name);
245 }
246
247#endif
248}
249#endif
248
249
250#ifdef ACPI_APPLICATION
251/*******************************************************************************
252 *
253 * FUNCTION: AcpiDbLoadTable
254 *
255 * PARAMETERS: fp - File that contains table

--- 27 unchanged lines hidden (view full) ---

283 return (AE_BAD_SIGNATURE);
284 }
285
286
287 /* Validate the table header/length */
288
289 Status = AcpiTbValidateTableHeader (&TableHeader);
290 if ((ACPI_FAILURE (Status)) ||
250
251
252#ifdef ACPI_APPLICATION
253/*******************************************************************************
254 *
255 * FUNCTION: AcpiDbLoadTable
256 *
257 * PARAMETERS: fp - File that contains table

--- 27 unchanged lines hidden (view full) ---

285 return (AE_BAD_SIGNATURE);
286 }
287
288
289 /* Validate the table header/length */
290
291 Status = AcpiTbValidateTableHeader (&TableHeader);
292 if ((ACPI_FAILURE (Status)) ||
291 (TableHeader.Length > 524288)) /* 1/2 Mbyte should be enough */
293 (TableHeader.Length > 0x800000)) /* 8 Mbyte should be enough */
292 {
293 AcpiOsPrintf ("Table header is invalid!\n");
294 return (AE_ERROR);
295 }
296
297
298 /* We only support a limited number of table types */
299

--- 78 unchanged lines hidden (view full) ---

378
379 ACPI_FUNCTION_TRACE ("AeLocalLoadTable");
380
381 if (!TablePtr)
382 {
383 return_ACPI_STATUS (AE_BAD_PARAMETER);
384 }
385
294 {
295 AcpiOsPrintf ("Table header is invalid!\n");
296 return (AE_ERROR);
297 }
298
299
300 /* We only support a limited number of table types */
301

--- 78 unchanged lines hidden (view full) ---

380
381 ACPI_FUNCTION_TRACE ("AeLocalLoadTable");
382
383 if (!TablePtr)
384 {
385 return_ACPI_STATUS (AE_BAD_PARAMETER);
386 }
387
386 /* Install the new table into the local data structures */
387
388 TableInfo.Pointer = TablePtr;
388 TableInfo.Pointer = TablePtr;
389 Status = AcpiTbRecognizeTable (&TableInfo, ACPI_TABLE_SECONDARY);
390 if (ACPI_FAILURE (Status))
391 {
392 return_ACPI_STATUS (Status);
393 }
389
394
395 /* Install the new table into the local data structures */
396
390 Status = AcpiTbInstallTable (&TableInfo);
391 if (ACPI_FAILURE (Status))
392 {
393 /* Free table allocated by AcpiTbGetTable */
394
395 AcpiTbDeleteSingleTable (&TableInfo);
396 return_ACPI_STATUS (Status);
397 }
398
399
397 Status = AcpiTbInstallTable (&TableInfo);
398 if (ACPI_FAILURE (Status))
399 {
400 /* Free table allocated by AcpiTbGetTable */
401
402 AcpiTbDeleteSingleTable (&TableInfo);
403 return_ACPI_STATUS (Status);
404 }
405
406
400#ifndef PARSER_ONLY
407#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
401 Status = AcpiNsLoadTable (TableInfo.InstalledDesc, AcpiGbl_RootNode);
402 if (ACPI_FAILURE (Status))
403 {
404 /* Uninstall table and free the buffer */
405
406 AcpiTbDeleteAcpiTable (ACPI_TABLE_DSDT);
407 return_ACPI_STATUS (Status);
408 }

--- 19 unchanged lines hidden (view full) ---

428 {
429 AcpiOsPrintf ("Could not open file %s\n", Filename);
430 return (AE_ERROR);
431 }
432
433
434 /* Get the entire file */
435
408 Status = AcpiNsLoadTable (TableInfo.InstalledDesc, AcpiGbl_RootNode);
409 if (ACPI_FAILURE (Status))
410 {
411 /* Uninstall table and free the buffer */
412
413 AcpiTbDeleteAcpiTable (ACPI_TABLE_DSDT);
414 return_ACPI_STATUS (Status);
415 }

--- 19 unchanged lines hidden (view full) ---

435 {
436 AcpiOsPrintf ("Could not open file %s\n", Filename);
437 return (AE_ERROR);
438 }
439
440
441 /* Get the entire file */
442
436 AcpiOsPrintf ("Loading Acpi table from file %s\n", Filename);
443 fprintf (stderr, "Loading Acpi table from file %s\n", Filename);
437 Status = AcpiDbLoadTable (fp, &AcpiGbl_DbTablePtr, &TableLength);
438 fclose(fp);
439
440 if (ACPI_FAILURE (Status))
441 {
442 AcpiOsPrintf ("Couldn't get table from the file\n");
443 return (Status);
444 }

--- 42 unchanged lines hidden (view full) ---

487 {
488 AcpiOsPrintf ("Could not install table, %s\n",
489 AcpiFormatException (Status));
490 }
491
492 return (Status);
493 }
494
444 Status = AcpiDbLoadTable (fp, &AcpiGbl_DbTablePtr, &TableLength);
445 fclose(fp);
446
447 if (ACPI_FAILURE (Status))
448 {
449 AcpiOsPrintf ("Couldn't get table from the file\n");
450 return (Status);
451 }

--- 42 unchanged lines hidden (view full) ---

494 {
495 AcpiOsPrintf ("Could not install table, %s\n",
496 AcpiFormatException (Status));
497 }
498
499 return (Status);
500 }
501
495 AcpiOsPrintf ("%4.4s at %p successfully installed and loaded\n",
496 AcpiGbl_DbTablePtr->Signature, AcpiGbl_DbTablePtr);
502 fprintf (stderr, "Acpi table [%4.4s] successfully installed and loaded\n",
503 AcpiGbl_DbTablePtr->Signature);
497
498 AcpiGbl_AcpiHardwarePresent = FALSE;
499
500#endif /* ACPI_APPLICATION */
501 return (AE_OK);
502}
503
504
505#endif /* ENABLE_DEBUGGER */
506
504
505 AcpiGbl_AcpiHardwarePresent = FALSE;
506
507#endif /* ACPI_APPLICATION */
508 return (AE_OK);
509}
510
511
512#endif /* ENABLE_DEBUGGER */
513