CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: msaitoh Date: Sun May 12 23:00:21 UTC 2024 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: s/iast/iasl/ from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/acpitools/acpidump/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.55 src/usr.sbin/acpitools/acpidump/acpi.c:1.56 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.55 Tue May 24 20:50:21 2022 +++ src/usr.sbin/acpitools/acpidump/acpi.c Sun May 12 23:00:21 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.55 2022/05/24 20:50:21 andvar Exp $ */ +/* $NetBSD: acpi.c,v 1.56 2024/05/12 23:00:21 msaitoh Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: acpi.c,v 1.55 2022/05/24 20:50:21 andvar Exp $"); +__RCSID("$NetBSD: acpi.c,v 1.56 2024/05/12 23:00:21 msaitoh Exp $"); #include #include @@ -4719,7 +4719,7 @@ aml_disassemble(ACPI_TABLE_HEADER *rsdt, goto out; } if (status != 0) { - fprintf(stderr, "iast exit status = %d\n", status); + fprintf(stderr, "iasl exit status = %d\n", status); } /* Dump iasl's output to stdout */
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: msaitoh Date: Sun May 12 23:00:21 UTC 2024 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: s/iast/iasl/ from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/acpitools/acpidump/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: skrll Date: Mon Nov 8 10:19:42 UTC 2021 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: acpi_print_gicc_flags: print {en,dis}abled To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/acpitools/acpidump/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.52 src/usr.sbin/acpitools/acpidump/acpi.c:1.53 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.52 Sun Sep 19 10:34:10 2021 +++ src/usr.sbin/acpitools/acpidump/acpi.c Mon Nov 8 10:19:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.52 2021/09/19 10:34:10 andvar Exp $ */ +/* $NetBSD: acpi.c,v 1.53 2021/11/08 10:19:42 skrll Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: acpi.c,v 1.52 2021/09/19 10:34:10 andvar Exp $"); +__RCSID("$NetBSD: acpi.c,v 1.53 2021/11/08 10:19:42 skrll Exp $"); #include #include @@ -979,7 +979,12 @@ static void acpi_print_gicc_flags(uint32_t flags) { - printf("\tFlags={Performance intr="); + printf("\tFlags={"); + if (flags & ACPI_MADT_ENABLED) + printf("enabled"); + else + printf("disabled"); + printf(", Performance intr="); if (flags & ACPI_MADT_PERFORMANCE_IRQ_MODE) printf("edge"); else
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: skrll Date: Mon Nov 8 10:19:42 UTC 2021 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: acpi_print_gicc_flags: print {en,dis}abled To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.sbin/acpitools/acpidump/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/acpitools/acpidump
On 2021/09/15 8:30, Jason Thorpe wrote: On Sep 14, 2021, at 1:34 PM, Roland Illig wrote: When lint runs on the code, it defines the preprocessor macro 'lint' to be 1. Due to that, this name cannot be used as a regular identifier. Perhaps all of the "#ifdef lint" conditions should become "#ifdef __lint__"? Agreed. lint should not pollute public namespace. Thanks, rin
Re: CVS commit: src/usr.sbin/acpitools/acpidump
> On Sep 14, 2021, at 1:34 PM, Roland Illig wrote: > > When lint runs on the code, it defines the preprocessor macro 'lint' to > be 1. Due to that, this name cannot be used as a regular identifier. Perhaps all of the "#ifdef lint" conditions should become "#ifdef __lint__"? -- thorpej
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: rillig Date: Tue Sep 14 20:34:36 UTC 2021 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: acpidump: fix lint errors When lint runs on the code, it defines the preprocessor macro 'lint' to be 1. Due to that, this name cannot be used as a regular identifier. acpi.c(86): error: syntax error '1' [249] acpi.c(1004): error: syntax error '1' [249] acpi.c(2422): error: void function acpi_print_lpit cannot return value [213] The FreeBSD code doesn't need this name change since lint is specific to NetBSD. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/acpitools/acpidump/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.50 src/usr.sbin/acpitools/acpidump/acpi.c:1.51 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.50 Wed Jan 20 15:27:51 2021 +++ src/usr.sbin/acpitools/acpidump/acpi.c Tue Sep 14 20:34:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.50 2021/01/20 15:27:51 skrll Exp $ */ +/* $NetBSD: acpi.c,v 1.51 2021/09/14 20:34:36 rillig Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: acpi.c,v 1.50 2021/01/20 15:27:51 skrll Exp $"); +__RCSID("$NetBSD: acpi.c,v 1.51 2021/09/14 20:34:36 rillig Exp $"); #include #include @@ -83,7 +83,7 @@ static void acpi_print_io_apic(uint32_t uint64_t apic_addr); static void acpi_print_mps_flags(uint16_t flags); static void acpi_print_intr(uint32_t intr, uint16_t mps_flags); -static void acpi_print_local_nmi(u_int lint, uint16_t mps_flags); +static void acpi_print_local_nmi(u_int local_int, uint16_t mps_flags); static void acpi_print_madt(ACPI_SUBTABLE_HEADER *mp); static void acpi_handle_bert(ACPI_TABLE_HEADER *sdp); static void acpi_handle_bgrt(ACPI_TABLE_HEADER *sdp); @@ -1001,10 +1001,10 @@ acpi_print_intr(uint32_t intr, uint16_t } static void -acpi_print_local_nmi(u_int lint, uint16_t mps_flags) +acpi_print_local_nmi(u_int local_int, uint16_t mps_flags) { - printf("\tLINT Pin=%d\n", lint); + printf("\tLINT Pin=%d\n", local_int); acpi_print_mps_flags(mps_flags); } @@ -2419,7 +2419,7 @@ acpi_print_lpit(ACPI_LPIT_HEADER *lpit) #undef PRINTFLAG if (lpit->Type == ACPI_LPIT_TYPE_NATIVE_CSTATE) - return acpi_print_native_lpit((ACPI_LPIT_NATIVE *)lpit); + acpi_print_native_lpit((ACPI_LPIT_NATIVE *)lpit); } static void
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: rillig Date: Tue Sep 14 20:34:36 UTC 2021 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: acpidump: fix lint errors When lint runs on the code, it defines the preprocessor macro 'lint' to be 1. Due to that, this name cannot be used as a regular identifier. acpi.c(86): error: syntax error '1' [249] acpi.c(1004): error: syntax error '1' [249] acpi.c(2422): error: void function acpi_print_lpit cannot return value [213] The FreeBSD code doesn't need this name change since lint is specific to NetBSD. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/acpitools/acpidump/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: maxv Date: Sat Jun 22 12:39:40 UTC 2019 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c acpidump.8 Log Message: Dump TPM2. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/acpitools/acpidump/acpi.c cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/acpitools/acpidump/acpidump.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: maxv Date: Sat Jun 22 12:39:40 UTC 2019 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c acpidump.8 Log Message: Dump TPM2. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/acpitools/acpidump/acpi.c cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/acpitools/acpidump/acpidump.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.45 src/usr.sbin/acpitools/acpidump/acpi.c:1.46 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.45 Mon Apr 29 02:49:35 2019 +++ src/usr.sbin/acpitools/acpidump/acpi.c Sat Jun 22 12:39:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.45 2019/04/29 02:49:35 dogcow Exp $ */ +/* $NetBSD: acpi.c,v 1.46 2019/06/22 12:39:40 maxv Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: acpi.c,v 1.45 2019/04/29 02:49:35 dogcow Exp $"); +__RCSID("$NetBSD: acpi.c,v 1.46 2019/06/22 12:39:40 maxv Exp $"); #include #include @@ -115,6 +115,7 @@ static void acpi_print_srat_memory(ACPI_ static void acpi_print_srat(ACPI_SUBTABLE_HEADER *srat); static void acpi_handle_srat(ACPI_TABLE_HEADER *sdp); static void acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_tpm2(ACPI_TABLE_HEADER *sdp); static void acpi_print_nfit(ACPI_NFIT_HEADER *nfit); static void acpi_handle_nfit(ACPI_TABLE_HEADER *sdp); static void acpi_handle_uefi(ACPI_TABLE_HEADER *sdp); @@ -3339,6 +3340,31 @@ acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp) printf(END_COMMENT); } +static void +acpi_handle_tpm2(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_TPM2 *tpm2; + const char *class; + + printf(BEGIN_COMMENT); + + acpi_print_sdt(sdp); + tpm2 = (ACPI_TABLE_TPM2 *)sdp; + + if (tpm2->PlatformClass == 0) { + class = "Client"; + } else if (tpm2->PlatformClass == 1) { + class = "Server"; + } else { + class = "Unknown"; + } + printf("\tClass=%s (%u)\n", class, tpm2->PlatformClass); + printf("\tControl Address=0x%"PRIx64"\n", tpm2->ControlAddress); + printf("\tStart Method=%u\n", tpm2->StartMethod); + + printf(END_COMMENT); +} + static const char * devscope_type2str(int type) { @@ -4297,6 +4323,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp acpi_handle_srat(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4)) acpi_handle_tcpa(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_TPM2, 4)) + acpi_handle_tpm2(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_NFIT, 4)) acpi_handle_nfit(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_UEFI, 4)) Index: src/usr.sbin/acpitools/acpidump/acpidump.8 diff -u src/usr.sbin/acpitools/acpidump/acpidump.8:1.15 src/usr.sbin/acpitools/acpidump/acpidump.8:1.16 --- src/usr.sbin/acpitools/acpidump/acpidump.8:1.15 Sun Dec 2 10:51:07 2018 +++ src/usr.sbin/acpitools/acpidump/acpidump.8 Sat Jun 22 12:39:40 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: acpidump.8,v 1.15 2018/12/02 10:51:07 msaitoh Exp $ +.\" $NetBSD: acpidump.8,v 1.16 2019/06/22 12:39:40 maxv Exp $ .\" ACPI (ACPI Package) .\" .\" Copyright (c) 1999 Doug Rabson @@ -30,7 +30,7 @@ .\" .\" $FreeBSD: head/usr.sbin/acpi/acpidump/acpidump.8 267668 2014-06-20 09:57:27Z bapt $ .\" -.Dd December 2, 2018 +.Dd June 22, 2019 .Dt ACPIDUMP 8 .Os .Sh NAME @@ -128,6 +128,7 @@ utility dumps contents of the following .It SPMI .It SRAT .It TCPA +.It TPM2 .It UEFI .It WAET .It WDAT
Re: CVS commit: src/usr.sbin/acpitools/acpidump
On 22.12.09 09:44, Christoph Egger wrote: Module Name: src Committed By: cegger Date: Tue Dec 22 08:44:03 UTC 2009 Modified Files: src/usr.sbin/acpitools/acpidump: Makefile acpi.c acpi_user.c acpidump.8 acpidump.c acpidump.h Removed Files: src/usr.sbin/acpitools/acpidump: aml_dump.c asl_dump.c Log Message: msg.txt Damn. I mixed up -m with -F. Log Message should have been: Import acpidump from FreeBSD per request from jmcneill@ Changes made in the port: - adapt path to iasl from /usr/sbin/iasl to /usr/bin/iasl - fix realpath() usage to accomplish NetBSD's behaviour - use EXIT_FAILURE/EXIT_SUCCESS everywhere - fix crash on corrupt DSDT file and print proper error message - implemented additional ACPI table parsers for BERT, BOOT, CPEP, DBGP, EINJ, ERST, HEST, MSCT, SBST, SLIT, SPCR, TCPA, WAET, WDAT and WDRT
Re: CVS commit: src/usr.sbin/acpitools/acpidump
On 22.12.09 09:46, Christoph Egger wrote: On 22.12.09 09:44, Christoph Egger wrote: Module Name: src Committed By:cegger Date:Tue Dec 22 08:44:03 UTC 2009 Modified Files: src/usr.sbin/acpitools/acpidump: Makefile acpi.c acpi_user.c acpidump.8 acpidump.c acpidump.h Removed Files: src/usr.sbin/acpitools/acpidump: aml_dump.c asl_dump.c Log Message: msg.txt Damn. I mixed up -m with -F. Log Message should have been: Import acpidump from FreeBSD per request from jmcneill@ Changes made in the port: - adapt path to iasl from /usr/sbin/iasl to /usr/bin/iasl - fix realpath() usage to accomplish NetBSD's behaviour - use EXIT_FAILURE/EXIT_SUCCESS everywhere - fix crash on corrupt DSDT file and print proper error message - implemented additional ACPI table parsers for BERT, BOOT, CPEP, DBGP, EINJ, ERST, HEST, MSCT, SBST, SLIT, SPCR, TCPA, WAET, WDAT and WDRT commit message fixed in repository. Christoph
Re: CVS commit: src/usr.sbin/acpitools/acpidump
On Tue, 22 Dec 2009, Christoph Egger wrote: Log Message: msg.txt Please fix the log message. --apb (Alan Barrett)