www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/06/23/14:13:45

From: Alvin Starr <alvin AT uunet DOT ca>
To: dj AT ctron DOT com
Subject: my changes to go32 for DV/X
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Tue, 23 Jun 1992 12:51:34 -0400

Just thought that I would send you the diffs that you should apply to 
paging.c to get it to work with go32. 
Note the comment before page_in_everything I have not touched this
code but it need fixin.

good luck

P.S. Do you have much experiance with DESQview?

alvin AT eyepoint DOT on DOT ca	phone (416)513-6717

===================================================================
RCS file: /homes/d0/cvsroots/go32/go32/paging.c,v
retrieving revision 1.4
diff -r1.4 paging.c
100a101
> word32 far *gpd = 0;
101a103
> word32 far *sys_pt;
123c125
<   client.page_table   = (word32)dir>>12;
---
>   client.page_table   = table[((word32)dir)>>24]&~0xFFFL;
332c334,335
<   pt = (word32 far *)((long)valloc(VA_640) << 24);
---
>   gpd = (word32 far *)((long)valloc(VA_640) << 24);
>   sys_pt = pt = (word32 far *)((long)valloc(VA_640) << 24);
334c337
<     pd[i] = 0;
---
>     gpd[i] = pd[i] = 0;
351,352c354,357
<   pd[0] = ((word32)pt >> 12) | PT_P | PT_W | PT_I;	/* map 0-1M 1:1 */
<   pd[0x3c0] = ((word32)pt >> 12) | PT_P | PT_W | PT_I;	/* map also to 0xF0000000 */
---
>   pd[0] = (pt[(((unsigned long)pt) >> 24)]&~0xFFFL) | PT_P | PT_W | PT_I;	/* map 0-1M 1:1 */
>   gpd[0] = (unsigned long)pt;
>   pd[0x3c0] = ((word32)pt[(((word32)pt) >> 24)]&~0xFFFL) | PT_P | PT_W | PT_I;	/* map also to 0xF0000000 */
>   gpd[0x3c0] = (unsigned long)pt;
359,370c364,381
<   pd[0x380] = ((word32)graphics_pt >> 12) | PT_P | PT_W | PT_U;
< 
<   c_tss.tss_cr3 = (unsigned long)pd >> 12;
<   a_tss.tss_cr3 = (unsigned long)pd >> 12;
<   o_tss.tss_cr3 = (unsigned long)pd >> 12;
<   i_tss.tss_cr3 = (unsigned long)pd >> 12;
<   p_tss.tss_cr3 = (unsigned long)pd >> 12;
<   f_tss.tss_cr3 = (unsigned long)pd >> 12;
<   v74_tss.tss_cr3 = (unsigned long)pd >> 12;
<   v78_tss.tss_cr3 = (unsigned long)pd >> 12;
<   v79_tss.tss_cr3 = (unsigned long)pd >> 12;
< 
---
>   pd[0x380] = ((word32)pt[(((word32)graphics_pt) >> 24)]&~0xFFFL) | PT_P | PT_W | PT_U;
>   gpd[0x380] = (unsigned long)graphics_pt;
>   {
>       unsigned long lpd = (unsigned long)pt[((unsigned long)pd) >> 24]&~0xFFF;
>       c_tss.tss_cr3 = lpd;
> /*	these next 2 lines are special for tunis and will soon dissapear */
>       a_tss.tss_esp0= ptr2linear(pd);
>       a_tss.tss_esp1= ptr2linear(gpd);
> /* note above */
>       a_tss.tss_cr3 = lpd;
>       o_tss.tss_cr3 = lpd;
>       i_tss.tss_cr3 = lpd;
>       p_tss.tss_cr3 = lpd;
>       f_tss.tss_cr3 = lpd;
>       v74_tss.tss_cr3 = lpd;
>       v78_tss.tss_cr3 = lpd;
>       v79_tss.tss_cr3 = lpd;
>   }
468a480
>     /*
469a482,484
>     */
>     pd[pdi] = ((word32)sys_pt[pn]&~0xFFFL) | PT_P | PT_W | PT_U;
>     gpd[pdi] = (unsigned long)pt;
474c489
<     pt = (word32 far *)((pd[pdi]&~0xFFF) << 12);
---
>     pt = (word32 far *)(gpd[pdi]);
582c597
<   pt = (word32 far *)((pd[last_po_pdi]&~0xFFF) << 12);
---
>   pt = (word32 far *)(gpd[last_po_pdi]);
621c636
<       pt = (word32 far *)((pd[last_po_pdi]&~0xFFF) << 12);
---
>       pt = (word32 far *)(gpd[last_po_pdi]);
631a647,650
> /* page in/out everyting does not work. although it should
>    be reasonably easy to fix by just keeping track of the pages
>    that are paged out/in and then paging them back in again
> */
637a657,662
>   if (vcpi_installed)
>   {
>     printf("cannot page out everything well\n");
>     xms_free();
>     exit(1);
>   }
643c668
<       fp = (void far *)((pd[pdi]&~0xFFF)<<12);
---
>       fp = (void far *)(pd[pdi]);
646c671
<       vfree(pd[pdi]>>12);
---
>       vfree(pd[pdi]>>24);
663a689,694
>   if (vcpi_installed)
>   {
>     printf("cannot page in everything well\n");
>     xms_free();
>     exit(1);
>   }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019