plex86-devel
[Top][All Lists]
Advanced

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

[Plex86-devel] Plex86 works in FreeBSD


From: Byunghyun Oh
Subject: [Plex86-devel] Plex86 works in FreeBSD
Date: Wed, 29 Jan 2003 19:26:43 +0900
User-agent: Mutt/1.4i

I made plex86 work in FreeBSD 4.6.2-RELEASE, but it works somewhat
problematically. Booting to FreeDOS is successful, but it is too slow.
Moreover, booting to Linux failed because of FPU non-supported (maybe).

Patches to source are all dirty hacks, but there are some important points:
almost everything in host-linux.c can be adopted in host-freebsd.c.
I explain here in a long, complex, and hard-to-understand manner.

   <in host-linux.c>
. initGuestPhyMem, initMonitor function were used.
. PLEX86_SETINTR call was commented out.
. PLEX86_*TIMER, PLEX86_REGIO, PLEX86_IRQ calls exist.
  : copy_from_user and copy_to_user function were used.
    arg variable exists.
. plex86_ioctl's return value may be ioctl() function's return value.

   <in host-freebsd.c>
. They had been changed to init_guest_phy_mem, init_monitor function, which
  actually don't exist, but I recovered them to their originals.
. I also commented out PLEX86_SETINTR in host-freebsd.c.
. I copied PLEX86_*TIMER, PLEX86_REGIO, PLEX86_IRQ almost same.
  : copyin and copyout function are used instead.
    arg variable: unsigned long arg = *(unsigned long*) data;
    these ideas were from already ported calls.
. MOST DIRTY HACK: By trial-and-error guessing, I found plex86_ioctl's return
  value except 0 is just error code in errno variable, and ioctl() function
  just returns -1 instead. To solve this problem, original ioRegister_t and
  timerRegister_t structs should be expanded to contain returning id. But
  instead fixing enormous lines, I chose DIRTY HACK temporary, id is returned
  into timerRegister_t.useconds and ioRegister_t.op, whose type is unsigned.
  To use this hack, user.c and plugin.c was also patched.

I expect to make clean and complete patch soon, but it can take a long time
because I don't have thorough knowledge about FreeBSD's kernel and plex86.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]