Page MenuHomeFreeBSD

acpidump: dump AMD IVRS table describing IOMMU layout
ClosedPublic

Authored by kib on Apr 4 2024, 4:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 9:09 PM
Unknown Object (File)
Mon, Jun 10, 2:02 PM
Unknown Object (File)
May 25 2024, 2:12 AM
Unknown Object (File)
May 24 2024, 2:31 PM
Unknown Object (File)
May 13 2024, 12:05 PM
Unknown Object (File)
May 12 2024, 1:19 PM
Unknown Object (File)
Apr 30 2024, 3:23 AM
Unknown Object (File)
Apr 26 2024, 4:45 AM
Subscribers

Details

Summary

Also:

acpidump: add printfield() helper
acpidump: bump WARNS to 6

and disable warnings about unused function args coming from the vendor
acpi headers.
acpidump: silent the warning about unaligned uuid

The field comes from the ACPI NFIT table and must be already properly
aligned by BIOS (at least so is written in the spec).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Apr 4 2024, 4:55 AM

Could you please share some sample output? My ryzen apparently does not have this table.

usr.sbin/acpi/acpidump/Makefile
5 ↗(On Diff #136516)

I believe 6 is the default, so this line can simply be removed.

8 ↗(On Diff #136516)

If it's just a problem in the contrib headers, perhaps use a pragma to suppress this warning just for the includes?

kib marked 2 inline comments as done.Apr 4 2024, 3:47 PM
/*
  IVRS: Length=382, Revision=2, Checksum=127,
	OEMID=SUPERM, OEM Table ID=AMD IVRS, OEM Revision=0x1,
	Creator ID=AMD, Creator Revision=0x0
	VAsize=64 PAsize=48 GVAsize=2
	ATS_resp_res=0 DMA_preboot_remap=0 EFRsup=1

	IVHD Type=0x10 IOMMUId=2
	Flags={Coherent,PPRSup}
	CapOffset=0x40 Base=0xeff00000 PCISeg=0 Unit=0 MSIlog=0
{HATS=0x2,GATS=0,MsuNumPPR=0,PNBanks=0x2,PNCounters=0x4,PASmax=0xf,GASup,UASup,GLXSup=0x1,NXSup}
		Dev Type=0x3 Id=0x0008-0xfffe
		Dev Type=0x43 Id=0xff00-0xffff AliasId=0x00a4
		Dev Type=0x48 Id=0x00a0 Handle=0 Variety=2(HPET)
		Dev Type=0x48 Id=0x00a0 Handle=0x80 Variety=1(IOAPIC) DTE={INITPass,EIntPass,NMIPass,SysMgtPass,Lint0Pass,Lint1Pass}
		Dev Type=0x48 Id=0x0001 Handle=0x81 Variety=1(IOAPIC)

	IVHD Type=0x11 IOMMUId=2
	Flags={Coherent,PPRSup}
	CapOffset=0x40 Base=0xeff00000 PCISeg=0 Unit=0 MSIlog=0
	Attr={MsiNumPPR=0,PNBanks=0x2,PNCounters=0}
	EFRreg=0x000f77ef22294ada
		Dev Type=0x3 Id=0x0008-0xfffe
		Dev Type=0x43 Id=0xff00-0xffff AliasId=0x00a4
		Dev Type=0x48 Id=0x00a0 Handle=0 Variety=2(HPET)
		Dev Type=0x48 Id=0x00a0 Handle=0x80 Variety=1(IOAPIC) DTE={INITPass,EIntPass,NMIPass,SysMgtPass,Lint0Pass,Lint1Pass}
		Dev Type=0x48 Id=0x0001 Handle=0x81 Variety=1(IOAPIC)
	Mem Type=0x20(ALL) Start=    0xfffd00000000 Length=0x300000000 Flags={ExclusionRange}

	IVHD Type=0x40 IOMMUId=2
	Flags={Coherent,PPRSup}
	CapOffset=0x40 Base=0xeff00000 PCISeg=0 Unit=0 MSIlog=0
	Attr={MsiNumPPR=0,PNBanks=0x2,PNCounters=0}
	EFRreg=0x000f77ef22294ada EFR2reg=000000000000000000
		Dev Type=0x3 Id=0x0008-0xfffe
		Dev Type=0x43 Id=0xff00-0xffff AliasId=0x00a4
		Dev Type=0x48 Id=0x00a0 Handle=0 Variety=2(HPET)
		Dev Type=0x48 Id=0x00a0 Handle=0x80 Variety=1(IOAPIC) DTE={INITPass,EIntPass,NMIPass,SysMgtPass,Lint0Pass,Lint1Pass}
		Dev Type=0x48 Id=0x0001 Handle=0x81 Variety=1(IOAPIC)
		Dev Type=0xf0 Id=0x0099 HID=PNPD0040 CID= UID=none DTE={INITPass,EIntPass,NMIPass,SysMgtPass,Lint0Pass,Lint1Pass}

	Type=80
	Length=32
 */

Seems reasonable to me. I didn't check the ACPI table definitions closely.

This revision is now accepted and ready to land.Apr 4 2024, 4:35 PM