Copyright c Xerox Corporation 1979, 1980Inter-Office MemorandumToMesa UsersDateOctober 27, 1980FromJim Sandman, John WickLocationPalo AltoSubjectMesa 6.0 XMesa UpdateOrganizationSDD/SS/MesaXEROX Filed on: [Iris]Doc>XMesa60.bravo (and .press)This memo describes the changes in Mesa 6.0 runtime support which incorporate the facilities ofXMesa 5.0 into the standard system.Overview of Extended Memory SupportMesa now uses the extended memory of Alto II XMs as additional swapping space for code. Thismeans that code and data need not co-exist in the MDS, the primary 64K of memory. Mesa takesadvantage of any available extra space automatically; standard Alto programs do not need to bemodified to run. Support is provided for up to one million words of memory in blocks of 64Kwords. Because Mesa uses extended memory for code segments, it includes a page-level storage allocatorfor the additional banks. Client programs may request storage in the additional banks by usingextensions of the standard procedures in SegmentDefs. Mesa provides primitive mechanisms toread and write words in extended memory and to copy blocks of data between banks of memory,but gives no other assistance in accessing information in the extended memory. In particular,arbitrary use of LONG POINTERs is not supported on the Alto.Public InterfacesUnless otherwise stated, all of the facilities in this section are defined in SegmentDefs.Configuration InformationThe Mesa runtime system has an internal data structure that contains information about thehardware configuration of the machine on which it is running. Clients may obtain a copy of thisdata structure by calling GetMemoryConfig and should normally test for the existence ofextended memory by examining the useXM field. The extant banks of memory are indicated byMemoryConfig.banks, which is a bit mask (e.g., MemoryConfig.banks=140000B impliesthat banks zero and one exist). Note that this bit mask has been expanded to allow for up tosixteen banks; constants used to test against it must be changed. pX qp]g~ri cs]pX -s7Bp ]s]p-s7Bp Ys]t-s 7Bp Sup N#sF4 Gp@ F# At# >p P <Q ;AN 9A 7 4%: 2Y 1U(v p( /D .F ,_w pxp (=t $pNv p xX }pR 4, /vp vp4 v tvp xpv tvwvp 9F x1p =d Mesa 6.0 XMesa Update2BankIndex: TYPE = [0..17B];ControlStoreType: TYPE = {Ram0, RamandRom, Ram3k, unknown};MachineType: TYPE = {unknown0, AltoI, AltoII, AltoIIXM, . . . };MemoryConfig: TYPE = MACHINE DEPENDENT RECORD [ reserved: [0..37B], AltoType: MachineType, xmMicroCode: BOOLEAN, useXM: BOOLEAN, mdsBank: BankIndex, controlStore: ControlStoreType, banks: [0..177777B], mesaMicrocodeVersion: [0..177777B]];memConfig: PUBILC READONLY MemoryConfig;GetMemoryConfig: PROCEDURE RETURNS [MemoryConfig] = INLINE BEGIN RETURN[memConfig] END;The field memConfig.useXM is true if and only if the following conditions hold:1)the machine is an Alto II with XM modifications (AltoType = AltoIIXM),2)the Alto has more than one memory bank installed (banks ~= 100000B),3)the Alto has a 3K RAM, or it has a second ROM containing an appropriate version ofthe XMesa microcode.The microcode version field tells only the microcode version, not the Mesa release number. (Forexample, for Mesa 6.0, mesaMicrocodeVersion is 41; Mesa 5.0 version 39 microcode is alsosupported, although not all features are available.)Extended Memory ManagementThe facilities described in this section can be used regardless of the state of useXM.Segments in extended memory are created with the usual primitives in SegmentDefs. However,additional "default" parameter values for those procedures that expect a VM base page numberhave been provided. DefaultMDSBase requests allocation anywhere in the MDS.DefaultXMBase requests allocation anywhere in the extended memory banks but not in theMDS. DefaultBase0, DefaultBase1, DefaultBase2 and DefaultBase3 request allocationin particular banks. DefaultANYBase requests allocation anywhere in the extended memorybanks or the MDS. DefaultBase is equivalent to DefaultANYBase if the segment is a codesegment, otherwise, it is equivalent to DefaultMDSBase.The following procedures convert between segment handles and long pointers, and work forsegments anywhere in the 20-bit address space.LongVMtoSegment: PROCEDURE [a: LONG POINTER] RETURNS [SegmentHandle]; ftG bvwFvXwv ^wFvX% [ wFvX wvwvwv X2 wFvXwFvX V T S<wv Qwv O NF! L J& GwFv w DZvwvXw BvwF v w ?dp vp6 <1vpwpvp :n2vpwpvp 8 F7 3xp xp 2)vp 04 ,_xX )pPvp %Av p $K "s{v wp( v wpA %v pv pv pv p }v wp+  v pv px /p!v p @ 9. vwvXwvwvwFvXwvw >VhGMesa 6.0 XMesa Update3LongSegmentAddress: PROCEDURE [seg: SegmentHandle] RETURNS [LONG POINTER];LongVMtoDataSegment: PROCEDURE [a: LONG POINTER] RETURNS[DataSegmentHandle];LongDataSegmentAddress: PROCEDURE [seg: DataSegmentHandle]RETURNS [LONG POINTER];LongVMtoFileSegment: PROCEDURE [a: LONG POINTER] RETURNS[FileSegmentHandle];LongFileSegmentAddress: PROCEDURE [seg: FileSegmentHandle]RETURNS [LONG POINTER];The following definitions have been added to AltoDefs; they define parameters of the extendedmemory system.MaxVMPage: CARDINAL = 7777B;MaxMDSPage: CARDINAL = 377B;PagesPerMDS: CARDINAL = MaxMDSPage+1;The following procedures convert between page numbers and long pointers, and are analogous toAddressFromPage and PageFromAddress.LongAddressFromPage: PROCEDURE [page: AltoDefs.PageNumber]RETURNS [lp: LONG POINTER];PageFromLongAddress: PROCEDURE [lp: LONG POINTER]RETURNS [page: AltoDefs.PageNumber];The following procedures check the validity of long pointers and page numbers and raise theindicated errors.ValidateVMPage: PROCEDURE [page: UNSPECIFIED];InvalidVMPage: ERROR [page: UNSPECIFIED];ValidateLongPointer: PROCEDURE [a: LONG UNSPECIFIED];InvalidLongPointer: ERROR [lp: LONG UNSPECIFIED];The signal ImmovableSegmentInXM is raised when MakeImage (or CheckPoint) discovers asegment in the extended memory banks that cannot be swapped out. (See the section onrestrictions, below, for more information about image files).Long Pointer SupportThe facilities described in this section should be used only when useXM (see above) is TRUE.XCOPY is no longer implemented; clients should use InlineDefs.LongCOPY. It may only becalled when memConfig.xmMicrocode is TRUE. ftG bvwvXwvwvwvwFvw ^vwvXwvwvwFvXw](vw YvwvwvwvX2wvwF vw TvwvXwvwvwFvXwS#8 <E TIMESROMAN MATH  TIMESROMAN  HELVETICA TIMESROMAN LOGO HELVETICA  HELVETICA TIMESROMAN   TIMESROMANj/  XMesa60.bravo SDD - wickOctober 24, 1980 8:07 PM