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

Re: [Xen-devel] [PATCH ARM v6 04/14] mini-os: headers for ARM



On Thu, 2014-07-17 at 09:14 +0100, Thomas Leonard wrote:
> On 16 July 2014 22:25, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> > Hi Thomas,
> >
> >
> > On 16/07/14 12:07, Thomas Leonard wrote:
> >>
> >> diff --git a/extras/mini-os/include/arm/os.h
> >> b/extras/mini-os/include/arm/os.h
> >> new file mode 100644
> >> index 0000000..6a1cc37
> >> --- /dev/null
> >> +++ b/extras/mini-os/include/arm/os.h
> >> @@ -0,0 +1,216 @@
> >> +#ifndef _OS_H_
> >> +#define _OS_H_
> >> +
> >> +#ifndef __ASSEMBLY__
> >> +
> >> +#include <mini-os/hypervisor.h>
> >> +#include <mini-os/types.h>
> >> +#include <mini-os/compiler.h>
> >> +#include <mini-os/kernel.h>
> >> +#include <xen/xen.h>
> >> +
> >> +void arch_fini(void);
> >> +void timer_handler(evtchn_port_t port, struct pt_regs *regs, void *ign);
> >> +
> >> +extern void *device_tree;
> >> +
> >> +#define BUG() while(1){asm volatile (".word 0xe7f000f0\n");} /* Undefined
> >> instruction; will call our fault handler. */
> >
> >
> > NIT: I would explain that ARM doesn't provide any undefined instruction so
> > we use an encoding that is invalid on ARMv7.
> 
> I think it does, although I can't find it in the ARMv7 reference at
> the moment.

In the past I've looked pretty hard for this and been completely unable
to find it. It's interesting that they document it in the assembler
reference.

Prompted by this I took another look and there it is, A8.8.247 defines
"UDF" as a permanently undefined encoding.

>  But from
> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/CIHJIJCA.html
> :
> 
> "UND pseudo-instruction

Thanks for the tip, this is the same encoding as the ARM ARM calls UDF,
helpfully with a different name, but it did lead mean to find UDF in the
ARM.

ARMv8 Aarch64 doesn't seem to have the same. It looks like C5.2.2
together with C5.2.7 is defining a set of undefined encodings, but I'm
not 100% clear that they are "permanently undefined", nor does there
appear to be a mnemonic for these encodings. Not sure we can rely on
that.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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