Skip to content

A Couple of minor DASD related changes #860

Description

@SE20225

Is there any plan or wish for providing support for the Extended Addressing Volumes
'EAV' in Hercules? Not that I have any demanding use for them but more for my
self-education. As long as you do not fill them with used tracks, I expect that
the compression mechanism will work OK as long as the max file size is not
exceeded. I am using DASDINIT64.

While trying to make minor changes to allow much higher cylinder numbers for 3390
I found one defect and one rather minor/cosmetic mishap.

  1. I found that Hercules does not fully validate that the begin and end extent
    CCHH values specigied for the DX (0X63 CCW opcode) are not fully validated.
    I could specigy a head number greater than the actual number of heads in a track
    and most likely also a too high cylinder number. The documentation clearly
    specifies that the data should be valid track addresses for the device used.

The change is very simple:
In CKDDASD.C the DefineExtent routine:
After the ckdxbcyl to ckdxehead variables are filled, add the following:

/* Verify that the extent is described via VALID DASD track addresses */
if (bcyl  >= dev->ckdcyls   ||
    ecyl  >= dev->ckdcyls   ||
    bhead >= dev->ckdheads  ||
    ehead >= dev->ckdheads )
{
    ckd_build_sense(dev, SENSE_CR, 0, 0, FORMAT_0, MESSAGE_4);
    *unitstat = CSW_CE | CSW_DE | CSW_UC;
    return false;
}
  1. The response to the RDC (0x64) CCW will indicate the presence of alternate
    tracks when the underlying DASDINITed volume was created with alternate tracks
    also when it is attached via a 2105 or 2107 CU. These 'emulated' volumes
    never have alternate tracks.

In DASDTAB.C the CKD the dasd_build_ckd_devchar routine
Modify the statements that indicate alternate tracks to:

    /* Emulated 3390 volumes do not have alternate tracks                    */
//    if (altcyls > 0)
    if (altcyls > 0 &&
       !(cu->devt == 0x2105 || cu->devt == 0x2107)
    )
    {
        store_hw(devchar+28, cyls - altcyls);   // Alternate cylinder & tracks
        store_hw(devchar+30, altcyls * ckd->heads);
    }

Anders Edlund andersedlund@telia.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions