openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
payload.h
Go to the documentation of this file.
1/*
2 * openMMC -- Open Source modular IPM Controller firmware
3 *
4 * Copyright (C) 2015 Piotr Miedzik <P.Miedzik@gsi.de>
5 * Copyright (C) 2015-2016 Henrique Silva <henrique.silva@lnls.br>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
21 */
22
36#ifndef PAYLOAD_H_
37#define PAYLOAD_H_
38
39#include "event_groups.h"
40#include "mmc_error.h"
41
45extern enum {
55
61#define PAYLOAD_MESSAGE_COLD_RST (1 << 0)
62#define PAYLOAD_MESSAGE_WARM_RST (1 << 1)
63#define PAYLOAD_MESSAGE_REBOOT (1 << 2)
64#define PAYLOAD_MESSAGE_QUIESCE (1 << 3)
65#define PAYLOAD_MESSAGE_RTM_ENABLE (1 << 4)
66#define PAYLOAD_MESSAGE_CLOCK_CONFIG (1 << 5)
74#define PAYLOAD_BASE_DELAY 100
75
79extern TaskHandle_t vTaskPayload_Handle;
80
89void payload_send_message( uint8_t fru_id, EventBits_t msg );
90
96void vTaskPayload( void *pvParameters );
97
101void payload_init( void );
102
103#ifdef MODULE_HPM
104
105#define PAYLOAD_HPM_PAGE_SIZE 256
106
107uint8_t payload_hpm_prepare_comp( void );
108uint8_t payload_hpm_upload_block( uint8_t * block, uint16_t size );
109uint8_t payload_hpm_finish_upload( uint32_t image_size );
110uint8_t payload_hpm_get_upgrade_status( void );
111uint8_t payload_hpm_activate_firmware( void );
112#endif
113
118mmc_err clock_configuration(const uint8_t clk_cfg[16]);
119
120#endif /* IPMI_PAYLOAD_H_ */
121
void vTaskPayload(void *pvParameters)
Payload Control task.
Definition payload.c:216
void payload_init(void)
Creates Payload Control task and initializes the board's needed hardware.
Definition payload.c:182
void payload_send_message(uint8_t fru_id, EventBits_t msg)
Sends a message to the payload task.
Definition payload.c:169
mmc_err clock_configuration(const uint8_t clk_cfg[16])
Configure the clock switch interconects according to the configuration saved in EEPROM.
TaskHandle_t vTaskPayload_Handle
Payload task handle variable.
Definition payload.c:180
enum @10 payload_state
Payload state machine state numbers.
@ PAYLOAD_QUIESCED
Definition payload.h:51
@ PAYLOAD_MAX_STATES
Definition payload.h:53
@ PAYLOAD_NO_POWER
Definition payload.h:46
@ PAYLOAD_FPGA_ON
Definition payload.h:49
@ PAYLOAD_SWITCHING_OFF
Definition payload.h:50
@ PAYLOAD_POWER_GOOD_WAIT
Definition payload.h:47
@ PAYLOAD_STATE_FPGA_SETUP
Definition payload.h:48
@ PAYLOAD_RESET
Definition payload.h:52
Error handling functions and codes.
mmc_err
Definition mmc_error.h:36