using System.Runtime.InteropServices; namespace XFESystem.NativeRuntime.Application; // Copies only the kernel's versioned fixed integer ABI. It never calls a host // driver or chooses an acceleration backend from PCI presence or FSP status. internal static unsafe class NativeGpuDiagnostics { [DllImport("xfe_pal", EntryPoint = "xfe_gpu_discovery_info", CallingConvention = CallingConvention.Cdecl)] private static extern ulong Info(uint field); [DllImport("xfe_pal", EntryPoint = "xfe_gpu_discovery_record", CallingConvention = CallingConvention.Cdecl)] private static extern int CopyRecord(uint index, byte* record, uint bytes); [DllImport("xfe_pal", EntryPoint = "xfe_gpu_boot_probe_info", CallingConvention = CallingConvention.Cdecl)] private static extern ulong BootInfo(uint field); internal static string ReadReport(out bool hasRtx5090) => NativeGpuReportFormatter.Format(Info, CopyRecord, BootInfo, out hasRtx5090); }