mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
Add x86bios_set_intr() to set interrupt vectors for real mode and simplify
x86bios_get_intr() a little.
This commit is contained in:
parent
bc339276fb
commit
97e6525d6a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211824
@ -203,6 +203,13 @@ x86bios_get_intr(int intno)
|
||||
return (readl(BIOS_PADDRTOVADDR(intno * 4)));
|
||||
}
|
||||
|
||||
void
|
||||
x86bios_set_intr(int intno, uint32_t saddr)
|
||||
{
|
||||
|
||||
writel(BIOS_PADDRTOVADDR(intno * 4), saddr);
|
||||
}
|
||||
|
||||
void
|
||||
x86bios_intr(struct x86regs *regs, int intno)
|
||||
{
|
||||
@ -619,11 +626,15 @@ x86bios_call(struct x86regs *regs, uint16_t seg, uint16_t off)
|
||||
uint32_t
|
||||
x86bios_get_intr(int intno)
|
||||
{
|
||||
uint32_t *iv;
|
||||
|
||||
iv = (uint32_t *)((vm_offset_t)x86bios_ivt + intno * 4);
|
||||
return (le32toh(*((uint32_t *)x86bios_ivt + intno)));
|
||||
}
|
||||
|
||||
return (le32toh(*iv));
|
||||
void
|
||||
x86bios_set_intr(int intno, uint32_t saddr)
|
||||
{
|
||||
|
||||
*((uint32_t *)x86bios_ivt + intno) = htole32(saddr);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -151,6 +151,7 @@ void x86bios_init_regs(struct x86regs *regs);
|
||||
void x86bios_intr(struct x86regs *regs, int intno);
|
||||
int x86bios_match_device(uint32_t offset, device_t dev);
|
||||
void *x86bios_offset(uint32_t offset);
|
||||
void x86bios_set_intr(int intno, uint32_t saddr);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_X86BIOS_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user