Deleted Added
full compact
dbdisply.c (126372) dbdisply.c (129684)
1/*******************************************************************************
2 *
3 * Module Name: dbdisply - debug display commands
1/*******************************************************************************
2 *
3 * Module Name: dbdisply - debug display commands
4 * $Revision: 101 $
4 * $Revision: 105 $
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.

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

778 *
779 ******************************************************************************/
780
781void
782AcpiDbDisplayGpes (void)
783{
784 ACPI_GPE_BLOCK_INFO *GpeBlock;
785 ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.

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

778 *
779 ******************************************************************************/
780
781void
782AcpiDbDisplayGpes (void)
783{
784 ACPI_GPE_BLOCK_INFO *GpeBlock;
785 ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
786 UINT32 i = 0;
786 ACPI_GPE_EVENT_INFO *GpeEventInfo;
787 ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
788 UINT32 GpeIndex;
789 UINT32 Block = 0;
790 UINT32 i;
791 UINT32 j;
792 char Buffer[80];
793 ACPI_BUFFER RetBuf;
794 ACPI_STATUS Status;
787
788
795
796
797 RetBuf.Length = sizeof (Buffer);
798 RetBuf.Pointer = Buffer;
799
800 Block = 0;
801
802 /* Walk the GPE lists */
803
789 GpeXruptInfo = AcpiGbl_GpeXruptListHead;
790 while (GpeXruptInfo)
791 {
792 GpeBlock = GpeXruptInfo->GpeBlockListHead;
793 while (GpeBlock)
794 {
804 GpeXruptInfo = AcpiGbl_GpeXruptListHead;
805 while (GpeXruptInfo)
806 {
807 GpeBlock = GpeXruptInfo->GpeBlockListHead;
808 while (GpeBlock)
809 {
795 AcpiOsPrintf ("Block %d - %p\n", i, GpeBlock);
796 AcpiOsPrintf (" Registers: %d\n", GpeBlock->RegisterCount);
797 AcpiOsPrintf (" GPE range: %d to %d\n", GpeBlock->BlockBaseNumber,
798 GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8) -1);
799 AcpiOsPrintf (" RegisterInfo: %p\n", GpeBlock->RegisterInfo);
810 Status = AcpiGetName (GpeBlock->Node, ACPI_FULL_PATHNAME, &RetBuf);
811 if (ACPI_FAILURE (Status))
812 {
813 AcpiOsPrintf ("Could not convert name to pathname\n");
814 }
815
816 AcpiOsPrintf ("\nBlock %d - Info %p DeviceNode %p [%s]\n",
817 Block, GpeBlock, GpeBlock->Node, Buffer);
818 AcpiOsPrintf (" Registers: %u (%u GPEs) \n",
819 GpeBlock->RegisterCount,
820 ACPI_MUL_8 (GpeBlock->RegisterCount));
821 AcpiOsPrintf (" GPE range: 0x%X to 0x%X\n",
822 GpeBlock->BlockBaseNumber,
823 GpeBlock->BlockBaseNumber +
824 (GpeBlock->RegisterCount * 8) -1);
825 AcpiOsPrintf (" RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
826 GpeBlock->RegisterInfo,
827 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
828 ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
800 AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
829 AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
801 i++;
802
830
831 /* Examine each GPE Register within the block */
832
833 for (i = 0; i < GpeBlock->RegisterCount; i++)
834 {
835 GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
836
837 AcpiOsPrintf (
838 " Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n",
839 i, GpeRegisterInfo->EnableForWake,
840 GpeRegisterInfo->EnableForRun,
841 ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
842 ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
843
844 /* Now look at the individual GPEs in this byte register */
845
846 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
847 {
848 GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
849 GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
850
851 if (!(GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK))
852 {
853 /* This GPE is not used (no method or handler) */
854
855 continue;
856 }
857
858 AcpiOsPrintf (
859 " GPE %.3X: %p Bit %2.2X Flags %2.2X: ",
860 GpeBlock->BlockBaseNumber + GpeIndex,
861 GpeEventInfo, GpeEventInfo->RegisterBit,
862 GpeEventInfo->Flags);
863
864 if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED)
865 {
866 AcpiOsPrintf ("Level, ");
867 }
868 else
869 {
870 AcpiOsPrintf ("Edge, ");
871 }
872
873 switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
874 {
875 case ACPI_GPE_TYPE_WAKE:
876 AcpiOsPrintf ("WakeOnly: ");
877 break;
878 case ACPI_GPE_TYPE_RUNTIME:
879 AcpiOsPrintf (" RunOnly: ");
880 break;
881 case ACPI_GPE_TYPE_WAKE_RUN:
882 AcpiOsPrintf (" WakeRun: ");
883 break;
884 default:
885 AcpiOsPrintf (" NotUsed: ");
886 break;
887 }
888
889 if (GpeEventInfo->Flags & ACPI_GPE_WAKE_ENABLED)
890 {
891 AcpiOsPrintf ("[Wake 1 ");
892 }
893 else
894 {
895 AcpiOsPrintf ("[Wake 0 ");
896 }
897
898 if (GpeEventInfo->Flags & ACPI_GPE_RUN_ENABLED)
899 {
900 AcpiOsPrintf ("Run 1], ");
901 }
902 else
903 {
904 AcpiOsPrintf ("Run 0], ");
905 }
906
907 switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
908 {
909 case ACPI_GPE_DISPATCH_NOT_USED:
910 AcpiOsPrintf ("NotUsed");
911 break;
912 case ACPI_GPE_DISPATCH_HANDLER:
913 AcpiOsPrintf ("Handler");
914 break;
915 case ACPI_GPE_DISPATCH_METHOD:
916 AcpiOsPrintf ("Method");
917 break;
918 default:
919 AcpiOsPrintf ("UNKNOWN: %X",
920 GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
921 break;
922 }
923
924 AcpiOsPrintf ("\n");
925 }
926 }
927 Block++;
803 GpeBlock = GpeBlock->Next;
804 }
928 GpeBlock = GpeBlock->Next;
929 }
805
806 GpeXruptInfo = GpeXruptInfo->Next;
807 }
808}
809
810
811#endif /* ACPI_DEBUGGER */
812
930 GpeXruptInfo = GpeXruptInfo->Next;
931 }
932}
933
934
935#endif /* ACPI_DEBUGGER */
936