Skip to content

Commit 3f0d12b

Browse files
authored
Merge branch 'master' into eliza/psc-seq-ereport
2 parents dd72991 + 7ccf459 commit 3f0d12b

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

drv/cosmo-seq-server/src/vcore.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ impl VCore {
366366
.map(|s| s.0);
367367
ringbuf_entry!(Trace::StatusMfrSpecific(rail, status_mfr));
368368

369-
let status = PmbusStatus {
369+
let pmbus_status = PmbusStatus {
370370
word: status_word.map(|s| s.0).ok(),
371371
input: status_input.ok(),
372372
vout: status_vout.ok(),
@@ -377,12 +377,12 @@ impl VCore {
377377
};
378378

379379
let ereport = Ereport {
380-
k: "pmbus.alert",
380+
k: "hw.pwr.pmbus.alert",
381381
v: 0,
382382
rail,
383-
dev_id: device.i2c_device().component_id(),
383+
refdes: device.i2c_device().component_id(),
384384
time: now,
385-
status,
385+
pmbus_status,
386386
pwr_good: power_good,
387387
};
388388
match self.packrat.serialize_ereport(&ereport, ereport_buf) {
@@ -397,6 +397,8 @@ impl VCore {
397397
ringbuf_entry!(Trace::EreportTooBig(rail))
398398
}
399399
}
400+
// TODO(eliza): if POWER_GOOD has been deasserted, we should produce a
401+
// subsequent ereport for that.
400402

401403
RegulatorState {
402404
faulted,
@@ -409,11 +411,11 @@ impl VCore {
409411
struct Ereport {
410412
k: &'static str,
411413
v: usize,
412-
dev_id: &'static str,
414+
refdes: &'static str,
413415
rail: Rail,
414416
time: u64,
415417
pwr_good: Option<bool>,
416-
status: PmbusStatus,
418+
pmbus_status: PmbusStatus,
417419
}
418420

419421
#[derive(Copy, Clone, Default, Serialize)]

drv/gimlet-seq-server/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ struct ServerImpl<S: SpiServer> {
207207
}
208208

209209
const TIMER_INTERVAL: u32 = 10;
210-
const EREPORT_BUF_LEN: usize = 128;
210+
const EREPORT_BUF_LEN: usize = 256;
211211

212212
impl<S: SpiServer + Clone> ServerImpl<S> {
213213
fn init(

drv/gimlet-seq-server/src/vcore.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ impl VCore {
267267
mfr: status_mfr_specific.ok(),
268268
};
269269
let ereport = Ereport {
270-
k: "pmbus.alert",
270+
k: "hw.pwr.pmbus.alert",
271271
v: 0,
272-
dev_id: self.device.i2c_device().component_id(),
272+
refdes: self.device.i2c_device().component_id(),
273273
rail: "VDD_VCORE",
274274
time: now,
275275
pwr_good,
276-
status,
276+
pmbus_status: status,
277277
};
278278
match self
279279
.packrat
@@ -290,6 +290,8 @@ impl VCore {
290290
ringbuf_entry!(Trace::EreportTooBig)
291291
}
292292
}
293+
// TODO(eliza): if POWER_GOOD has been deasserted, we should produce a
294+
// subsequent ereport for that.
293295

294296
// If the `INPUT_FAULT` bit in `STATUS_WORD` is set, or any bit is hot
295297
// in `STATUS_INPUT`, sample Vin in order to record the voltage dip in
@@ -339,9 +341,9 @@ struct PmbusStatus {
339341
struct Ereport {
340342
k: &'static str,
341343
v: usize,
342-
dev_id: &'static str,
344+
refdes: &'static str,
343345
rail: &'static str,
344346
time: u64,
345347
pwr_good: Option<bool>,
346-
status: PmbusStatus,
348+
pmbus_status: PmbusStatus,
347349
}

0 commit comments

Comments
 (0)