From:
https://github.com/moby/vpnkit
commit 2ffc1dd8a84ea7359dd09b1f4b51bb728d4f46a0
c/vpnkit-tap-vsockd/tap-vsockd.c
With minimum changes to make it build.
* stm32h7_qspi: Board.h now may define the BOARD_QSPI_CLK macro to select one of
RCC_D1CCIPR_QSPISEL_{HCLK,PLL1,PLL2,PER} clocks to use with QUADSPI peripherial.
Defaults to HCLK for backward compatibility.
New macros in qspi.h: QSPICMD_IDUAL and QSPICMD_IQUAD for selecting the bit
width for instruction code (1,2 or 4 bits) of a qspi_cmdinfo_s, and
QSPIMEM_IDUAL and QSPIMEM_IQUAD for selecting the bit width of a qspi_meminfo_s.
* NX style fixes
Necessary for dlfcn etc on ESP32, which has separate memory regions
for instruction and data.
known issues/todo
* consider something similar to dual heaps for PROTOECTED
* consider to adapt binfmt as well
The remaining errors:
Operator/assignment must be preceded with whitespace
I didn't fix them because they are in assembly code, which
nxstyle doesn't understand.
The remaining errors:
Mixed case identifier found
I didn't fix them because they were on ROM symbols,
which are not supposed to obey NuttX's coding style.
Unfortunately nxstyle is still not happy because it doesn't
like the following construct. I'm not sure what to do here.
struct
{
const char *pathname;
long mode;
size_t len;
} open =
{
.pathname = pathname,
.mode = host_flags_to_mode(flags),
.len = strlen(pathname),
};
I skipped the following files because they were not simple.
I'll create separate PRs.
arch/xtensa/src/esp32/esp32_cpustart.c
arch/xtensa/src/common/xtensa_abi.h
boards/xtensa/esp32/esp32-core/include/board.h
Also, I skipped the following files and directories because
they looked too huge and/or foreign.
arch/xtensa/include/esp32/tie.h
arch/xtensa/include/xtensa/xtensa_corebits.h
arch/xtensa/src/esp32/hardware/
arch/xtensa/include/esp32/tie-asm.h
arch/xtensa/include/esp32/core-isa.h
arch/xtensa/include/xtensa/core.h
I also fixed a few "is is" style typos when unwrapping long lines.
arch/z80/src/ez80/ez80_timerisr.c: Correct a mismatch between the programmed reload value and the timer input clock frequency.
arch/z80/src/ez80/ez80f92.h: Correct error in timer input clock divider: Bits 2-3, not bits 3-4.
boards/z80/ez80/z20x/src/w25_main.c: Correct an uninitialized return value; private function was not declard static.
* stm32h7: New timer output mode STM32_TIM_CH_OUTTOGGLE.
In this mode timer generates a square waveform on given timer channel.
The maximal waveform freq is timer clock divided by 4 (prescaler 1, period 1 results in 2 clocks '0' and 2 clocks '1').
* stm32_tim.h styling fixes.
arch/z80/src/ez80/ez80f92_init.asm: Timer control register was not being cleared and, as a result, timer interrupts may have been already enabled when the CPU was started by the debugger. This would result in spurious interrupts and Unexpected Interrupt crashes.
arch/z80/src/comming/up_initialize.c: Fix a trivial typo.
While we are at it, change the license headers in all relevant files in the affected directories to the Apache 2.0 license. Run all affected files through nxstyle.