Message ID | 1412150877-4090-5-git-send-email-suravee.suthikulpanit@amd.com |
---|---|
State | New |
Headers | show |
On Wed, 1 Oct 2014, suravee.suthikulpanit@amd.com wrote: > From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> > > This patch add inital (minimal) platform support for AMD Seattle, > which mainly just define the matching ID, and specify system_off, > and sytem_reset mechanism. > > Initially, the firmware only support a subset of PSCI-0.2 functions, > system-off and sytem-reset. The boot protocol is still using spin-table. In that case, aren't you missing cpu_up = cpu_up_send_sgi ? Or are you just going to assume that the firmware is going to be updated to support full PSCI 0.2? > Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> > > xen/arch/arm/platforms/Makefile | 1 + > xen/arch/arm/platforms/seattle.c | 50 ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 51 insertions(+) > create mode 100644 xen/arch/arm/platforms/seattle.c > > diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile > index 680364f..03e7a14 100644 > --- a/xen/arch/arm/platforms/Makefile > +++ b/xen/arch/arm/platforms/Makefile > @@ -4,3 +4,4 @@ obj-$(CONFIG_ARM_32) += midway.o > obj-$(CONFIG_ARM_32) += omap5.o > obj-$(CONFIG_ARM_32) += sunxi.o > obj-$(CONFIG_ARM_64) += xgene-storm.o > +obj-$(CONFIG_ARM_64) += seattle.o > diff --git a/xen/arch/arm/platforms/seattle.c b/xen/arch/arm/platforms/seattle.c > new file mode 100644 > index 0000000..e9a5ecf > --- /dev/null > +++ b/xen/arch/arm/platforms/seattle.c > @@ -0,0 +1,50 @@ > +/* > + * xen/arch/arm/seattle.c > + * > + * AMD Seattle specific settings > + * > + * Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> > + * Copyright (c) 2014 Advance Micro Devices Inc. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include <asm/platform.h> > +#include <xen/mm.h> > +#include <xen/vmap.h> > +#include <asm/io.h> > +#include <asm/gic.h> > +#include <asm/psci.h> > + > +static const char * const seattle_dt_compat[] __initconst = > +{ > + "amd,seattle", > + NULL > +}; > + > +/* Seattle firmware only implement PSCI handler for > + * system off and system reset. This is temporary > + * until full PSCI-0.2 is supported. > + */ > +PLATFORM_START(seattle, "SEATTLE") > + .compatible = seattle_dt_compat, > + .reset = call_psci_system_reset, > + .poweroff = call_psci_system_off, > +PLATFORM_END > + > +/* > + * Local variables: > + * mode: C > + * c-file-style: "BSD" > + * c-basic-offset: 4 > + * indent-tabs-mode: nil > + * End: > + */ > -- > 1.9.3 >
On 10/1/2014 5:10 AM, Stefano Stabellini wrote: > On Wed, 1 Oct 2014, suravee.suthikulpanit@amd.com wrote: >> From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> >> >> This patch add inital (minimal) platform support for AMD Seattle, >> which mainly just define the matching ID, and specify system_off, >> and sytem_reset mechanism. >> >> Initially, the firmware only support a subset of PSCI-0.2 functions, >> system-off and sytem-reset. The boot protocol is still using spin-table. > > In that case, aren't you missing > > cpu_up = cpu_up_send_sgi > > ? > > Or are you just going to assume that the firmware is going to be updated > to support full PSCI 0.2? I thought the platform_cpu_up() is only called from the arch/arm/arm32/smpboot.c. Is it also used for ARM64? And yes, the firmware will support full PSCI-0.2 eventually. Thanks, Suravee
On Wed, 1 Oct 2014, Suravee Suthikulanit wrote: > On 10/1/2014 5:10 AM, Stefano Stabellini wrote: > > On Wed, 1 Oct 2014, suravee.suthikulpanit@amd.com wrote: > > > From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> > > > > > > This patch add inital (minimal) platform support for AMD Seattle, > > > which mainly just define the matching ID, and specify system_off, > > > and sytem_reset mechanism. > > > > > > Initially, the firmware only support a subset of PSCI-0.2 functions, > > > system-off and sytem-reset. The boot protocol is still using spin-table. > > > > In that case, aren't you missing > > > > cpu_up = cpu_up_send_sgi > > > > ? > > > > Or are you just going to assume that the firmware is going to be updated > > to support full PSCI 0.2? > > I thought the platform_cpu_up() is only called from the > arch/arm/arm32/smpboot.c. Is it also used for ARM64? You are right, on arm64 we just look at enable-method > And yes, the firmware will support full PSCI-0.2 eventually. > > Thanks, > > Suravee > >
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile index 680364f..03e7a14 100644 --- a/xen/arch/arm/platforms/Makefile +++ b/xen/arch/arm/platforms/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_ARM_32) += midway.o obj-$(CONFIG_ARM_32) += omap5.o obj-$(CONFIG_ARM_32) += sunxi.o obj-$(CONFIG_ARM_64) += xgene-storm.o +obj-$(CONFIG_ARM_64) += seattle.o diff --git a/xen/arch/arm/platforms/seattle.c b/xen/arch/arm/platforms/seattle.c new file mode 100644 index 0000000..e9a5ecf --- /dev/null +++ b/xen/arch/arm/platforms/seattle.c @@ -0,0 +1,50 @@ +/* + * xen/arch/arm/seattle.c + * + * AMD Seattle specific settings + * + * Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> + * Copyright (c) 2014 Advance Micro Devices Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <asm/platform.h> +#include <xen/mm.h> +#include <xen/vmap.h> +#include <asm/io.h> +#include <asm/gic.h> +#include <asm/psci.h> + +static const char * const seattle_dt_compat[] __initconst = +{ + "amd,seattle", + NULL +}; + +/* Seattle firmware only implement PSCI handler for + * system off and system reset. This is temporary + * until full PSCI-0.2 is supported. + */ +PLATFORM_START(seattle, "SEATTLE") + .compatible = seattle_dt_compat, + .reset = call_psci_system_reset, + .poweroff = call_psci_system_off, +PLATFORM_END + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */