* [U-Boot-Users] TFTP boot in u-boot
2004-04-09 11:51 [U-Boot-Users] TFTP boot in u-boot Kruthi
@ 2004-04-09 11:28 ` ganapathi
2004-04-09 14:01 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: ganapathi @ 2004-04-09 11:28 UTC (permalink / raw)
To: u-boot
Hi,
Your way of loading is wrong.
You have to follow the below procedure
1. download the elf image into memory some where, say example
tftpboot 0x800000 linux.dxe
(consider the memory space availability and use the address according to
that.)
2. use the "bootelf" command to load the ELF image.
bootelf 0x800000
Regards
Ganapathi C
----- Original Message -----
From: "Kruthi" <kruthi_77@coolgoose.com>
To: <u-boot-users@lists.sourceforge.net>
Sent: Friday, April 09, 2004 5:21 PM
Subject: [U-Boot-Users] TFTP boot in u-boot
> Hi,
>
> I am trying to do some porting for the blackfin bf533 processor. Currently
i am
> working with tftp boot. I am able to transfer a file from the host to the
target. Now i
> need to boot the linux image on the target. I am just taking the bf533 2.4
kernel
> available in the blackfin site and i want to boot this via tftp.
>
> i just say tftpboot 1000 linux.dxe.
>
> (Actually an elf header gets added to the contents of around 94 bytes. So
i even
> tried loading the linux.dxe to (1000 - 94), i have compared the objdump
with the
> VDSP contents. Its just 1to1.
>
> when i say go 1000, it simply hangs. When i try to stop VDSP and load the
PC
> with 1000 and say go also it hangs. Do i need to do something else?
>
> I also tried by creating uImage as mentioned under README. Is it really
required?
>
> Pls let me know how can i boot this linux image from my bootloader?
>
> regards
> kruthi
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] TFTP boot in u-boot
@ 2004-04-09 11:51 Kruthi
2004-04-09 11:28 ` ganapathi
0 siblings, 1 reply; 7+ messages in thread
From: Kruthi @ 2004-04-09 11:51 UTC (permalink / raw)
To: u-boot
Hi,
I am trying to do some porting for the blackfin bf533 processor. Currently i am
working with tftp boot. I am able to transfer a file from the host to the target. Now i
need to boot the linux image on the target. I am just taking the bf533 2.4 kernel
available in the blackfin site and i want to boot this via tftp.
i just say tftpboot 1000 linux.dxe.
(Actually an elf header gets added to the contents of around 94 bytes. So i even
tried loading the linux.dxe to (1000 - 94), i have compared the objdump with the
VDSP contents. Its just 1to1.
when i say go 1000, it simply hangs. When i try to stop VDSP and load the PC
with 1000 and say go also it hangs. Do i need to do something else?
I also tried by creating uImage as mentioned under README. Is it really required?
Pls let me know how can i boot this linux image from my bootloader?
regards
kruthi
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] TFTP boot in u-boot
2004-04-09 11:28 ` ganapathi
@ 2004-04-09 14:01 ` Wolfgang Denk
2004-04-11 4:44 ` [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword? Masao Uebayashi
0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2004-04-09 14:01 UTC (permalink / raw)
To: u-boot
In message <00f501c41e25$bfd977e0$af00a8c0@tidelpark.isofttechindia.com> you wrote:
> Hi,
> Your way of loading is wrong.
>
> You have to follow the below procedure
> 1. download the elf image into memory some where, say example
> tftpboot 0x800000 linux.dxe
> (consider the memory space availability and use the address according to
> that.)
>
> 2. use the "bootelf" command to load the ELF image.
> bootelf 0x800000
If this is really the case, then the Linux support for this
proccessor is not implemented correctly. U-Boot is supposed to allow
"tftp ... ; bootm" on all known architectures.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
What was sliced bread the greatest thing since?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword?
2004-04-09 14:01 ` Wolfgang Denk
@ 2004-04-11 4:44 ` Masao Uebayashi
2004-04-12 7:54 ` Masami Komiya
0 siblings, 1 reply; 7+ messages in thread
From: Masao Uebayashi @ 2004-04-11 4:44 UTC (permalink / raw)
To: u-boot
Hello.
Is there anyone successfully using
pci_hose_write_config_{byte,word}_via_dword defined as a macro in
drivers/pci.c? Or, are you sure what the code there is doing? When I
tried to use it, writing a byte failed and I used the following code.
I think the current code is just wrong, but I can't explain how it's
wrong since I can't understand the intention of the code. :-)
Masao
\f
#define __mask(_o, _v) \
(_v << ((offset & _o) * 8))
#define __data(_o, _v) \
((((unsigned long)(val)) & _v) << ((offset & _o) * 8))
#define PCI_WRITE_VIA_DWORD_OP(__size, __type, __offsetmask, __valmask) \
int pci_hose_write_config_##__size##_via_dword( \
struct pci_controller *hose, \
pci_dev_t dev, \
int offset, \
__type val) \
{ \
u32 val32; \
\
if (pci_hose_read_config_dword(hose, dev, offset & ~0x3, &val32) < 0) \
return -1; \
/* Clear a byte/word in a word. */ \
val32 &= ~__mask(__offsetmask, __valmask); \
/* Fill a cleared byte/word in a word with a byte/word value. */ \
val32 |= __data(__offsetmask, __valmask); \
/* Write the value as a word! */ \
if (pci_hose_write_config_dword(hose, dev, offset & ~0x3, val32) < 0) \
return -1; \
\
return 0; \
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword?
2004-04-11 4:44 ` [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword? Masao Uebayashi
@ 2004-04-12 7:54 ` Masami Komiya
2004-04-12 9:10 ` Masami Komiya
0 siblings, 1 reply; 7+ messages in thread
From: Masami Komiya @ 2004-04-12 7:54 UTC (permalink / raw)
To: u-boot
I have confirmed the problem reported in this list.
When pci_hose_write_config_{byte,word}_via_dword is used
the upper byte is destroied.
If you can access pci device, please execute pci command
as the followings.
# pci w.l 00.0c.00 10 12345600
# pci display 00.0c.00 10
00000010: 12345601 10000000 00000000 00000000
# pci w.b 00.0c.00 13 ff
# pci display 00.0c.00 10
00000010: ff345601 10000000 00000000 00000000 <== GOOD
-----------------------------------------------------------
# pci w.l 00.0c.00 10 12345600
# pci display 00.0c.00 10
00000010: 12345601 10000000 00000000 00000000
# pci w.b 00.0c.00 12 ff
# pci display 00.0c.00 10
00000010: 00ff5601 10000000 00000000 00000000 <== NG
-----------------------------------------------------------
# pci w.l 00.0c.00 10 12345600
# pci display 00.0c.00 10
00000010: 12345601 10000000 00000000 00000000
# pci w.b 00.0c.00 11 ff
# pci display 00.0c.00 10
00000010: 0034ff01 10000000 00000000 00000000 <== NG
-----------------------------------------------------------
# pci w.l 00.0c.00 10 12345600
# pci display 00.0c.00 10
00000010: 12345601 10000000 00000000 00000000
# pci w.w 00.0c.00 10 ffff
# pci display 00.0c.00 10
00000010: 0000ff01 10000000 00000000 00000000 <== NG
How is your result ?
Best regards.
Masami Komiya
Masao Uebayashi wrote:
> Hello.
>
> Is there anyone successfully using
> pci_hose_write_config_{byte,word}_via_dword defined as a macro in
> drivers/pci.c? Or, are you sure what the code there is doing? When I
> tried to use it, writing a byte failed and I used the following code.
>
> I think the current code is just wrong, but I can't explain how it's
> wrong since I can't understand the intention of the code. :-)
>
> Masao
> \f
> #define __mask(_o, _v) \
> (_v << ((offset & _o) * 8))
>
> #define __data(_o, _v) \
> ((((unsigned long)(val)) & _v) << ((offset & _o) * 8))
>
> #define PCI_WRITE_VIA_DWORD_OP(__size, __type, __offsetmask, __valmask) \
> int pci_hose_write_config_##__size##_via_dword( \
> struct pci_controller *hose, \
> pci_dev_t dev, \
> int offset, \
> __type val) \
> { \
> u32 val32; \
> \
> if (pci_hose_read_config_dword(hose, dev, offset & ~0x3, &val32) < 0) \
> return -1; \
> /* Clear a byte/word in a word. */ \
> val32 &= ~__mask(__offsetmask, __valmask); \
> /* Fill a cleared byte/word in a word with a byte/word value. */ \
> val32 |= __data(__offsetmask, __valmask); \
> /* Write the value as a word! */ \
> if (pci_hose_write_config_dword(hose, dev, offset & ~0x3, val32) < 0) \
> return -1; \
> \
> return 0; \
> }
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword?
2004-04-12 7:54 ` Masami Komiya
@ 2004-04-12 9:10 ` Masami Komiya
2004-04-18 22:07 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Masami Komiya @ 2004-04-12 9:10 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
The attached patch fixes the pci_hose_write_config_{byte,word}_via_dword problem.
The original code is difficult to understand, so I have changed
the code not only fixing.
Best regards.
Masami Komiya
Masami Komiya wrote:
> I have confirmed the problem reported in this list.
>
> When pci_hose_write_config_{byte,word}_via_dword is used
> the upper byte is destroied.
>
> If you can access pci device, please execute pci command
> as the followings.
>
> # pci w.l 00.0c.00 10 12345600
> # pci display 00.0c.00 10
> 00000010: 12345601 10000000 00000000 00000000
>
> # pci w.b 00.0c.00 13 ff
> # pci display 00.0c.00 10
> 00000010: ff345601 10000000 00000000 00000000 <== GOOD
>
> -----------------------------------------------------------
>
> # pci w.l 00.0c.00 10 12345600
> # pci display 00.0c.00 10
> 00000010: 12345601 10000000 00000000 00000000
>
> # pci w.b 00.0c.00 12 ff
> # pci display 00.0c.00 10
> 00000010: 00ff5601 10000000 00000000 00000000 <== NG
>
> -----------------------------------------------------------
>
> # pci w.l 00.0c.00 10 12345600
> # pci display 00.0c.00 10
> 00000010: 12345601 10000000 00000000 00000000
>
> # pci w.b 00.0c.00 11 ff
> # pci display 00.0c.00 10
> 00000010: 0034ff01 10000000 00000000 00000000 <== NG
>
> -----------------------------------------------------------
>
> # pci w.l 00.0c.00 10 12345600
> # pci display 00.0c.00 10
> 00000010: 12345601 10000000 00000000 00000000
>
> # pci w.w 00.0c.00 10 ffff
> # pci display 00.0c.00 10
> 00000010: 0000ff01 10000000 00000000 00000000 <== NG
>
> How is your result ?
>
> Best regards.
>
> Masami Komiya
>
>
> Masao Uebayashi wrote:
>
>> Hello.
>>
>> Is there anyone successfully using
>> pci_hose_write_config_{byte,word}_via_dword defined as a macro in
>> drivers/pci.c? Or, are you sure what the code there is doing? When I
>> tried to use it, writing a byte failed and I used the following code.
>>
>> I think the current code is just wrong, but I can't explain how it's
>> wrong since I can't understand the intention of the code. :-)
>>
>> Masao
>> \f
>> #define __mask(_o, _v) \
>> (_v << ((offset & _o) * 8))
>>
>> #define __data(_o, _v) \
>> ((((unsigned long)(val)) & _v) << ((offset & _o) * 8))
>>
>> #define PCI_WRITE_VIA_DWORD_OP(__size, __type, __offsetmask,
>> __valmask) \
>> int pci_hose_write_config_##__size##_via_dword( \
>> struct pci_controller *hose, \
>> pci_dev_t dev, \
>> int offset, \
>> __type val) \
>> { \
>> u32 val32; \
>> \
>> if (pci_hose_read_config_dword(hose, dev, offset & ~0x3, &val32) <
>> 0) \
>> return -1; \
>> /* Clear a byte/word in a word. */ \
>> val32 &= ~__mask(__offsetmask, __valmask); \
>> /* Fill a cleared byte/word in a word with a byte/word value. */ \
>> val32 |= __data(__offsetmask, __valmask); \
>> /* Write the value as a word! */ \
>> if (pci_hose_write_config_dword(hose, dev, offset & ~0x3, val32) <
>> 0) \
>> return -1; \
>> \
>> return 0; \
>> }
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: IBM Linux Tutorials
>> Free Linux tutorial presented by Daniel Robbins, President and CEO of
>> GenToo technologies. Learn everything from fundamentals to system
>> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>> _______________________________________________
>> U-Boot-Users mailing list
>> U-Boot-Users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pci.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20040412/90d1a5a0/attachment.txt
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword?
2004-04-12 9:10 ` Masami Komiya
@ 2004-04-18 22:07 ` Wolfgang Denk
0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2004-04-18 22:07 UTC (permalink / raw)
To: u-boot
In message <407A5CEC.9070507@sonare.it> you wrote:
>
> The attached patch fixes the pci_hose_write_config_{byte,word}_via_dword problem.
Checked in.
> The original code is difficult to understand, so I have changed
> the code not only fixing.
Thanks.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
To be is to program.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-04-18 22:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-09 11:51 [U-Boot-Users] TFTP boot in u-boot Kruthi
2004-04-09 11:28 ` ganapathi
2004-04-09 14:01 ` Wolfgang Denk
2004-04-11 4:44 ` [U-Boot-Users] pci_hose_write_config_{byte,word}_via_dword? Masao Uebayashi
2004-04-12 7:54 ` Masami Komiya
2004-04-12 9:10 ` Masami Komiya
2004-04-18 22:07 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox