From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754923AbbJOCME (ORCPT ); Wed, 14 Oct 2015 22:12:04 -0400 Received: from mail-bn1bon0112.outbound.protection.outlook.com ([157.56.111.112]:42939 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754902AbbJOCMA convert rfc822-to-8bit (ORCPT ); Wed, 14 Oct 2015 22:12:00 -0400 X-Greylist: delayed 57190 seconds by postgrey-1.27 at vger.kernel.org; Wed, 14 Oct 2015 22:12:00 EDT From: Huan Wang To: Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" CC: Jin Jason , Russell King - ARM Linux , Fabio Estevam , "linux-kernel@vger.kernel.org" , "shawnguo@kernel.org" Subject: RE: [PATCH v4] ARM: configs: Add Freescale LS1021A defconfig Thread-Topic: [PATCH v4] ARM: configs: Add Freescale LS1021A defconfig Thread-Index: AQHQ8SjkL5VPm4WkUE22VnJn+5lonZ5AhnkAgAFdj6CAAIuhAIAI4e9QgAAC8gCAH5incIAAL4AAgADYhcA= Date: Thu, 15 Oct 2015 02:11:57 +0000 Message-ID: References: <1442480614-32345-1-git-send-email-b18965@freescale.com> <16038044.0DCMVgq8H3@wuerfel> <5232654.e6dagm53H4@wuerfel> In-Reply-To: <5232654.e6dagm53H4@wuerfel> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=alison.wang@freescale.com; x-originating-ip: [192.158.241.86] x-microsoft-exchange-diagnostics: 1;BN3PR0301MB1281;5:pH23/Xh3vRImtx+hoEv5IxR5gy1LL3HxWDr1MXHVNUUcETNevhaoMrms/T622eymFW3kMSe8ufhCV8d51VNgZsKjBR0OPOMV3lW/SZ/sIWHZkcGPq6NIRZY2C0ZhpThM9G2YmrnLLp7R7QVh3u8Tvg==;24:JwLsyhkE6DqclL1C0tERGnwS+dTM8ujRztBMzpZafFz0QMczCSQU/pkiZPwIBEkmHA6/wOqjLu1hlXetc8KY6SSxxOsTsV2FM2iNi669hQI=;20:DjKqlZcGTWOv6gwHMZSGXt8a9SQ/I5cSKXpZ0tEFblXWJHkt/4v1QlUtMVij/4zgw8gglM/wgOlzArNned3a9w== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1281; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(101931422205132); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001);SRVR:BN3PR0301MB1281;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1281; x-forefront-prvs: 0730093765 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(377454003)(199003)(189002)(54356999)(101416001)(92566002)(105586002)(106116001)(66066001)(11100500001)(122556002)(99286002)(64706001)(2900100001)(46102003)(86362001)(19580405001)(93886004)(19580395003)(76576001)(106356001)(2950100001)(33656002)(5008740100001)(10400500002)(5001920100001)(77096005)(76176999)(40100003)(97736004)(5002640100001)(5004730100002)(5001770100001)(2501003)(5007970100001)(189998001)(81156007)(50986999)(87936001)(5001960100002)(74316001)(102836002)(5003600100002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1281;H:BN3PR0301MB0867.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2015 02:11:57.9778 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1281 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Wednesday 14 October 2015 10:18:47 Huan Wang wrote: > > > On Thursday 24 September 2015 07:27:10 Huan Wang wrote: > > > > > On Fri, Sep 18, 2015 at 4:38 AM, Huan Wang > > > > > > > > > > wrote: > > > > > > > > > > > [Alison Wang] Thanks for your reply. I agreed with you about > > > > > > creating a new multi_v7_lpae_defconfig. In > > > > > > multi_v7_lpae_defconfig, I need to add the following CONFIG_XX > > > > > > to support LS1021A based on > > > > > multi_v7_defconfig. > > > > > > > > > > > > CONFIG_ARM_LPAE=y > > > > > > CONFIG_VMSPLIT_2G=y > > > > > > > > > > Is CONFIG_VMSPLIT_2G=y really needed? > > > > [Alison Wang] I tried to remove CONFIG_VMSPLIT_2G and used the > > > > default CONFIG_VMSPLIT_3G, but kernel could not boot up. It hangs > > > > at " Starting > > > kernel ... ". > > > > > > > > Any suggestion? Thanks. > > > > > > Try enabling DEBUG_LL for your platform to get some debug output, if > > > you still don't get any helpful messages, try also inserting > > > > > > printascii(__func__); > > > > > > statements in the early boot process to see how far you get before the > hang. > > > > > [Alison Wang] I can get to __turn_mmu_on or later, but I could not get > > the print message "Booting Linux on physical CPU 0xf00" in > smp_setup_processor_id(). > > > > I guess something wrong with the initial page tables in > > __create_page_tables, as for CONFIG_VMSPLIT_3G, only PAGE_OFFSET is > changed from 0x80000000 to 0xC0000000. > > BTW, on our platform, TEXT_OFFSET is 0x00008000, PHYS_OFFSET is > 0x80000000. > > > > Any suggestion? Thanks. > > My first guess is that there is something wrong with your debug_ll > implementation, as that would explain why you can't get anything to the > console after turning on page tables. > > It looks like ls1021a uses lpuart, but I can't even see an implementation > for that in arch/arm/include/debug/. What code do you use for printing? > [Alison Wang] ls1021a uses duart as the default serial port, not lpuart. So 8250/16550 serial driver is used. Let me explain my debug process in detail. When CONFIG_VMSPLIT_2G is used, I could boot up the whole kernel and get the print message " Booting Linux on physical CPU 0xf00" after "Starting kernel" as below. Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0xf00 ..... But when CONFIG_VMSPLIT_3G is used, I couldn't get print message " Booting Linux on physical CPU 0xf00". It only hangs at "Starting kernel ...". Moreover, I add some asm code in __turn_mmu_on to print some simple characters, and I could get the print characters when CONFIG_VMSPLIT_3G is used. So I guess there is something wrong with the page tables. Best Regards, Alison Wang From mboxrd@z Thu Jan 1 00:00:00 1970 From: alison.wang@freescale.com (Huan Wang) Date: Thu, 15 Oct 2015 02:11:57 +0000 Subject: [PATCH v4] ARM: configs: Add Freescale LS1021A defconfig In-Reply-To: <5232654.e6dagm53H4@wuerfel> References: <1442480614-32345-1-git-send-email-b18965@freescale.com> <16038044.0DCMVgq8H3@wuerfel> <5232654.e6dagm53H4@wuerfel> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > On Wednesday 14 October 2015 10:18:47 Huan Wang wrote: > > > On Thursday 24 September 2015 07:27:10 Huan Wang wrote: > > > > > On Fri, Sep 18, 2015 at 4:38 AM, Huan Wang > > > > > > > > > > wrote: > > > > > > > > > > > [Alison Wang] Thanks for your reply. I agreed with you about > > > > > > creating a new multi_v7_lpae_defconfig. In > > > > > > multi_v7_lpae_defconfig, I need to add the following CONFIG_XX > > > > > > to support LS1021A based on > > > > > multi_v7_defconfig. > > > > > > > > > > > > CONFIG_ARM_LPAE=y > > > > > > CONFIG_VMSPLIT_2G=y > > > > > > > > > > Is CONFIG_VMSPLIT_2G=y really needed? > > > > [Alison Wang] I tried to remove CONFIG_VMSPLIT_2G and used the > > > > default CONFIG_VMSPLIT_3G, but kernel could not boot up. It hangs > > > > at " Starting > > > kernel ... ". > > > > > > > > Any suggestion? Thanks. > > > > > > Try enabling DEBUG_LL for your platform to get some debug output, if > > > you still don't get any helpful messages, try also inserting > > > > > > printascii(__func__); > > > > > > statements in the early boot process to see how far you get before the > hang. > > > > > [Alison Wang] I can get to __turn_mmu_on or later, but I could not get > > the print message "Booting Linux on physical CPU 0xf00" in > smp_setup_processor_id(). > > > > I guess something wrong with the initial page tables in > > __create_page_tables, as for CONFIG_VMSPLIT_3G, only PAGE_OFFSET is > changed from 0x80000000 to 0xC0000000. > > BTW, on our platform, TEXT_OFFSET is 0x00008000, PHYS_OFFSET is > 0x80000000. > > > > Any suggestion? Thanks. > > My first guess is that there is something wrong with your debug_ll > implementation, as that would explain why you can't get anything to the > console after turning on page tables. > > It looks like ls1021a uses lpuart, but I can't even see an implementation > for that in arch/arm/include/debug/. What code do you use for printing? > [Alison Wang] ls1021a uses duart as the default serial port, not lpuart. So 8250/16550 serial driver is used. Let me explain my debug process in detail. When CONFIG_VMSPLIT_2G is used, I could boot up the whole kernel and get the print message " Booting Linux on physical CPU 0xf00" after "Starting kernel" as below. Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0xf00 ..... But when CONFIG_VMSPLIT_3G is used, I couldn't get print message " Booting Linux on physical CPU 0xf00". It only hangs at "Starting kernel ...". Moreover, I add some asm code in __turn_mmu_on to print some simple characters, and I could get the print characters when CONFIG_VMSPLIT_3G is used. So I guess there is something wrong with the page tables. Best Regards, Alison Wang