[video member=miotatsu stream_platform=twitch project=riscy title="Studying CLINT" vod_platform=youtube id=xtW4-ouxQQY annotator=Miblo] [0:10][A few words on the webcam position and a tease of some exciting content in the pipeline] [1:28][Recap and consult the SiFive forum reply[ref site="SiFive forums" page="Question about disabling interrupts in the demo_gpio program" url=https://forums.sifive.com/t/question-about-disabling-interrupts-in-the-demo-gpio-program/397] regarding the clear_csr() calls in demo_gpio.c] [5:10][A few words on updating the Freedom E SDK to commit 3a01ac1] [7:08][Look at the Makefile for demo_gpio.c, and the updated demo_gpio.c itself] [9:11][Consult the commit diffs for the Freedom E SDK[ref site=GitHub page="sifive / freedom-e-sdk" url=https://github.com/sifive/freedom-e-sdk]] [17:25][Shout-out to Megan Wachs] [18:02][Continue consulting the commit diffs[ref site=GitHub page="sifive / freedom-e-sdk" url=https://github.com/sifive/freedom-e-sdk]] [19:04][Return to looking at reset_demo()][:research] [21:34][Read about the machine-mode software interrupts (MSIP) of the CLINT[ref site="SiFive Developers" page="E3 Coreplex Manual" url=https://static.dev.sifive.com/pdfjs/web/viewer.html?file=https://static.dev.sifive.com/SiFive-E3-Coreplex-v1.2.pdf]][:hardware :research] [24:51][Read about the Machine Timer Registers in the Privileged ISA Specification[ref site="RISC-V" page="Draft Privileged ISA Specification v1.9.1" url=https://riscv.org/specifications/privileged-isa/]][:hardware :research] [27:48][Read about the Timer Registers and consult the CLINT memory map[ref site="SiFive Developers" page="E3 Coreplex Manual" url=https://static.dev.sifive.com/pdfjs/web/viewer.html?file=https://static.dev.sifive.com/SiFive-E3-Coreplex-v1.2.pdf]][:hardware :research] [31:05][Read about Memory Privilege in mstatus Register[ref site="RISC-V" page="Draft Privileged ISA Specification v1.9.1" url=https://riscv.org/specifications/privileged-isa/]][:hardware :research] [34:00][Hunt for some documentation on the CLINT in the Platform Reference Manual, and read the Introduction[ref site="SiFive Developers" page="Platform Reference Manual" url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:research] [38:02][Note that the E300 SoC is optimized for manufacture in a TSMC 180nm process, and again recommend "Indistinguishable From Magic: Manufacturing Modern Computer Chips"[ref site=YouTube page="Indistinguishable From Magic: Manufacturing Modern Computer Chips" url=https://www.youtube.com/watch?v=NGFhc8R_uO4]][:fabrication] [38:57][Hunt for more documentation on the CLINT[ref site="SiFive Developers" page="Platform Reference Manual" url=https://www.sifive.com/documentation/freedom-soc/freedom-e300-platform-reference-manual/]][:research] [46:29][Read about mip and mie again[ref site="RISC-V" page="Draft Privileged ISA Specification v1.9.1" url=https://riscv.org/specifications/privileged-isa/]][:hardware :research] [49:48][Read about Local Interrupt Sources[ref site="RISC-V" page="Draft Privileged ISA Specification v1.9.1" url=https://riscv.org/specifications/privileged-isa/]][:hardware :research] [51:32][Consult the machine-mode status register table[ref site="RISC-V" page="Draft Privileged ISA Specification v1.9.1" url=https://riscv.org/specifications/privileged-isa/]][:hardware :research] [54:36][Begin to understand how demo_gpio.c is setting the machine timers in conjunction with the CLINT Memory Map[ref site="RISC-V" page="Draft Privileged ISA Specification v1.9.1" url=https://riscv.org/specifications/privileged-isa/]] [56:58][:Research CLINT_MTIMECMP][:hardware] [1:02:08][Note that we're hardcoding that we're on hart 0][:hardware :research] [1:03:21][Review how plic_driver.c commonly computes the correct memory locations][:hardware :research] [1:05:26][A few words on code brittleness and :optimisation] [1:07:15][Mention that the Freedom E SDK failed to compile, as also mentioned in the SiFive Forums[ref site="SiFive Forums" page="Arch Linux and the HiFive1" url=https://forums.sifive.com/t/arch-linux-and-the-hifive1/212]] [1:08:13][Shout-out to nonerkao] [1:10:01][That's everything for today, with a mention of the twitter schedule[ref site=Twitter page="RISCY BUSINESS" url=https://twitter.com/hmn_riscy]] [1:11:29][Shout-out to @hossein1387] [/video]