View | Details | Raw Unified | Return to bug 210111
Collapse All | Expand All

(-)b/usr.sbin/bhyve/bhyverun.c (-2 / +8 lines)
Lines 803-815 main(int argc, char *argv[]) Link Here
803
			gdb_port = atoi(optarg);
803
			gdb_port = atoi(optarg);
804
			break;
804
			break;
805
		case 'l':
805
		case 'l':
806
			if (lpc_device_parse(optarg) != 0) {
806
			if (strncmp(optarg, "help", strlen(optarg)) == 0) {
807
				lpc_print_supported_devices();
808
				exit(0);
809
			} else if (lpc_device_parse(optarg) != 0) {
807
				errx(EX_USAGE, "invalid lpc device "
810
				errx(EX_USAGE, "invalid lpc device "
808
				    "configuration '%s'", optarg);
811
				    "configuration '%s'", optarg);
809
			}
812
			}
810
			break;
813
			break;
811
		case 's':
814
		case 's':
812
			if (pci_parse_slot(optarg) != 0)
815
			if (strncmp(optarg, "help", strlen(optarg)) == 0) {
816
				pci_print_supported_devices();
817
				exit(0);
818
			} else if (pci_parse_slot(optarg) != 0)
813
				exit(1);
819
				exit(1);
814
			else
820
			else
815
				break;
821
				break;
(-)b/usr.sbin/bhyve/pci_emul.c (+11 lines)
Lines 235-240 done: Link Here
235
	return (error);
235
	return (error);
236
}
236
}
237
237
238
void
239
pci_print_supported_devices()
240
{
241
	struct pci_devemu **pdpp, *pdp;
242
243
	SET_FOREACH(pdpp, pci_devemu_set) {
244
		pdp = *pdpp;
245
		printf("%s\n", pdp->pe_emu);
246
	}
247
}
248
238
static int
249
static int
239
pci_valid_pba_offset(struct pci_devinst *pi, uint64_t offset)
250
pci_valid_pba_offset(struct pci_devinst *pi, uint64_t offset)
240
{
251
{
(-)b/usr.sbin/bhyve/pci_emul.h (+1 lines)
Lines 229-234 int pci_msix_table_bar(struct pci_devinst *pi); Link Here
229
int	pci_msix_pba_bar(struct pci_devinst *pi);
229
int	pci_msix_pba_bar(struct pci_devinst *pi);
230
int	pci_msi_msgnum(struct pci_devinst *pi);
230
int	pci_msi_msgnum(struct pci_devinst *pi);
231
int	pci_parse_slot(char *opt);
231
int	pci_parse_slot(char *opt);
232
void    pci_print_supported_devices();
232
void	pci_populate_msicap(struct msicap *cap, int msgs, int nextptr);
233
void	pci_populate_msicap(struct msicap *cap, int msgs, int nextptr);
233
int	pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum);
234
int	pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum);
234
int	pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size,
235
int	pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size,
(-)b/usr.sbin/bhyve/pci_lpc.c (+10 lines)
Lines 112-117 done: Link Here
112
	return (error);
112
	return (error);
113
}
113
}
114
114
115
void
116
lpc_print_supported_devices()
117
{
118
	size_t i;
119
120
	printf("bootrom\n");
121
	for (i = 0; i < LPC_UART_NUM; i++)
122
		printf("%s\n", lpc_uart_names[i]);
123
}
124
115
const char *
125
const char *
116
lpc_bootrom(void)
126
lpc_bootrom(void)
117
{
127
{
(-)b/usr.sbin/bhyve/pci_lpc.h (+1 lines)
Lines 66-71 struct lpc_sysres { Link Here
66
#define	SYSRES_MEM(base, length)	LPC_SYSRES(LPC_SYSRES_MEM, base, length)
66
#define	SYSRES_MEM(base, length)	LPC_SYSRES(LPC_SYSRES_MEM, base, length)
67
67
68
int	lpc_device_parse(const char *opt);
68
int	lpc_device_parse(const char *opt);
69
void    lpc_print_supported_devices();
69
char	*lpc_pirq_name(int pin);
70
char	*lpc_pirq_name(int pin);
70
void	lpc_pirq_routed(void);
71
void	lpc_pirq_routed(void);
71
const char *lpc_bootrom(void);
72
const char *lpc_bootrom(void);

Return to bug 210111