DragonFly BSD
DragonFly bugs List (threaded) for 2009-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

amd64: ed(4) won't load

From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Fri, 2 Oct 2009 11:53:05 +0900

I've tried amd64 ISO on Parallels(an emulator which runs on Mac OS X).
The installation went fine, but so far I have two problems:

- the network driver won't work out-of-box; it's recognized as ed(4),
  but the driver won't load because of missing kvtop() function

- SMP kernel works, but not with APIC_IO; Parallels reported that the
  virtual machine crashed shortly after the following message is displayed
  on the console
    APIC_IO: MP table broken: ExtINT entry corrupt!

  (this is not specific to amd64, but it happens to i386, too)

I faked up the kvtop() function as follows and it seems to work,
although I haven't tried it under load, just a few `git fetch' or
NFS mounts(to share the source tree between Mac OS X and DragonFly).
I hope someone with knowledge has time to work on fixing ed(4)
for amd64 someday.

Best Regards,
YONETANI Tomokazu.

diff --git a/sys/dev/netif/ed/if_ed.c b/sys/dev/netif/ed/if_ed.c
index 60159a1..01f40f2 100644
--- a/sys/dev/netif/ed/if_ed.c
+++ b/sys/dev/netif/ed/if_ed.c
@@ -68,6 +68,7 @@
 #include <net/bpf.h>
 #include <machine/md_var.h>
+#include <vm/pmap.h>
 #include "if_edreg.h"
 #include "if_edvar.h"
@@ -192,6 +193,20 @@ ed_probe_generic8390(struct ed_softc *sc)
+ * Convert kernel VA to physical address
+ */
+kvtop(void *addr)
+	vm_paddr_t pa;
+	pa = pmap_extract(&kernel_pmap, (vm_offset_t)addr);
+	if (pa == 0)
+		panic("kvtop: zero page frame");
+	return (pa);
  * Probe and vendor-specific initialization routine for SMC/WD80x3 boards

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]