|
Lines 59-65
static inline u8 checksum(u8 * buffer, u
Link Here
|
| 59 |
} |
59 |
} |
| 60 |
|
60 |
|
| 61 |
static unsigned long psz, addr, length; |
61 |
static unsigned long psz, addr, length; |
| 62 |
static int print, connect, skip; |
62 |
static int print, connect, skip, dump_rsdt; |
| 63 |
static u8 select_sig[4]; |
63 |
static u8 select_sig[4]; |
| 64 |
|
64 |
|
| 65 |
static unsigned long read_efi_systab( void ) |
65 |
static unsigned long read_efi_systab( void ) |
|
Lines 401-406
static void usage(const char *progname)
Link Here
|
| 401 |
puts("\t--length 0x456 or -l 0x456 -- works only with --addr, dump physical memory" |
401 |
puts("\t--length 0x456 or -l 0x456 -- works only with --addr, dump physical memory" |
| 402 |
"\n\t\tregion without trying to understand it's contents"); |
402 |
"\n\t\tregion without trying to understand it's contents"); |
| 403 |
puts("\t--skip 2 or -s 2 -- skip 2 tables of the given name and output only 3rd one"); |
403 |
puts("\t--skip 2 or -s 2 -- skip 2 tables of the given name and output only 3rd one"); |
|
|
404 |
puts("\t--rsdt or -r -- Try to access RSDT and related tables even if XSDT is available"); |
| 404 |
puts("\t--help or -h -- this help message"); |
405 |
puts("\t--help or -h -- this help message"); |
| 405 |
exit(0); |
406 |
exit(0); |
| 406 |
} |
407 |
} |
|
Lines 412-417
static struct option long_options[] = {
Link Here
|
| 412 |
{"binary", 0, 0, 'b'}, |
413 |
{"binary", 0, 0, 'b'}, |
| 413 |
{"length", 1, 0, 'l'}, |
414 |
{"length", 1, 0, 'l'}, |
| 414 |
{"skip", 1, 0, 's'}, |
415 |
{"skip", 1, 0, 's'}, |
|
|
416 |
{"rsdt", 0, 0, 'r'}, |
| 415 |
{"help", 0, 0, 'h'}, |
417 |
{"help", 0, 0, 'h'}, |
| 416 |
{0, 0, 0, 0} |
418 |
{0, 0, 0, 0} |
| 417 |
}; |
419 |
}; |
|
Lines 428-434
int main(int argc, char **argv)
Link Here
|
| 428 |
addr = length = 0; |
430 |
addr = length = 0; |
| 429 |
skip = 0; |
431 |
skip = 0; |
| 430 |
while (1) { |
432 |
while (1) { |
| 431 |
c = getopt_long(argc, argv, "a:t:o:bl:s:h", |
433 |
c = getopt_long(argc, argv, "a:t:o:brl:s:h", |
| 432 |
long_options, &option_index); |
434 |
long_options, &option_index); |
| 433 |
if (c == -1) |
435 |
if (c == -1) |
| 434 |
break; |
436 |
break; |
|
Lines 437-442
int main(int argc, char **argv)
Link Here
|
| 437 |
case 'a': |
439 |
case 'a': |
| 438 |
addr = strtoul(optarg, (char **)NULL, 16); |
440 |
addr = strtoul(optarg, (char **)NULL, 16); |
| 439 |
break; |
441 |
break; |
|
|
442 |
case 'r': |
| 443 |
dump_rsdt = 1; |
| 444 |
break; |
| 440 |
case 't': |
445 |
case 't': |
| 441 |
memcpy(select_sig, optarg, 4); |
446 |
memcpy(select_sig, optarg, 4); |
| 442 |
break; |
447 |
break; |
|
Lines 506-514
int main(int argc, char **argv)
Link Here
|
| 506 |
/* ACPIDUMP uses xsdt table */ |
511 |
/* ACPIDUMP uses xsdt table */ |
| 507 |
if (!acpi_dump_XSDT(fd, &rsdpx)) |
512 |
if (!acpi_dump_XSDT(fd, &rsdpx)) |
| 508 |
goto not_found; |
513 |
goto not_found; |
|
|
514 |
if (dump_rsdt) |
| 515 |
acpi_dump_RSDT(fd, &rsdpx); |
| 516 |
} else { |
| 517 |
if (!acpi_dump_RSDT(fd, &rsdpx)) |
| 518 |
goto not_found; |
| 509 |
} |
519 |
} |
| 510 |
if (!acpi_dump_RSDT(fd, &rsdpx)) |
|
|
| 511 |
goto not_found; |
| 512 |
if (connect) { |
520 |
if (connect) { |
| 513 |
lseek(fd, 0, SEEK_SET); |
521 |
lseek(fd, 0, SEEK_SET); |
| 514 |
write(fd, x, (rsdpx.revision < 2) ? |
522 |
write(fd, x, (rsdpx.revision < 2) ? |