From owner-p4-projects@FreeBSD.ORG Wed Dec 10 13:16:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5AA5816A4D0; Wed, 10 Dec 2003 13:16:58 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31FAD16A4CF for ; Wed, 10 Dec 2003 13:16:58 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C53DF43D2F for ; Wed, 10 Dec 2003 13:16:46 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hBALGkXJ038394 for ; Wed, 10 Dec 2003 13:16:46 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hBALGj14038391 for perforce@freebsd.org; Wed, 10 Dec 2003 13:16:45 -0800 (PST) (envelope-from sam@freebsd.org) Date: Wed, 10 Dec 2003 13:16:45 -0800 (PST) Message-Id: <200312102116.hBALGj14038391@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 43756 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 21:16:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=43756 Change 43756 by sam@sam_ebb on 2003/12/10 13:16:43 IFC @ 43755 Affected files ... .. //depot/projects/netperf/sys/amd64/acpica/madt.c#3 integrate .. //depot/projects/netperf/sys/amd64/include/pcvt_ioctl.h#1 branch .. //depot/projects/netperf/sys/boot/Makefile#3 integrate .. //depot/projects/netperf/sys/boot/efi/include/efiapi.h#2 integrate .. //depot/projects/netperf/sys/boot/ficl/Makefile#2 integrate .. //depot/projects/netperf/sys/boot/ficl/loader.c#2 integrate .. //depot/projects/netperf/sys/boot/ficl/powerpc/sysdep.c#1 branch .. //depot/projects/netperf/sys/boot/ficl/powerpc/sysdep.h#1 branch .. //depot/projects/netperf/sys/boot/i386/boot0/boot0.s#3 integrate .. //depot/projects/netperf/sys/boot/i386/boot0/boot0sio.s#2 integrate .. //depot/projects/netperf/sys/boot/ia64/libski/acpi_stub.c#3 integrate .. //depot/projects/netperf/sys/boot/powerpc/loader/Makefile#3 integrate .. //depot/projects/netperf/sys/boot/powerpc/loader/conf.c#2 integrate .. //depot/projects/netperf/sys/conf/Makefile.powerpc#2 integrate .. //depot/projects/netperf/sys/conf/options.i386#8 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acconfig.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acdisasm.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acenv.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acevents.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acexcep.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acglobal.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acmacros.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acobject.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acpica_prep.sh#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acstruct.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/actbl.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/actbl1.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/actbl2.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/actypes.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/acutils.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/common/adisasm.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/aslanalyze.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/aslcompile.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/aslcompiler.y#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/aslfold.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/asltree.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/asltypes.h#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/compiler/aslutils.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dbcmds.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dbdisply.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dbexec.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dbfileio.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dbstats.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dbutils.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dmobject.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dmresrc.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dmresrcl.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dsfield.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dsinit.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dsmethod.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dsmthdat.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dsopcode.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dsutils.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dswexec.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dswload.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dswscope.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/dswstate.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/evgpe.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/evgpeblk.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/evmisc.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/evregion.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/evrgnini.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/evxfregn.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exconfig.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/excreate.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exdump.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exfield.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exfldio.c#4 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exmisc.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exmutex.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exoparg1.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exoparg3.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exprep.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exregion.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exresnte.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exresolv.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exresop.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exstore.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exstoren.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exsystem.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/exutils.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/hwacpi.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/hwregs.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/hwsleep.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsaccess.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsalloc.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsdump.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsdumpdv.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsinit.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsobject.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nssearch.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsutils.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/nsxfname.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/osunixxf.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/psargs.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/psparse.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/psxface.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rsaddr.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rscalc.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rscreate.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rsdump.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rsirq.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/rslist.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbconvrt.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbget.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbgetall.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbinstal.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbrsdt.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbxface.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/tbxfroot.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/utalloc.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/utdebug.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/utdelete.c#3 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/uteval.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/utglobal.c#2 integrate .. //depot/projects/netperf/sys/contrib/dev/acpica/utobject.c#2 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi.c#14 integrate .. //depot/projects/netperf/sys/dev/acpica/acpi_cpu.c#8 integrate .. //depot/projects/netperf/sys/dev/acpica/madt.h#2 delete .. //depot/projects/netperf/sys/dev/ata/ata-pci.c#8 integrate .. //depot/projects/netperf/sys/dev/ciss/cissreg.h#3 integrate .. //depot/projects/netperf/sys/dev/owi/if_owi.c#5 integrate .. //depot/projects/netperf/sys/dev/puc/pucdata.c#8 integrate .. //depot/projects/netperf/sys/dev/wi/if_wi.c#20 integrate .. //depot/projects/netperf/sys/dev/wi/if_wivar.h#4 integrate .. //depot/projects/netperf/sys/i386/acpica/madt.c#8 integrate .. //depot/projects/netperf/sys/i386/i386/mp_machdep.c#17 integrate .. //depot/projects/netperf/sys/i386/i386/mptable.c#8 integrate .. //depot/projects/netperf/sys/i386/include/pcvt_ioctl.h#2 integrate .. //depot/projects/netperf/sys/ia64/acpica/madt.c#4 integrate .. //depot/projects/netperf/sys/ia64/ia64/trap.c#10 integrate .. //depot/projects/netperf/sys/kern/kern_thread.c#9 integrate .. //depot/projects/netperf/sys/kern/subr_turnstile.c#3 integrate .. //depot/projects/netperf/sys/net/if_gre.c#5 integrate .. //depot/projects/netperf/sys/netinet6/ip6_mroute.c#7 integrate .. //depot/projects/netperf/sys/netkey/key.c#11 integrate .. //depot/projects/netperf/sys/pci/if_sis.c#19 edit .. //depot/projects/netperf/sys/powerpc/include/cpufunc.h#2 integrate .. //depot/projects/netperf/sys/powerpc/include/powerpc.h#2 integrate .. //depot/projects/netperf/sys/powerpc/powermac/ata_macio.c#3 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/db_interface.c#2 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/machdep.c#5 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/ofw_machdep.c#2 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/pmap.c#6 integrate .. //depot/projects/netperf/sys/security/mac_test/mac_test.c#7 integrate .. //depot/projects/netperf/sys/sys/ioctl_bt848.h#2 delete .. //depot/projects/netperf/sys/sys/ioctl_meteor.h#3 delete Differences ... ==== //depot/projects/netperf/sys/amd64/acpica/madt.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.9 2003/12/06 23:14:44 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.10 2003/12/09 03:04:19 njl Exp $"); #include #include @@ -50,7 +50,6 @@ #include "acpi.h" #include -#include #include #define NIOAPICS 32 /* Max number of I/O APICs */ @@ -70,7 +69,7 @@ u_int la_apic_id:8; } lapics[NLAPICS + 1]; -static APIC_TABLE *madt; +static MULTIPLE_APIC_TABLE *madt; static vm_paddr_t madt_physaddr; static vm_offset_t madt_length; @@ -83,10 +82,10 @@ static void *madt_map(vm_paddr_t pa, int offset, vm_offset_t length); static void *madt_map_table(vm_paddr_t pa, int offset, const char *sig); static void madt_parse_apics(APIC_HEADER *entry, void *arg); -static void madt_parse_interrupt_override(INTERRUPT_SOURCE_OVERRIDE *intr); +static void madt_parse_interrupt_override(MADT_INTERRUPT_OVERRIDE *intr); static void madt_parse_ints(APIC_HEADER *entry, void *arg __unused); -static void madt_parse_local_nmi(LAPIC_NMI *nmi); -static void madt_parse_nmi(NMI *nmi); +static void madt_parse_local_nmi(MADT_LOCAL_APIC_NMI *nmi); +static void madt_parse_nmi(MADT_NMI_SOURCE *nmi); static int madt_probe(void); static int madt_probe_cpus(void); static void madt_probe_cpus_handler(APIC_HEADER *entry, void *arg __unused); @@ -222,7 +221,7 @@ printf("MADT: Failed to map XSDT\n"); return (ENXIO); } - count = (xsdt->Header.Length - sizeof(ACPI_TABLE_HEADER)) / + count = (xsdt->Length - sizeof(ACPI_TABLE_HEADER)) / sizeof(UINT64); for (i = 0; i < count; i++) if (madt_probe_table(xsdt->TableOffsetEntry[i])) @@ -235,7 +234,7 @@ printf("MADT: Failed to map RSDT\n"); return (ENXIO); } - count = (rsdt->Header.Length - sizeof(ACPI_TABLE_HEADER)) / + count = (rsdt->Length - sizeof(ACPI_TABLE_HEADER)) / sizeof(UINT32); for (i = 0; i < count; i++) if (madt_probe_table(rsdt->TableOffsetEntry[i])) @@ -310,8 +309,8 @@ madt = pmap_mapdev(madt_physaddr, madt_length); lapic_init((uintptr_t)madt->LocalApicAddress); printf("ACPI APIC Table: <%.*s %.*s>\n", - (int)sizeof(madt->Header.OemId), madt->Header.OemId, - (int)sizeof(madt->Header.OemTableId), madt->Header.OemTableId); + (int)sizeof(madt->OemId), madt->OemId, + (int)sizeof(madt->OemTableId), madt->OemTableId); /* * We ignore 64-bit local APIC override entries. Should we @@ -363,7 +362,7 @@ APIC_HEADER *entry; u_char *p, *end; - end = (u_char *)(madt) + madt->Header.Length; + end = (u_char *)(madt) + madt->Length; for (p = (u_char *)(madt + 1); p < end; ) { entry = (APIC_HEADER *)p; handler(entry, arg); @@ -374,27 +373,27 @@ static void madt_probe_cpus_handler(APIC_HEADER *entry, void *arg) { - PROCESSOR_APIC *proc; + MADT_PROCESSOR_APIC *proc; struct lapic_info *la; switch (entry->Type) { - case APIC_PROC: + case APIC_PROCESSOR: /* * The MADT does not include a BSP flag, so we have to * let the MP code figure out which CPU is the BSP on * its own. */ - proc = (PROCESSOR_APIC *)entry; + proc = (MADT_PROCESSOR_APIC *)entry; if (bootverbose) printf("MADT: Found CPU APIC ID %d ACPI ID %d: %s\n", - proc->LocalApicId, proc->ProcessorApicId, + proc->LocalApicId, proc->ProcessorId, proc->ProcessorEnabled ? "enabled" : "disabled"); - if (proc->ProcessorApicId > NLAPICS) + if (proc->ProcessorId > NLAPICS) panic("%s: CPU ID %d too high", __func__, - proc->ProcessorApicId); - la = &lapics[proc->ProcessorApicId]; + proc->ProcessorId); + la = &lapics[proc->ProcessorId]; KASSERT(la->la_present == 0, - ("Duplicate local ACPI ID %d", proc->ProcessorApicId)); + ("Duplicate local ACPI ID %d", proc->ProcessorId)); la->la_present = 1; la->la_apic_id = proc->LocalApicId; if (proc->ProcessorEnabled) { @@ -412,16 +411,15 @@ static void madt_parse_apics(APIC_HEADER *entry, void *arg __unused) { - IO_APIC *apic; + MADT_IO_APIC *apic; - switch (entry->Type) { case APIC_IO: - apic = (IO_APIC *)entry; + apic = (MADT_IO_APIC *)entry; if (bootverbose) - printf("MADT: Found IO APIC ID %d, Vector %d at %p\n", - apic->IoApicId, apic->Vector, - (void *)(uintptr_t)apic->IoApicAddress); + printf("MADT: Found IO APIC ID %d, Interrupt %d at %p\n", + apic->IoApicId, apic->Interrupt, + (void *)(uintptr_t)apic->Address); if (apic->IoApicId >= NIOAPICS) panic("%s: I/O APIC ID %d too high", __func__, apic->IoApicId); @@ -429,9 +427,9 @@ panic("%s: Double APIC ID %d", __func__, apic->IoApicId); ioapics[apic->IoApicId].io_apic = ioapic_create( - (uintptr_t)apic->IoApicAddress, apic->IoApicId, - apic->Vector); - ioapics[apic->IoApicId].io_vector = apic->Vector; + (uintptr_t)apic->Address, apic->IoApicId, + apic->Interrupt); + ioapics[apic->IoApicId].io_vector = apic->Interrupt; break; default: break; @@ -448,10 +446,10 @@ { switch (Polarity) { - case APIC_POLARITY_CONFORM: - case APIC_POLARITY_ACTIVEHI: + case POLARITY_CONFORMS: + case POLARITY_ACTIVE_HIGH: return (1); - case APIC_POLARITY_ACTIVELO: + case POLARITY_ACTIVE_LOW: return (0); default: panic("Bogus Interrupt Polarity"); @@ -463,10 +461,10 @@ { switch (TriggerMode) { - case APIC_TRIGGER_CONFORM: - case APIC_TRIGGER_EDGE: + case TRIGGER_CONFORMS: + case TRIGGER_EDGE: return (1); - case APIC_TRIGGER_LEVEL: + case TRIGGER_LEVEL: return (0); default: panic("Bogus Interrupt Trigger Mode"); @@ -521,27 +519,26 @@ * Parse an interrupt source override for an ISA interrupt. */ static void -madt_parse_interrupt_override(INTERRUPT_SOURCE_OVERRIDE *intr) +madt_parse_interrupt_override(MADT_INTERRUPT_OVERRIDE *intr) { void *new_ioapic, *old_ioapic; u_int new_pin, old_pin; if (bootverbose) printf("MADT: intr override: source %u, irq %u\n", - intr->Source, intr->GlobalSystemInterrupt); + intr->Source, intr->Interrupt); KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero")); - if (madt_find_interrupt(intr->GlobalSystemInterrupt, &new_ioapic, + if (madt_find_interrupt(intr->Interrupt, &new_ioapic, &new_pin) != 0) { printf("MADT: Could not find APIC for vector %d (IRQ %d)\n", - intr->GlobalSystemInterrupt, intr->Source); + intr->Interrupt, intr->Source); return; } - if (intr->Source != intr->GlobalSystemInterrupt) { + if (intr->Source != intr->Interrupt) { /* XXX: This assumes that the SCI uses IRQ 9. */ - if (intr->GlobalSystemInterrupt > 15 && intr->Source == 9) - acpi_OverrideInterruptLevel( - intr->GlobalSystemInterrupt); + if (intr->Interrupt > 15 && intr->Source == 9) + acpi_OverrideInterruptLevel(intr->Interrupt); else ioapic_remap_vector(new_ioapic, new_pin, intr->Source); if (madt_find_interrupt(intr->Source, &old_ioapic, @@ -562,23 +559,22 @@ * Parse an entry for an NMI routed to an IO APIC. */ static void -madt_parse_nmi(NMI *nmi) +madt_parse_nmi(MADT_NMI_SOURCE *nmi) { void *ioapic; u_int pin; - if (madt_find_interrupt(nmi->GlobalSystemInterrupt, - &ioapic, &pin) != 0) { + if (madt_find_interrupt(nmi->Interrupt, &ioapic, &pin) != 0) { printf("MADT: Could not find APIC for vector %d\n", - nmi->GlobalSystemInterrupt); + nmi->Interrupt); return; } ioapic_set_nmi(ioapic, pin); - if (nmi->TriggerMode != APIC_TRIGGER_CONFORM) + if (nmi->TriggerMode != TRIGGER_CONFORMS) ioapic_set_triggermode(ioapic, pin, interrupt_trigger(nmi->TriggerMode)); - if (nmi->Polarity != APIC_TRIGGER_CONFORM) + if (nmi->Polarity != TRIGGER_CONFORMS) ioapic_set_polarity(ioapic, pin, interrupt_polarity(nmi->Polarity)); } @@ -587,27 +583,27 @@ * Parse an entry for an NMI routed to a local APIC LVT pin. */ static void -madt_parse_local_nmi(LAPIC_NMI *nmi) +madt_parse_local_nmi(MADT_LOCAL_APIC_NMI *nmi) { u_int apic_id, pin; - if (nmi->ProcessorApicId == 0xff) + if (nmi->ProcessorId == 0xff) apic_id = APIC_ID_ALL; - else if (madt_find_cpu(nmi->ProcessorApicId, &apic_id) != 0) { + else if (madt_find_cpu(nmi->ProcessorId, &apic_id) != 0) { if (bootverbose) printf("MADT: Ignoring local NMI routed to ACPI CPU %u\n", - nmi->ProcessorApicId); + nmi->ProcessorId); return; } - if (nmi->LINTPin == 0) + if (nmi->Lint == 0) pin = LVT_LINT0; else pin = LVT_LINT1; lapic_set_lvt_mode(apic_id, pin, APIC_LVT_DM_NMI); - if (nmi->TriggerMode != APIC_TRIGGER_CONFORM) + if (nmi->TriggerMode != TRIGGER_CONFORMS) lapic_set_lvt_triggermode(apic_id, pin, interrupt_trigger(nmi->TriggerMode)); - if (nmi->Polarity != APIC_POLARITY_CONFORM) + if (nmi->Polarity != POLARITY_CONFORMS) lapic_set_lvt_polarity(apic_id, pin, interrupt_polarity(nmi->Polarity)); } @@ -620,15 +616,15 @@ { switch (entry->Type) { - case APIC_INTERRUPT_SOURCE_OVERRIDE: + case APIC_XRUPT_OVERRIDE: madt_parse_interrupt_override( - (INTERRUPT_SOURCE_OVERRIDE *)entry); + (MADT_INTERRUPT_OVERRIDE *)entry); break; case APIC_NMI: - madt_parse_nmi((NMI *)entry); + madt_parse_nmi((MADT_NMI_SOURCE *)entry); break; - case APIC_LOCAL_APIC_NMI: - madt_parse_local_nmi((LAPIC_NMI *)entry); + case APIC_LOCAL_NMI: + madt_parse_local_nmi((MADT_LOCAL_APIC_NMI *)entry); break; } } ==== //depot/projects/netperf/sys/boot/Makefile#3 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/sys/boot/Makefile,v 1.18 2003/08/16 02:48:20 obrien Exp $ +# $FreeBSD: src/sys/boot/Makefile,v 1.19 2003/12/10 09:18:42 grehan Exp $ .if ${MACHINE_ARCH} == "amd64" .MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true .endif -.if !defined(NOFORTH) && ${MACHINE_ARCH} != "powerpc" +.if !defined(NOFORTH) # Build the add-in FORTH interpreter SUBDIR+= ficl .endif ==== //depot/projects/netperf/sys/boot/efi/include/efiapi.h#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/boot/efi/include/efiapi.h,v 1.5 2002/12/08 20:47:44 marcel Exp $ */ +/* $FreeBSD: src/sys/boot/efi/include/efiapi.h,v 1.6 2003/12/10 19:08:09 jhb Exp $ */ #ifndef _EFI_API_H #define _EFI_API_H @@ -204,7 +204,7 @@ /* - * EFI platform varibles + * EFI platform variables */ #define EFI_GLOBAL_VARIABLE \ ==== //depot/projects/netperf/sys/boot/ficl/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.35 2003/06/30 19:08:49 ru Exp $ +# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.36 2003/12/10 09:10:54 grehan Exp $ # .if ${MACHINE_ARCH} == "amd64" .MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true @@ -17,6 +17,9 @@ .if ${MACHINE_ARCH} == "i386" CFLAGS+= -mpreferred-stack-boundary=2 .endif +.if ${MACHINE_ARCH} == "powerpc" +CFLAGS+= -msoft-float +.endif .if ${MACHINE} == "pc98" CFLAGS+= -DPC98 .endif ==== //depot/projects/netperf/sys/boot/ficl/loader.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/ficl/loader.c,v 1.9 2003/06/08 03:11:16 nyan Exp $ + * $FreeBSD: src/sys/boot/ficl/loader.c,v 1.10 2003/12/10 09:09:38 grehan Exp $ */ /******************************************************************* @@ -662,14 +662,22 @@ ficlSetEnv(pSys, "arch-i386", FICL_TRUE); ficlSetEnv(pSys, "arch-alpha", FICL_FALSE); ficlSetEnv(pSys, "arch-ia64", FICL_FALSE); + ficlSetEnv(pSys, "arch-powerpc", FICL_FALSE); #elif defined(__alpha__) ficlSetEnv(pSys, "arch-i386", FICL_FALSE); ficlSetEnv(pSys, "arch-alpha", FICL_TRUE); ficlSetEnv(pSys, "arch-ia64", FICL_FALSE); + ficlSetEnv(pSys, "arch-powerpc", FICL_FALSE); #elif defined(__ia64__) ficlSetEnv(pSys, "arch-i386", FICL_FALSE); ficlSetEnv(pSys, "arch-alpha", FICL_FALSE); ficlSetEnv(pSys, "arch-ia64", FICL_TRUE); + ficlSetEnv(pSys, "arch-powerpc", FICL_FALSE); +#elif defined(__powerpc__) + ficlSetEnv(pSys, "arch-i386", FICL_FALSE); + ficlSetEnv(pSys, "arch-alpha", FICL_FALSE); + ficlSetEnv(pSys, "arch-ia64", FICL_FALSE); + ficlSetEnv(pSys, "arch-powerpc", FICL_TRUE); #endif return; ==== //depot/projects/netperf/sys/boot/i386/boot0/boot0.s#3 (text+ko) ==== @@ -13,7 +13,7 @@ # purpose. # -# $FreeBSD: src/sys/boot/i386/boot0/boot0.s,v 1.27 2003/11/20 20:28:18 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/boot0/boot0.s,v 1.28 2003/12/09 05:40:06 obrien Exp $ # A 512-byte boot manager. @@ -60,7 +60,7 @@ movw %ax,%ds # data movw %ax,%ss # Set up movw $LOAD,%sp # stack - + # # Copy this code to the address it was linked for # @@ -142,13 +142,13 @@ main.4: movb (%di),%cl # Partition addw %cx,%di # description callw putx # Display it -main.5: incw %dx # Next item +main.5: incw %dx # Next item addb $0x10,%bl # Next entry jnc main.3 # Till done # # Passed a 256 byte boundary.. # table is finished. -# Add one to the drive number and check it is valid, +# Add one to the drive number and check it is valid, # popw %ax # Drive number subb $0x80-0x1,%al # Does next @@ -176,7 +176,7 @@ callw putx # item # # Now that we've printed the drive (if we needed to), display a prompt. -# Get ready for the input byt noting the time. +# Get ready for the input byte noting the time. # main.7: movw $prompt,%si # Display callw putstr # prompt @@ -187,7 +187,7 @@ int $0x1a # system time movw %dx,%di # Ticks when addw _TICKS(%bp),%di # timeout -# +# # Busy loop, looking for keystrokes but # keeping one eye on the time. # @@ -206,7 +206,7 @@ # # User's last try was bad, beep in displeasure. # Since nothing was printed, just continue on as if the user -# hadn't done anything. This gives the effect of the user getting a beep +# hadn't done anything. This gives the effect of the user getting a beep # for all bad keystrokes but no action until either the timeout # occurs or the user hits a good key. # @@ -250,7 +250,7 @@ movw $FAKE,%si # Partition for write movb (%si),%dl # Drive number movw %si,%bx # Partition for read - cmpb $0x4,%al # F5 pressed? + cmpb $0x4,%al # F5/#5 pressed? pushf # Save je main.13 # Yes shlb $0x4,%al # Point to @@ -272,10 +272,10 @@ # If going to next drive, replace drive with selected one. # Remember to un-ascii it. Hey 0x80 is already set, cool! # - jne main.15 # If not F5 + jne main.15 # If not F5/#5 movb _NXTDRV(%bp),%dl # Next drive subb $'0',%dl # number -# +# # load selected bootsector to the LOAD location in RAM. # If it fails to read or isn't marked bootable, treat it # as a bad selection. @@ -387,7 +387,7 @@ .byte os_bsd-. # OpenBSD .byte os_bsd-. # NetBSD # -# And here are the strings themselves. 0x80 or'd into a byte indicates +# And here are the strings themselves. 0x80 or'd into a byte indicates # the end of the string. (not so great for Russians but...) # os_misc: .ascii "?"; .byte '?'|0x80 @@ -402,7 +402,7 @@ # # These values are sometimes changed before writing back to the drive -# Be especially careful that nxtdrv: must come after drive:, as it +# Be especially careful that nxtdrv: must come after drive:, as it # is part of the same string. # drive: .ascii "Drive " ==== //depot/projects/netperf/sys/boot/i386/boot0/boot0sio.s#2 (text+ko) ==== @@ -14,9 +14,9 @@ # purpose. # -# $FreeBSD: src/sys/boot/i386/boot0/boot0sio.s,v 1.1 2003/12/08 17:51:39 bms Exp $ +# $FreeBSD: src/sys/boot/i386/boot0/boot0sio.s,v 1.2 2003/12/09 05:40:06 obrien Exp $ -# A 512-byte boot manager which uses a 9600 baud serial console on COM1. +# A 512-byte boot manager which uses a serial console on COM1. .set NHRDRV,0x475 # Number of hard drives .set ORIGIN,0x600 # Execution address @@ -26,13 +26,14 @@ .set PRT_OFF,0x1be # Partition table .set TBL0SZ,0x3 # Table 0 size - .set TBL1SZ,0xc # Table 1 size + .set TBL1SZ,0xb # Table 1 size .set MAGIC,0xaa55 # Magic: bootable .set B0MAGIC,0xbb66 # Identification .set KEY_ENTER,0x1c # Enter key scan code .set KEY_F1,0x3b # F1 key scan code + .set KEY_1,0x02 # #1 key scan code .set ASCII_BEL,0x07 # ASCII code for .set ASCII_CR,0x0D # ASCII code for @@ -64,7 +65,7 @@ movw %ax,%ds # data movw %ax,%ss # Set up movw $LOAD,%sp # stack - + # # Copy this code to the address it was linked for # @@ -95,6 +96,7 @@ main: pushw %dx # Save xorw %dx,%dx # Port: COM1 movb $0xE3,%al # 9600 8-N-1 + movb $0x00,%ah # BIOS: Set COM Port int $0x14 # Parameters popw %dx # Restore @@ -157,13 +159,13 @@ main.4: movb (%di),%cl # Partition addw %cx,%di # description callw putx # Display it -main.5: incw %dx # Next item +main.5: incw %dx # Next item addb $0x10,%bl # Next entry jnc main.3 # Till done # # Passed a 256 byte boundary.. # table is finished. -# Add one to the drive number and check it is valid, +# Add one to the drive number and check it is valid, # popw %ax # Drive number subb $0x80-0x1,%al # Does next @@ -191,13 +193,13 @@ callw putx # item # # Now that we've printed the drive (if we needed to), display a prompt. +# Get ready for the input byte noting the time. # main.7: movw $prompt,%si # Display callw putstr # prompt movb _OPT(%bp),%dl # Display decw %si # default callw putkey # key - main.7_1: xorb %ah,%ah # BIOS: Get int $0x1a # system time @@ -205,7 +207,8 @@ addw _TICKS(%bp),%si # timeout # -# Check for a character on the serial port. +# Busy loop, checking for a character on the serial port, but +# keeping one eye on the time. # main.8: xorw %dx,%dx # Use COM1 @@ -227,7 +230,7 @@ # # User's last try was bad, beep in displeasure. # Since nothing was printed, just continue on as if the user -# hadn't done anything. This gives the effect of the user getting a beep +# hadn't done anything. This gives the effect of the user getting a beep # for all bad keystrokes but no action until either the timeout # occurs or the user hits a good key. # @@ -236,11 +239,12 @@ jmp main.7_1 # Go back # # Check the character we just got on the serial port. -# If it's CR act as if timed out. # main.11: movb $0x02,%ah # BIOS: Receive int $0x14 # COM Byte - +# +# If it's CR act as if timed out. +# cmpb $ASCII_CR,%al # Enter pressed? je main.9 # Yes # @@ -248,7 +252,7 @@ # If not ask again. # subb $ASCII_1,%al # Less '1' ascii character - cmpb $0x4,%al # 1..5? + cmpb $0x4,%al # #1..#5? ja main.10 # No # # We have a selection. @@ -267,7 +271,7 @@ movw $FAKE,%si # Partition for write movb (%si),%dl # Drive number movw %si,%bx # Partition for read - cmpb $0x4,%al # 5 pressed? + cmpb $0x4,%al # F5/#5 pressed? pushf # Save je main.13 # Yes shlb $0x4,%al # Point to @@ -289,10 +293,10 @@ # If going to next drive, replace drive with selected one. # Remember to un-ascii it. Hey 0x80 is already set, cool! # - jne main.15 # If not 5 + jne main.15 # If not F5/#5 movb _NXTDRV(%bp),%dl # Next drive - subb $'0',%dl # number XXX char val? -# + subb $'0',%dl # number +# # load selected bootsector to the LOAD location in RAM. # If it fails to read or isn't marked bootable, treat it # as a bad selection. @@ -371,7 +375,7 @@ # Menu strings item: .ascii " "; .byte ' '|0x80 -prompt: .ascii "\nDef:"; .byte ' '|0x80 +prompt: .ascii "\nDef:"; .byte ' '|0x80 crlf: .ascii "\r"; .byte '\n'|0x80 # Partition type tables @@ -384,7 +388,7 @@ # # These values indicate bootable types we know the names of # - .byte 0x1, 0x4, 0x6, 0xb, 0xc, 0xe, 0x63, 0x83 + .byte 0x1, 0x4, 0x6, 0xb, 0xc, 0xe, 0x83 .byte 0x9f, 0xa5, 0xa6, 0xa9 # # These are offsets that match the known names above and point to the strings @@ -397,21 +401,19 @@ .byte os_dos-. # Windows .byte os_dos-. # Windows .byte os_dos-. # Windows - .byte os_unix-. # UNIX .byte os_linux-. # Linux .byte os_bsd-. # BSD/OS .byte os_freebsd-. # FreeBSD .byte os_bsd-. # OpenBSD .byte os_bsd-. # NetBSD # -# And here are the strings themselves. 0x80 or'd into a byte indicates +# And here are the strings themselves. 0x80 or'd into a byte indicates # the end of the string. (not so great for Russians but...) # os_misc: .ascii "?"; .byte '?'|0x80 os_dos: .ascii "DO"; .byte 'S'|0x80 -os_unix: .ascii "UNI"; .byte 'X'|0x80 -os_linux: .ascii "Lnu"; .byte 'x'|0x80 -os_freebsd: .ascii "F" +os_linux: .ascii "Linu"; .byte 'x'|0x80 +os_freebsd: .ascii "Free" os_bsd: .ascii "BS"; .byte 'D'|0x80 .org PRT_OFF-0xe,0x90 @@ -420,7 +422,7 @@ # # These values are sometimes changed before writing back to the drive -# Be especially careful that nxtdrv: must come after drive:, as it +# Be especially careful that nxtdrv: must come after drive:, as it # is part of the same string. # drive: .ascii "Drive " ==== //depot/projects/netperf/sys/boot/ia64/libski/acpi_stub.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/ia64/libski/acpi_stub.c,v 1.2 2003/09/08 09:11:32 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/ia64/libski/acpi_stub.c,v 1.3 2003/12/09 08:35:17 marcel Exp $"); #include @@ -58,34 +58,30 @@ */ struct { - APIC_TABLE Header; - LOCAL_SAPIC cpu0; - LOCAL_SAPIC cpu1; - LOCAL_SAPIC cpu2; - LOCAL_SAPIC cpu3; - IO_SAPIC sapic; + MULTIPLE_APIC_TABLE Header; + MADT_LOCAL_SAPIC cpu0; + MADT_LOCAL_SAPIC cpu1; + MADT_LOCAL_SAPIC cpu2; + MADT_LOCAL_SAPIC cpu3; + MADT_IO_SAPIC sapic; } apic = { /* Header. */ { - { - APIC_SIG, /* Signature. */ - sizeof(apic), /* Length of table. */ - 0, /* ACPI minor revision. */ - 0, /* XXX checksum. */ - "FBSD", /* OEM Id. */ - "SKI", /* OEM table Id. */ - 0, /* OEM revision. */ - "FBSD", /* ASL compiler Id. */ - 0 /* ASL revision. */ - }, + APIC_SIG, /* Signature. */ + sizeof(apic), /* Length of table. */ + 0, /* ACPI minor revision. */ + 0, /* XXX checksum. */ + "FBSD", /* OEM Id. */ + "SKI", /* OEM table Id. */ + 0, /* OEM revision. */ + "FBSD", /* ASL compiler Id. */ + 0, /* ASL revision. */ 0xfee00000, }, /* cpu0. */ { - { - APIC_LOCAL_SAPIC, /* Type. */ - sizeof(apic.cpu0) /* Length. */ - }, + APIC_LOCAL_SAPIC, /* Type. */ + sizeof(apic.cpu0), /* Length. */ 0, /* ACPI processor id */ 0, /* Processor local SAPIC id */ 0, /* Processor local SAPIC eid */ @@ -94,10 +90,8 @@ }, /* cpu1. */ { - { - APIC_LOCAL_SAPIC, /* Type. */ - sizeof(apic.cpu1) /* Length. */ - }, + APIC_LOCAL_SAPIC, /* Type. */ + sizeof(apic.cpu1), /* Length. */ 1, /* ACPI processor id */ 0, /* Processor local SAPIC id */ 1, /* Processor local SAPIC eid */ @@ -106,10 +100,8 @@ }, /* cpu2. */ { - { - APIC_LOCAL_SAPIC, /* Type. */ - sizeof(apic.cpu2) /* Length. */ - }, + APIC_LOCAL_SAPIC, /* Type. */ + sizeof(apic.cpu2), /* Length. */ 2, /* ACPI processor id */ 1, /* Processor local SAPIC id */ 0, /* Processor local SAPIC eid */ @@ -118,10 +110,8 @@ }, /* cpu3. */ { - { - APIC_LOCAL_SAPIC, /* Type. */ - sizeof(apic.cpu3) /* Length. */ - }, + APIC_LOCAL_SAPIC, /* Type. */ + sizeof(apic.cpu3), /* Length. */ 3, /* ACPI processor id */ 1, /* Processor local SAPIC id */ 1, /* Processor local SAPIC eid */ @@ -130,10 +120,8 @@ }, /* sapic. */ { - { - APIC_IO_SAPIC, /* Type. */ - sizeof(apic.sapic) /* Length. */ - }, + APIC_IO_SAPIC, /* Type. */ + sizeof(apic.sapic), /* Length. */ 4, /* IO SAPIC id. */ 0, 16, /* Interrupt base. */ ==== //depot/projects/netperf/sys/boot/powerpc/loader/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.11 2003/08/16 02:48:20 obrien Exp $ +# $FreeBSD: src/sys/boot/powerpc/loader/Makefile,v 1.12 2003/12/10 09:16:22 grehan Exp $ BASE= loader PROG= ${BASE} @@ -8,38 +8,57 @@ BINDIR?= /boot INSTALLFLAGS= -b +# architecture-specific loader code +SRCS= conf.c metadata.c vers.c start.c + LOADER_DISK_SUPPORT?= yes +LOADER_UFS_SUPPORT?= yes +LOADER_CD9660_SUPPORT?= yes +LOADER_EXT2FS_SUPPORT?= no LOADER_NET_SUPPORT?= yes - -CFLAGS+= -ffreestanding -# load address -RELOC?= 0x6c0000 -CFLAGS+= -DRELOC=${RELOC} - -# architecture-specific loader code -SRCS= conf.c metadata.c +LOADER_NFS_SUPPORT?= yes +LOADER_TFTP_SUPPORT?= yes +LOADER_GZIP_SUPPORT?= yes +LOADER_BZIP2_SUPPORT?= no -# Pull in common loader code -.PATH: ${.CURDIR}/../../ofw/common -.include <${.CURDIR}/../../ofw/common/Makefile.inc> - .if defined(LOADER_DISK_SUPPORT) CFLAGS+= -DLOADER_DISK_SUPPORT >>> TRUNCATED FOR MAIL (1000 lines) <<<