Exemple #1
0
        public static Ssdt Create(SystemTableHeader header)
        {
            IoMemory region = IoMemory.MapPhysicalMemory(header.PostHeaderAddress,
                                                         header.PostHeaderLength,
                                                         true, false);
            int sum = (header.Checksum + AcpiChecksum.Compute(region)) & 0xff;

            if (sum != 0)
            {
                return(null);
            }
            return(new Ssdt(region, header));
        }
Exemple #2
0
        public static Rsdp Parse(UIntPtr regionAddress,
                                 uint regionBytes)
        {
            if (regionBytes >= 20)
            {
                IoMemory region = IoMemory.MapPhysicalMemory(regionAddress,
                                                             regionBytes,
                                                             true, false);

                if (AcpiChecksum.Compute(region, 0, 20) == 0 &&
                    region.ReadAsciiZeroString(0, 8) == Rsdp.Id)
                {
                    return(new Rsdp(region));
                }
            }
            return(null);
        }