[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH v2 10/47] arm64: add exception support
On 15/03/18 05:52, Huang Shijie wrote: > This patch adds the exception support for arm64: > .0) Add {arm32, arm64}/traps.h, and add new pt_regs{} for arm64. > .1) Add save_registers/restore_registers which are based on FreeBSD code. > .2) setup the vector table > > Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> > --- > arch/arm/arm64/arm64.S | 147 > ++++++++++++++++++++++++++++++++++++++++++++++ > arch/arm/arm64/traps.c | 16 +++++ > arch/arm/time.c | 8 ++- > include/arm/arm32/traps.h | 20 +++++++ > include/arm/arm64/traps.h | 27 +++++++++ > include/arm/traps.h | 20 ------- > include/console.h | 8 +++ > include/events.h | 9 ++- > include/hypervisor.h | 7 +++ > xenbus/xenbus.c | 8 +++ > 10 files changed, 248 insertions(+), 22 deletions(-) > create mode 100644 arch/arm/arm64/traps.c > create mode 100644 include/arm/arm32/traps.h > create mode 100644 include/arm/arm64/traps.h > delete mode 100644 include/arm/traps.h > > diff --git a/include/arm/traps.h b/include/arm/traps.h > deleted file mode 100644 > index 704df22..0000000 > --- a/include/arm/traps.h > +++ /dev/null > @@ -1,20 +0,0 @@ > -#ifndef _TRAPS_H_ > -#define _TRAPS_H_ > - > -struct pt_regs { > - unsigned long r0; > - unsigned long r1; > - unsigned long r2; > - unsigned long r3; > - unsigned long r4; > - unsigned long r5; > - unsigned long r6; > - unsigned long r7; > - unsigned long r8; > - unsigned long r9; > - unsigned long r10; > - unsigned long r11; > - unsigned long r12; > -}; > - > -#endif So you delete this file, ... > diff --git a/include/console.h b/include/console.h > index 539cccd..eef15fb 100644 > --- a/include/console.h > +++ b/include/console.h > @@ -37,7 +37,15 @@ > #define _LIB_CONSOLE_H_ > > #include <mini-os/os.h> > + > +#if defined(__arm__) > +#include <mini-os/arm32/traps.h> > +#elif defined(__aarch64__) > +#include <mini-os/arm64/traps.h> > +#else > #include <mini-os/traps.h> > +#endif > + .. and add all the ifdeffery in multiple other files. Please keep include/arm/traps.h and just put: +#if defined(__arm__) +#include <mini-os/arm32/traps.h> +#elif defined(__aarch64__) +#include <mini-os/arm64/traps.h> +#else +#error "Unknown ARM architecture" +#endif into it. This avoids below changes, too. Juergen > #include <mini-os/types.h> > #include <xen/grant_table.h> > #include <xenbus.h> > diff --git a/include/events.h b/include/events.h > index 89b5997..2187bab 100644 > --- a/include/events.h > +++ b/include/events.h > @@ -19,7 +19,14 @@ > #ifndef _EVENTS_H_ > #define _EVENTS_H_ > > -#include<mini-os/traps.h> > +#if defined(__arm__) > +#include <mini-os/arm32/traps.h> > +#elif defined(__aarch64__) > +#include <mini-os/arm64/traps.h> > +#else > +#include <mini-os/traps.h> > +#endif > + > #include<xen/event_channel.h> > > typedef void (*evtchn_handler_t)(evtchn_port_t, struct pt_regs *, void *); > diff --git a/include/hypervisor.h b/include/hypervisor.h > index f3b1f3c..effdbba 100644 > --- a/include/hypervisor.h > +++ b/include/hypervisor.h > @@ -24,7 +24,14 @@ > #error "Unsupported architecture" > #endif > #include <xen/hvm/hvm_op.h> > + > +#if defined(__arm__) > +#include <mini-os/arm32/traps.h> > +#elif defined(__aarch64__) > +#include <mini-os/arm64/traps.h> > +#else > #include <mini-os/traps.h> > +#endif > > /* hypervisor.c */ > #ifdef CONFIG_PARAVIRT > diff --git a/xenbus/xenbus.c b/xenbus/xenbus.c > index 636786c..1154207 100644 > --- a/xenbus/xenbus.c > +++ b/xenbus/xenbus.c > @@ -18,7 +18,15 @@ > #include <inttypes.h> > #include <mini-os/os.h> > #include <mini-os/mm.h> > + > +#if defined(__arm__) > +#include <mini-os/arm32/traps.h> > +#elif defined(__aarch64__) > +#include <mini-os/arm64/traps.h> > +#else > #include <mini-os/traps.h> > +#endif > + > #include <mini-os/lib.h> > #include <mini-os/xenbus.h> > #include <mini-os/events.h> > _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |