From: "Mark Meade" <mark@lakeshoremicro.com>
To: "Ilguiz Latypov" <ilatypov@superbt.com>,
"David Woodhouse" <dwmw2@infradead.org>
Cc: "Linux MTD mailing list" <linux-mtd@lists.infradead.org>
Subject: Re: DiskOnChip 2000 and Millenium support in GRUB bootloader
Date: Mon, 4 Mar 2002 16:48:56 -0500 [thread overview]
Message-ID: <005301c1c3c6$87ceea30$0101a8c0@dellc800> (raw)
In-Reply-To: Pine.LNX.4.44.0203041529100.20113-100000@server.superbt.com
On Mon, 4 Mar 2002, Ilguiz Latypov wrote:
> 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?
Ilguiz,
The segment issue is minor -- the original code assumed that _start was loaded at 0x20000
by the IPL, but in this case, we are executing in place, at 0xD0000 (for example).
So instead of this:
#ifndef DOC_REPLACE_IPL
/* Store the DiskOnChip segment */
movw %ds, %cs:doc_seg
#endif
I added the following, after the int 18/19 handler has been copied to the end of memory:
#ifdef DOC_REPLACE_IPL
/* Store the DiskOnChip segment (XIP from the IPL area) */
movw %cs, %es:doc_seg
#endif
When the interrupt handler is called, doc_seg is now in the correct spot.
I suppose it's possible to let the int handler XIP also, but it just seemed to fit better
with existing code to copy it to the 1K segment at the top of memory. This way, no more
Millennium-specific changes are required in doc_stage1b.S.
> I will modify the checksum program to generate a different value when
> "--enable-diskonchip-ipl" option is supplied to the configure script.
I had to add the checksum byte and a jump to the _start routine:
#ifdef DOC_REPLACE_IPL
/*
* _start is in the beginning of DoC Millennium flash memory
*/
.byte 0x55, 0xAA /* BIOS extension signature */
.byte 0x10 /* DoC window is 8K (16*512) in size */
/* BIOS will call far _start + 3 */
jmp over
.byte 0 /* BIOS extension checksum goes here */
#endif
over:
> I will also add an option to hook to the diskless boot int 18h handler.
Thanks! This makes it easier for me to test. I had one occasion when a botched int 19
handler made it impossible to boot with the DOC installed. I had to remove the DOC, boot
into DOS, install the DOC (with the PC turned on), and then erase it. Needless to say,
I'm trying to avoid having to do this again. ;-)
> 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.
I looked at that source late Friday, but I haven't had time to get real serious about it
yet. I've found some assembly sources related to the Linux BIOS project that may help,
also.
Mark
next parent reply other threads:[~2002-03-04 21:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0203041529100.20113-100000@server.superbt.com>
2002-03-04 21:48 ` Mark Meade [this message]
2002-03-15 22:05 DiskOnChip 2000 and Millenium support in GRUB bootloader Mark Meade
-- strict thread matches above, loose matches on Subject: below --
2002-03-11 18:06 Mark Meade
2002-03-12 21:07 ` Ilguiz Latypov
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-26 0:26 Vadim Khmelnitsky
2002-02-26 1:06 ` David Woodhouse
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
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='005301c1c3c6$87ceea30$0101a8c0@dellc800' \
--to=mark@lakeshoremicro.com \
--cc=dwmw2@infradead.org \
--cc=ilatypov@superbt.com \
--cc=linux-mtd@lists.infradead.org \
/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