Date: Wed, 17 Oct 2018 11:52:42 +0900 (JST) From: Mori Hiroki <yamori813@yahoo.co.jp> To: Warner Losh <imp@bsdimp.com> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: mips boot message Message-ID: <530507.76366.qm@web103901.mail.ssk.yahoo.co.jp> In-Reply-To: <CANCZdfr2qTGfKU7jsSC0MCk7zPeRjbTQg_a3S4AiMMRdXKfrdQ@mail.gmail.com> References: <897817.7763.qm@web103915.mail.ssk.yahoo.co.jp> <CANCZdfr2qTGfKU7jsSC0MCk7zPeRjbTQg_a3S4AiMMRdXKfrdQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi I was modify mips/mips source. https://gist.github.com/yamori813/aad6abc78b68a9e19a8563944d32033b diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c index 0f8583d..c490f09 100644 --- a/sys/mips/mips/cpu.c +++ b/sys/mips/mips/cpu.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #include <contrib/octeon-sdk/octeon-model.h> #endif -static void cpu_identify(void); +void cpu_identify(void); struct mips_cpuinfo cpuinfo; @@ -341,11 +341,9 @@ mips_cpu_init(void) mips_icache_sync_all(); mips_dcache_wbinv_all(); -/* Print some info about CPU */ -cpu_identify(); } -static void +void cpu_identify(void) { uint32_t cfg0, cfg1, cfg2, cfg3; diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index efd604a..cf8aaeb 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -179,6 +179,8 @@ struct bootinfo bootinfo; */ vm_offset_t kernel_kseg0_end = (vm_offset_t)&end; +void cpu_identify(void); + static void cpu_startup(void *dummy) { @@ -186,6 +188,10 @@ cpu_startup(void *dummy) if (boothowto & RB_VERBOSE) bootverbose++; +printf("CPU model: %s\n", cpu_model); + +cpu_identify(); + printf("real memory = %ju (%juK bytes)\n", ptoa((uintmax_t)realmem), ptoa((uintmax_t)realmem) / 1024); ----- Original Message ----- >From: Warner Losh <imp@bsdimp.com> >To: Mori Hiroki <yamori813@yahoo.co.jp> >Cc: freebsd-mips@freebsd.org >Date: 2018/10/13, Sat 00:22 >Subject: Re: mips boot message > > > > > >On Fri, Oct 12, 2018, 1:50 AM Mori Hiroki <yamori813@yahoo.co.jp> wrote: > >Hi >> >>FreeBSD/mips cpu information is before dmesg. >> >>I think good that is cpu information is after this. >> >>---<<BOOT>>--- >> >> >>How about this ? >> >>Thanks >> >>Hiroki Mori >> >> >>Starting kernel ... >> >>CPU platform: Atheros AR7241 rev 1 >>CPU Frequency=400 MHz >>CPU DDR Frequency=400 MHz >>CPU AHB Frequency=200 MHz >>platform frequency: 400 MHz >>CPU reference clock: 5 MHz >>CPU MDIO clock: 5 MHz >>arguments: >> a0 = 00000007 >> a1 = a3f6bfb0 >> a2 = a3f6c460 >> a3 = 00000004 >>Cmd line:argv is invalid >>Environment: >>envp is invalid >>Cache info: >> picache_stride = 4096 >> picache_loopcount = 16 >> pdcache_stride = 4096 >> pdcache_loopcount = 8 >> max line size = 32 >>cpu0: MIPS Technologies processor v116.147 >> MMU: Standard TLB, 16 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes) >> L1 i-cache: 4 ways of 512 sets, 32 bytes per line >> L1 d-cache: 4 ways of 256 sets, 32 bytes per line >> L2 cache: disabled >> Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG> >> Config2=0x80000000 >> Config3=0x20 >>Physical memory chunk(s): >>0x373000 - 0x3ffffff, 63492096 bytes (15501 pages) >>Maxmem is 0x4000000 >>---<<BOOT>>--- >>Copyright (c) 1992-2018 The FreeBSD Project. >>Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 >>The Regents of the University of California. All rights reserved. >>FreeBSD is a registered trademark of The FreeBSD Foundation. >>FreeBSD 12.0-ALPHA8 #0 fd45ead(zrouter)-dirty: Fri Oct 12 16:32:39 JST 2018 >> hiroki@microserver:/storage/home/hiroki/zorg/obj/storage/home/hiroki/zorg/ZRouter/tmp/storage/home/hiroki/freebsd/mips.mips/sys/Nec_WR8170N mips >>gcc version 4.2.1 20070831 patched [FreeBSD] >>Preloaded elf kernel "kernel" at 0x8036d370. >>real memory = 67108864 (65536K bytes) >>Physical memory chunk(s): >> > > >I like the idea, but other platforms put this after the memory. Can you make this more like x86 so we can automatically parse it more easily? > > >Warner > > From owner-freebsd-mips@freebsd.org Wed Oct 17 03:09:39 2018 Return-Path: <owner-freebsd-mips@freebsd.org> Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67F5910C110D for <freebsd-mips@mailman.ysv.freebsd.org>; Wed, 17 Oct 2018 03:09:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0170B8D13C for <freebsd-mips@freebsd.org>; Wed, 17 Oct 2018 03:09:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe36.google.com with SMTP id e206so19892233vsd.0 for <freebsd-mips@freebsd.org>; Tue, 16 Oct 2018 20:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s 150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MdAwLDI1yYrZk3ydEEsqkPiVEoFdiY4NC1rrVUP5qHQ=; b=0s3daP1/rz4d7PsaR28E+3Hym9o0sXQrPYU7QtohOLgYqOAe2Kxk88ShjPsTQYqShV jZuHGA2v9byhf0rbz2qj1Embave9S2C4EpAF1YaLDToXi5YOi1RKHCTwqNuT0eIpd7Eo DIxl2P27MmRS1nRWL1JSnfPq8silBwMqZGbFK/TPsDIGT+4/GhuVrJmsME3cVxl8L+S9 DnUmxE/fLIIlnERQqqhsCt2pXoryb+JI8yPq5k0BowfniTISRCbxkwFSFE7fZNCQyQ6M 5zWi8NLfWnMtanqZeN0kb+5XBo/1FFwzGu0Hs5ssTHt+WodC3+iXas00vrX2QtymIKBA xHwA=X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d100.net; s 161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MdAwLDI1yYrZk3ydEEsqkPiVEoFdiY4NC1rrVUP5qHQ=; b=oryxcstT2hVPxzjdvl1n7zX+iqGBU8lXck3IFUI96vQGFAofTFAEl4wTB37EWAUUjG Mj9f090dV7aFAxF5/5cYjIuec6NzPHntZYt9c/upKSQBtYF//9kDe218OAIZRZ+/Z90i atb+7mg1RvuPbQ7NfuS53dRIW1VZ6CMEB8zk4+lE/kKPQLT9JulujqCzk0dGivFhLghg P6XNO5bqFQDDq/kOJmY0TikxopxbuenM/a4BOjaeasY+xeQYeMNhTrS0/+uaMm3Vr481 n4rdWxms34a/GHPfU8mUZQ9R7hX+lHf1z5HH7nIsNwjFx4HWBXwK5h5AK+b60Ow85yC7 mGsA=X-Gm-Message-State: ABuFfoidrNFvab40YvuIcRiilDmdUaVfbKtFL7N7rkxCPaLtl9rCrYv/ IDsNMMMz//4XExVjS/h+OByMRmMxDblcI5DqVXUqj8Fd X-Google-Smtp-Source: ACcGV61DxNxamFJlcpdAWSdIxZVuwzBkfSrfMM8kEq1X+qdvtboYNhpEEX78+jyFNMnks1mFZgD4SDgHwBTR3lSUkqEX-Received: by 2002:a67:4988:: with SMTP id d8mr9520384vsg.41.1539745778380; Tue, 16 Oct 2018 20:09:38 -0700 (PDT) MIME-Version: 1.0 References: <897817.7763.qm@web103915.mail.ssk.yahoo.co.jp> <CANCZdfr2qTGfKU7jsSC0MCk7zPeRjbTQg_a3S4AiMMRdXKfrdQ@mail.gmail.com> <530507.76366.qm@web103901.mail.ssk.yahoo.co.jp> In-Reply-To: <530507.76366.qm@web103901.mail.ssk.yahoo.co.jp> From: Warner Losh <imp@bsdimp.com> Date: Tue, 16 Oct 2018 21:09:27 -0600 Message-ID: <CANCZdfortVHXSJKi_9MSb1yHNP0xVLLCA2MzPvC4gja7wzUxYw@mail.gmail.com> Subject: Re: mips boot message To: Mori Hiroki <yamori813@yahoo.co.jp> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting FreeBSD to MIPS <freebsd-mips.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-mips>, <mailto:freebsd-mips-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-mips/> List-Post: <mailto:freebsd-mips@freebsd.org> List-Help: <mailto:freebsd-mips-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-mips>, <mailto:freebsd-mips-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 17 Oct 2018 03:09:39 -0000 On Tue, Oct 16, 2018 at 8:52 PM Mori Hiroki <yamori813@yahoo.co.jp> wrote: > Hi > > I was modify mips/mips source. > > https://gist.github.com/yamori813/aad6abc78b68a9e19a8563944d32033b > > diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c > index 0f8583d..c490f09 100644 > --- a/sys/mips/mips/cpu.c > +++ b/sys/mips/mips/cpu.c > @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); > #include <contrib/octeon-sdk/octeon-model.h> > #endif > > -static void cpu_identify(void); > +void cpu_identify(void); > > struct mips_cpuinfo cpuinfo; > > @@ -341,11 +341,9 @@ mips_cpu_init(void) > > mips_icache_sync_all(); > mips_dcache_wbinv_all(); > - /* Print some info about CPU */ > - cpu_identify(); > } > > -static void > +void > cpu_identify(void) > { > uint32_t cfg0, cfg1, cfg2, cfg3; > diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c > index efd604a..cf8aaeb 100644 > --- a/sys/mips/mips/machdep.c > +++ b/sys/mips/mips/machdep.c > @@ -179,6 +179,8 @@ struct bootinfo bootinfo; > */ > vm_offset_t kernel_kseg0_end = (vm_offset_t)&end; > > +void cpu_identify(void); > + > static void > cpu_startup(void *dummy) > { > @@ -186,6 +188,10 @@ cpu_startup(void *dummy) > if (boothowto & RB_VERBOSE) > bootverbose++; > > + printf("CPU model: %s\n", cpu_model); > + > + cpu_identify(); > + > printf("real memory = %ju (%juK bytes)\n", ptoa((uintmax_t)realmem), > ptoa((uintmax_t)realmem) / 1024); > On first blush, that looks better. Thank you! What's the output look like now? Warner ----- Original Message ----- > *From:* Warner Losh <imp@bsdimp.com> > *To:* Mori Hiroki <yamori813@yahoo.co.jp> > *Cc:* freebsd-mips@freebsd.org > *Date:* 2018/10/13, Sat 00:22 > *Subject:* Re: mips boot message > > > > On Fri, Oct 12, 2018, 1:50 AM Mori Hiroki <yamori813@yahoo.co.jp> wrote: > > Hi > > FreeBSD/mips cpu information is before dmesg. > > I think good that is cpu information is after this. > > ---<<BOOT>>--- > > > How about this ? > > Thanks > > Hiroki Mori > > > Starting kernel ... > > CPU platform: Atheros AR7241 rev 1 > CPU Frequency@0 MHz > CPU DDR Frequency@0 MHz > CPU AHB Frequency 0 MHz > platform frequency: 400 MHz > CPU reference clock: 5 MHz > CPU MDIO clock: 5 MHz > arguments: > a0 = 00000007 > a1 = a3f6bfb0 > a2 = a3f6c460 > a3 = 00000004 > Cmd line:argv is invalid > Environment: > envp is invalid > Cache info: > picache_stride = 4096 > picache_loopcount = 16 > pdcache_stride = 4096 > pdcache_loopcount = 8 > max line size = 32 > cpu0: MIPS Technologies processor v116.147 > MMU: Standard TLB, 16 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes) > L1 i-cache: 4 ways of 512 sets, 32 bytes per line > L1 d-cache: 4 ways of 256 sets, 32 bytes per line > L2 cache: disabled > Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG> > Config2=0x80000000 > Config3=0x20 > Physical memory chunk(s): > 0x373000 - 0x3ffffff, 63492096 bytes (15501 pages) > Maxmem is 0x4000000 > ---<<BOOT>>--- > Copyright (c) 1992-2018 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 12.0-ALPHA8 #0 fd45ead(zrouter)-dirty: Fri Oct 12 16:32:39 JST 2018 > hiroki@microserver:/storage/home/hiroki/zorg/obj/storage/home/hiroki/zorg/ZRouter/tmp/storage/home/hiroki/freebsd/mips.mips/sys/Nec_WR8170N > mips > gcc version 4.2.1 20070831 patched [FreeBSD] > Preloaded elf kernel "kernel" at 0x8036d370. > real memory = 67108864 (65536K bytes) > Physical memory chunk(s): > > > I like the idea, but other platforms put this after the memory. Can you > make this more like x86 so we can automatically parse it more easily? > > Warner > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?530507.76366.qm>
