mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
This patch enables OpenBIOS to initialize on PPC64, enabling support for -cpu 970fx.
It gets up to the boot prompt and works rather good so far, though I haven't been able to run a kernel yet. For more recent PowerPC CPUs the PTE layout has changed, so we need to take that into account and create PTEs according to the new layout and at the new physical positions. Signed-off-by: Alexander Graf <alex@csgraf.de> Signed-off-by: Laurent Vivier <Laurent@vivier.eu> git-svn-id: svn://coreboot.org/openbios/openbios-devel@461 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Laurent Vivier
parent
7563abe630
commit
189c9077a1
@@ -30,6 +30,8 @@ extern void ofmem_release( ulong virt, ulong size );
|
||||
extern ulong ofmem_translate( ulong virt, int *ret_mode );
|
||||
|
||||
#ifdef CONFIG_PPC
|
||||
#define PAGE_SHIFT 12
|
||||
|
||||
ulong get_ram_size( void );
|
||||
ulong get_ram_top( void );
|
||||
ulong get_ram_bottom( void );
|
||||
@@ -39,9 +41,6 @@ void setup_mmu( ulong ramsize );
|
||||
void ofmem_register( phandle_t ph );
|
||||
#elif defined(CONFIG_SPARC32)
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
||||
/* arch/sparc32/lib.c */
|
||||
struct mem;
|
||||
@@ -53,4 +52,10 @@ int map_page(unsigned long va, uint64_t epa, int type);
|
||||
void *map_io(uint64_t pa, int size);
|
||||
#endif
|
||||
|
||||
#ifdef PAGE_SHIFT
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
#endif
|
||||
|
||||
#endif /* _H_OFMEM */
|
||||
|
||||
Reference in New Issue
Block a user