mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
acpi: new function acpi_update_checksum()
Introduce a new function to update ACPI table headers. This allows to simplify the existing code. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
c026767894
commit
69e61d46d2
2 changed files with 14 additions and 0 deletions
|
@ -1274,6 +1274,13 @@ ulong write_acpi_tables(ulong start);
|
||||||
*/
|
*/
|
||||||
struct acpi_table_header *acpi_find_table(const char *sig);
|
struct acpi_table_header *acpi_find_table(const char *sig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* acpi_update_checksum() - update ACPI table checksum
|
||||||
|
*
|
||||||
|
* @header - header of an ACPI table
|
||||||
|
*/
|
||||||
|
void acpi_update_checksum(struct acpi_table_header *header);
|
||||||
|
|
||||||
#endif /* !__ACPI__*/
|
#endif /* !__ACPI__*/
|
||||||
|
|
||||||
#include <asm/acpi_table.h>
|
#include <asm/acpi_table.h>
|
||||||
|
|
|
@ -6,11 +6,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mapmem.h>
|
#include <mapmem.h>
|
||||||
|
#include <tables_csum.h>
|
||||||
#include <acpi/acpi_table.h>
|
#include <acpi/acpi_table.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
void acpi_update_checksum(struct acpi_table_header *header)
|
||||||
|
{
|
||||||
|
header->checksum = 0;
|
||||||
|
header->checksum = table_compute_checksum(header, header->length);
|
||||||
|
}
|
||||||
|
|
||||||
struct acpi_table_header *acpi_find_table(const char *sig)
|
struct acpi_table_header *acpi_find_table(const char *sig)
|
||||||
{
|
{
|
||||||
struct acpi_rsdp *rsdp;
|
struct acpi_rsdp *rsdp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue