xref: /openbsd/sys/arch/landisk/stand/boot/libsa.h (revision a4f11372)
1 /*	$OpenBSD: libsa.h,v 1.10 2023/02/23 19:48:22 miod Exp $	*/
2 
3 /*
4  * Copyright (c) 2006 Michael Shalayeff
5  * All rights reserved.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
16  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #include <lib/libsa/stand.h>
21 
22 #define	PCLOCK	33333333
23 
24 int readsects(int dev, uint32_t lba, void *buf, size_t size);
25 int blkdevopen(struct open_file *, ...);
26 int blkdevclose(struct open_file *);
27 int blkdevstrategy(void *, int, daddr_t, size_t, void *, size_t *);
28 int  getc(void);
29 void putc(int);
30 void cache_flush(void);
31 void cache_disable(void);
32 
33 void	scif_cnprobe(struct consdev *);
34 void	scif_cninit(struct consdev *);
35 int	scif_cngetc(dev_t);
36 void	scif_cnputc(dev_t, int);
37 void	scif_init(unsigned int);
38 
39 int	tick_init();
40 void	delay(int);
41 
42 void	devboot(dev_t, char *);
43 void	machdep();
44 void	run_loadfile(uint64_t *, int);
45