mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
hw_x86_64: Factor out _core_only_mmio_regions function
Move the _core_only_mmio_regions function to the x86_64/platform_support.cc file. This is required to make it overridable for other platforms deriving from x86.
This commit is contained in:
parent
afb827a96f
commit
2a0b6fb541
@ -17,6 +17,7 @@ SRC_S += spec/x86_64/crt0.s
|
||||
# add C++ sources
|
||||
SRC_CC += spec/x86/pic.cc
|
||||
SRC_CC += spec/x86_64/kernel/thread_base.cc
|
||||
SRC_CC += spec/x86_64/platform_support.cc
|
||||
SRC_CC += spec/x86_64/idt.cc
|
||||
SRC_CC += spec/x86_64/tss.cc
|
||||
|
||||
|
@ -33,17 +33,6 @@ Native_region * Platform::_ram_regions(unsigned const i)
|
||||
}
|
||||
|
||||
|
||||
Native_region * Platform::_core_only_mmio_regions(unsigned const i)
|
||||
{
|
||||
static Native_region _regions[] =
|
||||
{
|
||||
{ Board::MMIO_LAPIC_BASE, Board::MMIO_LAPIC_SIZE },
|
||||
{ Board::MMIO_IOAPIC_BASE, Board::MMIO_IOAPIC_SIZE },
|
||||
};
|
||||
return i < sizeof(_regions)/sizeof(_regions[0]) ? &_regions[i] : 0;
|
||||
}
|
||||
|
||||
|
||||
void Platform::_init_io_port_alloc()
|
||||
{
|
||||
_io_port_alloc.add_range(0, 0x10000);
|
||||
|
28
repos/base-hw/src/core/spec/x86_64/platform_support.cc
Normal file
28
repos/base-hw/src/core/spec/x86_64/platform_support.cc
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* \brief Platform implementations specific for x86_64
|
||||
* \author Reto Buerki
|
||||
* \date 2015-05-04
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2015 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
/* core includes */
|
||||
#include <platform.h>
|
||||
#include <board.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
Native_region * Platform::_core_only_mmio_regions(unsigned const i)
|
||||
{
|
||||
static Native_region _regions[] =
|
||||
{
|
||||
{ Board::MMIO_LAPIC_BASE, Board::MMIO_LAPIC_SIZE },
|
||||
{ Board::MMIO_IOAPIC_BASE, Board::MMIO_IOAPIC_SIZE },
|
||||
};
|
||||
return i < sizeof(_regions)/sizeof(_regions[0]) ? &_regions[i] : 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user