[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/2] arch/riscv: initial RISC-V support to build/run minimal Xen
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 5 Jan 2023 14:40:49 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0ELXjnIH1l3VfliUzSU5AAkC8qMZTwHQR5Hju6YtaeU=; b=IRuIvA7TG5JizJU36HLurET2P9CUDOAhLJRKh8z9g5jwH/uBfHSQmDYJFsoOhVX0O3WTkbhwEWqhgFwBlZ0D8RkK0XBIigjUW3pBxgXk4/fOCkAFTxmH0GSDOwJZ7K1BVb0SGylT9+iQTa/m/DvjQw6rmi5PsIe0Mzuk1BMpj+RuYKHoR0ftUstUNYPPQ1Rwy+YIgUWsndz7FZ1ru19IMpXX4NxYUTJSLUkCwkOJZX1BBRRT6mQBPa2uP5zjxm9ogoAisHSl3A6XtmhkItrrZb6xwNkbIU9exdmkR2MKokycbIfObKO6BaNUCU+UEqU6NwyE+f+DbhdkQ4VqrMUq2g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m624Ro/TcUAEGaZVcd4acTgTW6U39SATAspbq+q2l/GlxHLMFFs/jMoQYrLHg2HUdB7UdPrff4hxL5uLNKgIkDy649wDM0AL1WCIlJvpLIT7CftEjBWBSQhcM2kxPuU7YezvwZPXcGrvafJvL9Jgg/3WcEoVO/OtxVY/VRNiqs4yPCV9sVuXJebcmjHCVpMGt7F5lCyhhVgrplegt29SOum4uDQG/z578Xq2O38rev0pQXjhH3hBzIvW8o0bAbJ+c+u73xXuN4YqSY3qTSDUrBBA+y8rGhQZglELwLOTYiTihpWtqxNky3OHgfMXBVQDtfOca5JF+HtO4Voswe7Kgw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 05 Jan 2023 13:41:04 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 05.01.2023 13:01, Oleksii Kurochko wrote:
> To run in debug mode should be done the following instructions:
> $ qemu-system-riscv64 -M virt -smp 1 -nographic -m 2g \
> -kernel xen/xen -s -S
> # In separate terminal:
> $ riscv64-buildroot-linux-gnu-gdb
> $ target remote :1234
> $ add-symbol-file <xen_src>/xen/xen-syms 0x80200000
> $ hb *0x80200000
> $ c # it should stop at instruction j 0x80200000 <start>
This suggests to me that Xen is meant to run at VA 0x80200000, whereas ...
> --- a/xen/arch/riscv/include/asm/config.h
> +++ b/xen/arch/riscv/include/asm/config.h
> @@ -1,6 +1,9 @@
> #ifndef __RISCV_CONFIG_H__
> #define __RISCV_CONFIG_H__
>
> +#include <xen/const.h>
> +#include <xen/page-size.h>
> +
> #if defined(CONFIG_RISCV_64)
> # define LONG_BYTEORDER 3
> # define ELFSIZE 64
> @@ -28,7 +31,7 @@
>
> /* Linkage for RISCV */
> #ifdef __ASSEMBLY__
> -#define ALIGN .align 2
> +#define ALIGN .align 4
>
> #define ENTRY(name) \
> .globl name; \
> @@ -36,6 +39,10 @@
> name:
> #endif
>
> +#define XEN_VIRT_START _AT(UL, 0x00200000)
... here you specify a much lower address (and to be honest even 0x80200000
looks pretty low to me for 64-bit, and perhaps even for 32-bit). Could you
clarify what the plans here are? Maybe this is merely a temporary thing,
but not called out as such?
Jan
|