Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
dmi
Commits
0aa2c28c
Verified
Commit
0aa2c28c
authored
Jun 28, 2019
by
Jeremy Soller
Browse files
0.1.2 - add MemoryDevice
parent
417a9a92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Cargo.toml
View file @
0aa2c28c
[package]
name
=
"redox_dmi"
version
=
"0.1.
1
"
version
=
"0.1.
2
"
edition
=
"2018"
description
=
"DMI table parser"
license
=
"MIT"
...
...
src/lib.rs
View file @
0aa2c28c
...
...
@@ -143,6 +143,35 @@ pub struct ChassisInfo {
unsafe
impl
Plain
for
ChassisInfo
{}
#[repr(packed)]
#[derive(Default,
Debug)]
pub
struct
MemoryDevice
{
pub
array_handle
:
u16
,
pub
error_information_handle
:
u16
,
pub
total_width
:
u16
,
pub
data_width
:
u16
,
pub
size
:
u16
,
pub
form_factor
:
u8
,
pub
device_set
:
u8
,
pub
device_locator
:
u8
,
pub
bank_locator
:
u8
,
pub
memory_kind
:
u8
,
pub
kind_detail
:
u16
,
pub
speed
:
u16
,
pub
manufacturer
:
u8
,
pub
serial_number
:
u8
,
pub
asset_tag
:
u8
,
pub
part_number
:
u8
,
pub
attributes
:
u8
,
pub
extended_size
:
u32
,
pub
configured_speed
:
u16
,
pub
minimum_voltage
:
u16
,
pub
maximum_voltage
:
u16
,
pub
configured_voltage
:
u16
,
}
unsafe
impl
Plain
for
MemoryDevice
{}
pub
fn
tables
(
data
:
&
[
u8
])
->
Vec
<
Table
>
{
let
mut
tables
=
Vec
::
new
();
...
...
Write
Preview
Supports
Markdown
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