mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[ioapi] Move get_memmap() to the I/O API group
pcbios specific get_memmap() is used by the b44 driver making all-drivers builds fail on other platforms. Move it to the I/O API group and provide a dummy implementation on EFI. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
e3c7a1948d
commit
5bbad9c8f0
@@ -503,4 +503,30 @@ void mb ( void );
|
||||
#define rmb() mb()
|
||||
#define wmb() mb()
|
||||
|
||||
/** A usable memory region */
|
||||
struct memory_region {
|
||||
/** Physical start address */
|
||||
uint64_t start;
|
||||
/** Physical end address */
|
||||
uint64_t end;
|
||||
};
|
||||
|
||||
/** Maximum number of memory regions we expect to encounter */
|
||||
#define MAX_MEMORY_REGIONS 8
|
||||
|
||||
/** A memory map */
|
||||
struct memory_map {
|
||||
/** Memory regions */
|
||||
struct memory_region regions[MAX_MEMORY_REGIONS];
|
||||
/** Number of used regions */
|
||||
unsigned int count;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get memory map
|
||||
*
|
||||
* @v memmap Memory map to fill in
|
||||
*/
|
||||
void get_memmap ( struct memory_map *memmap );
|
||||
|
||||
#endif /* _IPXE_IO_H */
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#ifndef _IPXE_MEMMAP_H
|
||||
#define _IPXE_MEMMAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Memory mapping
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
/** A usable memory region */
|
||||
struct memory_region {
|
||||
/** Physical start address */
|
||||
uint64_t start;
|
||||
/** Physical end address */
|
||||
uint64_t end;
|
||||
};
|
||||
|
||||
/** Maximum number of memory regions we expect to encounter */
|
||||
#define MAX_MEMORY_REGIONS 8
|
||||
|
||||
/** A memory map */
|
||||
struct memory_map {
|
||||
/** Memory regions */
|
||||
struct memory_region regions[MAX_MEMORY_REGIONS];
|
||||
/** Number of used regions */
|
||||
unsigned int count;
|
||||
};
|
||||
|
||||
extern void get_memmap ( struct memory_map *memmap );
|
||||
|
||||
#endif /* _IPXE_MEMMAP_H */
|
||||
Reference in New Issue
Block a user