Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Software for White Rabbit PTP Core
Commits
1e06a5cc
Commit
1e06a5cc
authored
12 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
Use #defines for Etherbone config space addresses.
parent
bc4cc1a7
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/hw/etherbone-config.h
+16
-0
16 additions, 0 deletions
include/hw/etherbone-config.h
include/hw/memlayout.h
+1
-0
1 addition, 0 deletions
include/hw/memlayout.h
lib/bootp.c
+4
-1
4 additions, 1 deletion
lib/bootp.c
with
21 additions
and
1 deletion
include/hw/etherbone-config.h
0 → 100644
+
16
−
0
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
This diff is collapsed.
Click to expand it.
include/hw/memlayout.h
+
1
−
0
View file @
1e06a5cc
...
...
@@ -8,6 +8,7 @@
#define BASE_SYSCON 0x20400
#define BASE_UART 0x20500
#define BASE_ONEWIRE 0x20600
#define BASE_ETHERBONE_CFG 0x20700
#define FMC_EEPROM_ADR 0x50
...
...
This diff is collapsed.
Click to expand it.
lib/bootp.c
+
4
−
1
View file @
1e06a5cc
#include
<string.h>
#include
"ipv4.h"
#include
"hw/memlayout.h"
#include
"hw/etherbone-config.h"
#define IP_VERSION 0
#define IP_TOS (IP_VERSION+1)
...
...
@@ -124,7 +126,8 @@ int send_bootp(uint8_t* buf, int retry) {
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
;
uint8_t
mac
[
6
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment