#include "hw/qdev-properties.h"
#include "hw/qdev-properties-system.h"
#include "hw/sysbus.h"
+#include "qemu/error-report.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "hw/misc/sifive_u_otp.h"
if (blk_pread(s->blk, s->pa * SIFIVE_U_OTP_FUSE_WORD, &buf,
SIFIVE_U_OTP_FUSE_WORD) < 0) {
- qemu_log_mask(LOG_GUEST_ERROR,
- "read error index<%d>\n", s->pa);
+ error_report("read error index<%d>", s->pa);
return 0xff;
}
if (blk_pwrite(s->blk, s->pa * SIFIVE_U_OTP_FUSE_WORD,
&s->fuse[s->pa], SIFIVE_U_OTP_FUSE_WORD,
0) < 0) {
- qemu_log_mask(LOG_GUEST_ERROR,
- "write error index<%d>\n", s->pa);
+ error_report("write error index<%d>", s->pa);
}
}
serial_data = s->serial;
if (blk_pwrite(s->blk, index * SIFIVE_U_OTP_FUSE_WORD,
&serial_data, SIFIVE_U_OTP_FUSE_WORD, 0) < 0) {
- qemu_log_mask(LOG_GUEST_ERROR,
- "write error index<%d>\n", index);
+ error_report("write error index<%d>", index);
}
serial_data = ~(s->serial);
if (blk_pwrite(s->blk, (index + 1) * SIFIVE_U_OTP_FUSE_WORD,
&serial_data, SIFIVE_U_OTP_FUSE_WORD, 0) < 0) {
- qemu_log_mask(LOG_GUEST_ERROR,
- "write error index<%d>\n", index + 1);
+ error_report("write error index<%d>", index + 1);
}
}