[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCHv4 15/43] uk/arch: Add necessary header files for Arm64



Hi,

On 13/07/18 10:13, Wei Chen wrote:
+#ifndef __UKARCH_LCPU_H__
+#error Do not include this header directly
+#endif
+
+struct __regs {
+       /* Generic Purpose registers, from x0 ~ x29 */
+       unsigned long x[30];
+
+       /* Link Register (x30) */
+       unsigned long lr;
+
+       /* Exception Link Register */
+       unsigned long elr_el1;
+
+       /* Processor State Register */
+       unsigned long spsr_el1;
+
+       /* Exception Status Register */
+       unsigned long esr_el1;
+
+       /* Stack Pointer */
+       unsigned long sp;
+};
+
+#define isb()   __asm__ __volatile("isb" ::: "memory")

What is this intended for?

This is for instruction memory barrier.

Just to clarify, isb is not a memory barrier ;). It is an instruction synchronization barrier. Any instructions in program order after the isb will only be fetched from cache/memory once the instruction has completed. This is used to ensure the effect of modification such as TLB invalidation, system registers have been taken into account.

I am not aware of any equivalent on x86.

Cheers,

--
Julien Grall

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.