xref: /linux/arch/x86/include/asm/bios_ebda.h (revision bb8985586b7a906e116db835c64773b7a7d51663)
1*bb898558SAl Viro #ifndef ASM_X86__BIOS_EBDA_H
2*bb898558SAl Viro #define ASM_X86__BIOS_EBDA_H
3*bb898558SAl Viro 
4*bb898558SAl Viro #include <asm/io.h>
5*bb898558SAl Viro 
6*bb898558SAl Viro /*
7*bb898558SAl Viro  * there is a real-mode segmented pointer pointing to the
8*bb898558SAl Viro  * 4K EBDA area at 0x40E.
9*bb898558SAl Viro  */
10*bb898558SAl Viro static inline unsigned int get_bios_ebda(void)
11*bb898558SAl Viro {
12*bb898558SAl Viro 	unsigned int address = *(unsigned short *)phys_to_virt(0x40E);
13*bb898558SAl Viro 	address <<= 4;
14*bb898558SAl Viro 	return address;	/* 0 means none */
15*bb898558SAl Viro }
16*bb898558SAl Viro 
17*bb898558SAl Viro void reserve_ebda_region(void);
18*bb898558SAl Viro 
19*bb898558SAl Viro #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
20*bb898558SAl Viro /*
21*bb898558SAl Viro  * This is obviously not a great place for this, but we want to be
22*bb898558SAl Viro  * able to scatter it around anywhere in the kernel.
23*bb898558SAl Viro  */
24*bb898558SAl Viro void check_for_bios_corruption(void);
25*bb898558SAl Viro void start_periodic_check_for_corruption(void);
26*bb898558SAl Viro #else
27*bb898558SAl Viro static inline void check_for_bios_corruption(void)
28*bb898558SAl Viro {
29*bb898558SAl Viro }
30*bb898558SAl Viro 
31*bb898558SAl Viro static inline void start_periodic_check_for_corruption(void)
32*bb898558SAl Viro {
33*bb898558SAl Viro }
34*bb898558SAl Viro #endif
35*bb898558SAl Viro 
36*bb898558SAl Viro #endif /* ASM_X86__BIOS_EBDA_H */
37