Deleted Added
full compact
pciroms.c (167167) pciroms.c (172394)
1/*
2 * Copyright (c) 2007 Bruce M. Simpson.
3 * All rights reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
34#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2007 Bruce M. Simpson.
3 * All rights reserved
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/tools/tools/pciroms/pciroms.c 167167 2007-03-02 13:53:23Z bms $");
35__FBSDID("$FreeBSD: head/tools/tools/pciroms/pciroms.c 172394 2007-09-30 11:05:18Z marius $");
36
37#include <sys/types.h>
38#include <sys/ioctl.h>
39#include <sys/pciio.h>
40#include <sys/mman.h>
41#include <sys/memrange.h>
42#include <sys/stat.h>
43#include <machine/endian.h>

--- 174 unchanged lines hidden (view full) ---

218 /* No PCI bridges; only PCI devices. */
219 if (p->pc_hdr != 0x00)
220 continue;
221
222 romsize = pci_testrombar(pci_fd, p);
223
224 switch (action) {
225 case PRINT:
36
37#include <sys/types.h>
38#include <sys/ioctl.h>
39#include <sys/pciio.h>
40#include <sys/mman.h>
41#include <sys/memrange.h>
42#include <sys/stat.h>
43#include <machine/endian.h>

--- 174 unchanged lines hidden (view full) ---

218 /* No PCI bridges; only PCI devices. */
219 if (p->pc_hdr != 0x00)
220 continue;
221
222 romsize = pci_testrombar(pci_fd, p);
223
224 switch (action) {
225 case PRINT:
226 printf("Bus %02Xh Device %02Xh Function %02Xh: ",
227 p->pc_sel.pc_bus, p->pc_sel.pc_dev,
228 p->pc_sel.pc_func);
226 printf(
227"Domain %04Xh Bus %02Xh Device %02Xh Function %02Xh: ",
228 p->pc_sel.pc_domain, p->pc_sel.pc_bus,
229 p->pc_sel.pc_dev, p->pc_sel.pc_func);
229 printf((romsize ? "%dKB ROM aperture detected."
230 : "No ROM present."), romsize/1024);
231 printf("\r\n");
232 break;
233 case SAVE:
234 if (romsize == 0)
235 continue; /* XXX */
236

--- 175 unchanged lines hidden ---
230 printf((romsize ? "%dKB ROM aperture detected."
231 : "No ROM present."), romsize/1024);
232 printf("\r\n");
233 break;
234 case SAVE:
235 if (romsize == 0)
236 continue; /* XXX */
237

--- 175 unchanged lines hidden ---