public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* RE: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-02-26  0:26 Vadim Khmelnitsky
  2002-02-26  1:06 ` David Woodhouse
  0 siblings, 1 reply; 26+ messages in thread
From: Vadim Khmelnitsky @ 2002-02-26  0:26 UTC (permalink / raw)
  To: 'Ilguiz Latypov', Mark Meade; +Cc: linux-mtd

[Ilguiz]
Vadim, should the Millennium SPL check sum include IPL?

[Vadim]
No . IPL of Millennium chip copies 7K of data out of offset 0x400 and
calculates the checksum  , which should be 0x55 . If it's not 0x55 IPL
returns to BIOS without executing SPL .

Vadim
-----Original Message-----
From: Ilguiz Latypov [mailto:ilatypov@superbt.com]
Sent: Fri, February 22, 2002 2:39 PM
To: Mark Meade
Cc: linux-mtd@lists.infradead.org
Subject: Re: DiskOnChip 2000 and Millenium support in GRUB bootloader 



Mark,

On Fri, 22 Feb 2002, Mark Meade wrote:

> The doc_loadbios output to /dev/mtd0 is off by 512 bytes (when I use an
> offset of 1024):

Thanks for the correction.   I adjusted your patch to take into account 
the almost impossible case when IPL is bigger than erase sector.

> My system now recognizes that something is there, but refuses to boot:
>     Searching for boot record from SCSI: Not Found.

Perhaps, IPL refuses to execute SPL (GRUB's doc_stage1) because the
doc_stage1's check sum didn't include IPL itself.  

Vadim, should the Millennium SPL check sum include IPL?

The other thought is if the stage1 code can be placed instead of IPL.

Ilguiz



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-03-15 22:05 Mark Meade
  0 siblings, 0 replies; 26+ messages in thread
From: Mark Meade @ 2002-03-15 22:05 UTC (permalink / raw)
  To: linux-mtd; +Cc: ilatypov

On Tue, 12 Mar 2002, Ilguiz Latypov wrote:

> inform that DoC Millennium and DoC Millennium Plus feature a Download
> Engine which takes care of copying the flash image into the read-only area
>available at offset 0 of the window.

> Apparently, the XIP IPL doesn't need the DoC 2000 trick with duplicating
> the code for 256-byte and 512-byte page size devices at offsets 0x100 and
> 0x200 respectively.

Ilguiz,

With a DoC Millennium , the doc_stage1 logic will always copy the 
256-byte-page code to RAM, regardless of the chip type.  In fact, because of 
the Millennium's 512 byte "boot block" window, the actual 512-byte page code 
is never directly accessible -- it is always located at 0x200 in this case.

As I mentioned previously, my hack to get my part to work was simply to force 
the 512-byte-page code to 0x100, and everything worked great.  If there are 
256-byte-page parts, this obviously won't work.

One alternative is to have both 256- and 512-byte code located at 
0x100..0x1FF, and determine (at run time) which type of part we have.

One way of doing this would be to have a small look-up table, and based on 
the chip ID, determine the part type.  

Another way (which I've already tested) is to read from flash address 0x200, 
using the 256-byte-page access method.  If we are indeed on a 256-byte 
device, the word at 0x200 will always match the code word at %cs:doc_stage1b.

In a 512-byte device, reading this address actually reads 0x400, which will 
*most likely* not match, as it is actually stage 2 GRUB code.  We could 
compare more bytes, if necessary, to reduce the possibility that this could 
happen.

Maybe there is an easier, cleaner way to handle this problem -- but I haven't 
found it yet.  Does it make sense to pursue this further?

Regards,

Mark

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-03-11 18:06 Mark Meade
  2002-03-12 21:07 ` Ilguiz Latypov
  0 siblings, 1 reply; 26+ messages in thread
From: Mark Meade @ 2002-03-11 18:06 UTC (permalink / raw)
  To: linux-mtd; +Cc: ilatypov

On Sun, 10 Mar 2002, Ilguiz Latypov wrote:

> I was able to test the grub_firmware file produced by the patch on a 64M
> DoC 2000.  Yes, I could get to the GRUB prompt and play with "root (dc0,"
> command.  GRUB can access the configuration file and the kernel image
> stored in ext2 partition.  The partition was created on top of NFTL block
> device layer.
>
> Mark Meade has offered few improvements to the patch.  I think there are 2 
> latest changes that may be of interest to you:
>
>  a) New configuration option --enable-diskonchip-biosnetboot will make 
>      GRUB firmware to attach itself to INT 18h (BIOS network boot) rather 
>      than to INT 19h (BIOS bootstrap loader).  If you try that option, 
>      enable network boot in BIOS as well.
>
>   b) The DoC SlowIO register is no longer read when fetching the data 
>      from the flash memory.
>
> I updated the patch.  It is available at
>    
> http://savannah.gnu.org/patch/?func=detailpatch&patch_id=164&group_id=68

Ilguiz,

I have been testing your latest patch with the DoC Millennium.  I'm able to 
get a GRUB prompt only after forcing the 512-byte-page code (doc_stage1b.S) 
to address 0x100.

Normally, it looks like the 256-byte/page code ends up at 0x100, and the 
512-byte at 0x200.  With the DoC 2000, this insures that the proper code 
(loaded by the IPL) ends up at 0x100.

Since the Millennium is XIP, jumping to 0x100 ends up running 256-byte-page 
code, which doesn't work in this case.

You mentioned that there are DoC Millennium parts based on 256-byte-page 
chips -- so my hack to force the 512-byte code to 0x100 will not work 
correctly for all Millennium parts.

Any thoughts or ideas?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 26+ messages in thread
[parent not found: <Pine.LNX.4.44.0203041529100.20113-100000@server.superbt.com>]
* Re: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-03-04 20:54 ilatypov
  0 siblings, 0 replies; 26+ messages in thread
From: ilatypov @ 2002-03-04 20:54 UTC (permalink / raw)
  To: Mark Meade, David Woodhouse; +Cc: Linux MTD mailing list

Mark,

Thanks a lot for your contribution.  I totally missed the DoC segment
issue you have identified.  What was your fix?  Do you copy %cs to %ds in
case doc_stage1 is IPL itself?  Are there any extra things to be done to 
make the code eXecute-In-Place?

I will modify the checksum program to generate a different value when
"--enable-diskonchip-ipl" option is supplied to the configure script.

I will also add an option to hook to the diskless boot int 18h handler.  

I found a detailed explanation of the PC BIOS startup at
    http://etherboot.sourceforge.net/doc/html/devman-3.html

Dave, is DoC Millennium documentation still available?  Mark has made
significant testing and coding with the GRUB patch.

Mark, my DoC Millennium modifications to the MTD GRUB patch were based on 
the doc2000.c kernel driver code from MTD repository.  Perhaps, I wasn't 
careful enough in copying the necessary operations.

Ilguiz

On Fri, 1 Mar 2002, Mark Meade wrote:

> 1) Some BIOS's don't like extensions without correct checksums.
[..]
> 2) For some reason, my BIOS won't let me override the int 19 handler.  
[..]
> 3) I made additional minor changes in doc_stage1.S to save and restore
> the doc segment correctly.  The boot block on a Millennium is an XIP
> block; _start is not running at 0x20000 in this case.
[..]

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-03-02  2:51 Mark Meade
  0 siblings, 0 replies; 26+ messages in thread
From: Mark Meade @ 2002-03-02  2:51 UTC (permalink / raw)
  To: linux-mtd; +Cc: Ilguiz Latypov

On Thu, 28 Feb 2002, Ilguiz Latypov wrote:

> I changed stage1/doc_stage1{,b}.S so that the GRUB firmware
> will correctly replace the BIOS extension initialization code of DoC
> Millennium.

Ilguiz,

I've downloaded your latest GRUB patches, and I've discovered a few minor problems:

1) Some BIOS's don't like extensions without correct checksums.  I modified doc_stage1.S
and added Makefile calls to the "makerom" program (originally found in /mtd/boot).  This
fixes the checksum problem; now the code to install the int 19 handler will be executed.

2) For some reason, my BIOS won't let me override the int 19 handler.  To get around this,
I changed it to an int 18 handler, and this works fine when the BIOS is set to boot from
"Network".  Using int 18 rather than 19 also allows me to boot from the hard drive without
having to remove the DOC.

IMHO, it might be a good idea to allow the use of int 18 or int 19 as a compile time
option.

3) I made additional minor changes in doc_stage1.S to save and restore the doc segment
correctly.   The boot block on a Millennium is an XIP block; _start is not running at
0x20000 in this case.

At this point, I get all the way to the "Jumping to Grub" message, and then it locks up.
I suspect that there might be a problem in the logic that copies stage2 from the DOC to
0x8200.  I haven't found any documentation on Millennium pipeline reads, so I might need
some help here :-).

I'm an open source newbie, so if you think these changes will do you any good, let me know
how to get them to you.

Regards,

Mark

^ permalink raw reply	[flat|nested] 26+ messages in thread
[parent not found: <87k7sxevml.wl@enter.planet.of.kuicr.kyoto-u.ac.jp>]
* RE: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-02-26  0:39 Vadim Khmelnitsky
  0 siblings, 0 replies; 26+ messages in thread
From: Vadim Khmelnitsky @ 2002-02-26  0:39 UTC (permalink / raw)
  To: 'Ilguiz Latypov', Mark Meade; +Cc: linux-mtd

Another thing that i forgot to mention earlier . When you guys write SPL to
flash i assume you read the content of the first 1Kb ( 2 copies of IPL ) of
flash and attach it to your SPL . The important thing here is to write IPL
part with ECC/EDC syndrom . Otherwise, IPL will not be able to read SPL out
of flash .

Vadim

-----Original Message-----
From: Vadim Khmelnitsky [mailto:VadimK@m-sys.com]
Sent: Mon, February 25, 2002 4:26 PM
To: 'Ilguiz Latypov'; Mark Meade
Cc: linux-mtd@lists.infradead.org
Subject: RE: DiskOnChip 2000 and Millenium support in GRUB bootloader 


[Ilguiz]
Vadim, should the Millennium SPL check sum include IPL?

[Vadim]
No . IPL of Millennium chip copies 7K of data out of offset 0x400 and
calculates the checksum  , which should be 0x55 . If it's not 0x55 IPL
returns to BIOS without executing SPL .

Vadim
-----Original Message-----
From: Ilguiz Latypov [mailto:ilatypov@superbt.com]
Sent: Fri, February 22, 2002 2:39 PM
To: Mark Meade
Cc: linux-mtd@lists.infradead.org
Subject: Re: DiskOnChip 2000 and Millenium support in GRUB bootloader 



Mark,

On Fri, 22 Feb 2002, Mark Meade wrote:

> The doc_loadbios output to /dev/mtd0 is off by 512 bytes (when I use an
> offset of 1024):

Thanks for the correction.   I adjusted your patch to take into account 
the almost impossible case when IPL is bigger than erase sector.

> My system now recognizes that something is there, but refuses to boot:
>     Searching for boot record from SCSI: Not Found.

Perhaps, IPL refuses to execute SPL (GRUB's doc_stage1) because the
doc_stage1's check sum didn't include IPL itself.  

Vadim, should the Millennium SPL check sum include IPL?

The other thought is if the stage1 code can be placed instead of IPL.

Ilguiz



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* RE: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-02-23  0:23 Vadim Khmelnitsky
  0 siblings, 0 replies; 26+ messages in thread
From: Vadim Khmelnitsky @ 2002-02-23  0:23 UTC (permalink / raw)
  To: 'Ilguiz Latypov', Mark Meade; +Cc: linux-mtd

[Ilguiz]
Vadim, should the Millennium SPL check sum include IPL?

[Vadim]
I will verify it with IPL developer , but as far as i know there is no
difference in behavior between IPL of DOC2000 and Millennium .

IPL that you use should load SPL ( secondary program loader ) . In case
of Millennium chip SPL should be placed right after IPL ( offset 0x400 ) and
i think that size of SPL should be no longer than 7K . 1KB of IPL + 7KB of
SPL = 8KB , which is the size of the Millennium chip erasable unit .


Vadim
  



-----Original Message-----
From: Ilguiz Latypov [mailto:ilatypov@superbt.com]
Sent: Fri, February 22, 2002 2:39 PM
To: Mark Meade
Cc: linux-mtd@lists.infradead.org
Subject: Re: DiskOnChip 2000 and Millenium support in GRUB bootloader 



Mark,

On Fri, 22 Feb 2002, Mark Meade wrote:

> The doc_loadbios output to /dev/mtd0 is off by 512 bytes (when I use an
> offset of 1024):

Thanks for the correction.   I adjusted your patch to take into account 
the almost impossible case when IPL is bigger than erase sector.

> My system now recognizes that something is there, but refuses to boot:
>     Searching for boot record from SCSI: Not Found.

Perhaps, IPL refuses to execute SPL (GRUB's doc_stage1) because the
doc_stage1's check sum didn't include IPL itself.  

Vadim, should the Millennium SPL check sum include IPL?

The other thought is if the stage1 code can be placed instead of IPL.

Ilguiz



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* RE: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-02-21 22:50 Vadim Khmelnitsky
  2002-02-22  5:37 ` Ilguiz Latypov
  0 siblings, 1 reply; 26+ messages in thread
From: Vadim Khmelnitsky @ 2002-02-21 22:50 UTC (permalink / raw)
  To: 'Mark Meade', Ilguiz Latypov; +Cc: linux-mtd

Guys,
I'm not sure what doc-loadbios is doing, but i assume that it writes some
stuff to the physical offset 0 of the diskonchip
in order to replace diskonchip BIOS driver with grub loader .
It should work fine with DOC2000 series , since the IPL code ( the one that
starts with 55AA signature ) is placed in ROM .
It will not work for the Millennium chip because IPL code is placed in flash
( offset 0 ) and downloaded to SRAM upon reset.
Millennium chip has small piece of SRAM instead of ROM . So, like i said
upon reset first 512 bytes of data are downloaded from flash to SRAM . Then
BIOS can access it read 55AA signature and hand control over to this piece
of code .
If you want to make doc-loadbios to work with Millennium chip you should put
it behind IPL code . IPL is 512 bites long . We have two copies of it . So,
you can put your code at offset 1KB .

Vadim


-----Original Message-----
From: Mark Meade [mailto:mark@lakeshoremicro.com]
Sent: Thu, February 21, 2002 2:32 PM
To: Ilguiz Latypov
Cc: linux-mtd@lists.infradead.org
Subject: Re: DiskOnChip 2000 and Millenium support in GRUB bootloader 


Ilguiz,

It appears that the 2-byte signature (55 AA) is not there after I run the
"doc_loadbios"
program.  The entire IPL that was there (after the M-Sys DFORMAT) is
modified by
doc_loadbios.  The motherboard BIOS is no longer seeing that 2-byte
signature, so none of
the other steps are even attempted.

I did apply the grub-2002-02-19-doc.patch prior to trying all of this; I
used the
2002-02-19 version of GRUB as detailed in your initial post, using the
configure options
specified.

Regards,

Mark

On Thur, 21 Feb 2002,  Ilguiz Latypov wrote:

> Can you please try the updated DoC GRUB patch?  This shouldn't fix the INT
> 19h problem though.





______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-02-20 22:25 Mark Meade
  2002-02-20 23:38 ` Ilguiz Latypov
  0 siblings, 1 reply; 26+ messages in thread
From: Mark Meade @ 2002-02-20 22:25 UTC (permalink / raw)
  To: linux-mtd

On 19 Feb 2002, Ilguiz Latypov wrote:

> Can anybody with DOC Millenium try the patch?  It's
>     patches/grub-2002-02-19-doc.patch

Hi,

I have an 8MB DOC Millenium, and have been booting successfully with the mtd-patched LILO.

I was able to apply the patch, and successfully build the grub_firmware file.  I've
followed the instructions posted earlier on this list (using doc_loadbios), but I can't
seem to make it boot.

I'm trying to boot from the DOC ISA eval board on a PC with an AMI BIOS -- and I believe
"boot from NETWORK" should call INT 18h.  I also tried booting from a floppy with the boot
record modified to call int 18.  In either case, my PC doesn't seem to recognize the DOC
at boot time.

I'd love to help out in testing this part -- Can I provide any more information, or maybe
I'm just missing something easy?

Regards,

Mark

^ permalink raw reply	[flat|nested] 26+ messages in thread
* DiskOnChip 2000 and Millenium support in GRUB bootloader
@ 2002-02-19 22:51 Ilguiz Latypov
  0 siblings, 0 replies; 26+ messages in thread
From: Ilguiz Latypov @ 2002-02-19 22:51 UTC (permalink / raw)
  To: Linux MTD mailing list

Hello,

I copied the Millenium-specific operations from the existing MTD driver to
the GRUB bootloader.  Thanks a lot to David for his original
implementation of the GRUB-compatible booloader.

Can anybody with DOC Millenium try the patch?  It's
    patches/grub-2002-02-19-doc.patch
in the Linux MTD repository described at
    http://linux-mtd.infradead.org/

The patch can be applied against the 2002-02-19 version of GRUB CVS at 
    http://savannah.gnu.org/cvs/?group_id=68

I tested the patch with a 64M DiskOnChip 2000.  The GRUB configure command 
was as follows:
    ./configure --enable-diskonchip --disable-ffs --disable-xfs 
                --disable-jfs --disable-vstafs --disable-reiserfs 
                --disable-minix --disable-fat

This left only ext2 read access in GRUB to load the kernel, as my 
DiskOnChip was split into ext2 and ext3 partitions.

The firmware file will be generated in the GRUB's stage1 directory.  I 
copied the stage1 source code to generate a stand-alone patch against 
GRUB repository.

Ilguiz

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2002-03-20  8:37 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-26  0:26 DiskOnChip 2000 and Millenium support in GRUB bootloader Vadim Khmelnitsky
2002-02-26  1:06 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2002-03-15 22:05 Mark Meade
2002-03-11 18:06 Mark Meade
2002-03-12 21:07 ` Ilguiz Latypov
     [not found] <Pine.LNX.4.44.0203041529100.20113-100000@server.superbt.com>
2002-03-04 21:48 ` Mark Meade
2002-03-04 20:54 ilatypov
2002-03-02  2:51 Mark Meade
     [not found] <87k7sxevml.wl@enter.planet.of.kuicr.kyoto-u.ac.jp>
2002-03-01  2:44 ` Ilguiz Latypov
2002-03-01  7:19   ` David Woodhouse
2002-03-20  8:48     ` Yoshinori K. Okuji
2002-02-26  0:39 Vadim Khmelnitsky
2002-02-23  0:23 Vadim Khmelnitsky
2002-02-21 22:50 Vadim Khmelnitsky
2002-02-22  5:37 ` Ilguiz Latypov
2002-02-22 16:17   ` Mark Meade
2002-02-22 16:59     ` Ilguiz Latypov
2002-02-22 20:32       ` Mark Meade
2002-02-22 22:38         ` Ilguiz Latypov
2002-02-20 22:25 Mark Meade
2002-02-20 23:38 ` Ilguiz Latypov
2002-02-21  1:01   ` Mark Meade
2002-02-21 22:08     ` Ilguiz Latypov
2002-02-21 22:13       ` Ilguiz Latypov
2002-02-21 22:32       ` Mark Meade
2002-02-19 22:51 Ilguiz Latypov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox