1 /* 2 * vim: filetype=c:tabstop=4:ai:expandtab 3 * SPDX-License-Identifier: ICU 4 * scspell-id: c48941bf-f62e-11ec-b993-80ee73e9b8e7 5 * 6 * --------------------------------------------------------------------------- 7 * 8 * Copyright (c) 2007-2013 Michael Mondy 9 * Copyright (c) 2012-2016 Harry Reed 10 * Copyright (c) 2013-2016 Charles Anthony 11 * Copyright (c) 2016 Michal Tomek 12 * Copyright (c) 2021-2022 The DPS8M Development Team 13 * 14 * All rights reserved. 15 * 16 * This software is made available under the terms of the ICU 17 * License, version 1.8.1 or later. For more details, see the 18 * LICENSE.md file at the top-level directory of this distribution. 19 * 20 * --------------------------------------------------------------------------- 21 */ 22 23 unsigned char PROM[1024]; 24 memset (PROM, 255, sizeof (PROM)); 25 sprintf ((char *) PROM, \ 26 "%11s%11u%6s%32s%1s%19s%3s%3s%3s%3s%8s%1s%26s%2s%20s%20s", 27 "DPS 8/EM ", // 0-10 CPU model ("XXXXXXXXXXX"/%11s) 28 #ifdef DPS8_SCP 29 0, 30 #else 31 cpu.switches.serno, // 11-21 CPU serial ("DDDDDDDDDDD"/%11d) 32 #endif 33 #ifdef VER_H_PROM_SHIP 34 VER_H_PROM_SHIP, // 22-27 CPU ship date ("YYMMDD"/%6s) 35 #else 36 "200101", // 22-27 CPU ship date ("YYMMDD"/%6s) 37 #endif /* VER_H_PROM_SHIP */ 38 "\377\377\377\377\377\377\377\377" 39 "\377\377\377\377\377\377\377\377" 40 "\377\377\377\377\377\377\377\377" 41 "\377\377\377\377\377\377\377\377", 42 // 28-59 (%32s) 43 "1", // 60 layout_version number ("N"/%1s) 44 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", 45 // 61-79 (%19s) 46 #ifdef VER_H_PROM_MAJOR_VER 47 VER_H_PROM_MAJOR_VER, // 80-82 major release number ("NNN"/%3s) 48 #else 49 "999", // 80-82 major release number ("NNN"/%3s) 50 #endif /* VER_H_PROM_MAJOR_VER */ 51 #ifdef VER_H_PROM_MINOR_VER 52 VER_H_PROM_MINOR_VER, // 83-85 minor release number ("NNN"/%3s) 53 #else 54 "999", // 83-85 minor release number ("NNN"/%3s) 55 #endif /* VER_H_PROM_MINOR_VER */ 56 #ifdef VER_H_PROM_PATCH_VER 57 VER_H_PROM_PATCH_VER, // 86-88 patch version number ("NNN"/%3s) 58 #else 59 "999", // 86-88 patch version number ("NNN"/%3s) 60 #endif /* VER_H_PROM_PATCH_VER */ 61 #ifdef VER_H_PROM_OTHER_VER 62 VER_H_PROM_OTHER_VER, // 89-91 iteration number ("NNN"/%3s) 63 #else 64 "999", // 89-91 iteration number ("NNN"/%3s) 65 #endif /* VER_H_PROM_OTHER_VER */ 66 "\377\377\377\377\377\377\377\377", 67 // 98-99 (%8s) 68 #ifdef VER_H_GIT_RELT 69 VER_H_GIT_RELT, // 100 rel type ("X"/%1s) 70 #else 71 "X", // 100 rel type ("X"/%1s) 72 #endif /* VER_H_GIT_RELT */ 73 #ifdef VER_H_PROM_VER_TEXT 74 VER_H_PROM_VER_TEXT, // 101-127 rel ("XXXXXXXXXXXXXXXXXXXXXXXXXX"/%26s) 75 #else 76 "Unknown ", // 101-127 ("XXXXXXXXXXXXXXXXXXXXXXXXXX"/%26s) 77 #endif /* VER_H_PROM_VER_TEXT */ 78 "\377\377", // 128-129 (%2s) 79 #ifdef BUILD_PROM_OSA_TEXT 80 BUILD_PROM_OSA_TEXT, // 130-149 build arch ("XXXXXXXXXXXXXXXXXXXX"/%20s) 81 #else 82 # ifdef VER_H_PROM_OSA_TEXT 83 VER_H_PROM_OSA_TEXT, // 130-149 build arch ("XXXXXXXXXXXXXXXXXXXX"/%20s) 84 # else 85 "Unknown ", // 130-149 build arch ("XXXXXXXXXXXXXXXXXXXX"/%20s) 86 # endif /* VER_H_PROM_OSA_TEXT */ 87 #endif /* BUILD_PROM_OSA_TEXT */ 88 #ifdef BUILD_PROM_OSV_TEXT 89 BUILD_PROM_OSV_TEXT // 150-169 build os ("XXXXXXXXXXXXXXXXXXXX"/%20s) 90 #else 91 # ifdef VER_H_PROM_OSV_TEXT 92 VER_H_PROM_OSV_TEXT // 150-169 build os ("XXXXXXXXXXXXXXXXXXXX"/%20s) 93 # else 94 "Unknown " // 150-169 build os ("XXXXXXXXXXXXXXXXXXXX"/%20s) 95 # endif /* VER_H_PROM_OSV_TEXT */ 96 #endif /* BUILD_PROM_OSV_TEXT */ 97 // 170 ------ sprintf adds trailing NULL ------ 98 ); 99 for (int iz = 0; iz < 1024; ++iz) { 100 if (PROM[iz] == 255) { 101 PROM[iz] = '\0'; 102 } 103 }