diff options
Diffstat (limited to 'drivers/acpi/acpica/tbxfroot.c')
-rw-r--r-- | drivers/acpi/acpica/tbxfroot.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c index 65ab8fed3d5e..43a54af2b548 100644 --- a/drivers/acpi/acpica/tbxfroot.c +++ b/drivers/acpi/acpica/tbxfroot.c | |||
@@ -50,6 +50,36 @@ ACPI_MODULE_NAME("tbxfroot") | |||
50 | 50 | ||
51 | /******************************************************************************* | 51 | /******************************************************************************* |
52 | * | 52 | * |
53 | * FUNCTION: acpi_tb_get_rsdp_length | ||
54 | * | ||
55 | * PARAMETERS: rsdp - Pointer to RSDP | ||
56 | * | ||
57 | * RETURN: Table length | ||
58 | * | ||
59 | * DESCRIPTION: Get the length of the RSDP | ||
60 | * | ||
61 | ******************************************************************************/ | ||
62 | u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp) | ||
63 | { | ||
64 | |||
65 | if (!ACPI_VALIDATE_RSDP_SIG(rsdp->signature)) { | ||
66 | |||
67 | /* BAD Signature */ | ||
68 | |||
69 | return (0); | ||
70 | } | ||
71 | |||
72 | /* "Length" field is available if table version >= 2 */ | ||
73 | |||
74 | if (rsdp->revision >= 2) { | ||
75 | return (rsdp->length); | ||
76 | } else { | ||
77 | return (ACPI_RSDP_CHECKSUM_LENGTH); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | /******************************************************************************* | ||
82 | * | ||
53 | * FUNCTION: acpi_tb_validate_rsdp | 83 | * FUNCTION: acpi_tb_validate_rsdp |
54 | * | 84 | * |
55 | * PARAMETERS: rsdp - Pointer to unvalidated RSDP | 85 | * PARAMETERS: rsdp - Pointer to unvalidated RSDP |
@@ -59,7 +89,8 @@ ACPI_MODULE_NAME("tbxfroot") | |||
59 | * DESCRIPTION: Validate the RSDP (ptr) | 89 | * DESCRIPTION: Validate the RSDP (ptr) |
60 | * | 90 | * |
61 | ******************************************************************************/ | 91 | ******************************************************************************/ |
62 | acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) | 92 | |
93 | acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp) | ||
63 | { | 94 | { |
64 | 95 | ||
65 | /* | 96 | /* |