Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
1e06a5cc
Commit
1e06a5cc
authored
Jul 09, 2012
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use #defines for Etherbone config space addresses.
parent
bc4cc1a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
etherbone-config.h
include/hw/etherbone-config.h
+16
-0
memlayout.h
include/hw/memlayout.h
+1
-0
bootp.c
lib/bootp.c
+4
-1
No files found.
include/hw/etherbone-config.h
0 → 100644
View file @
1e06a5cc
#ifndef ETHERBONE_CONFIG
#define ETHERBONE_CONFIG
/* These values are taken directly from the Etherbone specification */
#define ERROR_STATUS_HIGH 0
#define ERROR_STATUS_LOW 4
#define SDB_ADDRESS_HIGH 8
#define SDB_ADDRSES_LOW 12
/* These are implementation specific */
#define EB_MAC_HIGH16 16
#define EB_MAC_LOW32 20
#define EB_IPV4 24
#define EB_PORT 28
#endif
include/hw/memlayout.h
View file @
1e06a5cc
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#define BASE_SYSCON 0x20400
#define BASE_SYSCON 0x20400
#define BASE_UART 0x20500
#define BASE_UART 0x20500
#define BASE_ONEWIRE 0x20600
#define BASE_ONEWIRE 0x20600
#define BASE_ETHERBONE_CFG 0x20700
#define FMC_EEPROM_ADR 0x50
#define FMC_EEPROM_ADR 0x50
...
...
lib/bootp.c
View file @
1e06a5cc
#include <string.h>
#include <string.h>
#include "ipv4.h"
#include "ipv4.h"
#include "hw/memlayout.h"
#include "hw/etherbone-config.h"
#define IP_VERSION 0
#define IP_VERSION 0
#define IP_TOS (IP_VERSION+1)
#define IP_TOS (IP_VERSION+1)
...
@@ -124,7 +126,8 @@ int send_bootp(uint8_t* buf, int retry) {
...
@@ -124,7 +126,8 @@ int send_bootp(uint8_t* buf, int retry) {
int
process_bootp
(
uint8_t
*
buf
,
int
len
)
int
process_bootp
(
uint8_t
*
buf
,
int
len
)
{
{
volatile
unsigned
int
*
eb_ip
=
(
unsigned
int
*
)
0x20718
;
volatile
unsigned
int
*
eb_ip
=
(
unsigned
int
*
)(
BASE_ETHERBONE_CFG
+
EB_IPV4
);
unsigned
int
ip
;
unsigned
int
ip
;
uint8_t
mac
[
6
];
uint8_t
mac
[
6
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment