mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Do not hardcode size of struct vm86frame.
Submitted by: Jonathan Lemon <jlemon@americantv.com>
This commit is contained in:
parent
3c001d7648
commit
fcfe0b7b48
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47022
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.65 1999/04/02 17:59:37 alc Exp $
|
||||
* $Id: genassym.c,v 1.66 1999/04/28 01:03:18 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -68,6 +68,9 @@
|
||||
#endif
|
||||
#include <machine/segments.h>
|
||||
#include <machine/globaldata.h>
|
||||
#ifdef VM86
|
||||
#include <machine/vm86.h>
|
||||
#endif
|
||||
|
||||
#define OS(s, m) ((u_int)offsetof(struct s, m))
|
||||
|
||||
@ -229,6 +232,9 @@ main()
|
||||
printf("#define\tKPSEL %#x\n", GSEL(GPRIV_SEL, SEL_KPL));
|
||||
#endif
|
||||
printf("#define\tGPROC0_SEL %#x\n", GPROC0_SEL);
|
||||
#ifdef VM86
|
||||
printf("#define\tVM86_FRAMESIZE %#x\n", sizeof(struct vm86frame) / 4);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
|
||||
* $Id: genassym.c,v 1.65 1999/04/02 17:59:37 alc Exp $
|
||||
* $Id: genassym.c,v 1.66 1999/04/28 01:03:18 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -68,6 +68,9 @@
|
||||
#endif
|
||||
#include <machine/segments.h>
|
||||
#include <machine/globaldata.h>
|
||||
#ifdef VM86
|
||||
#include <machine/vm86.h>
|
||||
#endif
|
||||
|
||||
#define OS(s, m) ((u_int)offsetof(struct s, m))
|
||||
|
||||
@ -229,6 +232,9 @@ main()
|
||||
printf("#define\tKPSEL %#x\n", GSEL(GPRIV_SEL, SEL_KPL));
|
||||
#endif
|
||||
printf("#define\tGPROC0_SEL %#x\n", GPROC0_SEL);
|
||||
#ifdef VM86
|
||||
printf("#define\tVM86_FRAMESIZE %#x\n", sizeof(struct vm86frame) / 4);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: vm86bios.s,v 1.9 1999/04/28 01:03:28 luoqi Exp $
|
||||
* $Id: vm86bios.s,v 1.10 1999/05/11 15:57:42 luoqi Exp $
|
||||
*/
|
||||
|
||||
#include "opt_vm86.h"
|
||||
@ -89,7 +89,7 @@ ENTRY(vm86_bioscall)
|
||||
movl SCR_VMFRAME(%edx),%ebx /* target frame location */
|
||||
movl %ebx,%edi /* destination */
|
||||
movl SCR_ARGFRAME(%edx),%esi /* source (set on entry) */
|
||||
movl $22,%ecx /* sizeof(struct vm86frame)/4 */
|
||||
movl $VM86_FRAMESIZE,%ecx /* sizeof(struct vm86frame)/4 */
|
||||
cld
|
||||
rep
|
||||
movsl /* copy frame to new stack */
|
||||
@ -162,7 +162,7 @@ ENTRY(vm86_biosret)
|
||||
|
||||
movl 4(%esp),%esi /* source */
|
||||
movl SCR_ARGFRAME(%edx),%edi /* destination */
|
||||
movl $22,%ecx /* size */
|
||||
movl $VM86_FRAMESIZE,%ecx /* size */
|
||||
cld
|
||||
rep
|
||||
movsl /* copy frame to original frame */
|
||||
|
Loading…
Reference in New Issue
Block a user