From: David Woodhouse <dwmw2@infradead.org>
To: miguel@cetuc.puc-rio.br
Cc: Ciro Cattuto <ciro@prosa.it>, mtd@infradead.org
Subject: Re: GRUB on DOC: 2Mb issues
Date: Wed, 30 Aug 2000 16:07:07 +0100 [thread overview]
Message-ID: <16105.967648027@passion.cygnus.co.uk> (raw)
In-Reply-To: <1512880772E@mamao.cetuc.puc-rio.br>
miguel@cetuc.puc-rio.br said:
> Yes, but to not waste the second half of pages AND make
> doc_stage1.S work for all devices we would need to add code to
> identify the nand chip. I don't know how much bigger doc_stage1 would
> be, but it will be probably more than 256 bytes.
That's not a problem. We don't currently start the grub stage2 until byte
512 anyway, do we?
You don't even need to write the code to probe - if you set it up right
it'll just happen for you.
Use 768 bytes at the beginning of the flash for doc_stage1.S.
0x000 - 0x0ff holds generic register setup code.
0x100 - 0x1ff holds code specific to the 256-byte-page devices.
0x200 - 0x2ff holds code specific to the 512-byte-page devices.
Now because the IPL ROM only loads the first half of the page on 512-byte
devices, you'll find that whatever type of device you have, you magically
get the 'correct' second half of the loader put into offset 256 when it's
loaded into memory.
Start your grub stage2 at 0x300.
Calculate the checksum over the left-hand-sides of the pages and put it
into the code for 512-byte-page devices.
Now, calculate the checksum for the 256-byte-page devices and put it into
the code for the 256-byte-page devices - where the IPL won't see it if
we're on a 512-byte-page device.
I can hack this up and get it to work on the 512-byte devices if you like.
miguel@cetuc.puc-rio.br said:
> BTW, forgot my suggestion for "loadbios" ioctl...
I didn't forget it. You don't like handling it in userspace - I agree. I
just don't like handling it in the mtd character device _either_ :)
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next prev parent reply other threads:[~2000-08-30 14:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-28 16:50 GRUB on DOC: 2Mb issues Ciro Cattuto
2000-08-28 22:24 ` Miguel Freitas
2000-08-30 8:57 ` David Woodhouse
2000-08-30 13:46 ` Miguel Freitas
2000-08-30 15:07 ` David Woodhouse [this message]
2000-08-30 14:23 ` Miguel Freitas
2000-08-31 16:20 ` David Woodhouse
2000-08-31 23:10 ` Ciro Cattuto
2000-08-30 15:47 ` Ciro Cattuto
2000-08-30 16:31 ` David Woodhouse
2000-08-30 16:39 ` David Woodhouse
2000-08-30 14:21 ` Ciro Cattuto
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=16105.967648027@passion.cygnus.co.uk \
--to=dwmw2@infradead.org \
--cc=ciro@prosa.it \
--cc=miguel@cetuc.puc-rio.br \
--cc=mtd@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