PERFORCE change 62958 for review
Peter Wemm
peter at FreeBSD.org
Sun Oct 10 12:09:34 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=62958
Change 62958 by peter at 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 <machine/psl.h>
#include <machine/reg.h>
#include <machine/trap.h>
+#include <machine/frame.h>
+#include <machine/endian.h>
#include <gdb/gdb.h>
@@ -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 <isa/isavar.h>
#include <machine/legacyvar.h>
#include <machine/pci_cfgreg.h>
+#include <machine/resource.h>
#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),
More information about the p4-projects
mailing list