2023-06-26 11:44:57 -07:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause-Views
|
2021-12-29 22:31:46 -08:00
|
|
|
/*
|
2023-06-26 11:44:57 -07:00
|
|
|
* Copyright (c) 2021-2023 The Regents of the University of California
|
|
|
|
*/
|
2021-12-29 22:31:46 -08:00
|
|
|
|
|
|
|
#ifndef REG_BLOCK_H
|
|
|
|
#define REG_BLOCK_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2022-04-24 22:51:37 -07:00
|
|
|
struct mqnic_reg_block {
|
2021-12-29 22:31:46 -08:00
|
|
|
uint32_t type;
|
|
|
|
uint32_t version;
|
|
|
|
volatile uint8_t *base;
|
|
|
|
volatile uint8_t *regs;
|
|
|
|
};
|
|
|
|
|
2022-04-24 22:51:37 -07:00
|
|
|
struct mqnic_reg_block *mqnic_enumerate_reg_block_list(volatile uint8_t *base, size_t offset, size_t size);
|
|
|
|
struct mqnic_reg_block *mqnic_find_reg_block(struct mqnic_reg_block *list, uint32_t type, uint32_t version, int index);
|
|
|
|
void mqnic_free_reg_block_list(struct mqnic_reg_block *list);
|
2021-12-29 22:31:46 -08:00
|
|
|
|
|
|
|
#endif /* REG_BLOCK_H */
|