mirror of https://github.com/ipxe/ipxe.git
Header rearrangement.
I want to get to the point where any header in include/ reflects a standard user-level header (e.g. a POSIX header), while everything that's specific to gPXE lives in include/gpxe/. Headers that reflect a Linux header (e.g. if_ether.h) should also be in include/gpxe/, with the same name as the Linux header and, preferably, the same names used for the definitions.pull/1/head
parent
53f78346bf
commit
824d6ffa7f
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "pci_io.h"
|
#include "pci_io.h"
|
||||||
#ifdef KEEP_IT_REAL
|
#ifdef KEEP_IT_REAL
|
||||||
#include "realmode.h"
|
#include "realmode.h"
|
||||||
|
|
|
@ -33,7 +33,7 @@ $Id$
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
/* UNDI and PXE defines. Includes pxe.h. */
|
/* UNDI and PXE defines. Includes pxe.h. */
|
||||||
#include "undi.h"
|
#include "undi.h"
|
||||||
/* 8259 PIC defines */
|
/* 8259 PIC defines */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* relocate() is conceptually impossible with KEEP_IT_REAL */
|
/* relocate() is conceptually impossible with KEEP_IT_REAL */
|
||||||
#ifndef KEEP_IT_REAL
|
#ifndef KEEP_IT_REAL
|
||||||
|
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
|
|
||||||
/* An entry in the post-relocation function table */
|
/* An entry in the post-relocation function table */
|
||||||
struct post_reloc_fn {
|
struct post_reloc_fn {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "dev.h"
|
#include "dev.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "registers.h"
|
#include "registers.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
#ifdef CONFIG_FILO
|
#ifdef CONFIG_FILO
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
|
|
|
@ -457,7 +457,7 @@ int ip_transmit(int len, const void *buf)
|
||||||
|
|
||||||
ip = (struct iphdr *)buf;
|
ip = (struct iphdr *)buf;
|
||||||
destip = ip->dest.s_addr;
|
destip = ip->dest.s_addr;
|
||||||
if (destip == IP_BROADCAST) {
|
if (destip == INADDR_BROADCAST) {
|
||||||
eth_transmit(broadcast, ETH_P_IP, len, buf);
|
eth_transmit(broadcast, ETH_P_IP, len, buf);
|
||||||
} else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) {
|
} else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) {
|
||||||
unsigned char multicast[6];
|
unsigned char multicast[6];
|
||||||
|
@ -765,7 +765,7 @@ static int bootp(void)
|
||||||
memset ( arptable, 0, sizeof(arptable) );
|
memset ( arptable, 0, sizeof(arptable) );
|
||||||
memcpy ( arptable[ARP_CLIENT].node, my_hwaddr, ETH_ALEN );
|
memcpy ( arptable[ARP_CLIENT].node, my_hwaddr, ETH_ALEN );
|
||||||
|
|
||||||
udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
|
udp_transmit(INADDR_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
|
||||||
sizeof(struct bootpip_t), &ip);
|
sizeof(struct bootpip_t), &ip);
|
||||||
remaining_time = rfc2131_sleep_interval(BOOTP_TIMEOUT, retry++);
|
remaining_time = rfc2131_sleep_interval(BOOTP_TIMEOUT, retry++);
|
||||||
stop_time = currticks() + remaining_time;
|
stop_time = currticks() + remaining_time;
|
||||||
|
@ -804,8 +804,9 @@ static int bootp(void)
|
||||||
for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) {
|
for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) {
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
|
|
||||||
udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER,
|
udp_transmit(INADDR_BROADCAST, BOOTP_CLIENT,
|
||||||
sizeof(struct bootpip_t), &ip);
|
BOOTP_SERVER, sizeof(struct bootpip_t),
|
||||||
|
&ip);
|
||||||
dhcp_reply=0;
|
dhcp_reply=0;
|
||||||
timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++);
|
timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++);
|
||||||
if (!await_reply(await_bootp, 0, NULL, timeout))
|
if (!await_reply(await_bootp, 0, NULL, timeout))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pci_io.c may know how many buses we have, in which case it can
|
* pci_io.c may know how many buses we have, in which case it can
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "3c595.h"
|
#include "3c595.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
static struct nic_operations a3c90x_operations;
|
static struct nic_operations a3c90x_operations;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "mii.h"
|
#include "mii.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
#undef DAVICOM_DEBUG
|
#undef DAVICOM_DEBUG
|
||||||
#undef DAVICOM_DEBUG_WHERE
|
#undef DAVICOM_DEBUG_WHERE
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
/* #define EDEBUG 1 */
|
/* #define EDEBUG 1 */
|
||||||
|
|
|
@ -52,7 +52,7 @@ Drivers are port from Intel's Linux driver e1000-4.3.15
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
typedef unsigned char *dma_addr_t;
|
typedef unsigned char *dma_addr_t;
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
static int ioaddr;
|
static int ioaddr;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#define LINUX_OUT_MACROS
|
#define LINUX_OUT_MACROS
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#define dma_addr_t unsigned long
|
#define dma_addr_t unsigned long
|
||||||
#include "etherfabric.h"
|
#include "etherfabric.h"
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
/* Include timer support functions */
|
/* Include timer support functions */
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "mii.h"
|
#include "mii.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "mt23108.h"
|
#include "mt23108.h"
|
||||||
#include "ib_driver.h"
|
#include "ib_driver.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
struct device_buffers_st {
|
struct device_buffers_st {
|
||||||
union recv_wqe_u mads_qp_rcv_queue[NUM_MADS_RCV_WQES]
|
union recv_wqe_u mads_qp_rcv_queue[NUM_MADS_RCV_WQES]
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "mt25218.h"
|
#include "mt25218.h"
|
||||||
#include "ib_driver.h"
|
#include "ib_driver.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
#define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
|
#define MOD_INC(counter, max_count) (counter) = ((counter)+1) & ((max_count) - 1)
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ Skeleton NIC driver for Etherboot
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
/* to get the ISA support functions, if this is an ISA NIC */
|
/* to get the ISA support functions, if this is an ISA NIC */
|
||||||
#include "isa.h"
|
#include "isa.h"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ Skeleton NIC driver for Etherboot
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
/* to get the ISA support functions, if this is an ISA NIC */
|
/* to get the ISA support functions, if this is an ISA NIC */
|
||||||
#include "isa.h"
|
#include "isa.h"
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
/* Condensed operations for readability. */
|
/* Condensed operations for readability. */
|
||||||
#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
|
#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr))
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
/* defines */
|
/* defines */
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
#if ARCH == ia64 /* Support 64-bit addressing */
|
#if ARCH == ia64 /* Support 64-bit addressing */
|
||||||
#define USE_64BIT_ADDR
|
#define USE_64BIT_ADDR
|
||||||
|
|
|
@ -33,7 +33,7 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "ns8390.h"
|
#include "ns8390.h"
|
||||||
#ifdef INCLUDE_NS8390
|
#ifdef INCLUDE_NS8390
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#else
|
#else
|
||||||
#include "isa.h"
|
#include "isa.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
/* Include the time functions */
|
/* Include the time functions */
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "mii.h"
|
#include "mii.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@ $Id$
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hard-coded SSID
|
* Hard-coded SSID
|
||||||
|
|
|
@ -14,7 +14,7 @@ $Id$
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
|
|
||||||
#define WLAN_HOSTIF WLAN_PCI
|
#define WLAN_HOSTIF WLAN_PCI
|
||||||
|
|
|
@ -14,7 +14,7 @@ $Id$
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
|
|
||||||
#define WLAN_HOSTIF WLAN_PLX
|
#define WLAN_HOSTIF WLAN_PLX
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
#define drv_version "v1.6"
|
#define drv_version "v1.6"
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
#define RTL_TIMEOUT (1*TICKS_PER_SEC)
|
#define RTL_TIMEOUT (1*TICKS_PER_SEC)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
#include "sis900.h"
|
#include "sis900.h"
|
||||||
|
|
|
@ -15,7 +15,7 @@ Skeleton NIC driver for Etherboot
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* Drag in support for whichever bus(es) we want for this NIC */
|
/* Drag in support for whichever bus(es) we want for this NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "isa.h"
|
#include "isa.h"
|
||||||
#include "eisa.h"
|
#include "eisa.h"
|
||||||
#include "isapnp.h"
|
#include "isapnp.h"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "mii.h"
|
#include "mii.h"
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "tg3.h"
|
#include "tg3.h"
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "tlan.h"
|
#include "tlan.h"
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
/* User settable parameters */
|
/* User settable parameters */
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ static const char *version = "rhine.c v1.0.2 2004-10-29\n";
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
/* define all ioaddr */
|
/* define all ioaddr */
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
/* to get the interface to the body of the program */
|
/* to get the interface to the body of the program */
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
/* to get the PCI support functions, if this is a PCI NIC */
|
/* to get the PCI support functions, if this is a PCI NIC */
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
|
|
||||||
|
|
||||||
#include "via-velocity.h"
|
#include "via-velocity.h"
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
#include "etherboot.h"
|
#include "etherboot.h"
|
||||||
#include "nic.h"
|
#include "nic.h"
|
||||||
#include "pci.h"
|
#include <gpxe/pci.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
static const char *w89c840_version = "driver Version 0.94 - December 12, 2003";
|
static const char *w89c840_version = "driver Version 0.94 - December 12, 2003";
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
#include "ip.h"
|
#include "ip.h"
|
||||||
|
|
||||||
/** A background protocol */
|
/** A background protocol */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "vsprintf.h"
|
#include "vsprintf.h"
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "dhcp.h" /* for dhcp_dev_id */
|
#include "dhcp.h" /* for dhcp_dev_id */
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -202,7 +202,7 @@ struct device_driver {
|
||||||
|
|
||||||
#define DRIVER(_name,_type_driver,_bus_driver,_bus_info, \
|
#define DRIVER(_name,_type_driver,_bus_driver,_bus_info, \
|
||||||
_probe,_disable) \
|
_probe,_disable) \
|
||||||
static struct device_driver device_ ## _bus_info __device_driver = { \
|
struct device_driver device_ ## _bus_info __device_driver = { \
|
||||||
.name = _name, \
|
.name = _name, \
|
||||||
.type_driver = &_type_driver, \
|
.type_driver = &_type_driver, \
|
||||||
.bus_driver = &_bus_driver, \
|
.bus_driver = &_bus_driver, \
|
||||||
|
|
|
@ -125,10 +125,11 @@
|
||||||
#define ENOENT 0xd4
|
#define ENOENT 0xd4
|
||||||
#define EAFNOSUPPORT 0xd5
|
#define EAFNOSUPPORT 0xd5
|
||||||
#define EAGAIN 0xd6
|
#define EAGAIN 0xd6
|
||||||
|
#define EIO 0xd7
|
||||||
|
|
||||||
/* Data structures and declarations */
|
/* Data structures and declarations */
|
||||||
|
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
|
|
||||||
extern int errno;
|
extern int errno;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _HELLO_H
|
#ifndef _GPXE_HELLO_H
|
||||||
#define _HELLO_H
|
#define _GPXE_HELLO_H
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _IF_ARP_H
|
#ifndef _GPXE_IF_ARP_H
|
||||||
#define _IF_ARP_H
|
#define _GPXE_IF_ARP_H
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
@ -97,4 +97,4 @@ static inline void * arp_target_pa ( struct arphdr *arphdr ) {
|
||||||
return ( arp_target_ha ( arphdr ) + arphdr->ar_hln );
|
return ( arp_target_ha ( arphdr ) + arphdr->ar_hln );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _IF_ARP_H */
|
#endif /* _GPXE_IF_ARP_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _IF_ETHER_H
|
#ifndef _GPXE_IF_ETHER_H
|
||||||
#define _IF_ETHER_H
|
#define _GPXE_IF_ETHER_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -29,4 +29,4 @@ struct ethhdr {
|
||||||
uint16_t h_protocol;
|
uint16_t h_protocol;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
#endif /* _IF_ETHER_H */
|
#endif /* _GPXE_IF_ETHER_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _IN_H
|
#ifndef _GPXE_IN_H
|
||||||
#define _IN_H
|
#define _GPXE_IN_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -8,8 +8,11 @@
|
||||||
#define IP_TCP 6
|
#define IP_TCP 6
|
||||||
#define IP_UDP 17
|
#define IP_UDP 17
|
||||||
|
|
||||||
/* Same after going through htonl */
|
#define INADDR_NONE 0xffffffff
|
||||||
#define IP_BROADCAST 0xFFFFFFFF
|
|
||||||
|
#define INADDR_BROADCAST 0xffffffff
|
||||||
|
|
||||||
|
#define IN_MULTICAST(addr) ( ( (addr) & 0xf0000000 ) == 0xe0000000 )
|
||||||
|
|
||||||
struct in_addr {
|
struct in_addr {
|
||||||
uint32_t s_addr;
|
uint32_t s_addr;
|
||||||
|
@ -27,4 +30,4 @@ struct sockaddr_in {
|
||||||
extern int inet_aton ( const char *cp, struct in_addr *inp );
|
extern int inet_aton ( const char *cp, struct in_addr *inp );
|
||||||
extern char * inet_ntoa ( struct in_addr in );
|
extern char * inet_ntoa ( struct in_addr in );
|
||||||
|
|
||||||
#endif /* _IN_H */
|
#endif /* _GPXE_IN_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _IP_H
|
#ifndef _GPXE_IP_H
|
||||||
#define _IP_H
|
#define _GPXE_IP_H
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
@ -17,4 +17,4 @@ extern void set_gateway ( struct in_addr address );
|
||||||
extern void init_tcpip ( void );
|
extern void init_tcpip ( void );
|
||||||
extern void run_tcpip ( void );
|
extern void run_tcpip ( void );
|
||||||
|
|
||||||
#endif /* _IP_H */
|
#endif /* _GPXE_IP_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _ISCSI_H
|
#ifndef _GPXE_ISCSI_H
|
||||||
#define _ISCSI_H
|
#define _GPXE_ISCSI_H
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
@ -457,4 +457,4 @@ static inline int iscsi_error ( struct iscsi_session *iscsi ) {
|
||||||
return ( iscsi->state == ISCSI_STATE_FAILED );
|
return ( iscsi->state == ISCSI_STATE_FAILED );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _ISCSI_H */
|
#endif /* _GPXE_ISCSI_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef PCI_H
|
#ifndef _GPXEPCI_H
|
||||||
#define PCI_H
|
#define _GPXEPCI_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Support for NE2000 PCI clones added David Monro June 1997
|
** Support for NE2000 PCI clones added David Monro June 1997
|
||||||
|
@ -21,8 +21,7 @@
|
||||||
* your option) any later version.
|
* your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdint.h"
|
#include <stdint.h>
|
||||||
#include "nic.h"
|
|
||||||
#include "pci_ids.h"
|
#include "pci_ids.h"
|
||||||
|
|
||||||
#define PCI_BUS_TYPE 1
|
#define PCI_BUS_TYPE 1
|
||||||
|
@ -256,7 +255,8 @@ struct pci_device {
|
||||||
uint16_t busdevfn;
|
uint16_t busdevfn;
|
||||||
uint8_t revision;
|
uint8_t revision;
|
||||||
uint8_t irq;
|
uint8_t irq;
|
||||||
} __attribute__ (( packed ));
|
void *priv;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Useful busdevfn calculations
|
* Useful busdevfn calculations
|
||||||
|
@ -348,7 +348,6 @@ extern unsigned long pci_bar_start ( struct pci_device *pci,
|
||||||
unsigned int bar );
|
unsigned int bar );
|
||||||
extern unsigned long pci_bar_size ( struct pci_device *pci, unsigned int bar );
|
extern unsigned long pci_bar_size ( struct pci_device *pci, unsigned int bar );
|
||||||
extern int pci_find_capability ( struct pci_device *pci, int capability );
|
extern int pci_find_capability ( struct pci_device *pci, int capability );
|
||||||
extern void pci_fill_nic ( struct nic *nic, struct pci_device *pci );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PCI bus global definition
|
* PCI bus global definition
|
||||||
|
@ -356,4 +355,12 @@ extern void pci_fill_nic ( struct nic *nic, struct pci_device *pci );
|
||||||
*/
|
*/
|
||||||
extern struct bus_driver pci_driver;
|
extern struct bus_driver pci_driver;
|
||||||
|
|
||||||
#endif /* PCI_H */
|
static inline void pci_set_drvdata ( struct pci_device *pci, void *priv ) {
|
||||||
|
pci->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void * pci_get_drvdata ( struct pci_device *pci ) {
|
||||||
|
return pci->priv;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _GPXE_PCI_H */
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifndef _GPXE_PCI_IDS_H
|
||||||
|
#define _GPXE_PCI_IDS_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PCI Class, Vendor and Device IDs
|
* PCI Class, Vendor and Device IDs
|
||||||
*
|
*
|
||||||
|
@ -341,3 +344,5 @@
|
||||||
#define PCI_SUBVENDOR_ID_EXSYS 0xd84d
|
#define PCI_SUBVENDOR_ID_EXSYS 0xd84d
|
||||||
#define PCI_VENDOR_ID_TIGERJET 0xe159
|
#define PCI_VENDOR_ID_TIGERJET 0xe159
|
||||||
#define PCI_VENDOR_ID_ARK 0xedd8
|
#define PCI_VENDOR_ID_ARK 0xedd8
|
||||||
|
|
||||||
|
#endif /* _GPXE_PCI_IDS_H */
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _SCSI_H
|
#ifndef _GPXE_SCSI_H
|
||||||
#define _SCSI_H
|
#define _GPXE_SCSI_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -31,4 +31,4 @@ union scsi_cdb {
|
||||||
char bytes[16];
|
char bytes[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _SCSI_H */
|
#endif /* _GPXE_SCSI_H */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef TABLES_H
|
#ifndef _GPXE_TABLES_H
|
||||||
#define TABLES_H
|
#define _GPXE_TABLES_H
|
||||||
|
|
||||||
/** @page ifdef_harmful #ifdef considered harmful
|
/** @page ifdef_harmful #ifdef considered harmful
|
||||||
*
|
*
|
||||||
|
@ -164,7 +164,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "compiler.h" /* for doxygen */
|
#ifdef DOXYGEN
|
||||||
|
#define __attribute__(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __table_str(x) #x
|
#define __table_str(x) #x
|
||||||
#define __table_section(table,idx) \
|
#define __table_section(table,idx) \
|
||||||
|
@ -224,4 +226,4 @@
|
||||||
#define __table_end(table) \
|
#define __table_end(table) \
|
||||||
__attribute__ (( unused, __table_section_end(table) ))
|
__attribute__ (( unused, __table_section_end(table) ))
|
||||||
|
|
||||||
#endif /* TABLES_H */
|
#endif /* _GPXE_TABLES_H */
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _TCP_H
|
#ifndef _GPXE_TCP_H
|
||||||
#define _TCP_H
|
#define _GPXE_TCP_H
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
@ -99,4 +99,4 @@ extern void tcp_send ( struct tcp_connection *conn, const void *data,
|
||||||
size_t len );
|
size_t len );
|
||||||
extern void tcp_close ( struct tcp_connection *conn );
|
extern void tcp_close ( struct tcp_connection *conn );
|
||||||
|
|
||||||
#endif /* _TCP_H */
|
#endif /* _GPXE_TCP_H */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
#include "dev.h"
|
#include "dev.h"
|
||||||
|
|
||||||
struct image {
|
struct image {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define INIT_H
|
#define INIT_H
|
||||||
|
|
||||||
#include "stddef.h" /* for NULL */
|
#include "stddef.h" /* for NULL */
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In order to avoid having objects dragged in just because main()
|
* In order to avoid having objects dragged in just because main()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef PROTO_H
|
#ifndef PROTO_H
|
||||||
#define PROTO_H
|
#define PROTO_H
|
||||||
|
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include <gpxe/in.h>
|
#include <gpxe/in.h>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define RESOLV_H
|
#define RESOLV_H
|
||||||
|
|
||||||
#include <gpxe/in.h>
|
#include <gpxe/in.h>
|
||||||
#include "tables.h"
|
#include <gpxe/tables.h>
|
||||||
|
|
||||||
struct resolver {
|
struct resolver {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
@ -54,7 +54,7 @@ static int nmb_resolv ( struct in_addr *addr, const char *name ) {
|
||||||
DBG ( "NMB resolving %s\n", name );
|
DBG ( "NMB resolving %s\n", name );
|
||||||
|
|
||||||
/* Set up the query data */
|
/* Set up the query data */
|
||||||
nameserver.sin_addr.s_addr = IP_BROADCAST;
|
nameserver.sin_addr.s_addr = INADDR_BROADCAST;
|
||||||
nameserver.sin_port = NBNS_UDP_PORT;
|
nameserver.sin_port = NBNS_UDP_PORT;
|
||||||
memset ( &query, 0, sizeof ( query ) );
|
memset ( &query, 0, sizeof ( query ) );
|
||||||
query.dns.id = htons ( 1 );
|
query.dns.id = htons ( 1 );
|
||||||
|
|
Loading…
Reference in New Issue