Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SDB - Self-describing Bus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
SDB - Self-describing Bus
Commits
dd8a13bc
Commit
dd8a13bc
authored
Apr 11, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdb.h (both places): bless as official v1.1
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
c9aa3651
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
22 deletions
+44
-22
sdb.h
docs/specification/sdb.h
+2
-2
sdb.h
sdbfs/include/linux/sdb.h
+42
-20
No files found.
docs/specification/sdb.h
View file @
dd8a13bc
/*
/*
* This is the
proposed version 1.1 of sdb.h, still not official
* This is the
official version 1.1 of sdb.h
*/
*/
#ifndef __SDB_H__
#ifndef __SDB_H__
#define __SDB_H__
#define __SDB_H__
...
@@ -61,7 +61,7 @@ enum sdb_record_type {
...
@@ -61,7 +61,7 @@ enum sdb_record_type {
* sdb_records is the length of the table including this first
* sdb_records is the length of the table including this first
* record, version is 1. The bus type is enumerated later.
* record, version is 1. The bus type is enumerated later.
*/
*/
#define SDB_MAGIC
0x5344422d
/* "SDB-" */
#define SDB_MAGIC 0x5344422d
/* "SDB-" */
struct
sdb_interconnect
{
struct
sdb_interconnect
{
uint32_t
sdb_magic
;
/* 0x00-0x03 */
uint32_t
sdb_magic
;
/* 0x00-0x03 */
uint16_t
sdb_records
;
/* 0x04-0x05 */
uint16_t
sdb_records
;
/* 0x04-0x05 */
...
...
sdbfs/include/linux/sdb.h
View file @
dd8a13bc
/*
/*
* This is
a modified version 1.0 of sdb.h, not the official spec version
* This is
the official version 1.1 of sdb.h
*/
*/
#ifndef __SDB_H__
#ifndef __SDB_H__
#define __SDB_H__
#define __SDB_H__
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* magic number at the head of the interconnect record
* magic number at the head of the interconnect record
*/
*/
/* Product, 40 bytes at offset 24, 8-byte align
m
ed
/* Product, 40 bytes at offset 24, 8-byte aligned
*
*
* device_id is vendor-assigned; version is device-specific,
* device_id is vendor-assigned; version is device-specific,
* date is hex (e.g 0x20120501), name is UTF-8, blank-filled
* date is hex (e.g 0x20120501), name is UTF-8, blank-filled
...
@@ -34,7 +34,7 @@ struct sdb_product {
...
@@ -34,7 +34,7 @@ struct sdb_product {
};
};
/*
/*
* Component, 56 bytes at offset 8, 8-byte aligned
* Component, 56 bytes at offset 8, 8-byte aligned
*
*
* The address range is first to last, inclusive
* The address range is first to last, inclusive
* (for example 0x100000 - 0x10ffff)
* (for example 0x100000 - 0x10ffff)
...
@@ -47,19 +47,21 @@ struct sdb_component {
...
@@ -47,19 +47,21 @@ struct sdb_component {
/* Type of the SDB record */
/* Type of the SDB record */
enum
sdb_record_type
{
enum
sdb_record_type
{
sdb_type_interconnect
=
0x00
,
sdb_type_interconnect
=
0x00
,
sdb_type_device
=
0x01
,
sdb_type_device
=
0x01
,
sdb_type_bridge
=
0x02
,
sdb_type_bridge
=
0x02
,
sdb_type_integration
=
0x80
,
sdb_type_integration
=
0x80
,
sdb_type_empty
=
0xFF
,
sdb_type_repo_url
=
0x81
,
sdb_type_synthesis
=
0x82
,
sdb_type_empty
=
0xFF
,
};
};
/* Type 0: interconnect (first of the array)
/* Type 0: interconnect (first of the array)
*
*
* sdb_records is the length of the table including this first
* sdb_records is the length of the table including this first
*
record, version is 1. The bus type is enumerated later.
* record, version is 1. The bus type is enumerated later.
*/
*/
#define SDB_MAGIC
0x5344422d
/* "SDB-" */
#define SDB_MAGIC 0x5344422d
/* "SDB-" */
struct
sdb_interconnect
{
struct
sdb_interconnect
{
uint32_t
sdb_magic
;
/* 0x00-0x03 */
uint32_t
sdb_magic
;
/* 0x00-0x03 */
uint16_t
sdb_records
;
/* 0x04-0x05 */
uint16_t
sdb_records
;
/* 0x04-0x05 */
...
@@ -102,10 +104,33 @@ struct sdb_integration {
...
@@ -102,10 +104,33 @@ struct sdb_integration {
struct
sdb_product
product
;
/* 0x08-0x3f */
struct
sdb_product
product
;
/* 0x08-0x3f */
};
};
/* Type 0x81: Top module repository url
*
* again, an informative field that software can ignore
*/
struct
sdb_repo_url
{
uint8_t
repo_url
[
63
];
/* 0x00-0x3e */
uint8_t
record_type
;
/* 0x3f */
};
/* Type 0x82: Synthesis tool information
*
* this informative record
*/
struct
sdb_synthesis
{
uint8_t
syn_name
[
16
];
/* 0x00-0x0f */
uint8_t
commit_id
[
16
];
/* 0x10-0x1f */
uint8_t
tool_name
[
8
];
/* 0x20-0x27 */
uint32_t
tool_version
;
/* 0x28-0x2b */
uint32_t
date
;
/* 0x2c-0x2f */
uint8_t
user_name
[
15
];
/* 0x30-0x3e */
uint8_t
record_type
;
/* 0x3f */
};
/* Type 0xff: empty
/* Type 0xff: empty
*
*
* this allows keeping empty slots during development,
* this allows keeping empty slots during development,
* so they can be filled later with mi
min
al efforts and
* so they can be filled later with mi
nim
al efforts and
* no misleading description is ever shipped -- hopefully.
* no misleading description is ever shipped -- hopefully.
* It can also be used to pad a table to a desired length.
* It can also be used to pad a table to a desired length.
*/
*/
...
@@ -120,18 +145,15 @@ enum sdb_bus_type {
...
@@ -120,18 +145,15 @@ enum sdb_bus_type {
sdb_data
=
0x01
,
sdb_data
=
0x01
,
};
};
#define SDB_WB_WIDTH_MASK 0x0f
#define SDB_WB_WIDTH_MASK 0x0f
#define SDB_WB_ACCESS8 0x01
#define SDB_WB_ACCESS8 0x01
#define SDB_WB_ACCESS16 0x02
#define SDB_WB_ACCESS16 0x02
#define SDB_WB_ACCESS32 0x04
#define SDB_WB_ACCESS32 0x04
#define SDB_WB_ACCESS64 0x08
#define SDB_WB_ACCESS64 0x08
#define SDB_WB_LITTLE_ENDIAN 0x80
#define SDB_WB_LITTLE_ENDIAN 0x80
#define SDB_DATA_READ 0x04
#define SDB_DATA_READ 0x04
#define SDB_DATA_WRITE 0x02
#define SDB_DATA_WRITE 0x02
#define SDB_DATA_EXEC 0x01
#define SDB_DATA_EXEC 0x01
#endif
/* __SDB_H__ */
#endif
/* __SDB_H__ */
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