s390-ccw bios update
This pull request is not for master.
Hi Cornelia,
the following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab:
hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 21:16:10 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/s390-ccw-bios-2020-07-02
for you to fetch changes up to b71db6b9abb5af302c9669c133d78115c6437c45:
pc-bios/s390: Update s390-ccw bios binaries with the latest changes (2020-07-02 11:51:31 +0200)
----------------------------------------------------------------
* Source code clean-ups from Janosch
----------------------------------------------------------------
Janosch Frank (9):
pc-bios: s390x: cio.c cleanup and compile fix
pc-bios: s390x: Consolidate timing functions into time.h
pc-bios: s390x: Move sleep and yield to helper.h
pc-bios: s390x: Get rid of magic offsets into the lowcore
pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64
pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR
pc-bios: s390x: Move panic() into header and add infinite loop
pc-bios: s390x: Use ebcdic2ascii table
pc-bios: s390x: Make u32 ptr check explicitThomas Huth (2):
pc-bios/s390-ccw: Generate and include dependency files in the Makefile pc-bios/s390: Update s390-ccw bios binaries with the latest changes
pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes pc-bios/s390-ccw/Makefile | 3 +++ pc-bios/s390-ccw/bootmap.c | 4 +--- pc-bios/s390-ccw/cio.c | 40 ++++++++++++++++++++++------------------ pc-bios/s390-ccw/cio.h | 17 +++++++++++------ pc-bios/s390-ccw/helper.h | 19 ++++++++++++++++++- pc-bios/s390-ccw/jump2ipl.c | 10 ++++------ pc-bios/s390-ccw/main.c | 15 +++------------ pc-bios/s390-ccw/menu.c | 1 + pc-bios/s390-ccw/netboot.mak | 13 +++++++------ pc-bios/s390-ccw/netmain.c | 23 +++-------------------- pc-bios/s390-ccw/s390-arch.h | 4 +++- pc-bios/s390-ccw/s390-ccw.h | 27 +++++++-------------------- pc-bios/s390-ccw/s390-time.h | 23 +++++++++++++++++++++++ pc-bios/s390-ccw/start.S | 5 +++-- pc-bios/s390-ccw/virtio-net.c | 2 ++ pc-bios/s390-ccw/virtio-scsi.c | 2 ++ pc-bios/s390-ccw/virtio.c | 18 +++--------------- pc-bios/s390-netboot.img | Bin 67232 -> 67232 bytes 19 files changed, 116 insertions(+), 110 deletions(-) create mode 100644 pc-bios/s390-ccw/s390-time.h
[PULL SUBSYSTEM s390x 01/11] pc-bios: s390x: cio.c cleanup and compile fix
From: Janosch Frank <[email protected]>
Let's initialize the structs at the beginning to ease reading and also zeroing all other fields. This also makes the compiler stop complaining about sense_id_ccw.flags being ored into when it's not initialized.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/cio.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-)
pc-bios/s390-ccw/cio.c +22 -18
@@ -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. */
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 02/11] pc-bios: s390x: Consolidate timing functions into time.h
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
Let's consolidate timing related functions into one header.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/menu.c | 1 + pc-bios/s390-ccw/netmain.c | 15 +++------------ pc-bios/s390-ccw/s390-ccw.h | 8 ++++---- pc-bios/s390-ccw/s390-time.h | 23 +++++++++++++++++++++++ pc-bios/s390-ccw/virtio-net.c | 1 + pc-bios/s390-ccw/virtio-scsi.c | 1 + pc-bios/s390-ccw/virtio.c | 18 +++--------------- 7 files changed, 36 insertions(+), 31 deletions(-) create mode 100644 pc-bios/s390-ccw/s390-time.h
pc-bios/s390-ccw/menu.c +1 -0
@@ -12,6 +12,7 @@#include "libc.h" #include "s390-ccw.h" #include "sclp.h" +#include "s390-time.h" #define KEYCODE_NO_INP '\0'#define KEYCODE_ESCAPE '\033'
pc-bios/s390-ccw/netmain.c +3 -12
@@ -35,6 +35,7 @@#include "s390-ccw.h" #include "cio.h" #include "virtio.h" +#include "s390-time.h" #define DEFAULT_BOOT_RETRIES 10#define DEFAULT_TFTP_RETRIES 20
@@ -57,24 +58,14 @@ static SubChannelId net_schid = { .one = 1 };static uint8_t mac[6 ];static uint64_t dest_timer; -static uint64_t get_timer_ms (void ) -{ -uint64_t clk; - - asmvolatile (" stck %0 " : :"Q" (clk) :"memory" ); - -/* Bit 51 is incremented each microsecond */ -return (clk >> (63 -51 )) /1000 ; -} -void set_timer (int val) { - dest_timer =get_timer_ms () + val; + dest_timer =get_time_ms () + val; }int get_timer (void ) { -return dest_timer -get_timer_ms (); +return dest_timer -get_time_ms (); }int get_sec_ticks (void )
pc-bios/s390-ccw/s390-ccw.h +4 -4
@@ -74,8 +74,6 @@ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2,bool virtio_is_supported (SubChannelId schid);void virtio_blk_setup_device (SubChannelId schid);int virtio_read (ulong sector,void *load_addr); -u64 get_clock (void ); -ulong get_second (void );/* bootmap.c */ void zipl_load (void );
@@ -153,11 +151,13 @@ static inline void yield(void)#define MAX_SECTOR_SIZE 4096 +#include "s390-time.h" +static inline void sleep (unsigned int seconds) { -ulong target =get_second () + seconds; +ulong target =get_time_seconds () + seconds; -while (get_second () < target) { +while (get_time_seconds () < target) {yield (); } }
pc-bios/s390-ccw/s390-time.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef TIME_H +#define TIME_H + +static inline u64 get_clock (void ) +{ +u64 r; + + asmvolatile ("stck %0" :"=Q" (r) : :"cc" ); +return r; +} + +static inline u64 get_time_ms (void ) +{ +/* Bit 51 is incremented each microsecond */ +return (get_clock () >>12 ) /1000 ; +} + +static inline u64 get_time_seconds (void ) +{ +return get_time_ms () /1000 ; +} + +#endif
pc-bios/s390-ccw/virtio-net.c +1 -0
@@ -19,6 +19,7 @@#include <ethernet.h> #include "s390-ccw.h" #include "virtio.h" +#include "s390-time.h" #ifndef DEBUG_VIRTIO_NET #define DEBUG_VIRTIO_NET 0
pc-bios/s390-ccw/virtio-scsi.c +1 -0
@@ -14,6 +14,7 @@#include "virtio.h" #include "scsi.h" #include "virtio-scsi.h" +#include "s390-time.h" static ScsiDevice default_scsi_device;static VirtioScsiCmdReq req;
pc-bios/s390-ccw/virtio.c +3 -15
@@ -15,6 +15,7 @@#include "virtio-scsi.h" #include "bswap.h" #include "helper.h" +#include "s390-time.h" #define VRING_WAIT_REPLY_TIMEOUT 30
@@ -157,19 +158,6 @@ void vring_send_buf(VRing *vr, void *p, int len, int flags) } } -u64 get_clock (void ) -{ -u64 r; - - asmvolatile ("stck %0" :"=Q" (r) : :"cc" ); -return r; -} - -ulong get_second (void ) -{ -return (get_clock () >>12 ) /1000000 ; -} -int vr_poll (VRing *vr) {if (vr->used->idx == vr->used_idx) {
@@ -194,7 +182,7 @@ int vr_poll(VRing *vr)*/ int vring_wait_reply (void ) { -ulong target_second =get_second () + vdev.wait_reply_timeout; +ulong target_second =get_time_seconds () + vdev.wait_reply_timeout;/* Wait for any queue to be updated by the host */ do {
@@ -207,7 +195,7 @@ int vring_wait_reply(void)if (r) {return 0 ; } - }while (!vdev.wait_reply_timeout || (get_second () < target_second)); + }while (!vdev.wait_reply_timeout || (get_time_seconds () < target_second));return 1 ; }
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 08/11] pc-bios: s390x: Use ebcdic2ascii table
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
Why should we do conversion of a ebcdic value if we have a handy table where we could look up the ascii value instead?
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/bootmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
pc-bios/s390-ccw/bootmap.c +1 -3
@@ -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 ; }
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 07/11] pc-bios: s390x: Move panic() into header and add infinite loop
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
panic() was defined for the ccw and net bios, i.e. twice, so it's cleaner to rather put it into the header.
Also let's add an infinite loop into the assembly of disabled_wait() so the caller doesn't need to take care of it.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/main.c | 7 ------- pc-bios/s390-ccw/netmain.c | 8 -------- pc-bios/s390-ccw/s390-ccw.h | 9 +++++++-- pc-bios/s390-ccw/start.S | 5 +++-- 4 files changed, 10 insertions(+), 19 deletions(-)
pc-bios/s390-ccw/main.c +0 -7
@@ -46,13 +46,6 @@ void write_iplb_location(void) lowcore->ptr_iplb =ptr2u32 (&iplb); } -void panic (const char *string) -{ -sclp_print (string); -disabled_wait (); -while (1 ) { } -} -unsigned int get_loadparm_index (void ) {return atoui (loadparm_str);
pc-bios/s390-ccw/netmain.c +0 -8
@@ -439,14 +439,6 @@ static int net_try_direct_tftp_load(filename_ip_t *fn_ip)return rc; } -void panic (const char *string) -{ -sclp_print (string); -for (;;) { -disabled_wait (); - } -} -void write_subsystem_identification (void ) {SubChannelId *schid = (SubChannelId *)184 ;
pc-bios/s390-ccw/s390-ccw.h +7 -2
@@ -50,12 +50,11 @@ typedef unsigned long long __u64;#include "iplb.h" /* start.s */ -void disabled_wait (void ); +void disabled_wait (void ) __attribute__ ((__noreturn__));void consume_sclp_int (void );void consume_io_int (void );/* main.c */ -void panic (const char *string);void write_subsystem_identification (void );void write_iplb_location (void ); extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE)));
@@ -91,6 +90,12 @@ bool menu_is_enabled_enum(void);#define MAX_BOOT_ENTRIES 31 +static inline void panic (const char *string) +{ +sclp_print (string); +disabled_wait (); +} +static inline void fill_hex (char *out,unsigned char val) {const char hex[] ="0123456789abcdef" ;
pc-bios/s390-ccw/start.S +3 -2
@@ -47,8 +47,9 @@ memsetxc: */ .globl disabled_wait disabled_wait: - larl %r1,disabled_wait_psw - lpswe 0(%r1) + larl %r1,disabled_wait_psw + lpswe 0(%r1) +1: j 1b /*
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 03/11] pc-bios: s390x: Move sleep and yield to helper.h
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
They are definitely helper functions.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/helper.h | 17 +++++++++++++++++ pc-bios/s390-ccw/s390-ccw.h | 18 ------------------ pc-bios/s390-ccw/virtio-net.c | 1 + pc-bios/s390-ccw/virtio-scsi.c | 1 + 4 files changed, 19 insertions(+), 18 deletions(-)
pc-bios/s390-ccw/helper.h +17 -0
@@ -14,6 +14,7 @@#define S390_CCW_HELPER_H #include "s390-ccw.h" +#include "s390-time.h" /* Avoids compiler warnings when casting a pointer to a u32 */ static inline uint32_t ptr2u32 (void *ptr)
@@ -28,4 +29,20 @@ static inline void *u32toptr(uint32_t n) return (void *)(uint64_t)n; } +static inline void yield (void ) +{ + asmvolatile ("diag 0,0,0x44" + : : + :"memory" ,"cc" ); +} + +static inline void sleep (unsigned int seconds) +{ +ulong target =get_time_seconds () + seconds; + +while (get_time_seconds () < target) { +yield (); + } +} +#endif
pc-bios/s390-ccw/s390-ccw.h +0 -18
@@ -142,26 +142,8 @@ static inline void debug_print_addr(const char *desc, void *p)#define KVM_S390_VIRTIO_SET_STATUS 2#define KVM_S390_VIRTIO_CCW_NOTIFY 3 -static inline void yield (void ) -{ - asmvolatile ("diag 0,0,0x44" - : : - :"memory" ,"cc" ); -} -#define MAX_SECTOR_SIZE 4096 -#include "s390-time.h" - -static inline void sleep (unsigned int seconds) -{ -ulong target =get_time_seconds () + seconds; - -while (get_time_seconds () < target) { -yield (); - } -} -static inline void IPL_assert (bool term,const char *message) {if (!term) {
pc-bios/s390-ccw/virtio-net.c +1 -0
@@ -20,6 +20,7 @@#include "s390-ccw.h" #include "virtio.h" #include "s390-time.h" +#include "helper.h" #ifndef DEBUG_VIRTIO_NET #define DEBUG_VIRTIO_NET 0
pc-bios/s390-ccw/virtio-scsi.c +1 -0
@@ -15,6 +15,7 @@#include "scsi.h" #include "virtio-scsi.h" #include "s390-time.h" +#include "helper.h" static ScsiDevice default_scsi_device;static VirtioScsiCmdReq req;
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 05/11] pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
This constant enables 64 bit addressing, not the ESAME architecture, so it shouldn't be named ZMODE.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/s390-arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
pc-bios/s390-ccw/s390-arch.h +1 -1
@@ -29,7 +29,7 @@ _Static_assert(sizeof(struct PSWLegacy) == 8, "PSWLegacy size incorrect");#define PSW_MASK_WAIT 0x0002000000000000ULL#define PSW_MASK_EAMODE 0x0000000100000000ULL#define PSW_MASK_BAMODE 0x0000000080000000ULL -#define PSW_MASK_ZMODE (PSW_MASK_EAMODE | PSW_MASK_BAMODE) +#define PSW_MASK_64 (PSW_MASK_EAMODE | PSW_MASK_BAMODE)/* Low core mapping */ typedef struct LowCore {
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 11/11] pc-bios/s390: Update s390-ccw bios binaries with the latest changes
In reply to Thomas Huth... to make sure that the binaries match the current state of the sources.
--- pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes pc-bios/s390-netboot.img | Bin 67232 -> 67232 bytes 2 files changed, 0 insertions(+), 0 deletions(-)
pc-bios/s390-ccw.img binary +0 -0
pc-bios/s390-netboot.img binary +0 -0
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 09/11] pc-bios: s390x: Make u32 ptr check explicit
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
Let's make it a bit more clear that we check the full 64 bits to fit into the 32 we return.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
pc-bios/s390-ccw/helper.h +1 -1
@@ -19,7 +19,7 @@/* Avoids compiler warnings when casting a pointer to a u32 */ static inline uint32_t ptr2u32 (void *ptr) { -IPL_assert ((uint64_t )ptr <=0xffffffff ,"ptr2u32: ptr too large" ); +IPL_assert ((uint64_t )ptr <=0xffffffffull ,"ptr2u32: ptr too large" );return (uint32_t )(uint64_t )ptr; }
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 04/11] pc-bios: s390x: Get rid of magic offsets into the lowcore
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
If we have a lowcore struct that has members for offsets that we want to touch, why not use it?
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/cio.h | 17 +++++++++++------ pc-bios/s390-ccw/main.c | 8 +++----- 2 files changed, 14 insertions(+), 11 deletions(-)
pc-bios/s390-ccw/cio.h +11 -6
@@ -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 {
pc-bios/s390-ccw/main.c +3 -5
@@ -36,11 +36,9 @@ LowCore *lowcore; /* Yes, this *is* a pointer to address 0 */*/ void write_subsystem_identification (void ) { -SubChannelId *schid = (SubChannelId *)184 ; -uint32_t *zeroes = (uint32_t *)188 ; - - *schid = blk_schid; - *zeroes =0 ; + lowcore->subchannel_id = blk_schid.sch_id; + lowcore->subchannel_nr = blk_schid.sch_no; + lowcore->io_int_parm =0 ; }void write_iplb_location (void )
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 10/11] pc-bios/s390-ccw: Generate and include dependency files in the Makefile
In reply to Thomas HuthThe Makefile of the s390-ccw bios does not handle dependencies of the *.c files from the headers yet, so that you often have to run a "make clean" to get the build right when one of the headers has been changed. Let's make sure that we generate and include dependency files for all *.c files now to avoid this problem in the future.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/Makefile | 3 +++ pc-bios/s390-ccw/netboot.mak | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-)
pc-bios/s390-ccw/Makefile +3 -0
@@ -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
pc-bios/s390-ccw/netboot.mak +7 -6
@@ -1,8 +1,7 @@ SLOF_DIR := $(SRC_PATH)/roms/SLOF -NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o \ - libnet.a libc.a +NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include LIBNET_INC := -I$(SLOF_DIR)/lib/libnet
@@ -11,15 +10,16 @@ NETLDFLAGS := $(LDFLAGS) -Ttext=0x7800000 $(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC) -s390-netboot.elf: $(NETOBJS) - $(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $(NETOBJS),"BUILD","$(TARGET_DIR)$@") +s390-netboot.elf: $(NETOBJS) libnet.a libc.a + $(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@") s390-netboot.img: s390-netboot.elf $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") # libc files: -LIBC_CFLAGS := $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) +LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ + -MMD -MP -MT $@ -MF $(@:%.o=%.d) CTYPE_OBJS = isdigit.o isxdigit.o toupper.o %.o : $(SLOF_DIR)/lib/libc/ctype/%.c
@@ -52,7 +52,8 @@ libc.a: $(LIBCOBJS) LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \ dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o -LIBNETCFLAGS := $(QEMU_CFLAGS) $(CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC) +LIBNETCFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \ + -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d) %.o : $(SLOF_DIR)/lib/libnet/%.c $(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
Signature · 1 line
2.18.1
[PULL SUBSYSTEM s390x 06/11] pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR
In reply to Thomas HuthFrom: Janosch Frank <[email protected]>
Let's move some of the PSW mask defines into s390-arch.h and use them in jump2ipl.c. Also let's introduce a new constant for the address mask of 8 byte (short) PSWs.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/jump2ipl.c | 10 ++++------ pc-bios/s390-ccw/s390-arch.h | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-)
pc-bios/s390-ccw/jump2ipl.c +4 -6
@@ -8,12 +8,10 @@#include "libc.h" #include "s390-ccw.h" +#include "s390-arch.h" #define KERN_IMAGE_START 0x010000UL -#define PSW_MASK_64 0x0000000100000000ULL -#define PSW_MASK_32 0x0000000080000000ULL -#define PSW_MASK_SHORTPSW 0x0008000000000000ULL -#define RESET_PSW_MASK (PSW_MASK_SHORTPSW | PSW_MASK_32 | PSW_MASK_64) +#define RESET_PSW_MASK (PSW_MASK_SHORTPSW | PSW_MASK_64) typedef struct ResetInfo { uint64_t ipl_psw;
@@ -54,7 +52,7 @@ void jump_to_IPL_code(uint64_t address) current->ipl_psw = (uint64_t ) &jump_to_IPL_2; current->ipl_psw |=RESET_PSW_MASK ; - current->ipl_continue = address &0x7fffffff ; + current->ipl_continue = address &PSW_MASK_SHORT_ADDR ;debug_print_int ("set IPL addr to" , current->ipl_continue);
@@ -86,7 +84,7 @@ void jump_to_low_kernel(void)/* Trying to get PSW at zero address */ if (*((uint64_t *)0 ) &RESET_PSW_MASK ) { -jump_to_IPL_code ((*((uint64_t *)0 )) &0x7fffffff ); +jump_to_IPL_code ((*((uint64_t *)0 )) &PSW_MASK_SHORT_ADDR ); }/* No other option left, so use the Linux kernel start address */
pc-bios/s390-ccw/s390-arch.h +2 -0
@@ -26,9 +26,11 @@ _Static_assert(sizeof(struct PSWLegacy) == 8, "PSWLegacy size incorrect");/* s390 psw bit masks */ #define PSW_MASK_IOINT 0x0200000000000000ULL +#define PSW_MASK_SHORTPSW 0x0008000000000000ULL#define PSW_MASK_WAIT 0x0002000000000000ULL#define PSW_MASK_EAMODE 0x0000000100000000ULL#define PSW_MASK_BAMODE 0x0000000080000000ULL +#define PSW_MASK_SHORT_ADDR 0x000000007fffffffULL#define PSW_MASK_64 (PSW_MASK_EAMODE | PSW_MASK_BAMODE)/* Low core mapping */
Signature · 1 line
2.18.1
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Subject: [PULL SUBSYSTEM s390x 00/11] s390-ccw bios update
Type: series
Message-id: [email protected]
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
From https://github.com/patchew-project/qemu
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
0d1e389 pc-bios/s390: Update s390-ccw bios binaries with the latest changes b853d2a pc-bios/s390-ccw: Generate and include dependency files in the Makefile b23b6b1 pc-bios: s390x: Make u32 ptr check explicit
6b8c130 pc-bios: s390x: Use ebcdic2ascii table
e2168e6 pc-bios: s390x: Move panic() into header and add infinite loop 7a2400d pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR 267c418 pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64
6bd3e6c pc-bios: s390x: Get rid of magic offsets into the lowcore becd3ca pc-bios: s390x: Move sleep and yield to helper.h
061e9f3 pc-bios: s390x: Consolidate timing functions into time.h
7e56f4f pc-bios: s390x: cio.c cleanup and compile fix
=== OUTPUT BEGIN ===
1/11 Checking commit 7e56f4febf83 (pc-bios: s390x: cio.c cleanup and compile fix) 2/11 Checking commit 061e9f352a3e (pc-bios: s390x: Consolidate timing functions into time.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #97:
new file mode 100644
total: 0 errors, 1 warnings, 142 lines checked
Patch 2/11 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/11 Checking commit becd3ca7caaf (pc-bios: s390x: Move sleep and yield to helper.h) 4/11 Checking commit 6bd3e6c441a1 (pc-bios: s390x: Get rid of magic offsets into the lowcore)
ERROR: spaces required around that ':' (ctx:VxV)
#34: FILE: pc-bios/s390-ccw/cio.h:127:
+ __u16 cssid:8;
^ERROR: spaces required around that ':' (ctx:VxV)
#35: FILE: pc-bios/s390-ccw/cio.h:128:
+ __u16 reserved:4;
^ERROR: spaces required around that ':' (ctx:VxV)
#36: FILE: pc-bios/s390-ccw/cio.h:129:
+ __u16 m:1;
^ERROR: spaces required around that ':' (ctx:VxV)
#37: FILE: pc-bios/s390-ccw/cio.h:130:
+ __u16 ssid:2;
^ERROR: spaces required around that ':' (ctx:VxV)
#38: FILE: pc-bios/s390-ccw/cio.h:131:
+ __u16 one:1;
^total: 5 errors, 0 warnings, 37 lines checked
Patch 4/11 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/11 Checking commit 267c4180a374 (pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64)
6/11 Checking commit 7a2400dfa22b (pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR) 7/11 Checking commit e2168e661f8d (pc-bios: s390x: Move panic() into header and add infinite loop) 8/11 Checking commit 6b8c130e5b38 (pc-bios: s390x: Use ebcdic2ascii table)
9/11 Checking commit b23b6b118f04 (pc-bios: s390x: Make u32 ptr check explicit)
10/11 Checking commit b853d2adc612 (pc-bios/s390-ccw: Generate and include dependency files in the Makefile) 11/11 Checking commit 0d1e38904c99 (pc-bios/s390: Update s390-ccw bios binaries with the latest changes) === OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Subject: [PULL SUBSYSTEM s390x 00/11] s390-ccw bios update
Type: series
Message-id: [email protected]
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
08322ed pc-bios/s390: Update s390-ccw bios binaries with the latest changes fa1b24c pc-bios/s390-ccw: Generate and include dependency files in the Makefile 2a10b04 pc-bios: s390x: Make u32 ptr check explicit
eabfe81 pc-bios: s390x: Use ebcdic2ascii table
a1f5d42 pc-bios: s390x: Move panic() into header and add infinite loop 11e6639 pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR 698cf8e pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64
09abe4a pc-bios: s390x: Get rid of magic offsets into the lowcore 187e4da pc-bios: s390x: Move sleep and yield to helper.h
4b2ae23 pc-bios: s390x: Consolidate timing functions into time.h
bafe452 pc-bios: s390x: cio.c cleanup and compile fix
=== OUTPUT BEGIN ===
1/11 Checking commit bafe4528bda4 (pc-bios: s390x: cio.c cleanup and compile fix) 2/11 Checking commit 4b2ae23f4133 (pc-bios: s390x: Consolidate timing functions into time.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #97:
new file mode 100644
total: 0 errors, 1 warnings, 142 lines checked
Patch 2/11 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/11 Checking commit 187e4daaa561 (pc-bios: s390x: Move sleep and yield to helper.h) 4/11 Checking commit 09abe4ab2f1c (pc-bios: s390x: Get rid of magic offsets into the lowcore)
ERROR: spaces required around that ':' (ctx:VxV)
#34: FILE: pc-bios/s390-ccw/cio.h:127:
+ __u16 cssid:8;
^ERROR: spaces required around that ':' (ctx:VxV)
#35: FILE: pc-bios/s390-ccw/cio.h:128:
+ __u16 reserved:4;
^ERROR: spaces required around that ':' (ctx:VxV)
#36: FILE: pc-bios/s390-ccw/cio.h:129:
+ __u16 m:1;
^ERROR: spaces required around that ':' (ctx:VxV)
#37: FILE: pc-bios/s390-ccw/cio.h:130:
+ __u16 ssid:2;
^ERROR: spaces required around that ':' (ctx:VxV)
#38: FILE: pc-bios/s390-ccw/cio.h:131:
+ __u16 one:1;
^total: 5 errors, 0 warnings, 37 lines checked
Patch 4/11 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/11 Checking commit 698cf8e0b1f5 (pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64)
6/11 Checking commit 11e663982839 (pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR) 7/11 Checking commit a1f5d4280c22 (pc-bios: s390x: Move panic() into header and add infinite loop) 8/11 Checking commit eabfe8127b88 (pc-bios: s390x: Use ebcdic2ascii table)
9/11 Checking commit 2a10b04887c5 (pc-bios: s390x: Make u32 ptr check explicit)
10/11 Checking commit fa1b24ca40d3 (pc-bios/s390-ccw: Generate and include dependency files in the Makefile) 11/11 Checking commit 08322ed01c42 (pc-bios/s390: Update s390-ccw bios binaries with the latest changes) === OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Subject: [PULL SUBSYSTEM s390x 00/11] s390-ccw bios update
Type: series
Message-id: [email protected]
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
* [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
f0b076c pc-bios/s390: Update s390-ccw bios binaries with the latest changes bf38303 pc-bios/s390-ccw: Generate and include dependency files in the Makefile 32d438d pc-bios: s390x: Make u32 ptr check explicit
d8c3200 pc-bios: s390x: Use ebcdic2ascii table
64f3f76 pc-bios: s390x: Move panic() into header and add infinite loop 8f3dc6b pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR 937ebff pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64
e8f864c pc-bios: s390x: Get rid of magic offsets into the lowcore 9638d54 pc-bios: s390x: Move sleep and yield to helper.h
4099f82 pc-bios: s390x: Consolidate timing functions into time.h
5e1d3fa pc-bios: s390x: cio.c cleanup and compile fix
=== OUTPUT BEGIN ===
1/11 Checking commit 5e1d3fafa103 (pc-bios: s390x: cio.c cleanup and compile fix) 2/11 Checking commit 4099f82dce51 (pc-bios: s390x: Consolidate timing functions into time.h)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #97:
new file mode 100644
total: 0 errors, 1 warnings, 142 lines checked
Patch 2/11 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/11 Checking commit 9638d54963df (pc-bios: s390x: Move sleep and yield to helper.h) 4/11 Checking commit e8f864c1883e (pc-bios: s390x: Get rid of magic offsets into the lowcore)
ERROR: spaces required around that ':' (ctx:VxV)
#34: FILE: pc-bios/s390-ccw/cio.h:127:
+ __u16 cssid:8;
^ERROR: spaces required around that ':' (ctx:VxV)
#35: FILE: pc-bios/s390-ccw/cio.h:128:
+ __u16 reserved:4;
^ERROR: spaces required around that ':' (ctx:VxV)
#36: FILE: pc-bios/s390-ccw/cio.h:129:
+ __u16 m:1;
^ERROR: spaces required around that ':' (ctx:VxV)
#37: FILE: pc-bios/s390-ccw/cio.h:130:
+ __u16 ssid:2;
^ERROR: spaces required around that ':' (ctx:VxV)
#38: FILE: pc-bios/s390-ccw/cio.h:131:
+ __u16 one:1;
^total: 5 errors, 0 warnings, 37 lines checked
Patch 4/11 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
5/11 Checking commit 937ebffac0f6 (pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64)
6/11 Checking commit 8f3dc6be69ea (pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR) 7/11 Checking commit 64f3f7675d21 (pc-bios: s390x: Move panic() into header and add infinite loop) 8/11 Checking commit d8c320076ea9 (pc-bios: s390x: Use ebcdic2ascii table)
9/11 Checking commit 32d438db1ef6 (pc-bios: s390x: Make u32 ptr check explicit)
10/11 Checking commit bf3830330eb1 (pc-bios/s390-ccw: Generate and include dependency files in the Makefile) 11/11 Checking commit f0b076c09a1f (pc-bios/s390: Update s390-ccw bios binaries with the latest changes) === OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Quoted 48 lines · On Thu, 2 Jul 2020 13:50:34 +0200 Thomas Huth <[email protected]> wrote:
This pull request is not for master.
Hi Cornelia,
the following changes since commit
fc1bff958998910ec8d25db86cd2f53ff125f7ab:hw/misc/pca9552: Add missing
TypeInfo::class_sizefield (2020-06-29 21:16:10 +0100)are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/s390-ccw-bios-2020-07-02
for you to fetch changes up to
b71db6b9abb5af302c9669c133d78115c6437c45:pc-bios/s390: Update s390-ccw bios binaries with the latest changes (2020-07-02 11:51:31 +0200)
----------------------------------------------------------------
* Source code clean-ups from Janosch
----------------------------------------------------------------Janosch Frank (9):
pc-bios: s390x: cio.c cleanup and compile fix pc-bios: s390x: Consolidate timing functions into time.h pc-bios: s390x: Move sleep and yield to helper.h pc-bios: s390x: Get rid of magic offsets into the lowcore pc-bios: s390x: Rename PSW_MASK_ZMODE to PSW_MASK_64 pc-bios: s390x: Use PSW masks where possible and introduce PSW_MASK_SHORT_ADDR pc-bios: s390x: Move panic() into header and add infinite loop pc-bios: s390x: Use ebcdic2ascii table pc-bios: s390x: Make u32 ptr check explicitThomas Huth (2):
pc-bios/s390-ccw: Generate and include dependency files in theMakefilepc-bios/s390: Update s390-ccw bios binaries with the latest changespc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes pc-bios/s390-ccw/Makefile | 3 +++ pc-bios/s390-ccw/bootmap.c | 4 +--- pc-bios/s390-ccw/cio.c | 40 ++++++++++++++++++++++------------------ pc-bios/s390-ccw/cio.h | 17 +++++++++++------ pc-bios/s390-ccw/helper.h | 19 ++++++++++++++++++- pc-bios/s390-ccw/jump2ipl.c | 10 ++++------ pc-bios/s390-ccw/main.c | 15 +++------------ pc-bios/s390-ccw/menu.c | 1 + pc-bios/s390-ccw/netboot.mak | 13 +++++++------ pc-bios/s390-ccw/netmain.c | 23 +++-------------------- pc-bios/s390-ccw/s390-arch.h | 4 +++- pc-bios/s390-ccw/s390-ccw.h | 27 +++++++--------------------
Quoted 8 lines
pc-bios/s390-ccw/s390-time.h | 23 +++++++++++++++++++++++ pc-bios/s390-ccw/start.S | 5 +++-- pc-bios/s390-ccw/virtio-net.c | 2 ++ pc-bios/s390-ccw/virtio-scsi.c | 2 ++ pc-bios/s390-ccw/virtio.c | 18 +++--------------- pc-bios/s390-netboot.img | Bin 67232 -> 67232 bytes 19 files changed, 116 insertions(+), 110 deletions(-) create mode 100644 pc-bios/s390-ccw/s390-time.h
Thanks, pulled.