Last active
February 11, 2019 21:52
-
-
Save bluecmd/2762655d3486b8160fe7210bf063466b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SERVC WRITE_EVENT, event is c | |
| SERVC HWL FOUND | |
| SERVC PTT passed | |
| sclp_hwl_request: | |
| - length: 0x3800 | |
| - flag: 0x0 | |
| - resv1: 0x0 0x0 | |
| - type: 0x0 | |
| - reas: 0x0 | |
| - resp: 0x0 | |
| -| event data header: | |
| - totlen: 0x3000 | |
| - type: 0xc | |
| - flag: 0x0 | |
| - resv: 0x0 | |
| -| hardware load request: | |
| - type: 0x2 | |
| - file: 0x3 | |
| - resv1: 0x0 0x0 | |
| - hwl: 0x40e37f | |
| - resv2: 0x0 | |
| - asa: 0x1 | |
| - resv3: 0x0 | |
| - sto: 0x0 | |
| - resv4: 0x0 0x0 0x0 | |
| - size: 0 | |
| HHCHL005I Hardware loader file type 3 IS supported | |
| SERVC WRITE_EVENT, event is c | |
| SERVC HWL FOUND | |
| SERVC PTT passed | |
| sclp_hwl_request: | |
| - length: 0x3800 | |
| - flag: 0x0 | |
| - resv1: 0x0 0x0 | |
| - type: 0x0 | |
| - reas: 0x0 | |
| - resp: 0x0 | |
| -| event data header: | |
| - totlen: 0x3000 | |
| - type: 0xc | |
| - flag: 0x0 | |
| - resv: 0x0 | |
| -| hardware load request: | |
| - type: 0x0 | |
| - file: 0x3 | |
| - resv1: 0x0 0x0 | |
| - hwl: 0x40e37f | |
| - resv2: 0x0 | |
| - asa: 0x1 | |
| - resv3: 0x0 | |
| - sto: 0x7c0b0eb00000000 | |
| - resv4: 0xe0030000 0x20f280 0x0 | |
| - size: 1000000 | |
| HHCHL004I Loading /usr/local/share/hercules/scsiboot | |
| TRACE 1 | |
| TRACE 5: sto = ebb0c000, mainsize = 0 | |
| TRACE 6 | |
| TRACE pto: 24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*-------------------------------------------------------------------*/ | |
| /* Funtion to load file to main storage */ | |
| /*-------------------------------------------------------------------*/ | |
| static void s390_hwl_loadfile ( SCCB_HWL_BK* hwl_bk ); // (fwd ref) | |
| static void ARCH_DEP(hwl_loadfile)(SCCB_HWL_BK *hwl_bk) | |
| { | |
| CREG sto; | |
| U32 size; | |
| int fd; | |
| fd = open (hwl_fn[hwl_bk->file], O_RDONLY|O_BINARY); | |
| if (fd < 0) | |
| { | |
| LOGMSG( "HHCHL002I %s open error: %s\n", | |
| hwl_fn[hwl_bk->file], strerror( errno )); | |
| return; | |
| } | |
| else | |
| LOGMSG( "HHCHL004I Loading %s\n", hwl_fn[ hwl_bk->file ]); | |
| FETCH_FW(size,hwl_bk->size); | |
| /* Segment Table Origin */ | |
| FETCH_DW(sto,hwl_bk->sto); | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| sto &= ASCE_TO; | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| sto &= STD_STO; | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| LOGMSG("TRACE 1\n"); | |
| for( ; ; sto += sizeof(sto)) | |
| { | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| DBLWRD *ste; | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| FWORD *ste; | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| CREG pto, pti; | |
| LOGMSG("TRACE 5: sto = %x, mainsize = %x\n", sto, sysblk.mainsize); | |
| /* Fetch segment table entry and calculate Page Table Origin */ | |
| if( sto >= sysblk.mainsize) | |
| goto eof; | |
| LOGMSG("TRACE 6\n"); | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| ste = (DBLWRD*)(sysblk.mainstor + sto); | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| ste = (FWORD*)(sysblk.mainstor + sto); | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| FETCH_W(pto, ste); | |
| LOGMSG("TRACE pto: %x\n", pto); | |
| if( pto & SEGTAB_INVALID ) | |
| goto eof; | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| pto &= ZSEGTAB_PTO; | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| pto &= SEGTAB_PTO; | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| LOGMSG("TRACE 10\n"); | |
| for(pti = 0; pti < 256 ; pti++, pto += sizeof(pto)) | |
| { | |
| LOGMSG("TRACE 100\n"); | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| DBLWRD *pte; | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| FWORD *pte; | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| CREG pgo; | |
| BYTE *page; | |
| /* Fetch Page Table Entry to get page origin */ | |
| if( pto >= sysblk.mainsize) | |
| goto eof; | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| pte = (DBLWRD*)(sysblk.mainstor + pto); | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| pte = (FWORD*)(sysblk.mainstor + pto); | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| FETCH_W(pgo, pte); | |
| if( pgo & PAGETAB_INVALID ) | |
| goto eof; | |
| #if defined(FEATURE_001_ZARCH_INSTALLED_FACILITY) | |
| pgo &= ZPGETAB_PFRA; | |
| #else /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| pgo &= PAGETAB_PFRA; | |
| #endif /*!defined(FEATURE_001_ZARCH_INSTALLED_FACILITY)*/ | |
| /* Read page into main storage */ | |
| if( pgo >= sysblk.mainsize) | |
| goto eof; | |
| page = sysblk.mainstor + pgo; | |
| if( !(size--) || !read(fd, page, STORAGE_KEY_PAGESIZE) ) | |
| goto eof; | |
| LOGMSG("STORAGE WROTE:\n"); | |
| { | |
| int a = 0; | |
| for (; a < STORAGE_KEY_PAGESIZE; a++ ) { | |
| LOGMSG(" %02x", page[a]); | |
| if (a % 16 == 15) { | |
| LOGMSG("\n"); | |
| } | |
| } | |
| LOGMSG("\n"); | |
| } | |
| STORAGE_KEY(pgo, &sysblk) |= (STORKEY_REF|STORKEY_CHANGE); | |
| } | |
| } | |
| eof: | |
| close(fd); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment