<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Hi ,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thanks for the answers, but still some questions.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I modified the makefile and copied the coreboot before the stripping to vis_1strip and then did an objdump.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">[viswesh@arka image]$ objdump -D --start-address=0xfffffff0 --stop-address=0xffffffff vis_1strip</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">vis_1strip:     file format elf32-i386</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Disassembly of section .ram:<BR>Disassembly of section .rom:<BR>Disassembly of section .reset:</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">fffffff0 <reset_vector>:<BR>fff0:   e9 51 53 ff ff          jmp    ffff5346 <_start+0x2><BR>fff5:   00 00                   add    %al,(%eax)<BR>fff7:   00 e9                   add    %ch,%cl<BR>fff9:   9f                      lahf<BR>fffa:   53                      push   %ebx<BR>fffb:  
 ff                      (bad)<BR>fffc:   ff 00                   incl   (%eax)<BR>        ...<BR>Disassembly of section .id:<BR>[viswesh@arka image]$</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">So here I can actually see the flash location and the opcodes in that location.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">But when I do the same, as you mentioned,  when I try to dump the last 0x20 bytes in coreboot.rom file, I should actually see similar instructions and basically there should be a jump in the last 16 bytes.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">[viswesh@arka image]$ objdump -D coreboot.rom | grep -ni reset_vector<BR>[viswesh@arka image]$ objdump -D coreboot.rom | grep -ni _start</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">[viswesh@arka image]</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Here I have dumped both the beginning and the end of the coreboot,rom file.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">[viswesh@arka image]$ objdump -D coreboot.rom | more</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">coreboot.rom:     file format elf32-i386</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Disassembly of section .note:</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">00100000 <.note>:<BR>  100000:       08 00                   or     %al,(%eax)<BR>  100002:       00 00                   add    %al,(%eax)<BR>  100004:       05 00 00 00 01          add    $0x1000000,%eax<BR>  100009:       00 00                   add    %al,(%eax)<BR>  10000b:       00 45
 4c                add    %al,0x4c(%ebp)<BR>  10000e:       46                      inc    %esi<BR>  10000f:       42                      inc    %edx<BR>  100010:       6f                      outsl  %ds:(%esi),(%dx)<BR>  100011:       6f                      outsl 
 %ds:(%esi),(%dx)<BR>  100012:       74 00                   je     0x100014<BR>  100014:       46                      inc    %esi<BR>  100015:       49                      dec    %ecx<BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">[viswesh@arka image]$ objdump -D coreboot.rom | tail<BR>  13cf96:       00 00                   add    %al,(%eax)<BR>  13cf98:       00 00                   add    %al,(%eax)<BR>  13cf9a:       00 00                   add    %al,(%eax)<BR>  13cf9c:       d1 e5                   shl    %ebp<BR> 
 13cf9e:       10 00                   adc    %al,(%eax)<BR>  13cfa0:       08 00                   or     %al,(%eax)<BR>  13cfa2:       00 00                   add    %al,(%eax)<BR>  13cfa4:       27                      daa<BR>  13cfa5:       e7 10                  
 out    %eax,$0x10<BR>        ...<BR>[viswesh@arka image]$<BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">So here also we dont see any jump to a specific location.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">So basically where should be the code which should be flashed into the location 0xfffffff0.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">(or) how can I locate the code inside the coreboot.rom,if it is there inside the rom file.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thanks in advance,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Viswesh<BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR><BR> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: a a <todthgie@hotmail.com><BR>To: coreboot@coreboot.org<BR>Cc: viswesh_vichu@yahoo.com<BR>Sent: Wednesday, March 26, 2008 1:04:13 PM<BR>Subject: Re: [coreboot] Code flow from reset vector<BR><BR>
<STYLE>
.hmmessage P
{
margin:0px;padding:0px;}
body.hmmessage
{
FONT-SIZE:10pt;FONT-FAMILY:Tahoma;}
</STYLE>
Hello,<BR>Viswesh S wrote:<BR>> Hi,<BR>> I understand the procedure in which internally how the CS register ( <BR>> Segment selector and base address part) make sure that we point to the <BR>> address 0xFFFFFFF0.<BR>correct<BR>> But my doubts are in this part.<BR>> 1) We will be flashing the coreboot.rom into the BIOS flash, right ?<BR>yes and the flash chip is mapped at 0x(1)00000000 - chipsize (0xFFFFFFFF<BR>- chipsize +1 in the core iirc) so a 256Kbyte (0x40000 bytes) chip <BR>would be at 0xFFFC0000....0xFFFFFFFF....<BR>> 2) If we objdump coreboot.rom, dump all the sections, we dont see the <BR>> reset vector part and also the address 0xFFFFFFF0.This could be because <BR>> these sections are stripped off.Is it because of that ?<BR>no, it will be at chipsize -0x10 (0x3FFF0 for a 256Kbyte chip)<BR>coreboot.rom should be EXACLY as long as you flash chip is ....<BR>so 0x10 bytes from the end of the file<BR>> 4) If they are
 stripped off, then when I flash the coreboot.rom, what do <BR>> I flash into the address 0xFFFFFFF0, as the coreboot.rom doesnt even <BR>> contain the data(opcodes ) to write in that location.<BR>no they should not be stripped...<BR>whats in the file @ 0x10 bytes from the end ends op @ 0xFFFFFFF0<BR>> Am I missing anything.<BR>> Regards,<BR>> Viswesh<BR>> ps:- I am trying to correlate my experience in embedded firmware exp, <BR>> where the files we were flashing had absolute addresses and we could <BR>> objdump the flash file to understand the code at each location.<BR>a lot of embedded targets have the flash at 0x00000000 the x86 does not.<BR>the adresses are static but have a offset of 4G-chipsize<BR></DIV></div><br>
      <hr size=1>Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a></body></html>