Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_BIOS_EBDA_H
0003 #define _ASM_X86_BIOS_EBDA_H
0004 
0005 #include <asm/io.h>
0006 
0007 /*
0008  * Returns physical address of EBDA.  Returns 0 if there is no EBDA.
0009  */
0010 static inline unsigned int get_bios_ebda(void)
0011 {
0012     /*
0013      * There is a real-mode segmented pointer pointing to the
0014      * 4K EBDA area at 0x40E.
0015      */
0016     unsigned int address = *(unsigned short *)phys_to_virt(0x40E);
0017     address <<= 4;
0018     return address; /* 0 means none */
0019 }
0020 
0021 void reserve_bios_regions(void);
0022 
0023 #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
0024 /*
0025  * This is obviously not a great place for this, but we want to be
0026  * able to scatter it around anywhere in the kernel.
0027  */
0028 void check_for_bios_corruption(void);
0029 void start_periodic_check_for_corruption(void);
0030 #else
0031 static inline void check_for_bios_corruption(void)
0032 {
0033 }
0034 
0035 static inline void start_periodic_check_for_corruption(void)
0036 {
0037 }
0038 #endif
0039 
0040 #endif /* _ASM_X86_BIOS_EBDA_H */