Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: vagabon.xyz@gmail.com, ths@networkno.de, ralf@linux-mips.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] setup.c: introduce __pa_symbol() and get ride of CPHYSADDR()
Date: Tue, 10 Oct 2006 17:01:53 +0200	[thread overview]
Message-ID: <452BB5E1.5090308@innova-card.com> (raw)
In-Reply-To: <20061010.231944.42203018.anemo@mba.ocn.ne.jp>

Atsushi Nemoto wrote:
> On Tue, 10 Oct 2006 15:49:27 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>> heh ? I'm wondering if anybody is using 'CONFIG_BUILD_ELF64=n' config at
>> all...
> 
> arch/mips/configs/bigsur_defconfig:# CONFIG_BUILD_ELF64 is not set
> arch/mips/configs/ip27_defconfig:# CONFIG_BUILD_ELF64 is not set
> arch/mips/configs/ip32_defconfig:# CONFIG_BUILD_ELF64 is not set
> arch/mips/configs/ocelot_c_defconfig:# CONFIG_BUILD_ELF64 is not set
> arch/mips/configs/ocelot_g_defconfig:# CONFIG_BUILD_ELF64 is not set
> arch/mips/configs/sb1250-swarm_defconfig:# CONFIG_BUILD_ELF64 is not set
> 
> According to arch/mips/configs, nobody is using CONFIG_BUILD_ELF64=y :-)
> 
> Also one might use gcc 3.x which ignore -msym32 option ...
> 

yeah, that's probably the reason...

>> Atsushi, do you have any idea on how address are translated with
>> 'CONFIG_BUILD_ELF64=n' config ? How such code is supposed to work ?
>>
>> 	code_resource.start = virt_to_phys(&_text);
>>  	code_resource.end = virt_to_phys(&_etext) - 1;
>> 	data_resource.start = virt_to_phys(&_etext);
>>  	data_resource.end = virt_to_phys(&_edata) - 1;
>>
>> Let's say that '&_text' is in KSEG0 and is equal to 0xffffffff80000000.
>> In this case virt_to_phys() returns 0x57ffffff80000000
>> (with PAGE_OFFSET = 0xa800000000000000). Is this physical address
>> correct ?
> 
> I think this peice of code is just broken, as you said.  This is bogus
> but harmless since we have not checked these resources are
> successfully registered or not.
> 

what about all other uses of virt_to_phys(x) ? And what the point to set
PAGE_OFFSET to 0xa800000000000000 ? I'm really confused...

		Franck

  reply	other threads:[~2006-10-10 15:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 13:36 [PATCH] setup.c: introduce __pa_symbol() and get ride of CPHYSADDR() Franck Bui-Huu
2006-10-06 17:21 ` Thiemo Seufer
2006-10-09 11:58   ` Franck Bui-Huu
2006-10-09 13:21     ` Thiemo Seufer
2006-10-09 14:25       ` Franck Bui-Huu
2006-10-09 14:58         ` Thiemo Seufer
2006-10-09 15:30           ` Franck Bui-Huu
2006-10-09 15:51           ` Atsushi Nemoto
2006-10-09 16:59             ` Thiemo Seufer
2006-10-10  8:49               ` Atsushi Nemoto
2006-10-10 13:49                 ` Franck Bui-Huu
2006-10-10 14:19                   ` Atsushi Nemoto
2006-10-10 15:01                     ` Franck Bui-Huu [this message]
2006-10-10 15:29                       ` Atsushi Nemoto
2006-10-10 16:04                         ` Franck Bui-Huu
2006-10-10 16:16                           ` Franck Bui-Huu
2006-10-10 21:51                           ` Ralf Baechle
2006-10-11  3:11                             ` Atsushi Nemoto
2006-10-11  9:37                             ` Franck Bui-Huu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=452BB5E1.5090308@innova-card.com \
    --to=vagabon.xyz@gmail.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=ths@networkno.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox