-/* $OpenBSD: autoconf.h,v 1.18 2008/06/26 05:42:13 ray Exp $ */
+/* $OpenBSD: autoconf.h,v 1.19 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: autoconf.h,v 1.10 2001/07/24 19:32:11 eeh Exp $ */
/*-
};
struct bootpath *bootpath_store(int, struct bootpath *);
-/* Establish a mountroot_hook, for benefit of floppy drive, mostly. */
-void mountroot_hook_establish(void (*)(struct device *), struct device *);
-
void bootstrap(int);
int firstchild(int);
int nextsibling(int);
void callrom(void);
struct device *getdevunit(char *, int);
-void *findzs(int);
int romgetcursoraddr(int **, int **);
int findroot(void);
int findnode(int, const char *);
-/* $OpenBSD: conf.h,v 1.27 2022/06/28 14:43:50 visa Exp $ */
+/* $OpenBSD: conf.h,v 1.28 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: conf.h,v 1.9 2001/03/26 12:33:26 lukem Exp $ */
/*-
0, (dev_type_mmap((*))) enodev, \
0, 0, dev_init(c,n,kqfilter) }
-cdev_decl(cn);
-
cdev_decl(zs);
bdev_decl(fd);
cdev_decl(fd);
-cdev_decl(fb);
-
-cdev_decl(ms);
-
-cdev_decl(kbd);
-cdev_decl(kd);
-
-cdev_decl(bwtwo);
-
-cdev_decl(cgtwo);
-
-cdev_decl(cgthree);
-
-cdev_decl(cgfour);
-
-cdev_decl(cgsix);
-
-cdev_decl(cgeight);
-
-cdev_decl(tcx);
-
-cdev_decl(cgfourteen);
-
cdev_decl(bpp);
cdev_decl(lpt);
-cdev_decl(scsibus);
-
bdev_decl(wd);
cdev_decl(wd);
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
0, (dev_type_mmap((*))) enodev, 0, 0, seltrue_kqfilter }
-
-cdev_decl(bpp);
-/* $OpenBSD: cpu.h,v 1.104 2024/02/25 19:15:50 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.105 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */
/*
/* cpu.c */
int cpu_myid(void);
/* machdep.c */
-int ldcontrolb(caddr_t);
void dumpconf(void);
caddr_t reserve_dumppages(caddr_t);
/* clock.c */
struct timeval;
int clockintr(void *);/* level 10 (clock) interrupt code */
-int statintr(void *); /* level 14 (statclock) interrupt code */
/* locore.s */
struct fpstate;
void savefpstate(struct fpstate *);
struct pcb;
void snapshot(struct pcb *);
struct frame *getfp(void);
-int xldcontrolb(caddr_t, struct pcb *);
-void copywords(const void *, void *, size_t);
-void qcopy(const void *, void *, size_t);
-void qzero(void *, size_t);
void switchtoctx(int);
/* trap.c */
void pmap_unuse_final(struct proc *);
/* vm_machdep.c */
void fpusave_cpu(struct cpu_info *, int);
void fpusave_proc(struct proc *, int);
-/* cons.c */
-int cnrom(void);
-/* zs.c */
-void zsconsole(struct tty *, int, int, void (**)(struct tty *, int));
/* fb.c */
void fb_unblank(void);
/* ltc.c */
};
extern struct trapvec trapbase[]; /* the 256 vectors */
-extern void wzero(void *, u_int);
-extern void wcopy(const void *, void *, u_int);
-
struct blink_led {
void (*bl_func)(void *, int);
void *bl_arg;
-/* $OpenBSD: idprom.h,v 1.2 2001/08/20 20:23:52 jason Exp $ */
+/* $OpenBSD: idprom.h,v 1.3 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: idprom.h,v 1.2 1998/09/05 23:57:26 eeh Exp $ */
/*
char id_undef[16]; /* undefined */
};
-#define ID_SUN4_100 0x22
-#define ID_SUN4_200 0x21
-#define ID_SUN4_300 0x23
-#define ID_SUN4_400 0x24
-
#define IDPROM_VERSION 1
-/* $OpenBSD: pte.h,v 1.15 2013/03/31 17:07:03 deraadt Exp $ */
+/* $OpenBSD: pte.h,v 1.16 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: pte.h,v 1.7 2001/07/31 06:55:46 eeh Exp $ */
/*
#ifndef _MACHINE_PTE_H_
#define _MACHINE_PTE_H_
-/*
- * Address translation works as follows:
- *
- **
- * For sun4u:
- *
- * Take your pick; it's all S/W anyway. We'll start by emulating a sun4.
- * Oh, here's the sun4u TTE for reference:
- *
- * struct sun4u_tte {
- * u_int64 tag_g:1, (global flag)
- * tag_ctxt:15, (context for mapping)
- * tag_unassigned:6,
- * tag_va:42; (virtual address bits<63:22>)
- * u_int64 data_v:1, (valid bit)
- * data_size:2, (page size [8K*8**<SIZE>])
- * data_nfo:1, (no-fault only)
- * data_ie:1, (invert endianness [inefficient])
- * data_soft2:2, (reserved for S/W)
- * data_pa:36, (physical address)
- * data_soft:6, (reserved for S/W)
- * data_lock:1, (lock into TLB)
- * data_cacheable:2, (cacheability control)
- * data_e:1, (explicit accesses only)
- * data_priv:1, (privileged page)
- * data_w:1, (writeable)
- * data_g:1; (same as tag_g)
- * };
- */
-
/* virtual address to virtual page number */
#define VA_SUN4U_VPG(va) (((int)(va) >> 13) & 31)
#ifndef _LOCORE
/*
* This is the spitfire TTE.
- *
- * We could use bitmasks and shifts to construct this if
- * we had a 64-bit compiler w/64-bit longs. Otherwise it's
- * a real pain to do this in C.
*/
-#if 0
-/* We don't use bitfields anyway. */
+#if 0 /* We don't use bitfields anyway. */
struct sun4u_tag_fields {
u_int64_t tag_g:1, /* global flag */
tag_ctxt:15, /* context for mapping */
((priv)?SUN4V_TLB_P:0LL)|((write)?SUN4V_TLB_W:0LL)|((g)?SUN4V_TLB_G:0LL)|\
((ie)?SUN4V_TLB_IE:0LL))
-
-#define MMU_CACHE_VIRT 0x3
-#define MMU_CACHE_PHYS 0x2
-#define MMU_CACHE_NONE 0x0
-
-/* This needs to be updated for sun4u IOMMUs */
-/*
- * IOMMU PTE bits.
- */
-#define IOPTE_PPN_MASK 0x07ffff00
-#define IOPTE_PPN_SHIFT 8
-#define IOPTE_RSVD 0x000000f1
-#define IOPTE_WRITE 0x00000004
-#define IOPTE_VALID 0x00000002
-
#endif /* _MACHINE_PTE_H_ */
-
-/* $OpenBSD: vmparam.h,v 1.34 2023/03/19 20:32:13 kettenis Exp $ */
+/* $OpenBSD: vmparam.h,v 1.35 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: vmparam.h,v 1.18 2001/05/01 02:19:19 thorpej Exp $ */
/*
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
-#if defined (_KERNEL) && !defined(_LOCORE)
-struct vm_map;
-vaddr_t dvma_mapin(struct vm_map *, vaddr_t, int, int);
-void dvma_mapout(vaddr_t, vaddr_t, int);
-#endif
#endif
-/* $OpenBSD: clock.c,v 1.82 2023/09/17 14:50:51 cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.83 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
static struct idprom *idprom;
int clock_bus_wenable(struct todr_chip_handle *, int);
-struct chiptime;
void myetheraddr(u_char *);
struct idprom *getidprom(void);
-int chiptotime(int, int, int, int, int, int);
-void timetochip(struct chiptime *);
-
-int timerblurb = 10; /* Guess a value; used before clock is attached */
/*
* The OPENPROM calls the clock the "eeprom", so we have to have our
-/* $OpenBSD: locore.s,v 1.204 2023/12/12 07:37:21 deraadt Exp $ */
+/* $OpenBSD: locore.s,v 1.205 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
TA32
.endm
- .macro DMMU_PROT dprot
+ .macro DMMU_PROT
ba,a,pt %xcc, dmmu_write_fault
nop
TA32
ufast_DMMU_miss: ! 068 = fast data access MMU miss
DMMU_MISS 7
ufast_DMMU_protection: ! 06c = fast data access MMU protection
- DMMU_PROT udprot
+ DMMU_PROT
UTRAP 0x070 ! Implementation dependent traps
UTRAP 0x071; UTRAP 0x072; UTRAP 0x073; UTRAP 0x074; UTRAP 0x075; UTRAP 0x076
UTRAP 0x077; UTRAP 0x078; UTRAP 0x079; UTRAP 0x07a; UTRAP 0x07b; UTRAP 0x07c
kfast_DMMU_miss: ! 068 = fast data access MMU miss
DMMU_MISS 10
kfast_DMMU_protection: ! 06c = fast data access MMU protection
- DMMU_PROT kdprot
+ DMMU_PROT
UTRAP 0x070 ! Implementation dependent traps
UTRAP 0x071; UTRAP 0x072; UTRAP 0x073; UTRAP 0x074; UTRAP 0x075; UTRAP 0x076
UTRAP 0x077; UTRAP 0x078; UTRAP 0x079; UTRAP 0x07a; UTRAP 0x07b; UTRAP 0x07c
*
* Essentially we need to be able to write re-entrant code w/no stack.
*/
- .data
-trap_setup_msg:
- .asciz "TRAP_SETUP: tt=%x osp=%x nsp=%x tl=%x tpc=%x\n"
- _ALIGN
-intr_setup_msg:
- .asciz "INTR_SETUP: tt=%x osp=%x nsp=%x tl=%x tpc=%x\n"
- _ALIGN
.text
.macro TRAP_SETUP stackspace
-/* $OpenBSD: machdep.c,v 1.209 2024/03/07 15:01:53 claudio Exp $ */
+/* $OpenBSD: machdep.c,v 1.210 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
}
}
-void trapdump(struct trapframe *);
-/*
- * dump out a trapframe.
- */
-void
-trapdump(struct trapframe *tf)
-{
- printf("TRAPFRAME: tstate=%llx pc=%llx npc=%llx y=%x\n",
- (unsigned long long)tf->tf_tstate, (unsigned long long)tf->tf_pc,
- (unsigned long long)tf->tf_npc, (unsigned)tf->tf_y);
- printf("%%g1-7: %llx %llx %llx %llx %llx %llx %llx\n",
- (unsigned long long)tf->tf_global[1],
- (unsigned long long)tf->tf_global[2],
- (unsigned long long)tf->tf_global[3],
- (unsigned long long)tf->tf_global[4],
- (unsigned long long)tf->tf_global[5],
- (unsigned long long)tf->tf_global[6],
- (unsigned long long)tf->tf_global[7]);
- printf("%%o0-7: %llx %llx %llx %llx\n %llx %llx %llx %llx\n",
- (unsigned long long)tf->tf_out[0],
- (unsigned long long)tf->tf_out[1],
- (unsigned long long)tf->tf_out[2],
- (unsigned long long)tf->tf_out[3],
- (unsigned long long)tf->tf_out[4],
- (unsigned long long)tf->tf_out[5],
- (unsigned long long)tf->tf_out[6],
- (unsigned long long)tf->tf_out[7]);
-}
/*
* get the fp and dump the stack as best we can. don't leave the
* current stack page
-/* $OpenBSD: ofw_machdep.c,v 1.36 2022/10/17 18:49:06 kettenis Exp $ */
+/* $OpenBSD: ofw_machdep.c,v 1.37 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */
/*
#include <dev/ofw/ofw_pci.h>
-#if defined(FFS) && defined(CD9660)
-#include <ufs/ffs/fs.h>
-#endif
-
/*
* Note that stdarg.h and the ANSI style va_start macro is used for both
* ANSI and traditional C compilers.
#include <machine/sparc64.h>
-int vsprintf(char *, const char *, va_list);
-
-void dk_cleanup(void);
-
static u_int mmuh = -1, memh = -1;
static u_int get_mmu_handle(void);
-/* $OpenBSD: pmap.c,v 1.111 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.112 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
/*
*
void pmap_bootstrap_cpu(paddr_t);
-void pmap_pinit(struct pmap *);
void pmap_release(struct pmap *);
pv_entry_t pa_to_pvh(paddr_t);
-/* $OpenBSD: trap.c,v 1.119 2024/01/11 19:16:27 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.120 2024/03/29 21:06:14 miod Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
#include <sparc64/fpu/fpu_extern.h>
#include <sparc64/sparc64/cache.h>
-#ifndef offsetof
-#define offsetof(s, f) ((int)&((s *)0)->f)
-#endif
-
-/* trapstats */
-int trapstats = 0;
-int protfix = 0;
-int udmiss = 0; /* Number of normal/nucleus data/text miss/protection faults */
-int udhit = 0;
-int udprot = 0;
-int utmiss = 0;
-int kdmiss = 0;
-int kdhit = 0;
-int kdprot = 0;
-int ktmiss = 0;
-int iveccnt = 0; /* number if normal/nucleus interrupt/interrupt vector faults */
-int uintrcnt = 0;
-int kiveccnt = 0;
-int kintrcnt = 0;
-int intristk = 0; /* interrupts when already on intrstack */
-int intrpoll = 0; /* interrupts not using vector lists */
-int wfill = 0;
-int kwfill = 0;
-int wspill = 0;
-int wspillskip = 0;
-int rftucnt = 0;
-int rftuld = 0;
-int rftudone = 0;
-int rftkcnt[5] = { 0, 0, 0, 0, 0 };
-
/*
* Initial FPU state is all registers == all 1s, everything else == all 0s.
* This makes every floating point register a signalling NaN, with sign bit