Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
In addition to using EFI's PXE protocol implement a network driver that
makes use of EFI's Simple Network protocol.  This allows us to speak
raw network on U-Boot based machines so we can do TFTP boot on those as
well.

ok kettenis@
  • Loading branch information
bluerise committed Mar 31, 2018
1 parent 7914c92 commit b0a12b4
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 40 deletions.
3 changes: 2 additions & 1 deletion sys/arch/arm64/stand/efiboot/Makefile
@@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.3 2018/01/21 21:35:34 patrick Exp $
# $OpenBSD: Makefile,v 1.4 2018/03/31 17:43:53 patrick Exp $

NOMAN= #

Expand Down Expand Up @@ -30,6 +30,7 @@ SRCS+= close.c closeall.c cons.c cread.c dev.c disklabel.c dkcksum.c fstat.c \
lseek.c open.c read.c readdir.c stat.c
SRCS+= loadfile.c
SRCS+= ufs.c
SRCS+= arp.c ether.c globals.c in_cksum.c net.c netif.c netudp.c tftp.c

.PATH: ${S}/lib/libkern/arch/arm64 ${S}/lib/libkern
SRCS+= divdi3.c moddi3.c qdivrem.c strlcpy.c strlen.c
Expand Down
11 changes: 9 additions & 2 deletions sys/arch/arm64/stand/efiboot/conf.c
@@ -1,4 +1,4 @@
/* $OpenBSD: conf.c,v 1.12 2018/02/06 20:35:21 naddy Exp $ */
/* $OpenBSD: conf.c,v 1.13 2018/03/31 17:43:53 patrick Exp $ */

/*
* Copyright (c) 1996 Michael Shalayeff
Expand Down Expand Up @@ -40,7 +40,9 @@ const char version[] = "0.11";
int debug = 0;

struct fs_ops file_system[] = {
{ tftp_open, tftp_close, tftp_read, tftp_write, tftp_seek,
{ mtftp_open, mtftp_close, mtftp_read, mtftp_write, mtftp_seek,
mtftp_stat, mtftp_readdir },
{ efitftp_open,tftp_close, tftp_read, tftp_write, tftp_seek,
tftp_stat, tftp_readdir },
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek,
ufs_stat, ufs_readdir },
Expand All @@ -58,3 +60,8 @@ struct consdev constab[] = {
{ NULL }
};
struct consdev *cn_tab;

struct netif_driver *netif_drivers[] = {
&efinet_driver,
};
int n_netif_drivers = nitems(netif_drivers);

0 comments on commit b0a12b4

Please sign in to comment.