[comp.os.minix] Expanded memory for PC Minix

Peter_Van_Epp@cc.sfu.ca (08/02/89)

 wsincc@EUTRC3.URC.TUE.NL  writes:
 >Would it be possible to insert one or the other memory extention
 >card in to the computer to increase the amount of available
 >memory for Minix, or is such a thing only for 80286 and larger?
 >If possible which crad are best supported by Minix?
 >Thank in advance for any response. Met vriendelijke groeten,
 >Wim van Dorst (wsincc@tuerc3.urc.tue.nl)
 
 It is certainly possible, there is a PC EMS board driver for the
 Intel above-board availible in the archive at Bugs.nosc.mil and
 also at listserv@ndsuvm1 on Bitnet. The following cdif modifies
 that driver to work with the Zucker board EMS board (which is 
 availible cheap from mail order houses in the states). All that
 is needed  on a PC (assuming minix 1.3d anyway) is to 
 replace the current em_xfer.s in klib88.s (for extended memory)
 with the one from the archive and create a root file system bigger
 than 240 blocks (which the 1.3c kernel will happily put in 
 expanded storage). With a few more mods to the MM (which I haven't
 yet done for 1.3c) you can arrange to only load the first 360
 blocks of a 2 meg root file system from a floppy (or a hard disk
 partition) and have 2 megs of /tmp space.
 
 
 
*** em_xfer.org Tue Aug  1 01:18:37 1989
--- em_xfer.s   Tue Aug  1 02:08:27 1989
***************
*** 4,10 ****
  |===========================================================================
  |
  |              (Changed from extended memory,    1988-May-1  efth)
! |
  |
  |  status = em_xfer( source, destination, count );
  |
--- 4,10 ----
  |===========================================================================
  |
  |              (Changed from extended memory,    1988-May-1  efth)
! |              (modified for Zucker Board EMS    1988-sept-20 pve) 
  |
  |  status = em_xfer( source, destination, count );
  |
***************
*** 25,43 ****
  |  boundary.
  |
  |  Note "EXP_PORT" must be changed to match the strapping on your expanded
! |  memory card. "MAP_PAGE" and the "MAP_DATA" table must be set for either
! |  0xc000 or 0xd000.
 
 
  EXP_PORT  = 0x0258            |  First i/o port to control expanded memory
  NEXT_PORT = 0x4000            |  Offset to higher ports
 
! MAP_PAGE  = 0xc000            |  Where the expanded memory appears
  NEXT_PAGE = 0x0400            |  Pages are 16K
 
  MAP_DATA:                     |  Tells mem. card where to map in pages
!       .byte   0x80            |  Change to 0x80,0,0x80,0 for
!       .byte   0               |          MAP_PAGE = 0xd000
        .byte   0
        .byte   0
 
--- 25,43 ----
  |  boundary.
  |
  |  Note "EXP_PORT" must be changed to match the strapping on your expanded
! |  memory card. They are set here for a Zucker board as the first (only!)
! |  EMS board in the system.
 
 
  EXP_PORT  = 0x0258            |  First i/o port to control expanded memory
  NEXT_PORT = 0x4000            |  Offset to higher ports
 
! MAP_PAGE  = 0xd000            |  Where the expanded memory appears
  NEXT_PAGE = 0x0400            |  Pages are 16K
 
  MAP_DATA:                     |  Tells mem. card where to map in pages
!       .byte   0               |  ( 0xd000 in this case which is the only
!       .byte   0               |    place I know how to do it!)
        .byte   0
        .byte   0
 
***************
*** 56,68 ****
        pushf                   |  Save DF flag
        cld                     |  Auto increment (DF = 0)
 
 
  |  Load the 4 bit mapping data into the expanded memory card, so
  |  that it knows which set of addresses to use to map in the pages.
 
        mov     si,#MAP_DATA
        mov     cx,#4
!       mov     dx,#EXP_PORT+1  |  i/o addrs of map registers
 
  set_up:
        lodb                    |  Load from MAP_DATA vector
--- 56,79 ----
        pushf                   |  Save DF flag
        cld                     |  Auto increment (DF = 0)
 
+         mov     dx,#EXP_PORT+1  |  Zucker board initialization 
+         movb    al,*1 
+         outb 
+         movb    al,*0x81 
+         outb 
+         mov     dx,#EXP_PORT
+         movb    al,*0x80
+         outb
+         movb    al,*0 
+         outb 
+ 
 
  |  Load the 4 bit mapping data into the expanded memory card, so
  |  that it knows which set of addresses to use to map in the pages.
 
        mov     si,#MAP_DATA
        mov     cx,#4
!       mov     dx,#EXP_PORT    |  i/o addrs of map registers
 
  set_up:
        lodb                    |  Load from MAP_DATA vector