summaryrefslogtreecommitdiffstats
path: root/sys/ia64/acpica
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2014-07-07 00:27:09 +0000
committermarcel <marcel@FreeBSD.org>2014-07-07 00:27:09 +0000
commit9f28abd980752efcf77578cd494f1015083c2a2b (patch)
tree98db2559cee662a9de7212211dd5c69176b58254 /sys/ia64/acpica
parent43f783bfcf60b349841acd57895767177114e4ae (diff)
downloadFreeBSD-src-9f28abd980752efcf77578cd494f1015083c2a2b.zip
FreeBSD-src-9f28abd980752efcf77578cd494f1015083c2a2b.tar.gz
Remove ia64.
This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
Diffstat (limited to 'sys/ia64/acpica')
-rw-r--r--sys/ia64/acpica/OsdEnvironment.c77
-rw-r--r--sys/ia64/acpica/acpi_machdep.c101
-rw-r--r--sys/ia64/acpica/acpi_wakeup.c52
-rw-r--r--sys/ia64/acpica/madt.c247
4 files changed, 0 insertions, 477 deletions
diff --git a/sys/ia64/acpica/OsdEnvironment.c b/sys/ia64/acpica/OsdEnvironment.c
deleted file mode 100644
index 7aa281f..0000000
--- a/sys/ia64/acpica/OsdEnvironment.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 2000,2001 Michael Smith
- * Copyright (c) 2000 BSDi
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/efi.h>
-#include <sys/sysctl.h>
-
-#include <contrib/dev/acpica/include/acpi.h>
-
-static u_long acpi_root_phys;
-
-SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &acpi_root_phys, 0,
- "The physical address of the RSDP");
-
-ACPI_STATUS
-AcpiOsInitialize(void)
-{
-
- return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiOsTerminate(void)
-{
-
- return (AE_OK);
-}
-
-static u_long
-acpi_get_root_from_efi(void)
-{
- static struct uuid acpi_root_uuid = EFI_TABLE_ACPI20;
- void *acpi_root;
-
- acpi_root = efi_get_table(&acpi_root_uuid);
- if (acpi_root != NULL)
- return (IA64_RR_MASK((uintptr_t)acpi_root));
-
- return (0);
-}
-
-ACPI_PHYSICAL_ADDRESS
-AcpiOsGetRootPointer(void)
-{
-
- if (acpi_root_phys == 0)
- acpi_root_phys = acpi_get_root_from_efi();
-
- return (acpi_root_phys);
-}
diff --git a/sys/ia64/acpica/acpi_machdep.c b/sys/ia64/acpica/acpi_machdep.c
deleted file mode 100644
index 1466cfe..0000000
--- a/sys/ia64/acpica/acpi_machdep.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * Copyright (c) 2001 Doug Rabson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/bus.h>
-#include <machine/md_var.h>
-#include <machine/pal.h>
-
-#include <contrib/dev/acpica/include/acpi.h>
-#include <contrib/dev/acpica/include/actables.h>
-#include <dev/acpica/acpivar.h>
-
-int
-acpi_machdep_init(device_t dev)
-{
- struct acpi_softc *sc;
-
- sc = device_get_softc(dev);
-
- acpi_install_wakeup_handler(sc);
-
- return (0);
-}
-
-int
-acpi_machdep_quirks(int *quirks)
-{
- return (0);
-}
-
-void
-acpi_cpu_c1()
-{
-#ifdef INVARIANTS
- register_t ie;
-
- ie = intr_disable();
- KASSERT(ie == 0, ("%s called with interrupts enabled\n", __func__));
-#endif
- ia64_call_pal_static(PAL_HALT_LIGHT, 0, 0, 0);
- ia64_enable_intr();
-}
-
-void *
-acpi_find_table(const char *sig)
-{
- ACPI_PHYSICAL_ADDRESS rsdp_ptr;
- ACPI_TABLE_RSDP *rsdp;
- ACPI_TABLE_XSDT *xsdt;
- ACPI_TABLE_HEADER *table;
- UINT64 addr;
- u_int i, count;
-
- if ((rsdp_ptr = AcpiOsGetRootPointer()) == 0)
- return (NULL);
-
- rsdp = (ACPI_TABLE_RSDP *)IA64_PHYS_TO_RR7(rsdp_ptr);
- xsdt = (ACPI_TABLE_XSDT *)IA64_PHYS_TO_RR7(rsdp->XsdtPhysicalAddress);
-
- count = (UINT64 *)((char *)xsdt + xsdt->Header.Length) -
- xsdt->TableOffsetEntry;
-
- for (i = 0; i < count; i++) {
- addr = xsdt->TableOffsetEntry[i];
- table = (ACPI_TABLE_HEADER *)IA64_PHYS_TO_RR7(addr);
-
- if (strncmp(table->Signature, sig, ACPI_NAME_SIZE) != 0)
- continue;
- if (ACPI_FAILURE(AcpiTbChecksum((void *)table, table->Length)))
- continue;
-
- return (table);
- }
-
- return (NULL);
-}
diff --git a/sys/ia64/acpica/acpi_wakeup.c b/sys/ia64/acpica/acpi_wakeup.c
deleted file mode 100644
index 6c70ca7..0000000
--- a/sys/ia64/acpica/acpi_wakeup.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 2001 Doug Rabson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/bus.h>
-
-#include <contrib/dev/acpica/include/acpi.h>
-
-#include <dev/acpica/acpivar.h>
-
-int
-acpi_sleep_machdep(struct acpi_softc *sc, int state)
-{
- return (0);
-}
-
-int
-acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result,
- int intr_enabled)
-{
- return (0);
-}
-
-void
-acpi_install_wakeup_handler(struct acpi_softc *sc)
-{
-}
diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c
deleted file mode 100644
index 51193ff..0000000
--- a/sys/ia64/acpica/madt.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/*-
- * Copyright (c) 2001 Doug Rabson
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <contrib/dev/acpica/include/acpi.h>
-#include <contrib/dev/acpica/include/actables.h>
-
-#include <machine/md_var.h>
-
-struct sapic *sapic_create(int, int, u_int64_t);
-
-static void
-print_entry(ACPI_SUBTABLE_HEADER *entry)
-{
-
- switch (entry->Type) {
- case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE: {
- ACPI_MADT_INTERRUPT_OVERRIDE *iso =
- (ACPI_MADT_INTERRUPT_OVERRIDE *)entry;
- printf("\tInterrupt source override entry\n");
- printf("\t\tBus=%u, Source=%u, Irq=0x%x\n", iso->Bus,
- iso->SourceIrq, iso->GlobalIrq);
- break;
- }
-
- case ACPI_MADT_TYPE_IO_APIC:
- printf("\tI/O APIC entry\n");
- break;
-
- case ACPI_MADT_TYPE_IO_SAPIC: {
- ACPI_MADT_IO_SAPIC *sapic = (ACPI_MADT_IO_SAPIC *)entry;
- printf("\tI/O SAPIC entry\n");
- printf("\t\tId=0x%x, InterruptBase=0x%x, Address=0x%lx\n",
- sapic->Id, sapic->GlobalIrqBase, sapic->Address);
- break;
- }
-
- case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
- printf("\tLocal APIC NMI entry\n");
- break;
-
- case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: {
- ACPI_MADT_LOCAL_APIC_OVERRIDE *lapic =
- (ACPI_MADT_LOCAL_APIC_OVERRIDE *)entry;
- printf("\tLocal APIC override entry\n");
- printf("\t\tLocal APIC address=0x%jx\n", lapic->Address);
- break;
- }
-
- case ACPI_MADT_TYPE_LOCAL_SAPIC: {
- ACPI_MADT_LOCAL_SAPIC *sapic = (ACPI_MADT_LOCAL_SAPIC *)entry;
- printf("\tLocal SAPIC entry\n");
- printf("\t\tProcessorId=0x%x, Id=0x%x, Eid=0x%x",
- sapic->ProcessorId, sapic->Id, sapic->Eid);
- if (!(sapic->LapicFlags & ACPI_MADT_ENABLED))
- printf(" (disabled)");
- printf("\n");
- break;
- }
-
- case ACPI_MADT_TYPE_NMI_SOURCE:
- printf("\tNMI entry\n");
- break;
-
- case ACPI_MADT_TYPE_INTERRUPT_SOURCE: {
- ACPI_MADT_INTERRUPT_SOURCE *pis =
- (ACPI_MADT_INTERRUPT_SOURCE *)entry;
- printf("\tPlatform interrupt entry\n");
- printf("\t\tPolarity=%u, TriggerMode=%u, Id=0x%x, "
- "Eid=0x%x, Vector=0x%x, Irq=%d\n",
- pis->IntiFlags & ACPI_MADT_POLARITY_MASK,
- (pis->IntiFlags & ACPI_MADT_TRIGGER_MASK) >> 2,
- pis->Id, pis->Eid, pis->IoSapicVector, pis->GlobalIrq);
- break;
- }
-
- case ACPI_MADT_TYPE_LOCAL_APIC:
- printf("\tLocal APIC entry\n");
- break;
-
- default:
- printf("\tUnknown type %d entry\n", entry->Type);
- break;
- }
-}
-
-void
-ia64_probe_sapics(void)
-{
- ACPI_PHYSICAL_ADDRESS rsdp_ptr;
- ACPI_SUBTABLE_HEADER *entry;
- ACPI_TABLE_MADT *table;
- ACPI_TABLE_RSDP *rsdp;
- ACPI_TABLE_XSDT *xsdt;
- char *end, *p;
- int t, tables;
-
- if ((rsdp_ptr = AcpiOsGetRootPointer()) == 0)
- return;
-
- rsdp = (ACPI_TABLE_RSDP *)IA64_PHYS_TO_RR7(rsdp_ptr);
- xsdt = (ACPI_TABLE_XSDT *)IA64_PHYS_TO_RR7(rsdp->XsdtPhysicalAddress);
-
- tables = (UINT64 *)((char *)xsdt + xsdt->Header.Length) -
- xsdt->TableOffsetEntry;
-
- for (t = 0; t < tables; t++) {
- table = (ACPI_TABLE_MADT *)
- IA64_PHYS_TO_RR7(xsdt->TableOffsetEntry[t]);
-
- if (bootverbose)
- printf("Table '%c%c%c%c' at %p\n",
- table->Header.Signature[0],
- table->Header.Signature[1],
- table->Header.Signature[2],
- table->Header.Signature[3], table);
-
- if (strncmp(table->Header.Signature, ACPI_SIG_MADT,
- ACPI_NAME_SIZE) != 0 ||
- ACPI_FAILURE(AcpiTbChecksum((void *)table,
- table->Header.Length)))
- continue;
-
- /* Save the address of the processor interrupt block. */
- if (bootverbose)
- printf("\tLocal APIC address=0x%x\n", table->Address);
- ia64_lapic_addr = table->Address;
-
- end = (char *)table + table->Header.Length;
- p = (char *)(table + 1);
- while (p < end) {
- entry = (ACPI_SUBTABLE_HEADER *)p;
-
- if (bootverbose)
- print_entry(entry);
-
- switch (entry->Type) {
- case ACPI_MADT_TYPE_IO_SAPIC: {
- ACPI_MADT_IO_SAPIC *sapic =
- (ACPI_MADT_IO_SAPIC *)entry;
- sapic_create(sapic->Id, sapic->GlobalIrqBase,
- sapic->Address);
- break;
- }
-
- case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE: {
- ACPI_MADT_LOCAL_APIC_OVERRIDE *lapic =
- (ACPI_MADT_LOCAL_APIC_OVERRIDE *)entry;
- ia64_lapic_addr = lapic->Address;
- break;
- }
-
-#ifdef SMP
- case ACPI_MADT_TYPE_LOCAL_SAPIC: {
- ACPI_MADT_LOCAL_SAPIC *sapic =
- (ACPI_MADT_LOCAL_SAPIC *)entry;
- if (sapic->LapicFlags & ACPI_MADT_ENABLED)
- cpu_mp_add(sapic->ProcessorId,
- sapic->Id, sapic->Eid);
- break;
- }
-#endif
-
- default:
- break;
- }
-
- p += entry->Length;
- }
- }
-}
-
-/*
- * Count the number of local SAPIC entries in the APIC table. Every enabled
- * entry corresponds to a processor.
- */
-int
-ia64_count_cpus(void)
-{
- ACPI_PHYSICAL_ADDRESS rsdp_ptr;
- ACPI_MADT_LOCAL_SAPIC *entry;
- ACPI_TABLE_MADT *table;
- ACPI_TABLE_RSDP *rsdp;
- ACPI_TABLE_XSDT *xsdt;
- char *end, *p;
- int cpus, t, tables;
-
- if ((rsdp_ptr = AcpiOsGetRootPointer()) == 0)
- return (0);
-
- rsdp = (ACPI_TABLE_RSDP *)IA64_PHYS_TO_RR7(rsdp_ptr);
- xsdt = (ACPI_TABLE_XSDT *)IA64_PHYS_TO_RR7(rsdp->XsdtPhysicalAddress);
-
- tables = (UINT64 *)((char *)xsdt + xsdt->Header.Length) -
- xsdt->TableOffsetEntry;
-
- cpus = 0;
-
- for (t = 0; t < tables; t++) {
- table = (ACPI_TABLE_MADT *)
- IA64_PHYS_TO_RR7(xsdt->TableOffsetEntry[t]);
-
- if (strncmp(table->Header.Signature, ACPI_SIG_MADT,
- ACPI_NAME_SIZE) != 0 ||
- ACPI_FAILURE(AcpiTbChecksum((void *)table,
- table->Header.Length)))
- continue;
-
- end = (char *)table + table->Header.Length;
- p = (char *)(table + 1);
- while (p < end) {
- entry = (ACPI_MADT_LOCAL_SAPIC *)p;
-
- if (entry->Header.Type == ACPI_MADT_TYPE_LOCAL_SAPIC &&
- (entry->LapicFlags & ACPI_MADT_ENABLED))
- cpus++;
-
- p += entry->Header.Length;
- }
- }
-
- return (cpus);
-}
OpenPOWER on IntegriCloud