Type ASSEMBLE
Source Lines : 1,120
Fixes Applied : 7
Most Recent Version : Thursday, December 7, 1978
Last Fix ID : [HRC073DK]
Module
DMKBLD
Function
TO CREATE AND INITIALIZE SEGMENT, PAGE, AND SWAP TABLES, AS A FUNCTION OF VIRTUAL CORE SIZE, AS PART OF THE PROCESS OF CREATING A USER'S VIRTUAL MACHINE.
Attributes
REENTRANT, PAGEABLE, CALLED VIA SVC
Operation
A) IF PAGE-SWAP SKIP SPECIFIED, GO TO STEP C B) ADJUST R5 WITH NEW TOTAL NUMBER OF PAGES TO BUILD PAGE AND SWAP TABLES FOR C) IF SKIP SEGTABLE PROCESS SPECIFIED, GO TO 1.7 D) IF THERE IS AN OLD VMSEG POINTER, TEST IF NUMBER OF ENTRIES IS THE SAME AS DESIRED IN THE NEW SEGTABLE. IF NOT THE SAME, OR IF NO OLD VMSEG, GO TO STEP 1 E) IF OLD SEGTABLE ENTRIES ARE TO BE SAVED, GO TO STEP 1.7 F) CALL BLDRL TO RELEASE ALL PAG-SWAP TABLES, BUT NOT OLD SEGTABLE, AND GO TO STEP 1.7 1. DMKFREE IS CALLED FOR 15 DOUBLE WORDS OF FREE STORAGE FOR THE SEGMENT TABLE. THE ADDRESS OBTAINED FROM DMKFREE IS ROUNDED (AS NEEDED) TO ALIGN THE SEGMENT TABLE ON A 64-BYTE 1.10 IF DATA IN OLD SEGTABLE IS NOT TO BE SAVED, GO TO 1.14 1.11 MOVE DATA FROM OLD SEGTABLE TO NEW 1.12 IF NEW SEGTABLE > OLD, GO TO STEP 1.15 1.13 SET R1,R2 FOR FRETS OF OLD PAG-SWP TABLES NOT MOVED AND FRET OLD SEGTABLE. GO TO STEP 1.2 1.14 SET R1,R2 FOR FRET OF ALL PAGE,SWAP,SEG TABLES. GO TO 1.2 1.15 SET R1,R2 FOR FRET OF OLD SEGTABLE ONLY 1.2 CALL BLDRL TO DO FRETS 1.3 STORE NEW VMSEG, VMSEGDSP 1.60 IF OLD SEGTABLE ENTRIES NOT SAVED, GO TO 1.62 1.61 COMPUTE START OF INVALID STE'S 1.62 INVALIDATE STE'S 1.70 IF VIRT=REAL GO TO STEP 2 1.71 IF SKIP PAG-SWP BUILD SPECIFIED, RETURN TO CALLER 1.72 ADJUST R6 FOR START OF SEGMENTS TO BUILD PAGE AND SWAP TABLES FOR 1.5 IF VM ASSIST IS AVAILABLE, ADDRESS OF SEGMENT TABLE IS PUT INTO MICBLOK. 2. THEN, DEPENDING UPON THE CORE SIZE, THE APPROPRIATE SIZE OF PAGE TABLE AND SWAP TABLE FOR A SEGMENT ARE COMPUTED AND OBTAINED FROM FREE STORAGE, AND THEN INITIALIZED TO THEIR DEFAULT VALUES. 2.1 IF PAGETONLY IS SPECIFIED, RETURN TO CALLER. 3. STEP 2 IS THEN REPEATED, AS NECESSARY, UNTIL SUFFICIENT PAGE TABLES AND SWAP TABLES HAVE BEEN OBTAINED AND SET UP TO HANDLE THE VIRTUAL MACHINE SIZE SPECIFIED. 4. BEFORE RETURNING TO THE CALLER; THE VMPSTAT FIELD IS CHECKED FOR VIRT=REAL OPTION. IF THIS USER DOES NOT HAVE VIRT=REAL PRIVILEGE, EXIT TO THE CALLER. OTHERWISE DETERMINE IF THE VIRT=REAL AREA CAN BE GIVEN TO THIS USER, A. CALCULATE THE SIZE OF VIRT=REAL AREA; A(DMKSLC-4096), IS THE SIZE IN BYTES OF THE AREA. B. VIRTUAL MACHINE SIZE MUST BE LESS THAN VIRT=REAL SIZE C. THE POINTER IN PSA WORD <AVMREAL> MUST BE ZERO (0) INDICATING THE VIRT=REAL AREA IS FREE AND NOT IN USE IF THE ABOVE CONDITIONS ARE MET, THE PAGE AND SEGMENT TABLE ENTRIES ARE CHANGED TO REFLECT THAT THE PAGES ARE IN REAL STORAGE. THE AVMREAL WORD IN PSA IS ALTERED TO POINT TO THIS USER'S VMBLOK. EXIT IS NOW MADE TO THE CALLER.
Calls to Other Routines
DMKFREE - TO OBTAIN FREE STORAGE FOR TABLES TO BE CREATED DMKERMSG - TO OUTPUT ERROR MESSAGES DMKBLDRL - TO RELEASE THE OLD SEGMENT TABLE