|
From: | Bharata B Rao |
Subject: | Re: [Qemu-devel] [PATCH v5] target-ppc: ppc64 target's virtio can be either endian |
Date: | Mon, 21 Apr 2014 09:46:59 +0530 |
+
+#if !defined(CONFIG_USER_ONLY)
+bool virtio_is_big_endian(void)
+{
+ PowerPCCPU *cp = POWERPC_CPU(first_cpu);
+ CPUPPCState *env = &cp->env;
+
+ /* NOTE: booke uses the same number for another unrelated spr.
+ */
+ if (strcmp(env->spr_cb[SPR_LPCR].name, "LPCR")) {
+ return TARGET_WORDS_BIGENDIAN;
+ } else {
+ return !(env->spr[SPR_LPCR] & LPCR_ILE);
+ }
+}
+#endif
[Prev in Thread] | Current Thread | [Next in Thread] |