summaryrefslogtreecommitdiffstats
path: root/src/interface
Commit message (Collapse)AuthorAgeFilesLines
* [efi] Add basic implementation of EFI SIMPLE_NETWORK_PROTOCOLMichael Brown2008-10-161-0/+978
| | | | | This implementation is tested and working, but not currently tied in to the EFI build.
* [netdevice] Change link-layer push() and pull() methods to take raw typesMichael Brown2008-10-161-9/+10
| | | | | | | | | | EFI requires us to be able to specify the source address for individual transmitted packets, and to be able to extract the destination address on received packets. Take advantage of this to rationalise the push() and pull() methods so that push() takes a (dest,source,proto) tuple and pull() returns a (dest,source,proto) tuple.
* [efi] Add EFI image format and basic runtime environmentMichael Brown2008-10-137-0/+886
| | | | | | | | | We have EFI APIs for CPU I/O, PCI I/O, timers, console I/O, user access and user memory allocation. EFI executables are created using the vanilla GNU toolchain, with the EXE header handcrafted in assembly and relocations generated by a custom efilink utility.
* [pxe] Display PXE_LOADER debug message after call to initialise()Michael Brown2008-09-231-3/+3
| | | | | | | At least one Dell system calls the UNDI loader entry point with the BIOS console disabled. The serial console is active only after a call to initialise(), so move the debug message in undi_loader() so that it can be displayed via the serial console.
* [pxe] Add extra debug messages to the PXE UDP API callsMichael Brown2008-08-211-4/+16
|
* [pxe] Fix broadcast transmissions via PXENV_UDP_WRITEMichael Brown2008-08-211-0/+1
| | | | | pxenv_udp_write() needs to specify a net device, otherwise ipv4 is unable to route broadcast transmissions.
* [undi] Fill in ProtType correctly in PXENV_UNDI_ISRMichael Brown2008-08-201-12/+61
| | | | | | | | | Determine the network-layer packet type and fill it in for UNDI clients. This is required by some NBPs such as emBoot's winBoot/i. This change requires refactoring the link-layer portions of the gPXE netdevice API, so that it becomes possible to strip the link-layer header without passing the packet up the network stack.
* [undi] Work around broken UNDI polling behaviour in winBoot/iMichael Brown2008-08-201-3/+17
| | | | | | | | Some dumb NBPs (e.g. emBoot's winBoot/i) never call PXENV_UNDI_ISR with FuncFlag=PXENV_UNDI_ISR_START; they just sit in a tight polling loop merrily violating the PXE spec with repeated calls to PXENV_UNDI_ISR_IN_PROCESS. Force a extra calls to netdev_poll() to cope with these out-of-spec clients.
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-171-1/+1
| | | | | | | | | | | | | Add yet another ugly hack to iscsiboot.c, this time to allow the user to inhibit the shutdown/removal of the iSCSI INT13 device (and the network devices, since they are required for the iSCSI device to function). On the plus side, the fact that shutdown() now takes flags to differentiate between shutdown-for-exit and shutdown-for-boot means that another ugly hack (to allow returning via the PXE stack on BIOSes that have broken INT 18 calls) will be easier. I feel dirty.
* [i386] Change semantics of __from_data16 and __from_text16Michael Brown2008-07-013-8/+4Star
| | | | | | | | | __from_data16 and __from_text16 now take a pointer to a .data16/.text16 variable, and return the real-mode offset within the appropriate segment. This matches the use case for every occurrence of these macros, and prevents potential future bugs such as that fixed in commit d51d80f. (The bug arose essentially because "&pointer" is still syntactically valid.)
* [pxe] Fix a typo in PXENV_GET_CACHED_INFO that broke AltirisMichael Brown2008-07-011-1/+1
| | | | | | __from_data16 takes the value pointed to, rather than the pointer itself. This was silently causing gPXE to return a dud buffer pointer when the caller did not supply a buffer for PXENV_GET_CACHED_INFO.
* [misc] Fix building on OpenBSDMichael Brown2008-06-271-1/+1
| | | | | | | OpenBSD throws compiler warnings that we can't reproduce on Linux, for some reason. Original patch from Dewey Hylton <dewey@hyltown.com>.
* [PXEXT] Add FILE_API_CHECK API functionH. Peter Anvin2008-03-261-0/+35
| | | | | Add FILE_API_CHECK to the PXEXT API so the NBP can query the availability and status of the API.
* [Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown2008-03-251-4/+4
| | | | | | | | | | | | Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout.
* [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFOMichael Brown2008-03-231-25/+34
| | | | | | | | | | | Add dedicated functions create_dhcpdiscover(), create_dhcpack() and create_proxydhcpack() for use by external code such as the PXE preboot code. Register ProxyDHCP options under the global scope "proxydhcp". Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP succeeds.
* [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-211-7/+8
|
* [PXE] Work around a buffer-size bug in WinPEMichael Brown2008-03-101-2/+12
| | | | | | | | | | | WinPE's pxeboot.n12 takes the BufferLimit returned by gPXE (indicating the size of gPXE's internal DHCP packet buffers) and erroneously passes it in as BufferSize (indicating the size of pxeboot.n12's DHCP packet buffer). If these don't match, then pxeboot.n12 ends up instructing gPXE to overwrite parts of its data segment. Change gPXE's internal DHCP packet buffers to be exactly sizeof(BOOTPLAYER_t) bytes to work around this problem.
* [PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API.Michael Brown2008-03-041-1/+39
| | | | | | | | This allows pxelinux to execute arbitrary gPXE commands. This is remarkably unsafe (not least because some of the commands will assume full ownership of memory and do nasty things like edit the e820 map underneath the calling pxelinux), but it does allow access to the "sanboot" command.
* Start restructuring pxe_tftp.c to cope with multicast (MTFTP) receives.Michael Brown2008-02-021-147/+231
|
* Add pxe_set_cached_filename() so that pxe_tftp.c can also update theMichael Brown2008-01-221-12/+20
| | | | stored DHCP packets.
* Use XFER_INIT() macro.Michael Brown2008-01-221-7/+1Star
|
* Make seek information part of the xfer metadata, rather than an entirelyMichael Brown2008-01-081-1/+0Star
| | | | | | | separate xfer method. Add missing .alloc_iob entries to several xfer_interface_operations structures.
* Fix compiler warnings that appear only on OpenBSD.Michael Brown2007-12-061-2/+2
|
* Don't complain when callers provide too-short buffers forMichael Brown2007-12-071-7/+6Star
| | | | PXENV_GET_CACHED_INFO. NTLDR does this.
* Provide individually cached constructed copies of DHCP packets viaMichael Brown2007-11-221-86/+109
| | | | | | PXENV_GET_CACHED_INFO. If we dont do this, Altiris' NBP screws up; it relies on being able to grab pointers to each of the three packets and then read them at will later.
* Do not fill in the BufferLimit field in structMichael Brown2007-11-221-3/+32
| | | | | s_PXENV_GET_CACHED_INFO, because this field doesn't exist in earlier versions of the PXE spec, and some callers don't allocate space for it.
* Add PXE FILE API.Michael Brown2007-08-041-0/+191
|
* Make read_user() non-blocking, and add select() call.Michael Brown2007-08-041-15/+38
|
* Centralise construction of the DHCP request and response packets.Michael Brown2007-07-311-10/+8Star
|
* Add per-file error identifiersMichael Brown2007-07-242-0/+2
|
* Separate the "is data ready" function of xfer_seek() into anMichael Brown2007-07-081-0/+1
| | | | | xfer_window() function, which can return a scalar rather than a boolean.
* Kill off unused request() method in data-xfer interface.Michael Brown2007-07-081-1/+0Star
|
* Use net_device_operations structure and netdev_nullify() to allow forMichael Brown2007-07-071-9/+17
| | | | | | | | | | | safe dropping of the netdev ref by the driver while other refs still exist. Add netdev_irq() method. Net device open()/close() methods should no longer enable or disable IRQs. Remove rx_quota; it wasn't used anywhere and added too much complexity to implementing correct interrupt-masking behaviour in pxe_undi.c.
* Allow recording of TX and RX errors to aid in end-user debugging.Michael Brown2007-07-051-4/+4
|
* !PXE and PXENV+ structures are in code segment, not data segment.Michael Brown2007-07-041-3/+4
|
* Add (untested) UNDI loader C-level implementation.Michael Brown2007-07-042-74/+39Star
|
* Separated out initialisation functions from startup/shutdown functions.Michael Brown2007-07-041-26/+12Star
|
* Move pxe_netdev and set_pxe_netdev to pxe_undi.c and removeMichael Brown2007-07-032-182/+15Star
| | | | now-obsolete pxe.c.
* Implemented (untested) PXENV_START_UNDI.Michael Brown2007-07-031-32/+41
|
* Report our interface type as "gPXE" to avoid working around EtherbootMichael Brown2007-07-031-1/+1
| | | | 5.4 bugs when driving ourselves via UNDI.
* Kill off PXENV_UNDI_FORCE_INTERRUPT support; we have no reason toMichael Brown2007-07-031-7/+4Star
| | | | | suspect that we need it, and implementing it would require needlessly complicating the net device API.
* Reserve space for link-layer header in pxenv_undi_transmit() when notMichael Brown2007-07-031-2/+10
| | | | handed a P_UNKNOWN packet.
* Add missing call to free_iob() in pxenv_undi_isr().Michael Brown2007-07-031-5/+6
| | | | Correct typo in pxenv_set_station_address().
* Add trivial net device statistics (TX and RX packet count), reportedMichael Brown2007-07-031-8/+13
| | | | via UNDI API and also by ifstat command; may be useful for debugging.
* Place netdev_open()/netdev_close() calls in appropriate places.Michael Brown2007-07-031-8/+24
|
* Add mechanism for providing TX completion events.Michael Brown2007-07-031-9/+43
|
* Add untested support for UNDI transmit and receive.Michael Brown2007-07-021-112/+107Star
|
* Use a common base-memory packet buffer for DHCP construction (as usedMichael Brown2007-07-021-3/+3
| | | | by PXE and NBI) and UNDI packets (as used by undinet and UNDI).
* pxe_netdev now holds a reference to the network device.Michael Brown2007-07-022-55/+41Star
| | | | | | | | | Use generic fields in struct device_description rather than assuming that the struct device * is contained within a pci_device or isapnp_device; this assumption is broken when using the undionly driver. Add PXENV_UNDI_SET_STATION_ADDRESS.
* Call shutdown() from pxenv_undi_shutdown(). Probably not totallyMichael Brown2007-07-021-0/+3
| | | | correct, but it's enough to get RIS working.