Skip to content

Commit

Permalink
Remove debug module from devicetree (#806)
Browse files Browse the repository at this point in the history
* remove debug module from devicetree
* replace uart compatible string with one that uses the FiFos
* regenerate bootrom
* regenerate FPGA bootrom

Signed-off-by: Noah Huetter <[email protected]>
Co-authored-by: Noah Huetter <[email protected]>
  • Loading branch information
huettern and Noah Huetter authored Jan 31, 2022
1 parent 944f915 commit da74358
Show file tree
Hide file tree
Showing 7 changed files with 812 additions and 797 deletions.
17 changes: 10 additions & 7 deletions corev_apu/bootrom/ariane.dts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@
// riscv,max-priority = <7>;
// riscv,ndev = <2>;
// };
debug-controller@0 {
compatible = "riscv,debug-013";
interrupts-extended = <&CPU0_intc 65535>;
reg = <0x0 0x0 0x0 0x1000>;
reg-names = "control";
};
// Specifying the interrupt controller in the devicetree is not necessary.
// Furthermore, the IRQ 65535 will cause a `hwirq 0xffff is too large` during
// Linux boot (occured with mainline linux 5.14.0).
// debug-controller@0 {
// compatible = "riscv,debug-013";
// interrupts-extended = <&CPU0_intc 65535>;
// reg = <0x0 0x0 0x0 0x1000>;
// reg-names = "control";
// };
uart@10000000 {
compatible = "ns16750";
compatible = "ns16550a";
reg = <0x0 0x10000000 0x0 0x1000>;
clock-frequency = <50000000>;
current-speed = <115200>;
Expand Down
44 changes: 7 additions & 37 deletions corev_apu/bootrom/bootrom.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Auto-generated code

const int reset_vec_size = 402;
const int reset_vec_size = 372;

uint32_t reset_vec[reset_vec_size] = {
0x00100413,
Expand Down Expand Up @@ -36,15 +36,15 @@ uint32_t reset_vec[reset_vec_size] = {
0x00000000,
0x00000000,
0xedfe0dd0,
0xc2050000,
0x4a050000,
0x38000000,
0xbc040000,
0x44040000,
0x28000000,
0x11000000,
0x10000000,
0x00000000,
0x06010000,
0x84040000,
0x0c040000,
0x00000000,
0x00000000,
0x00000000,
Expand Down Expand Up @@ -235,46 +235,16 @@ uint32_t reset_vec[reset_vec_size] = {
0x006c6f72,
0x02000000,
0x01000000,
0x75626564,
0x6f632d67,
0x6f72746e,
0x72656c6c,
0x00003040,
0x03000000,
0x10000000,
0x1b000000,
0x63736972,
0x65642c76,
0x2d677562,
0x00333130,
0x03000000,
0x08000000,
0xb8000000,
0x01000000,
0xffff0000,
0x03000000,
0x10000000,
0x5b000000,
0x00000000,
0x00000000,
0x00000000,
0x00100000,
0x03000000,
0x08000000,
0xcc000000,
0x746e6f63,
0x006c6f72,
0x02000000,
0x01000000,
0x74726175,
0x30303140,
0x30303030,
0x00000030,
0x03000000,
0x08000000,
0x09000000,
0x1b000000,
0x3631736e,
0x00303537,
0x61303535,
0x00000000,
0x03000000,
0x10000000,
0x5b000000,
Expand Down
33 changes: 9 additions & 24 deletions corev_apu/bootrom/bootrom.sv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module bootrom (
input logic [63:0] addr_i,
output logic [63:0] rdata_o
);
localparam int RomSize = 201;
localparam int RomSize = 186;

const logic [RomSize-1:0][63:0] mem = {
64'h00000000_00000068,
Expand Down Expand Up @@ -88,26 +88,11 @@ module bootrom (
64'h00000000_00000010,
64'h00000000_5b000000,
64'h10000000_03000000,
64'h00303537_3631736e,
64'h1b000000_08000000,
64'h03000000_00000030,
64'h30303030_30303140,
64'h74726175_01000000,
64'h02000000_006c6f72,
64'h746e6f63_cc000000,
64'h08000000_03000000,
64'h00100000_00000000,
64'h00000000_00000000,
64'h5b000000_10000000,
64'h03000000_ffff0000,
64'h01000000_b8000000,
64'h08000000_03000000,
64'h00333130_2d677562,
64'h65642c76_63736972,
64'h1b000000_10000000,
64'h03000000_00003040,
64'h72656c6c_6f72746e,
64'h6f632d67_75626564,
64'h00000000_61303535,
64'h3631736e_1b000000,
64'h09000000_03000000,
64'h00000030_30303030,
64'h30303140_74726175,
64'h01000000_02000000,
64'h006c6f72_746e6f63,
64'hcc000000_08000000,
Expand Down Expand Up @@ -203,11 +188,11 @@ module bootrom (
64'h00000000_01000000,
64'h00000000_00000000,
64'h00000000_00000000,
64'h84040000_06010000,
64'h0c040000_06010000,
64'h00000000_10000000,
64'h11000000_28000000,
64'hbc040000_38000000,
64'hc2050000_edfe0dd0,
64'h44040000_38000000,
64'h4a050000_edfe0dd0,
64'h00000000_00000000,
64'h00000000_00000000,
64'h00000000_00000000,
Expand Down
Loading

0 comments on commit da74358

Please sign in to comment.