Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146120764
D37772.1779253986.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37772.1779253986.diff
View Options
diff --git a/sys/arm64/arm64/gic_v3_acpi.c b/sys/arm64/arm64/gic_v3_acpi.c
--- a/sys/arm64/arm64/gic_v3_acpi.c
+++ b/sys/arm64/arm64/gic_v3_acpi.c
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2016 The FreeBSD Foundation
+ * Copyright (c) 2022 Arm Ltd
*
* This software was developed by Andrew Turner under
* the sponsorship of the FreeBSD Foundation.
@@ -393,23 +394,25 @@
dev = arg;
sc = device_get_softc(dev);
+ di = malloc(sizeof(*di), M_GIC_V3, M_WAITOK | M_ZERO);
+ err = acpi_iort_its_lookup(gict->TranslationId, &xref, &pxm);
+ if (err != 0) {
+ free(di, M_GIC_V3);
+ return;
+ }
+
child = device_add_child(dev, "its", -1);
- if (child == NULL)
+ if (child == NULL) {
+ free(di, M_GIC_V3);
return;
+ }
- di = malloc(sizeof(*di), M_GIC_V3, M_WAITOK | M_ZERO);
+ di->di_gic_dinfo.gic_domain = pxm;
+ di->di_gic_dinfo.msi_xref = xref;
resource_list_init(&di->di_rl);
resource_list_add(&di->di_rl, SYS_RES_MEMORY, 0,
gict->BaseAddress, gict->BaseAddress + 128 * 1024 - 1,
128 * 1024);
- err = acpi_iort_its_lookup(gict->TranslationId, &xref, &pxm);
- if (err == 0) {
- di->di_gic_dinfo.gic_domain = pxm;
- di->di_gic_dinfo.msi_xref = xref;
- } else {
- di->di_gic_dinfo.gic_domain = -1;
- di->di_gic_dinfo.msi_xref = ACPI_MSI_XREF;
- }
sc->gic_nchildren++;
device_set_ivars(child, di);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 20, 5:13 AM (7 h, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28752202
Default Alt Text
D37772.1779253986.diff (1 KB)
Attached To
Mode
D37772: Check for the IORT before adding the ITS driver
Attached
Detach File
Event Timeline
Log In to Comment