mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-15 17:34:43 +00:00
acpi: Clear reserved bits in IORT
The IORT spec says that reserved bits must be set to zero, thus clear all fields of the struct before starting to fill out non-reserved fields. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
parent
0ae343239b
commit
fe8844f4ad
1 changed files with 4 additions and 0 deletions
|
@ -615,6 +615,7 @@ int acpi_iort_add_named_component(struct acpi_ctx *ctx,
|
|||
node->length += strlen(device_name) + 1;
|
||||
|
||||
comp = (struct acpi_iort_named_component *)node->node_data;
|
||||
memset(comp, '\0', sizeof(struct acpi_iort_named_component));
|
||||
|
||||
comp->node_flags = node_flags;
|
||||
comp->memory_properties = memory_properties;
|
||||
|
@ -655,6 +656,8 @@ int acpi_iort_add_rc(struct acpi_ctx *ctx,
|
|||
node->length += sizeof(struct acpi_iort_id_mapping) * num_mappings;
|
||||
|
||||
rc = (struct acpi_iort_rc *)node->node_data;
|
||||
memset(rc, '\0', sizeof(struct acpi_iort_rc));
|
||||
|
||||
rc->mem_access_properties = mem_access_properties;
|
||||
rc->ats_attributes = ats_attributes;
|
||||
rc->pci_segment_number = pci_segment_number;
|
||||
|
@ -713,6 +716,7 @@ int acpi_iort_add_smmu_v3(struct acpi_ctx *ctx,
|
|||
node->length += sizeof(struct acpi_iort_id_mapping) * num_mappings;
|
||||
|
||||
smmu = (struct acpi_iort_smmu_v3 *)node->node_data;
|
||||
memset(smmu, '\0', sizeof(struct acpi_iort_smmu_v3));
|
||||
|
||||
smmu->base_address = base_address;
|
||||
smmu->flags = flags;
|
||||
|
|
Loading…
Add table
Reference in a new issue