Add new defines GRUB_RSDP_SIGNATURE_SIZE and GRUB_RSDP_SIGNATURE.
This commit is contained in:
parent
52eab6562d
commit
ce7d92a9f2
4 changed files with 17 additions and 10 deletions
|
@ -32,7 +32,7 @@ grub_machine_acpi_get_rsdpv1 (void)
|
|||
if (! ebda_len)
|
||||
return 0;
|
||||
for (ptr = ebda; ptr < ebda + 0x400; ptr += 16)
|
||||
if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
|
||||
if (grub_memcmp (ptr, GRUB_RSDP_SIGNATURE, GRUB_RSDP_SIGNATURE_SIZE) == 0
|
||||
&& grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
|
||||
&& ((struct grub_acpi_rsdp_v10 *) ptr)->revision == 0)
|
||||
return (struct grub_acpi_rsdp_v10 *) ptr;
|
||||
|
@ -40,7 +40,7 @@ grub_machine_acpi_get_rsdpv1 (void)
|
|||
grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");
|
||||
for (ptr = (grub_uint8_t *) 0xe0000; ptr < (grub_uint8_t *) 0x100000;
|
||||
ptr += 16)
|
||||
if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
|
||||
if (grub_memcmp (ptr, GRUB_RSDP_SIGNATURE, GRUB_RSDP_SIGNATURE_SIZE) == 0
|
||||
&& grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
|
||||
&& ((struct grub_acpi_rsdp_v10 *) ptr)->revision == 0)
|
||||
return (struct grub_acpi_rsdp_v10 *) ptr;
|
||||
|
@ -59,7 +59,7 @@ grub_machine_acpi_get_rsdpv2 (void)
|
|||
if (! ebda_len)
|
||||
return 0;
|
||||
for (ptr = ebda; ptr < ebda + 0x400; ptr += 16)
|
||||
if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
|
||||
if (grub_memcmp (ptr, GRUB_RSDP_SIGNATURE, GRUB_RSDP_SIGNATURE_SIZE) == 0
|
||||
&& grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
|
||||
&& ((struct grub_acpi_rsdp_v10 *) ptr)->revision != 0
|
||||
&& ((struct grub_acpi_rsdp_v20 *) ptr)->length < 1024
|
||||
|
@ -70,7 +70,7 @@ grub_machine_acpi_get_rsdpv2 (void)
|
|||
grub_dprintf ("acpi", "Looking for RSDP. Scanning BIOS\n");
|
||||
for (ptr = (grub_uint8_t *) 0xe0000; ptr < (grub_uint8_t *) 0x100000;
|
||||
ptr += 16)
|
||||
if (grub_memcmp (ptr, "RSD PTR ", 8) == 0
|
||||
if (grub_memcmp (ptr, GRUB_RSDP_SIGNATURE, GRUB_RSDP_SIGNATURE_SIZE) == 0
|
||||
&& grub_byte_checksum (ptr, sizeof (struct grub_acpi_rsdp_v10)) == 0
|
||||
&& ((struct grub_acpi_rsdp_v10 *) ptr)->revision != 0
|
||||
&& ((struct grub_acpi_rsdp_v20 *) ptr)->length < 1024
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue