Skip site navigation (1)Skip section navigation (2)
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=0A=0AI was modify mips/mips source.=0A=0Ahttps://gist.github.com/yamori8=
13/aad6abc78b68a9e19a8563944d32033b=0A=0A=0Adiff --git a/sys/mips/mips/cpu.=
c b/sys/mips/mips/cpu.c=0Aindex 0f8583d..c490f09 100644=0A--- a/sys/mips/mi=
ps/cpu.c=0A+++ b/sys/mips/mips/cpu.c=0A@@ -61,7 +61,7 @@ __FBSDID("$FreeBSD=
$");=0A=A0#include <contrib/octeon-sdk/octeon-model.h>=0A=A0#endif=0A=A0=0A=
-static void cpu_identify(void);=0A+void cpu_identify(void);=0A=A0=0A=A0str=
uct mips_cpuinfo cpuinfo;=0A=A0=0A@@ -341,11 +341,9 @@ mips_cpu_init(void)=
=0A=A0=0A=A0mips_icache_sync_all();=0A=A0mips_dcache_wbinv_all();=0A-/* Pri=
nt some info about CPU */=0A-cpu_identify();=0A=A0}=0A=A0=0A-static void=0A=
+void=0A=A0cpu_identify(void)=0A=A0{=0A=A0uint32_t cfg0, cfg1, cfg2, cfg3;=
=0Adiff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c=0Aindex e=
fd604a..cf8aaeb 100644=0A--- a/sys/mips/mips/machdep.c=0A+++ b/sys/mips/mip=
s/machdep.c=0A@@ -179,6 +179,8 @@ struct bootinfo bootinfo;=0A=A0 */=0A=A0v=
m_offset_t kernel_kseg0_end =3D (vm_offset_t)&end;=0A=A0=0A+void cpu_identi=
fy(void);=0A+=0A=A0static void=0A=A0cpu_startup(void *dummy)=0A=A0{=0A@@ -1=
86,6 +188,10 @@ cpu_startup(void *dummy)=0A=A0if (boothowto & RB_VERBOSE)=
=0A=A0bootverbose++;=0A=A0=0A+printf("CPU model: %s\n", cpu_model);=0A+=0A+=
cpu_identify();=0A+=0A=A0printf("real memory=A0 =3D %ju (%juK bytes)\n", pt=
oa((uintmax_t)realmem),=0A=A0=A0 =A0 ptoa((uintmax_t)realmem) / 1024);=0A=
=A0=0A=0A=0A=0A----- Original Message -----=0A>From: Warner Losh <imp@bsdim=
p.com>=0A>To: Mori Hiroki <yamori813@yahoo.co.jp> =0A>Cc: freebsd-mips@free=
bsd.org=0A>Date: 2018/10/13, Sat 00:22=0A>Subject: Re: mips boot message=0A=
> =0A>=0A>=0A>=0A>=0A>On Fri, Oct 12, 2018, 1:50 AM Mori Hiroki <yamori813@=
yahoo.co.jp> wrote:=0A>=0A>Hi=0A>>=0A>>FreeBSD/mips cpu information is befo=
re dmesg.=0A>>=0A>>I think good that is cpu information is after this.=0A>>=
=0A>>---<<BOOT>>---=0A>>=0A>>=0A>>How about this ?=0A>>=0A>>Thanks=0A>>=0A>=
>Hiroki Mori=0A>>=0A>>=0A>>Starting kernel ...=0A>>=0A>>CPU platform: Ather=
os AR7241 rev 1=0A>>CPU Frequency=3D400 MHz=0A>>CPU DDR Frequency=3D400 MHz=
=0A>>CPU AHB Frequency=3D200 MHz=0A>>platform frequency: 400 MHz=0A>>CPU re=
ference clock: 5 MHz=0A>>CPU MDIO clock: 5 MHz=0A>>arguments:=A0=0A>>=A0 a0=
 =3D 00000007=0A>>=A0 a1 =3D a3f6bfb0=0A>>=A0 a2 =3D a3f6c460=0A>>=A0 a3 =
=3D 00000004=0A>>Cmd line:argv is invalid=0A>>Environment:=0A>>envp is inva=
lid=0A>>Cache info:=0A>>=A0 picache_stride=A0 =A0 =3D 4096=0A>>=A0 picache_=
loopcount =3D 16=0A>>=A0 pdcache_stride=A0 =A0 =3D 4096=0A>>=A0 pdcache_loo=
pcount =3D 8=0A>>=A0 max line size =A0 =A0 =3D 32=0A>>cpu0: MIPS Technologi=
es processor v116.147=0A>>=A0 MMU: Standard TLB, 16 entries (4K 16K 64K 256=
K 1M 16M 64M 256M pg sizes)=0A>>=A0 L1 i-cache: 4 ways of 512 sets, 32 byte=
s per line=0A>>=A0 L1 d-cache: 4 ways of 256 sets, 32 bytes per line=0A>>=
=A0 L2 cache: disabled=0A>>=A0 Config1=3D0x9ee3519e<PerfCount,WatchRegs,MIP=
S16,EJTAG>=0A>>=A0 Config2=3D0x80000000=0A>>=A0 Config3=3D0x20=0A>>Physical=
 memory chunk(s):=0A>>0x373000 - 0x3ffffff, 63492096 bytes (15501 pages)=0A=
>>Maxmem is 0x4000000=0A>>---<<BOOT>>---=0A>>Copyright (c) 1992-2018 The Fr=
eeBSD Project.=0A>>Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, =
1992, 1993, 1994=0A>>The Regents of the University of California. All right=
s reserved.=0A>>FreeBSD is a registered trademark of The FreeBSD Foundation=
.=0A>>FreeBSD 12.0-ALPHA8 #0 fd45ead(zrouter)-dirty: Fri Oct 12 16:32:39 JS=
T 2018=0A>>=A0 =A0 hiroki@microserver:/storage/home/hiroki/zorg/obj/storage=
/home/hiroki/zorg/ZRouter/tmp/storage/home/hiroki/freebsd/mips.mips/sys/Nec=
_WR8170N mips=0A>>gcc version 4.2.1 20070831 patched [FreeBSD]=0A>>Preloade=
d elf kernel "kernel" at 0x8036d370.=0A>>real memory=A0 =3D 67108864 (65536=
K bytes)=0A>>Physical memory chunk(s):=0A>>=0A>=0A>=0A>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?=0A>=0A>=0A>Warner=A0=0A>=0A>
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=20150623;
 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;
 d=1e100.net; s=20161025;
 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+jyFNMnks1mFZgD4SDgHwBTR3lSUkqE=
X-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=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
>
>
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?530507.76366.qm>