blob: 657698ba54d1441ae7f1922674e0edad62b96c9f [file] [log] [blame]
Aaron Williams46db3822020-08-20 07:22:03 +02001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2020 Marvell International Ltd.
4 */
5
6#ifndef __BOOTOCT_CMD_H__
7#define __BOOTOCT_CMD_H__
8
9#include "cvmx-coremask.h"
10
11enum octeon_boot_cmd_type {
12 BOOTOCT,
13 BOOTOCTLINUX,
14 BOOTOCTELF
15};
16
17/** Structure to contain results of command line argument parsing */
18struct octeon_boot_args {
19 struct cvmx_coremask coremask; /** Parsed coremask */
20 int num_cores[CVMX_MAX_NODES]; /** number of cores */
21 int num_skipped[CVMX_MAX_NODES];/** number of skipped cores */
22 const char *app_name; /** Application name */
23 const char *named_block; /** Named block to load Linux into */
24 u32 stack_size; /** stack size */
25 u32 heap_size; /** heap size */
26 u32 boot_flags; /** boot flags */
27 int node_mask; /** Node mask to use */
28 int console_uart; /** serial console number */
29 bool forceboot; /** force booting if core 0 not set */
30 bool coremask_set; /** set if coremask was set */
31 bool num_cores_set; /** Set if num_cores was set */
32 bool num_skipped_set; /** Set if num_skipped was set */
33 /** Set if endbootargs parameter was passed. */
34 bool endbootargs;
35};
36
37/**
38 * Parse command line arguments
39 *
40 * @param argc number of arguments
41 * @param[in] argv array of argument strings
42 * @param cmd command type
43 * @param[out] boot_args parsed values
44 *
45 * @return number of arguments parsed
46 */
47int octeon_parse_bootopts(int argc, char *const argv[],
48 enum octeon_boot_cmd_type cmd,
49 struct octeon_boot_args *boot_args);
50
51void nmi_bootvector(void);
52extern u64 nmi_handler_para[];
53
54#endif /* __BOOTOCT_CMD_H__ */