• Aucun résultat trouvé

Extended Memory Data Structures

Dans le document RT–11 System Internals Manual (Page 162-165)

Memory Mapping

3.6 Extended Memory Data Structures

A program in an extended memory environment communicates with the monitor through special data structures. For each region it defines, a program contains one region definition block to describe the size of the extended memory region. The monitor also maintains a set of internal data structures. The region control block, located in the Mapping Context Area (MCA) region in extended memory, describes a region. The monitor can maintain up to 24 region control blocks per job. For each

window it defines, a program also uses one window definition block to describe the virtual addresses encompassed by that window. The window control block, located in the MCA region, is the monitor’s internal description for a window. The monitor can maintain up to eight window control blocks for each job under single-mapped monitors. Under fully-mapped monitors, up to eight WCBs can be maintained for each supported address space for each job. Finally, the monitor allocates regions in extended memory based on its internal free memory list.

The following sections describe these data structures and show, where necessary, how to create them.

3.6.1 Region Definition Block

Aregion definition blockis a 6-word area in your program that contains information about a region you define in extended memory. The monitor uses the region definition block to communicate with your job when you issue a .CRRG or .ELRG programmed request. You must set up the region definition block in your program and define its symbolic offsets before you can create a region in extended memory. You must then place the region’s size in the region definition block. After you create the region, the monitor returns its identification and some status information to you through the region definition block. Each time your program needs to refer to this region, it uses the region identification. (Since the monitor creates the static region for you, you do not know its identification. You can always refer to the static region by using 0 as its identification.) Figure 3–19 and Table 3–7 show the structure of a region definition block.

Figure 3–19: Region Definition Block

R.GID 0

2 4 6 10 12 R.GSIZ

R.GSTS

R.GNAM

R.GBAS

Table 3–7: Region Definition Block (.RDBDF) Offset Symbol Modifier Contents

0 R.GID Monitor’s .CRRG

rou-tine A unique region identification. Use it

later to reference that region. The region identification is a pointer within the job’s impure area to the region control block. The identification for the static region in a virtual job is 0.

2 R.GSIZ .RDBBK macro or

user program The size of the region you need, in 3210-word units. When attaching a local region to an existing global region, specifying a zero value obtains the whole global region.

4 R.GSTS Monitor’s .CRRG

rou-tine The region status word.

6 R.GNAM .RDBBK macro Two-word global region name.

12 R.GBAS .RDBBK macro Global region base address.

3.6.1.1 Region Status Word (R.GSTS)

The region status word contains information on the status of local and global regions.

Table 3–8 shows the bits in the region status word and their meaning. Bits 0 through 3 are reserved for future use by Digital.

Table 3–8: Region Status Word (.RDBDF)

Bit Symbol Pattern Meaning When Set

15 RS.CRR 100000 The monitor created the region successfully. The .CRRG routine sets this bit; the .ELRG routine clears it.

14 RS.UNM 40000 One or more windows were unmapped as a result of eliminating the region. The .ELRG routine sets this bit when necessary.

13 RS.NAL 20000 Region was not previously allocated.

12 RS.NEW 10000 An attach request to a global region was made, and the global region was not found. The global region was created.

11 RS.GBL 4000 Create a local region within a global region. If global region is not found, returns error. (No error returned if RS.CGR is set.)

10 RS.CGR 2000 Create a local region within a global region. If a global region is not found, create a global region.

Table 3–8 (Cont.): Region Status Word (.RDBDF) Bit Symbol Pattern Meaning When Set

9 RS.AGE 1000 Enable automatic global elimination. Eliminates global region when last job using global region detaches; when count in GR.SHC of global region control block is zero.

RS.EGR need not be set.

8 RS.EGR 400 Eliminates global region. Global region area is returned to free memory list. Count in GR.SHC of global region control block must be zero.

7 RS.EXI 200 Eliminate global region when exiting or aborting from job.

6 RS.CAC 100 Enable cache-bypass.

5 RS.BAS 40 Explicitly assign base address for this global region.

4 RS.NSM 20 Explicitly assign the base address for this global region exclusive of system memory. System memory is defined as the I/O page and that memory below the address you derive from the value stored in RMON fixed offset 420,

$MEMSZ.

1 RS.DSP 2 Reserved.

0 RS.PVT 1 Reserved.

3.6.1.2 .RDBDF Macro

The .RDBDF macro defines symbols for the local and global region definition block.

It defines the symbolic offset names for the definition block and the names for the region status word bit patterns. In addition, the macro defines the length of the definition block by setting up the following symbol:

R.GLGH = 10.

The .RDBDF macro does not reserve space for the region definition block.

The format of the .RDBDF macro is as follows:

.RDBDF

Dans le document RT–11 System Internals Manual (Page 162-165)