use stored MAC address in pingd

This commit is contained in:
Howard Mao
2017-07-21 21:50:28 +00:00
parent f28f2379a4
commit 758e09037a
4 changed files with 19 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
#define SIMPLENIC_SEND_COMP (SIMPLENIC_BASE + 16)
#define SIMPLENIC_RECV_COMP (SIMPLENIC_BASE + 18)
#define SIMPLENIC_COUNTS (SIMPLENIC_BASE + 20)
#define SIMPLENIC_MACADDR (SIMPLENIC_BASE + 24)
static inline int nic_send_req_avail(void)
{
@@ -52,3 +53,8 @@ static int nic_recv(void *dest)
return len;
}
static inline uint64_t nic_macaddr(void)
{
return reg_read64(SIMPLENIC_MACADDR);
}