mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Raphaël Poggi" <poggi.raph@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v3 03/14] arm: introduce lib64 for arm64 related stuff
Date: Wed, 29 Jun 2016 08:36:14 +0200	[thread overview]
Message-ID: <CACqcpZCbZHG3zT_GFa5KzV1WGJj9hLZjDgtTKL_TLCxBn4gyeQ@mail.gmail.com> (raw)
In-Reply-To: <20160629060006.GR20657@pengutronix.de>

2016-06-29 8:00 GMT+02:00 Sascha Hauer <s.hauer@pengutronix.de>:
> On Tue, Jun 28, 2016 at 09:15:06AM +0200, Raphaël Poggi wrote:
>> 2016-06-28 8:47 GMT+02:00 Sascha Hauer <s.hauer@pengutronix.de>:
>> > On Fri, Jun 24, 2016 at 02:23:50PM +0200, Raphael Poggi wrote:
>> >> Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
>> >> ---
>> >>  arch/arm/lib64/Makefile        |  10 +
>> >>  arch/arm/lib64/armlinux.c      | 104 ++++++++
>> >>  arch/arm/lib64/asm-offsets.c   |  16 ++
>> >>  arch/arm/lib64/barebox.lds.S   | 125 +++++++++
>> >>  arch/arm/lib64/bootm.c         | 572 +++++++++++++++++++++++++++++++++++++++++
>> >>  arch/arm/lib64/copy_template.S | 192 ++++++++++++++
>> >>  arch/arm/lib64/div0.c          |  27 ++
>> >>  arch/arm/lib64/memcpy.S        |  74 ++++++
>> >>  arch/arm/lib64/memset.S        | 215 ++++++++++++++++
>> >>  9 files changed, 1335 insertions(+)
>> >>  create mode 100644 arch/arm/lib64/Makefile
>> >>  create mode 100644 arch/arm/lib64/armlinux.c
>> >>  create mode 100644 arch/arm/lib64/asm-offsets.c
>> >>  create mode 100644 arch/arm/lib64/barebox.lds.S
>> >>  create mode 100644 arch/arm/lib64/bootm.c
>> >>  create mode 100644 arch/arm/lib64/copy_template.S
>> >>  create mode 100644 arch/arm/lib64/div0.c
>> >>  create mode 100644 arch/arm/lib64/memcpy.S
>> >>  create mode 100644 arch/arm/lib64/memset.S
>> >>
>> >> diff --git a/arch/arm/lib64/Makefile b/arch/arm/lib64/Makefile
>> >> new file mode 100644
>> >> index 0000000..a424293
>> >> --- /dev/null
>> >> +++ b/arch/arm/lib64/Makefile
>> >> @@ -0,0 +1,10 @@
>> >> +obj-$(CONFIG_ARM_LINUX)      += armlinux.o
>> >> +obj-$(CONFIG_BOOTM)  += bootm.o
>> >> +obj-y        += div0.o
>> >> +obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS)  += memcpy.o
>> >> +obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS)  += memset.o
>> >> +extra-y += barebox.lds
>> >> +
>> >> +pbl-y        += lib1funcs.o
>> >> +pbl-y        += ashldi3.o
>> >> +pbl-y        += div0.o
>> >> diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c
>> >> new file mode 100644
>> >> index 0000000..c70e079
>> >> --- /dev/null
>> >> +++ b/arch/arm/lib64/armlinux.c
>> >> @@ -0,0 +1,104 @@
>> >> +/*
>> >> + * (C) Copyright 2002
>> >> + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
>> >> + * Marius Groeger <mgroeger@sysgo.de>
>> >> + *
>> >> + * Copyright (C) 2001  Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
>> >> + *
>> >> + * 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 <boot.h>
>> >> +#include <common.h>
>> >> +#include <command.h>
>> >> +#include <driver.h>
>> >> +#include <environment.h>
>> >> +#include <image.h>
>> >> +#include <init.h>
>> >> +#include <fs.h>
>> >> +#include <linux/list.h>
>> >> +#include <xfuncs.h>
>> >> +#include <malloc.h>
>> >> +#include <fcntl.h>
>> >> +#include <errno.h>
>> >> +#include <memory.h>
>> >> +#include <of.h>
>> >> +#include <magicvar.h>
>> >> +
>> >> +#include <asm/byteorder.h>
>> >> +#include <asm/setup.h>
>> >> +#include <asm/barebox-arm.h>
>> >> +#include <asm/armlinux.h>
>> >> +#include <asm/system.h>
>> >> +
>> >> +static void *armlinux_bootparams = NULL;
>> >> +
>> >> +static int armlinux_architecture;
>> >> +static u32 armlinux_system_rev;
>> >> +static u64 armlinux_system_serial;
>> >> +
>> >> +BAREBOX_MAGICVAR(armlinux_architecture, "ARM machine ID");
>> >> +BAREBOX_MAGICVAR(armlinux_system_rev, "ARM system revision");
>> >> +BAREBOX_MAGICVAR(armlinux_system_serial, "ARM system serial");
>> >> +
>> >> +void armlinux_set_architecture(int architecture)
>> >> +{
>> >> +     export_env_ull("armlinux_architecture", architecture);
>> >> +     armlinux_architecture = architecture;
>> >> +}
>> >> +
>> >> +int armlinux_get_architecture(void)
>> >> +{
>> >> +     getenv_uint("armlinux_architecture", &armlinux_architecture);
>> >> +
>> >> +     return armlinux_architecture;
>> >> +}
>> >> +
>> >> +void armlinux_set_revision(unsigned int rev)
>> >> +{
>> >> +     export_env_ull("armlinux_system_rev", rev);
>> >> +     armlinux_system_rev = rev;
>> >> +}
>> >> +
>> >> +unsigned int armlinux_get_revision(void)
>> >> +{
>> >> +     getenv_uint("armlinux_system_rev", &armlinux_system_rev);
>> >> +
>> >> +     return armlinux_system_rev;
>> >> +}
>> >> +
>> >> +void armlinux_set_serial(u64 serial)
>> >> +{
>> >> +     export_env_ull("armlinux_system_serial", serial);
>> >> +     armlinux_system_serial = serial;
>> >> +}
>> >> +
>> >> +u64 armlinux_get_serial(void)
>> >> +{
>> >> +     getenv_ull("armlinux_system_serial", &armlinux_system_serial);
>> >> +
>> >> +     return armlinux_system_serial;
>> >> +}
>> >> +
>> >> +void armlinux_set_bootparams(void *params)
>> >> +{
>> >> +     armlinux_bootparams = params;
>> >> +}
>> >
>> > All of the above is not needed. Sorry, it seems I overlooked this last
>> > time.
>>
>> Ok for that, I will only let the "start_linux" function.
>>
>> >
>> >> diff --git a/arch/arm/lib64/bootm.c b/arch/arm/lib64/bootm.c
>> >
>> > I still think this file should not be here. You can always copy/modify
>> > it from the arm32 bootm.c once you need it, but at the moment this file
>> > is the reason this patch can't be applied. I'd really like to
>> > review/apply a "arm64: Add bootm code" patch once it's ready.
>>
>> I understand, but since bootm is needed for booting (especially via
>> do_bootm_linux)
>> and also lib/bootm.c is not compiled in arm64 case, how can I use
>> lib/bootm.c in arm64 case without include it in lib64 ?
>>
>> Maybe I miss something...
>
> We could make a lib/, lib32/ and lib64/ for common code, 32bit code and
> 64bit code respectively.

Indeed, thanks.

Raphaël

>
> Sascha
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-06-29  6:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24 12:23 [PATCH v3 0/12] Add basic support for arm64 Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 01/14] arm: add armv8 Kconfig entries Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 02/14] arm: Makefile: rework makefile to handle armv8 Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 03/14] arm: introduce lib64 for arm64 related stuff Raphael Poggi
2016-06-28  6:47   ` Sascha Hauer
2016-06-28  7:15     ` Raphaël Poggi
2016-06-29  6:00       ` Sascha Hauer
2016-06-29  6:36         ` Raphaël Poggi [this message]
2016-06-24 12:23 ` [PATCH v3 04/14] arm: cpu: add arm64 specific code Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 05/14] arm: include: system: add arm64 helper functions Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 06/14] arm: cpu: start: arm64 does not support relocation Raphael Poggi
2016-06-28  6:50   ` Sascha Hauer
2016-06-28  7:01     ` Raphaël Poggi
2016-06-28  7:02       ` Sascha Hauer
2016-06-24 12:23 ` [PATCH v3 07/14] arm: include: bitops: arm64 use generic __fls Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 08/14] arm: include: system_info: add armv8 identification Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 09/14] arm: cpu: cpuinfo: add armv8 support Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 10/14] arm: cpu: disable code portion in armv8 case Raphael Poggi
2016-06-24 12:23 ` [PATCH v3 11/14] arm: cpu: add basic arm64 mmu support Raphael Poggi
2016-06-28  7:01   ` Sascha Hauer
2016-06-24 12:23 ` [PATCH v3 12/14] arm: boards: add mach-qemu and virt64 board Raphael Poggi
2016-06-24 12:24 ` [PATCH v3 13/14] arm: include: swab: use rigth assembly for armv8 Raphael Poggi
2016-06-24 12:24 ` [PATCH v3 14/14] uimage: add define for ARM64 architecture Raphael Poggi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACqcpZCbZHG3zT_GFa5KzV1WGJj9hLZjDgtTKL_TLCxBn4gyeQ@mail.gmail.com \
    --to=poggi.raph@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox