[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 03/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S
- To: Julien Grall <julien@xxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Fri, 15 Sep 2023 23:17:01 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=H/yFPuC0VIsMDoCFtboepgMYNu1d5xk/XRvCf8dQtLo=; b=e8PfDZjXiY7lztrlMTrhAQDSp/uE9Vz1su0hZEyqdeDLz/GLQRa4VfptU9E7/ofi/kPwH4b6fW6mg3S39N/nZcA4nkVpoVsdImSjzAM8ewqQXhXpxwLwqw/DnH+ZgOQv75bWgux77s/EW0zPIFPSnRCNXVByMKv2yBGCGwL06SjeBNb/5L5AVEEzPD8mlqH+arGrxln5Quj8V8pco9L/ypY7ejjdXiddxrjhlt+LIlq4ZOUqQQfwQmWumy7Dl4VA5uL94eiWcf9KQcUO29JkF9iHQnuMVxQKnP2VwruquZYiUeGByD8rBbzFRuOSK5Ln7zY9e/JVNlxp2+xfy/RCtw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RzJ9+WYUUakGiYM3W+9zSS5hMMN2A+TuoYjvtWz8koPAqLKAHkqiC5uyfS44LjIUQeZ2bRcD1z6wxoc5JkGmJBDeG5PZudEcCj7X7V0dFhOqAHBwnkgaX6ORDwOdZdzhYefZvKYXQ4sAcnatr2XmELmI+jel7OB4NtkSqODp7N1IIfCAYFZgiQ8fKQcoPYG5sQWHqH4tZTb8ROYe0qogFxD/2c19WriOGrE9Nc2sy2i9QV0YAiwo7QwWUa7KWeLY4vvO+fGEXplJ0qkYPvVMtbjvW6pTyNqIW3auXEgL65Z2dw+hDEsAM1nlXYrsrciGreGHMTHpnJPcSzyG2RRCdg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
- Delivery-date: Fri, 15 Sep 2023 23:17:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZ2U+UcSThZeMoaki/TjWLz78rArAciCOAgAAapgA=
- Thread-topic: [PATCH v6 03/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S
Hi Julien,
> On Sep 16, 2023, at 05:41, Julien Grall <julien@xxxxxxx> wrote:
>
> Hi Henry,
>
> I realize that this was already committed. But something went wrong during
> the code movement.
>
> On 28/08/2023 02:32, Henry Wang wrote:
>> +/*
>> + * Enable mm (turn on the data cache and the MMU) for the boot CPU.
>> + * The function will return to the virtual address provided in LR (e.g. the
>> + * runtime mapping).
>> + *
>> + * Inputs:
>> + * lr : Virtual address to return to.
>> + *
>> + * Clobbers x0 - x5
>> + */
>> +ENTRY(enable_boot_cpu_mm)
>> + mov x5, lr
>> +
>> + bl create_page_tables
>> + load_paddr x0, boot_pgtable
>> +
>> + bl enable_mmu
>> + mov lr, x5
>> +
>> + /*
>> + * The MMU is turned on and we are in the 1:1 mapping. Switch
>> + * to the runtime mapping.
>> + */
>> + ldr x0, =1f
>> + br x0
>> +1:
>> + /*
>> + * The 1:1 map may clash with other parts of the Xen virtual memory
>> + * layout. As it is not used anymore, remove it completely to
>> + * avoid having to worry about replacing existing mapping
>> + * afterwards. Function will return to primary_switched.
>> + */
>> + b remove_identity_mapping
>> +
>> + /*
>> + * Below is supposed to be unreachable code, as "ret" in
>> + * remove_identity_mapping will use the return address in LR in
>> advance.
>> + */
>> + b fail
>
> The "b fail" didn't exist in head.S. I guess this was due to a wrong
> rebase? Can you check if there is something else that went missing?
Please correct me if I am wrong but I think the “b fail” of
enable_boot_cpu_mm() is
in the mmu head.S, see line 348 [1].
[1]
https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/arch/arm/arm64/mmu/head.S;h=d71fdc69a531780501387fc5c717b4c41bb1b66a;hb=6734327d76be38d20f280ecc96392e385fbc1d8b#l348
Kind regards,
Henry
>
> Cheers,
>
> --
> Julien Grall
|