Date: Sat, 26 Sep 1998 19:10:43 +0900 From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> To: freebsd-smp@FreeBSD.ORG Cc: jlemon@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: VM86 on SMP Message-ID: <199809261010.TAA20805@zodiac.mech.utsunomiya-u.ac.jp>
next in thread | raw e-mail | index | archive | help
I compiled a SMP kernel with VM86. It appears that the kernel panics as soon as something makes a vm86 call. Example 1: Enable apm0, then the kernel panics while apm0 is probed. Trap 12 fault virtual address: 0xa00 fault code: superviser write vm86_prepcall() at vm86_prepcall+0x4a vm86_bioscall() at vm86_bioscall+0xe4 apmprobe() at apmprobe+0x3d movl %eax,0(%edx,0) at vm86_prepcall+0x4a Example 2: Boot the kernel without APM, then try to load the VESA LKM. The same panic at the same place. vm86_prepcall() at vm86_prepcall+0x4a vm86_bioscall() at vm86_bioscall+0xe4 But, this time it is the VESA LKM initialization routine which is calling VM86. The uniprocessor kernel has, of cource, no problems in the above situations. I think the fault is at the following line. We have a hardcoded address here: 0xa00, Is this address valid in SMP? vm86_prepcall(struct vm86frame vmf) { uintptr_t addr[] = { 0xA00, 0x1000 }; /* code, stack */ u_char intcall[] = { CLI, INTn, 0x00, STI, HLT }; if ((vmf.vmf_trapno & PAGE_MASK) <= 0xff) { /*interrupt call requested */ intcall[2] = (u_char)(vmf.vmf_trapno & 0xff); memcpy((void *)addr[0], (void *)intcall, sizeof(intcall)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vmf.vmf_ip = addr[0]; vmf.vmf_cs = 0; } vmf.vmf_sp = addr[1] - 2; /* keep aligned */ vmf.kernel_es = vmf.kernel_ds = 0; vmf.vmf_ss = 0; vmf.vmf_eflags = PSL_VIF | PSL_VM | PSL_USER; vm86_initflags(&vmf); } Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809261010.TAA20805>