Commit f196f6a8 authored by Cornelia Huck's avatar Cornelia Huck
Browse files

Merge tag 's390-ccw-bios-2020-07-02' into s390-next-staging



* Source code clean-ups from Janosch

# gpg: Signature made Thu 02 Jul 2020 11:56:01 AM CEST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]

* tag 's390-ccw-bios-2020-07-02':
  pc-bios/s390: Update s390-ccw bios binaries with the latest changes
  pc-bios/s390-ccw: Generate and include dependency files in the Makefile
  pc-bios: s390x: Make u32 ptr check explicit
  pc-bios: s390x: Use ebcdic2ascii table
  pc-bios: s390x: Move panic() into header and add infinite loop
  pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR
  pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64
  pc-bios: s390x: Get rid of magic offsets into the lowcore
  pc-bios: s390x: Move sleep and yield to helper.h
  pc-bios: s390x: Consolidate timing functions into time.h
  pc-bios: s390x: cio.c cleanup and compile fix

Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parents 45175361 b71db6b9
Loading
Loading
Loading
Loading
(41.6 KiB)

File changed.

No diff preview for this file type.

+3 −0
Original line number Diff line number Diff line
@@ -38,5 +38,8 @@ s390-netboot.img:
	@echo "s390-netboot.img not built since roms/SLOF/ is not available."
endif

ALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS))
-include $(ALL_OBJS:%.o=%.d)

clean:
	rm -f *.o *.d *.img *.elf *~ *.a
+1 −3
Original line number Diff line number Diff line
@@ -328,9 +328,7 @@ static void print_eckd_ldl_msg(ECKD_IPL_mode_t mode)
        msg[0] = '2';
        break;
    default:
        msg[0] = vlbl->LDL_version;
        msg[0] &= 0x0f; /* convert EBCDIC   */
        msg[0] |= 0x30; /* to ASCII (digit) */
        msg[0] = ebc2asc[vlbl->LDL_version];
        msg[1] = '?';
        break;
    }
+22 −18
Original line number Diff line number Diff line
@@ -49,13 +49,13 @@ void enable_subchannel(SubChannelId schid)

uint16_t cu_type(SubChannelId schid)
{
    Ccw1 sense_id_ccw;
    SenseId sense_data;

    sense_id_ccw.cmd_code = CCW_CMD_SENSE_ID;
    sense_id_ccw.cda = ptr2u32(&sense_data);
    sense_id_ccw.count = sizeof(sense_data);
    sense_id_ccw.flags |= CCW_FLAG_SLI;
    Ccw1 sense_id_ccw = {
        .cmd_code = CCW_CMD_SENSE_ID,
        .flags = CCW_FLAG_SLI,
        .count = sizeof(sense_data),
        .cda = ptr2u32(&sense_data),
    };

    if (do_cio(schid, CU_TYPE_UNKNOWN, ptr2u32(&sense_id_ccw), CCW_FMT1)) {
        panic("Failed to run SenseID CCw\n");
@@ -67,13 +67,13 @@ uint16_t cu_type(SubChannelId schid)
int basic_sense(SubChannelId schid, uint16_t cutype, void *sense_data,
                 uint16_t data_size)
{
    Ccw1 senseCcw;
    Ccw1 senseCcw = {
        .cmd_code = CCW_CMD_BASIC_SENSE,
        .count = data_size,
        .cda = ptr2u32(sense_data),
    };
    Irb irb;

    senseCcw.cmd_code = CCW_CMD_BASIC_SENSE;
    senseCcw.cda = ptr2u32(sense_data);
    senseCcw.count = data_size;

    return __do_cio(schid, ptr2u32(&senseCcw), CCW_FMT1, &irb);
}

@@ -314,7 +314,17 @@ static void print_irb_err(Irb *irb)
 */
static int __do_cio(SubChannelId schid, uint32_t ccw_addr, int fmt, Irb *irb)
{
    CmdOrb orb = {};
    /*
     * QEMU's CIO implementation requires prefetch and 64-bit idaws. We
     * allow all paths.
     */
    CmdOrb orb = {
        .fmt = fmt,
        .pfch = 1,
        .c64 = 1,
        .lpm = 0xFF,
        .cpa = ccw_addr,
    };
    int rc;

    IPL_assert(fmt == 0 || fmt == 1, "Invalid ccw format");
@@ -324,12 +334,6 @@ static int __do_cio(SubChannelId schid, uint32_t ccw_addr, int fmt, Irb *irb)
        IPL_assert(ccw_addr <= 0xFFFFFF - 8, "Invalid ccw address");
    }

    orb.fmt = fmt;
    orb.pfch = 1;  /* QEMU's cio implementation requires prefetch */
    orb.c64 = 1;   /* QEMU's cio implementation requires 64-bit idaws */
    orb.lpm = 0xFF; /* All paths allowed */
    orb.cpa = ccw_addr;

    rc = ssch(schid, &orb);
    if (rc == 1 || rc == 2) {
        /* Subchannel status pending or busy. Eat status and ask for retry. */
+11 −6
Original line number Diff line number Diff line
@@ -122,12 +122,17 @@ typedef struct schib {
} __attribute__ ((packed, aligned(4))) Schib;

typedef struct subchannel_id {
        __u32 cssid:8;
        __u32:4;
        __u32 m:1;
        __u32 ssid:2;
        __u32 one:1;
        __u32 sch_no:16;
    union {
        struct {
            __u16 cssid:8;
            __u16 reserved:4;
            __u16 m:1;
            __u16 ssid:2;
            __u16 one:1;
        };
        __u16 sch_id;
    };
    __u16 sch_no;
} __attribute__ ((packed, aligned(4))) SubChannelId;

struct chsc_header {
Loading