Display successful memory claims with exact address and rounded-down
MiB location and rounded-up size in MiB.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Eric Snowberg <eric.snowberg@oracle.com>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Pavithra Prakash <pavrampu@in.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Carolyn Scherrer <cpscherr@us.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
*result = args.base;
if (args.base == IEEE1275_CELL_INVALID)
return -1;
+ grub_dprintf ("mmap", "CLAIMED: 0x%" PRIxGRUB_IEEE1275_CELL_T " (%"
+ PRIuGRUB_IEEE1275_CELL_T " MiB) size: %" PRIuGRUB_SIZE " MiB\n",
+ args.base, args.base >> 20, ALIGN_UP (size, 1 << 20) >> 20);
return 0;
}
#define GRUB_IEEE1275_CELL_SIZEOF 4
typedef grub_uint32_t grub_ieee1275_cell_t;
+#define PRIxGRUB_IEEE1275_CELL_T PRIxGRUB_UINT32_T
+#define PRIuGRUB_IEEE1275_CELL_T PRIuGRUB_UINT32_T
+
#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */
#define GRUB_IEEE1275_CELL_SIZEOF 8
typedef grub_uint64_t grub_ieee1275_cell_t;
+#define PRIxGRUB_IEEE1275_CELL_T PRIxGRUB_UINT64_T
+#define PRIuGRUB_IEEE1275_CELL_T PRIuGRUB_UINT64_T
+
/* Encoding of 'mode' argument to grub_ieee1275_map_physical() */
#define IEEE1275_MAP_WRITE 0x0001 /* Writable */
#define IEEE1275_MAP_READ 0x0002 /* Readable */