Hi,
Guenter schrieb:
> a lot of Realtek RTL8139 NICs have a DIL-32 bootrom socket, and it is
> possible from DOS to flash PXE bootcode directly onboard provided you
> use ATMEL AT29C512 or AT29C010A flashs; here's the download of the
> Realtek flash program (see DOS section):
Many cards tie the "write enable" Pin to its logic "not enabled" state
instead of connecting to the chip, so flash writes are impossible on
_most_ card types I came across. YMMV.
> http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=6&PFid=6&Level=5&Conn=4&DownTypeID=3&GetDown=false
>
> unfortunately Realtek's flash utility only supports ATMEL flashs, and
> even more worse is the trap that you can only flash the chip if it is
> detected by the BIOS - if you just insert an empty chip then it didnt
> work for me; the chip needs at least the 55AA code at the beginning so
> that its memory is mapped into adapter space by the MB BIOS.
> Do you think that it is possible to add support for flashing these cards
> (omst likely the RTL8169 GB NICs work same) to flashrom?
RTL8169 uses different addresses IIRC. Same problem with hard wired
Write Enable pin - see above.
I have still some not-really-working code from my earlier experiments. I
could read the chip-id and erase the chip - but the erase test failed
afterwards, though the cips' contents seemed to be all 0xFF.
If you are still interested: The attached .c file contains details on
how to talk to the flash chip on RTL 8139 NIC.
-- J. Fischer
/*
* This file is part of the flashrom project.
*
* Copyright (C) 2009 Joerg Fischer <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "flash.h"
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_VENDOR_ID_SMC1211 0x1113
#define BIOS_ROM_ADDR 0xD4
#define BIOS_ROM_DATA 0xD7
struct pcidev_status nics_realtek[] = {
{0x10ec, 0x8139, PCI_OK, "Realtek","rtl8139b/c PCI 10/100 Mbps"},
{},
};
struct pcidev_status nics_smc1211[] = {
{0x1113, 0x1211, PCI_OK, "SMC", "SMC 1211TX rtl8139 clone 10/100 Mbps"},
{}
};
int nicrealtek_init(void)
{
get_io_perms();
io_base_addr = pcidev_init(PCI_VENDOR_ID_REALTEK, nics_realtek,
programmer_param);
buses_supported = CHIP_BUSTYPE_PARALLEL;
return 0;
}
int nicsmc1211_init(void)
{
get_io_perms();
io_base_addr = pcidev_init(PCI_VENDOR_ID_SMC1211, nics_smc1211,
programmer_param);
buses_supported = CHIP_BUSTYPE_PARALLEL;
return 0;
}
int nicrealtek_shutdown(void)
{
free(programmer_param);
pci_cleanup(pacc);
release_io_perms();
return 0;
}
void nicrealtek_chip_writeb(uint8_t val, chipaddr addr)
{
OUTL(((uint32_t)addr &0x01FFFF)|0x0A0000| (val << 24), io_base_addr +
BIOS_ROM_ADDR);
OUTL(((uint32_t)addr &0x01FFFF)|0x1E0000| (val << 24), io_base_addr +
BIOS_ROM_ADDR);
}
uint8_t nicrealtek_chip_readb(const chipaddr addr)
{
OUTL(((uint32_t)addr & 0x01FFFF) | 0x060000, io_base_addr +
BIOS_ROM_ADDR);
return INB(io_base_addr + BIOS_ROM_DATA);
}_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom