On 26.06.14 16:30, Jens Freimann wrote:
From: "Eugene (jno) Dvurechenski" <j...@linux.vnet.ibm.com>

Use the virtio device's configuration to figure out the disk geometry
and use a sector size based upon the layout.

Signed-off-by: Eugene (jno) Dvurechenski <j...@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jf...@linux.vnet.ibm.com>
---
  pc-bios/s390-ccw/bootmap.c  |  3 +-
  pc-bios/s390-ccw/s390-ccw.h |  2 +-
  pc-bios/s390-ccw/virtio.c   | 96 ++++++++++++++++++++++++++++++++++++++++++---
  pc-bios/s390-ccw/virtio.h   | 48 +++++++++++++++++++++++
  4 files changed, 142 insertions(+), 7 deletions(-)

diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index c216030..79db3c3 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -10,6 +10,7 @@
#include "s390-ccw.h"
  #include "bootmap.h"
+#include "virtio.h"
/* #define DEBUG_FALLBACK */ @@ -238,7 +239,7 @@ int zipl_load(void)
          goto fail;
      }
- ns_end = sec + SECTOR_SIZE;
+    ns_end = sec + virtio_get_block_size();
      for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns++) {
          prog_table_entry = (ScsiBlockPtr *)ns;
          if (!prog_table_entry->blockno) {
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index fe1dd22..a2bd042 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -130,6 +130,6 @@ static inline void yield(void)
                    : "memory", "cc");
  }
-#define SECTOR_SIZE 512
+#define SECTOR_SIZE 4096

Why keep the define at all?


Alex


Reply via email to