

			R O M C H E C K



The romcheck program allows you to track down problems with boot EPROMs. It
is therefore only useful if you installed the netboot bootrom into a real
EPROM, onboard Flash-ROM or FlashCard. There is no need to use romcheck with
the bootrom code written onto a floppy or integrated into the system BIOS.




Installation:
============

You can find the romcheck binary in the directory /usr/local/share/netboot/utils
in the file romcheck.bin, after you permanently installed everything. However,
you can also find the binary in the netboot distribution in the directory
misc/romcheck. To use romcheck you have to copy it onto a formatted floppy
disk. The easiest way to do this on a UNIX type system is to use dd:

	dd if=/usr/local/share/netboot/utils/romcheck.bin of=/dev/fd0

Replace /dev/fd0 with the pathname of the floppy device you want to use. After
copying romcheck simply insert the floppy into the boot floppy drive of your
client and boot it up.




Using romcheck:
==============

After starting up your client, romcheck will print a copyright message and
then start scanning the memory area which usually contains boot and BIOS
extension roms. This area usually ranges from physical address C0000 to
EFFFF (all addresses in this text are given as hex numbers). When romcheck
completed the scan, it will print a prompt and ask you for a command. The
following commands are available:

	h  -  print a short help message
	n  -  find and identify a netboot bootrom
	p  -  print a memory map with block graphic characters
	q  -  terminate romcheck and reboot the client
	x  -  print a rom area as a hex dump

First you should use the 'p' command to see the result of the previous
memory scan. You will see several lines of block graphic characters, each
showing the position of one identified rom. The last line gives a guess
about how the physical memory looks like.


Logical rom positions:
	A rom which has been installed in the system, has two different
	properties:

		- physical layout:
			This is what the processor sees on it's address
			bus. That means, if you installed a 32kB EPROM at
			address D0000, everything from that address up to
			D7FFF is occupied by the EPROM, no matter what you
			have programmed into it.

		- logical layout:
			When the system starts up, the BIOS scans the
			option rom area (starting at C0000) for a special
			signature code. Within this code is a byte telling
			how large the ROM is. Suppose you have burned into
			your 32kB EPROM mentioned above a rom image of a
			size of 16kB. The BIOS will then find the rom sig-
			nature at D0000, read the 16kB size byte and there-
			fore assumes a rom ranging from D0000 to D3FFF.
			It will then perform a checksum test on this memory
			range, and only accept the rom image if the checksum
			is ok. If the physical layout is larger than this
			logical size, the remaining physical ROM space can
			be mapped out of the processor memory address space
			and get replaced by RAM depending on the capabilities
			of the mainboard.

	All identified logical rom areas are numbered by romcheck starting
	at 1. The first lines of the memory layout display show the position
	of each such logical area within the scanned memory area. Each line
	is made up of block characters with each block representing a size
	of 4kB of memory. A memory block containg a validly identified rom
	is represented by a dense character block. However, it might be that
	for some reason there is a rom signature but the checksum is invalid.
	In that case, the block character is lighter (see the help text of
	romcheck to have a look at those characters - they can't be correctly
	represented in an ASCII document like this one).

	In a normal setup, you should see one line for each rom you have
	installed (including the video BIOS rom, but excluding the system
	BIOS). Each line should have a contigous area of dense block graphic
	characters. The video BIOS rom usually has a size of 32kB or 64kB
	and starts at address C0000, so you should see either 8 or 16 block
	characters at the beginning of the line numbered 1. All other lines
	represent additionally installed roms, including the netboot bootrom.
	In a normal system, where you have installed no other option rom but
	the bootrom, there should be just a second line, and then only the
	final line describing the physical layout. If you see lines with
	numbers higher than 2, you either have installed a card with a rom
	you don't know about, or you have programmed the bootrom into the
	EPROM twice. It is more or less unlikely that an address line on
	your network card is defective so that it will show up the bootrom
	multiple times. If the bootrom area is not shown with dense characters
	but with lighter block graphic characters, this means that the rom
	signature has been found but the checksum is incorrect. This can have
	several reasons:

		- The EPROM into which you programmed the bootrom is defective.
		  Remove the EPROM, read it with your programmer and compare
		  the EPROM contents with the bootrom image. If it differs,
		  get a new EPROM and try again burning it.

		- The network card has not been configured properly to
		  support the size of the EPROM which has been installed. In
		  this case it only shows the first part of the EPROM
		  image to the processor. Check that your network card has
		  been configured properly.

		- Some network cards physically support 32kB or 64kB boot
		  EPROMs, but only decode the addresses up to a fraction of
		  this size (usually 16kB). Almost any manufacturer has such
		  a cheap but brain-dead network card in it's line of pro-
		  ducts. In this case, the first part of the bootrom will be
		  shown to the processor, romcheck detects the rom signature
		  but fails to verify the checksum. You have to either dis-
		  pose off your network card and buy a new one, or better
		  make yourself a FlashCard.

	In contrast it might be that you only see one line in the logical
	memory display, which is the video BIOS rom. This means, that rom-
	check couldn't find the bootrom signature at all. You should check
	with the physical memory layout (see below) if it could find some
	rom where you installed your bootrom. If the physical display shows
	some rom, but the logical display doesn't show up your bootrom, use
	the hex display mode of romcheck (see below for further information)
	to check if you can see any part of the bootrom within the physical
	rom area. Anyway, this condition usually means, that you didn't
	burn the bootrom image correctly into the EPROM.
	But the more common case is probably, that you can't find anything
	either with the logical memory display (no second line) nor with the
	physical layout display. In this case it's highly likely that your
	network card doesn't enable the EPROM at all. This can have several
	reasons:

		- You didn't setup your network card correctly to enable
		  the EPROM

		- You didn't plug the EPROM into the socket on the network
		  card, or plugged it in incorrectly

		- Your network card doesn't enable the EPROM for some other
		  reason. Especially with PnP-cards, if you don't have a
		  PnP-BIOS, the EPROM only gets enabled after running a PnP
		  setup program. Doing this is impossible for the bootrom.


Physical memory layout:
	romcheck tries to identify the physical type of memory installed
	and will display the scan results in the last line of the memory
	layout display. Similarily to the logical rom display, this line
	consists of block graphic characters, with each block representing
	a size of 4kB. However, the displayed result is just a guess, because
	there are several possible conditions, which romcheck can't identify:

		- Phyiscal ram: this can easily be detected by writing a
			value and then reading it back. If it's the same
			both times, the memory block is positively identi-
			fied as ram. Usually the BIOS doesn't map any ram
			into the scanned option rom area, so there should
			be no ram for romcheck to find. Some network cards
			have a shared ram area, and it might be that romcheck
			will display this. However, usually the network card
			activates it's ram only after being initialized by
			a network driver, so after power-up of the system
			this ram should not be visible.

		- Shadow ram: if the BIOS can identify a rom according to
			it's signature and checksum, some BIOSes might be
			able to copy the rom contents (up to a size given
			by the size byte in the rom signature) into physical
			ram, then tell the chipset to disable any accesses
			to the real rom and map the ram area into the exact
			place where the physical rom has been found. Since
			the chipset usually inhibits writing into this shadow
			ram area, there is no way of identifying it as
			physical ram.

		- Unused memory area: usually not all addresses are occupied by
			physical memory. At the time romcheck starts up, those
			free or unused address ranges are not opened to physi-
			cal ram by the BIOS. Therefore, writing into such an
			address area will result in a noop - nothing happens
			at all. Especially, the written result can't be read
			back. However, read accesses to unused addresses usu-
			ally result in a value of FF throughout the whole
			address range. romcheck tries to identify unused
			memory blocks by checking if they contain the same
			value (FF) for all addresses. Unfortunately, unpro-
			grammed EPROM's also contain all FF's and romcheck
			will not be able to distinguish these from an unused
			address area.

		- Physical rom: if a value can't be written into an address
			range, and this range has not been identified as
			unused by the method mentioned above, it is likely
			to be physical rom. However, there is no way of
			differentiating physical rom from shadow ram.

	Ram areas are displayed by a caret character, while rom areas are
	shown with a dense block graphic character. Unused address areas
	are displayed using a small dot.

	As explained above, romcheck can't differentiate between shadow ram
	and physical rom, but this distinction is unimportant anyway. But
	if you find an area marked as unused where you would expect your
	bootrom, something is wrong with your EPROM. Either you didn't
	program it correctly, or you didn't setup your network card
	correctly to show up with the EPROM on the system bus. You could
	also see here if the network card exports the EPROM completely,
	of if it doesn't show up with the correct size. In the latter
	case you might have setup your network card incorrectly (for
	example it's set to 16kB while you installed a 32kB EPROM), or
	you have one of those brain-dead network cards mentioned above,
	which don't allow complete usage of the installed EPROM.

	There is a fourth possibility besides those described above: that's
	when romcheck is unable to determine the type of memory. As explained
	above unused memory gets checked by reading all FF values over a
	range of addresses. In contrast, there might exist a condition, where
	the same byte value can be read throughout an address range, but it's
	not FF. In this case, romcheck prints a large dot. It might result
	from an incorrectly programmed EPROM, or some strange or unusual
	chipset behaviour.

	If romcheck could find a FlashCard in your system, it will mark the
	first memory block of the flash EPROM with a small up-arrow directly
	below the physical memory display.


After you have used the memory display and checked that it indeed shows
your bootrom, you might want to use the 'n' command. This will let romcheck
tell you the logical rom area number in which it detected the netboot
bootrom. It will also tell you if the rom signature and checksum are
correct, the logical starting and ending addresses of the bootrom, it's
version number and if it is burned into a flash EPROM. All these details
should be correct.

In case you found some error with the previous checks, you can now use
the hex display to further inspect the memory. To do this, use the 'x'
command. romcheck will first ask you which logical rom area you want to
inspect. If you select 0 here, you can give a starting and ending segment
(a segment address represents the highest 4 bytes of the physical memory
address) for inspection. Otherwise, the starting and ending segment will
be determined by the selected logical rom area. Once the hex display
appears, you can use the blank key to advance by one screen, 'b' to backup
one page, 't' to go to the beginning of the selected memory area, 'e' to
go to the end of the selected memory area, and 'q' to return to the main
command prompt.
With this hex display you should take a look at the bootrom and first
check, that you can read it at all. Ideally, you should be able to read
the whole bootrom area. The first two bytes of the bootrom should be
55 AA, which is the rom signature, followed by a byte which gives the
rom size in 512-byte steps. At the end of the bootrom, you will find
an area with all zeroes (compared to an unused address range of all
FF). The very last byte of the bootrom should be different from zero.
It is the two's complement of the sum of all preceding bytes of the
bootrom. Check that it's the same as in the bootrom image file which
you used to program the EPROM.

