/***************************************************************************/ /** **/ /** HPE CONFIDENTIAL. This software is confidential proprietary software **/ /** licensed by Hewlett-Packard Enterprise Development, LP, and is not **/ /** authorized to be used, duplicated OR disclosed to anyone without the **/ /** prior written permission of HPE. **/ /** © 2023 Copyright Hewlett-Packard Enterprise Development, LP **/ /** **/ /** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential **/ /** proprietary software licensed by VMS Software, Inc., and is not **/ /** authorized to be used, duplicated or disclosed to anyone without **/ /** the prior written permission of VMS Software, Inc. **/ /** © 2023 Copyright VMS Software, Inc. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 9-Nov-2023 12:07:57 by OpenVMS SDL V3.7 */ /* Source: 25-JAN-2021 10:16:55 $1$DGA8345:[LIB_H.SRC]PXMLDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $PXMLDEF ***/ #ifndef __PXMLDEF_LOADED #define __PXMLDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /* */ /* PXML structures: Data needed to define localities on Integrity cell-based */ /* systems, the underlying uinformation for setting up RADs. */ /* The structures must be defined in "reverse" order because */ /* of the way they reference each other. */ /* */ /* PXML_MEMORY: One per memory fragment within each locality. Contains */ /* start and end address of the fragment. */ /* */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _pxml_memory { #pragma __nomember_alignment unsigned __int64 pxml$q_base; /* Physical base address of fragment */ unsigned __int64 pxml$q_end; /* Physical end address of fragment */ } PXML_MEMORY; /* */ /* PXML_LOCALITY: One per populated locality. Contains locality and RAD */ /* numbers, count of CPUs (both real and ghost) and memory */ /* fragments, bitmap of CPUs, plus the calculated average */ /* & best costs and spread/variance (across all localities */ /* that contain CPUs) for access to memory in this fragment. */ /* */ /* An array of memory fragments is appended to each */ /* locality structure (first fragment is built in to the */ /* structure). */ /* */ /* Note 1: The spread is not a true standard deviation: no */ /* square root is taken and a multiplier (32) is used to */ /* increase accuracy because all calculations are performed */ /* on unsigned 32-bit integer values. */ /* */ /* Note 2: The MEM_COUNT quadword must immediately precede */ /* the first MEM_FRAGMENTS quadword pair and must be quadword */ /* aligned. */ /* */ /* Note 3: "Real" CPUs are those that actually exist in the */ /* locality. "Ghost" CPUs are those considered part of a */ /* locality because its memory is interleaved (CLM or ILM) */ /* and the CPU exists in one of the contributing localities. */ /* */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _pxml_locality { #pragma __nomember_alignment unsigned int pxml$l_locality; /* The locality number */ unsigned int pxml$l_cost; /* Offset of this locality in the LOCALITIES_BY_COST array */ unsigned int pxml$l_rad; /* The RAD number */ unsigned int pxml$l_locality_length; /* Length of this structure (including all memory fragments) */ unsigned int pxml$l_average; /* Average cost to access memory in this locality */ unsigned int pxml$l_spread; /* Spread of costs to access memory in this locality */ unsigned int pxml$l_cpu_count; /* Count of actual CPUs in this locality */ unsigned int pxml$l_ghost_cpus; /* Count of CPUs considered as part of this non-CPU locality */ unsigned int pxml$l_rad_list_offset; /* Offset (from PXML base) to RAD preference array */ unsigned int pxml$l_fragment_offset; /* Offset (from PXML base) to optimized fragment list */ /* (Where holes are ignored unless there's an */ /* intervening fragment from another locality) */ /* Also used to count the number of fragments in optimized list */ int pxml$l_base_rads [2]; /* Best ILM or CLM RAD(s) to be used by this RAD */ #if defined(__VAXC) char pxml$t_fill_1[]; #else #define pxml$t_fill_1 pxml$t_cpu_bitmap #endif /* #if defined(__VAXC) */ unsigned __int64 pxml$t_cpu_bitmap [16]; /* Bitmap of all CPUs (actual & ghost) in this locality */ unsigned __int64 pxml$q_mem_total; /* Total memory in this locality */ /* Keep the next two lines together **** */ unsigned __int64 pxml$q_mem_count; /* Number of memory fragments in this locality */ PXML_MEMORY pxml$t_mem_fragments [1]; /* First memory fragment in this locality */ /* Keep the last two lines together **** */ } PXML_LOCALITY; /* */ /* PXML: The main structure containing pointers to the saved SLIT, */ /* SRAT, and LID array, various counts and internal pointers. */ /* One or more pages are allocated (in S2 space) for the */ /* structure, the saved SLIT, SRAT, and LID array, and all */ /* the additional bitmaps, arrays of pointers, the */ /* PXML_LOCALITY and their PXML_MEMORY substructures, */ /* and the PA-to-RAD conversion array. All the pointers in */ /* this structure point to locations following the structure. */ /* */ #define PXML$C_LENGTH 112 /* Length of base PXML structure */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _pxml { #pragma __nomember_alignment unsigned int pxml$l_slit_offset; /* Offset to saved SLIT */ unsigned int pxml$l_srat_offset; /* Offset to saved SRAT */ unsigned int pxml$l_lid_offset; /* Offset to LID array */ unsigned int pxml$l_locality_bitmap; /* Offset to bitmap of all populated localities */ unsigned int pxml$l_locality_cpumap; /* Offset to bitmap of localities that contain CPUs */ unsigned int pxml$l_locality_memmap; /* Offset to bitmap of localities that contain memory */ unsigned int pxml$l_localities_by_loc; /* Three offsets to arrays of offsets to PXML_LOCALITY structures */ unsigned int pxml$l_localities_by_cost; /* ... first ordered by locality, second by spread/cost, */ unsigned int pxml$l_localities_by_rad; /* ... third in best RAD order (localities with CPUs then increasing */ /* ... spread/cost for the remainder) */ unsigned int pxml$l_pa_rad_array; /* Offset to array of PA-to-RAD conversions */ unsigned int pxml$l_next_free; /* Offset to next free location in page(s) */ unsigned int pxml$l_pxml_length; /* Length of available area allocated (rounded up to a complete page) */ unsigned int pxml$l_slit_size; /* Size of saved SLIT */ unsigned int pxml$l_srat_size; /* Size of saved SRAT */ unsigned int pxml$l_lid_count; /* Number of entries in LID array (from HWRPB$IQ_NPROC) */ unsigned int pxml$l_localities; /* Total number of localities (from SLIT) */ unsigned int pxml$l_rads; /* Number of populated localities */ unsigned int pxml$l_cpus; /* Total number of CPUs */ unsigned int pxml$l_fragments; /* Total number of memory fragments */ unsigned int pxml$l_bitmap_length; /* Length of each of the three locality bitmaps */ unsigned int pxml$l_cpu_rad_shift; /* CPU-to-RAD shift value (or 0xFFFFFFFF) */ unsigned int pxml$l_pa_rad_entries; /* Eventual number of entries in the PA-to-RAD array */ unsigned int pxml$l_syimap_offset; /* Offset to the saved copy of the memory map */ unsigned int pxml$l_syimap_entries; /* Number of entries used in the memory map */ unsigned int pxml$l_syimap_allocated; /* Number of entries allocated for the memory map */ int pxml$l_base_rad; /* Best ILM or CLM RAD (first in cost list) */ int pxml$l_alt_base_rad; /* Second base RAD (if there is one) */ char pxml$t_fill_2 [4]; /* Ensure the base structure is an exact number of quadwords */ } PXML; /* All calculations of average and spread/deviation are done as 32-bit */ /* unsigned integers. Therefore, in order to improve the accuracy */ /* (or granularity) we apply a shift factor to the raw values. If set */ /* too low, we don't gain enough accuracy. If set too large, the squared */ /* sums will exceed a longword. Right now we're using 5 (i.e. multiply */ /* by 32). */ #define PXML$C_SPREAD_SHIFT 5 /* The initial space used to build the PXML and its substructures is */ /* allocated within the module that initializes it (in SYSBOOT or */ /* EXEC_INIT). Later it is copied to pages in "fair" memory for use */ /* by the running system. Right now we're allocating eight pages. */ #define PXML$C_PXML_SIZE 65536 /* If a RAD has little memory (less than or equal to PXML$C_MINIMUM_RAD_MEMORY) */ /* then it probably only has firmware-reserved space. If there's only one RAD */ /* with more than this amount of memory, consider the system to be all-ILM */ /* and don't set up RADs. PXML$C_MINIMUM_RAD_MEMORY is currently set at 256MB. */ #define PXML$C_MINIMUM_RAD_MEMORY 268435456 #ifdef __INITIAL_POINTER_SIZE #pragma __required_pointer_size __save /* Save current pointer size */ #pragma __required_pointer_size __long /* Pointers are 64-bit */ typedef PXML * PXML_PQ; /* Pointer to a PXML structure. */ typedef PXML_LOCALITY * PXML_LOCALITY_PQ; /* Pointer to a PXML_LOCALITY structure. */ typedef PXML_LOCALITY ** PXML_LOCALITY_PPQ; /* Pointer to a pointer to a PXML_LOCALITY structure. */ typedef PXML_MEMORY * PXML_MEMORY_PQ; /* Pointer to a PXML_MEMORY structure. */ #pragma __required_pointer_size __restore /* Return to previous pointer size */ #else typedef unsigned __int64 PXML_PQ; typedef unsigned __int64 PXML_LOCALITY_PQ; typedef unsigned __int64 PXML_LOCALITY_PPQ; typedef unsigned __int64 PXML_MEMORY_PQ; #endif /* __INITIAL_POINTER_SIZE */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __PXMLDEF_LOADED */