Skip to content

Commit a6d1f82

Browse files
add minibar-a and minibar-b boards (#2275)
These boards can both use the same FPGA image. Due to a hardware bug, the SP could not talk to the management network switch on minibar-a, but that was fixed on minibar-b so we can add the `net` task there.
1 parent a4fbe15 commit a6d1f82

File tree

16 files changed

+37
-22
lines changed

16 files changed

+37
-22
lines changed

app/minibar/app.toml renamed to app/minibar/base.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name = "minibar"
2-
board = "minibar"
31
target = "thumbv7em-none-eabihf"
42
chip = "../../chips/stm32h7"
53
stacksize = 896
@@ -346,6 +344,6 @@ memory-size = 33_554_432 # 256 Mib / 32 MiB
346344
slot-count = 16 # 2 MiB slots
347345

348346
[[auxflash.blobs]]
349-
file = "drv/minibar-seq-api/minibar_controller_hcv_a.bit"
347+
file = "drv/minibar-seq-api/minibar_controller.bit"
350348
compress = true
351349
tag = "FPGA"

app/minibar/rev-a.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name = "minibar-a"
2+
board = "minibar-a"
3+
inherit = "base.toml"

app/minibar/app-net.toml renamed to app/minibar/rev-b.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
# Minibar with network connectivity
2-
#
3-
# NOTE: this requires rework to correct for a board-level issue
4-
# (see https://github.com/oxidecomputer/hardware-minibar/issues/168)
5-
6-
name = "minibar-net"
7-
inherit = "app.toml"
1+
name = "minibar-b"
2+
board = "minibar-b"
3+
inherit = "base.toml"
84

95
[kernel]
106
features = ["dump"]

app/minibar/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,18 @@ fn system_init() {
8585

8686
// Build the full ID
8787
let rev = p.GPIOK.idr.read().bits();
88-
let rev = [5, 6, 7]
88+
// The pins are listed in descending order as that how they got wired up.
89+
let rev = [7, 6, 5]
8990
.iter()
9091
.enumerate()
9192
.map(|(i, bit)| if (rev & (1 << bit)) != 0 { 1 << i } else { 0 })
9293
.fold(0, |acc, v| acc | v);
9394

9495
cfg_if::cfg_if! {
95-
if #[cfg(target_board = "minibar")] {
96+
if #[cfg(target_board = "minibar-a")] {
9697
let expected_rev = 0b000;
98+
} else if #[cfg(target_board = "minibar-b")] {
99+
let expected_rev = 0b001;
97100
} else {
98101
compile_error!("not a recognized minibar board")
99102
}
File renamed without changes.

boards/minibar-b.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[probe-rs]
2+
chip-name = "STM32H753ZITx"

drv/fpga-server/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn main() -> ! {
151151
driver.configure_gpio();
152152

153153
let devices = [ecp5::Ecp5::new(driver)];
154-
} else if #[cfg(target_board = "minibar")] {
154+
} else if #[cfg(any(target_board = "minibar-a", target_board = "minibar-b"))] {
155155
let configuration_port =
156156
spi.device(drv_spi_api::devices::ECP5_FPGA);
157157
let user_design =

drv/minibar-seq-api/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
`minibar_controller_hvc_a.bit` and `minibar_regs.json` are generated at
2-
[this commit](https://github.com/oxidecomputer/quartz/commit/ba03a69ad4aa1940fe60d631797e8da17589beac)
1+
`minibar_controller.bit` and `minibar_regs.json` are generated at
2+
[this commit](https://github.com/oxidecomputer/quartz/commit/1934809db062acea87eff618423865e3e8118fcc)

drv/minibar-seq-api/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
1717

1818
// Check that a valid bitstream is available for this board.
1919
let board = build_util::env_var("HUBRIS_BOARD")?;
20-
if board != "minibar" {
20+
if board != "minibar-a" && board != "minibar-b" {
2121
panic!("unknown target board");
2222
}
2323

0 commit comments

Comments
 (0)