From owner-p4-projects@FreeBSD.ORG Sun Oct 10 19:09:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9982516A4D1; Sun, 10 Oct 2004 19:09:33 +0000 (GMT) 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 5CCFE16A4CE for ; Sun, 10 Oct 2004 19:09:33 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FD8143D1D for ; Sun, 10 Oct 2004 19:09:33 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9AJ9XXW096462 for ; Sun, 10 Oct 2004 19:09:33 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9AJ9Wu0096459 for perforce@freebsd.org; Sun, 10 Oct 2004 19:09:32 GMT (envelope-from peter@freebsd.org) Date: Sun, 10 Oct 2004 19:09:32 GMT Message-Id: <200410101909.i9AJ9Wu0096459@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 62958 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: Sun, 10 Oct 2004 19:09:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=62958 Change 62958 by peter@peter_daintree on 2004/10/10 19:09:08 integ -I -b i386_hammer Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/gdb_machdep.c#2 integrate .. //depot/projects/hammer/sys/amd64/conf/NOTES#48 integrate .. //depot/projects/hammer/sys/amd64/include/pmap.h#50 integrate .. //depot/projects/hammer/sys/amd64/pci/pci_bus.c#22 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/gdb_machdep.c#2 (text+ko) ==== @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include @@ -48,6 +50,16 @@ struct trapframe *tf = kdb_frame; *regsz = gdb_cpu_regsz(regnum); + + /* XXX this stuff is mighty suspicious */ + if (kdb_thread == curthread) { + switch (regnum) { + case 0: return (&tf->tf_rax); + case 1: return (&tf->tf_rcx); + case 2: return (&tf->tf_rdx); + } + } + /* i386 uses kdb_thrctx, a pcb for these */ switch (regnum) { case 0: return (&tf->tf_rax); case 1: return (&tf->tf_rbx); @@ -78,7 +90,11 @@ { struct trapframe *tf = kdb_frame; + val = __bswap64(val); switch (regnum) { - case GDB_REG_PC: tf->tf_rip = val; break; + case GDB_REG_PC: + kdb_thrctx->pcb_rip = val; + if (kdb_thread == curthread) + tf->tf_rip = val; } } ==== //depot/projects/hammer/sys/amd64/conf/NOTES#48 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# (XXX from i386:NOTES,v 1.1172) +# (XXX from i386:NOTES,v 1.1173) # $FreeBSD: src/sys/amd64/conf/NOTES,v 1.20 2004/09/22 01:04:54 peter Exp $ # @@ -312,6 +312,10 @@ device digi_Xe device digi_Xem device digi_Xr +# Parallel (8255 PPI) basic I/O (mode 0) port (e.g. Advantech PCL-724) +#device pbio +#hint.pbio.0.at="isa" +#hint.pbio.0.port="0x360" # sx device is i386 and pc98 only at the moment. device sx options SX_DEBUG ==== //depot/projects/hammer/sys/amd64/include/pmap.h#50 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/pci/pci_bus.c#22 (text+ko) ==== @@ -42,6 +42,7 @@ #include #include #include +#include #include "pcib_if.h" @@ -81,8 +82,8 @@ static const char * legacy_pcib_is_host_bridge(int bus, int slot, int func, - u_int32_t id, u_int8_t class, u_int8_t subclass, - u_int8_t *busnum) + uint32_t id, uint8_t class, uint8_t subclass, + uint8_t *busnum) { const char *s = NULL; @@ -262,6 +263,24 @@ return ENOENT; } +static struct resource * +legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + /* + * If no memory preference is given, use upper 32MB slot most + * bioses use for their memory window. Typically other bridges + * before us get in the way to assert their preferences on memory. + * Hardcoding like this sucks, so a more MD/MI way needs to be + * found to do it. This is typically only used on older laptops + * that don't have pci busses behind pci bridge, so assuming > 32MB + * is liekly OK. + */ + if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) + start = 0xfe000000; + return (bus_generic_alloc_resource(dev, child, type, rid, start, end, + count, flags)); +} static device_method_t legacy_pcib_methods[] = { /* Device interface */ @@ -276,7 +295,7 @@ DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),