[flashrom] Porting flashrom to OpenBSD

Stuart Henderson stu at spacehopper.org
Fri Jun 25 16:25:10 CEST 2010


On 2010/06/25 11:57, Carl-Daniel Hailfinger wrote:
> Hi Jonathan,
> 
> you're in CC of this mail because you sent the "unbreak pciutils" mail
> to this list, and the failure mode is related.
> http://marc.info/?l=openbsd-ports&m=126918139214769

Hmmm... So why is PCIOCWRITE failing, even when securelevel is 0 and 
allowaperture=2...

I don't know this area at all well, but this looks worth investigating

/sys/dev/pci/pci.c

        case PCIOCWRITE:
                io = (struct pci_io *)data;
                switch (io->pi_width) {
                case 4:
                        /* Make sure the register is properly aligned */
                        if (io->pi_reg & 0x3)
                                return EINVAL;
                        pci_conf_write(pc, tag, io->pi_reg, io->pi_data);
                        error = 0;
                        break;
                default:
                        error = ENODEV;
                        break;
                }
                break;

> Thanks, looks good. One small comment about installation in sbin,
> though. flashrom can also work with programmers attached to serial ports
> and USB, and those might work even for non-root users if appropriate
> permissions are set (well, under most Unix-like OS, but OpenBSD might be
> different). Due to that, some people think installing in bin instead of
> sbin makes more sense.

I don't think the location is a problem..

> Stuart, does the pcilib abort happen on i386 and amd64?

I don't have an i386 box handy to try at the moment.

As an aside, anyone know why securelevel gets set to 1 after
booting (despite the setting in rc.securelevel)?





More information about the flashrom mailing list