x86: Add support for (paging-based) protection domains
This patch implements a simple, lightweight form of protection domains using a pluggable framework. Currently, the following plugin is available: - Flat memory model with paging. The overall goal of a protection domain implementation within this framework is to define a set of resources that should be accessible to each protection domain and to prevent that protection domain from accessing other resources. The details of each implementation of protection domains may differ substantially, but they should all be guided by the principle of least privilege. However, that idealized principle is balanced against the practical objectives of limiting the number of relatively time-consuming context switches and minimizing changes to existing code. For additional information, please refer to cpu/x86/mm/README.md. This patch also causes the C compiler to be used as the default linker and assembler.
This commit is contained in:
parent
b0de416682
commit
3908253038
48 changed files with 3558 additions and 295 deletions
|
@ -32,8 +32,8 @@
|
|||
#include "uart-16x50.h"
|
||||
#include <assert.h>
|
||||
|
||||
static uart_16x50_driver_t quarkX1000_uart0;
|
||||
static uart_16x50_driver_t quarkX1000_uart1;
|
||||
PROT_DOMAINS_ALLOC(uart_16x50_driver_t, quarkX1000_uart0);
|
||||
PROT_DOMAINS_ALLOC(uart_16x50_driver_t, quarkX1000_uart1);
|
||||
|
||||
/* Divisor setting for 115200 baud from section 18.2.2 of Intel Quark SoC
|
||||
* X1000 Datasheet.
|
||||
|
@ -49,6 +49,7 @@ void
|
|||
quarkX1000_uart_init(quarkX1000_uart_dev_t dev)
|
||||
{
|
||||
pci_config_addr_t pci_addr;
|
||||
uart_16x50_driver_t *drv;
|
||||
|
||||
assert((dev == QUARK_X1000_UART_0) || (dev == QUARK_X1000_UART_1));
|
||||
|
||||
|
@ -59,7 +60,14 @@ quarkX1000_uart_init(quarkX1000_uart_dev_t dev)
|
|||
pci_addr.func = (dev == QUARK_X1000_UART_0) ? 1 : 5;
|
||||
pci_addr.reg_off = PCI_CONFIG_REG_BAR0;
|
||||
|
||||
uart_16x50_init((dev == QUARK_X1000_UART_0) ? &quarkX1000_uart0 : &quarkX1000_uart1, pci_addr, QUARK_X1000_UART_DL_115200);
|
||||
if(dev == QUARK_X1000_UART_0) {
|
||||
drv = &quarkX1000_uart0;
|
||||
PROT_DOMAINS_INIT_ID(quarkX1000_uart0);
|
||||
} else {
|
||||
drv = &quarkX1000_uart1;
|
||||
PROT_DOMAINS_INIT_ID(quarkX1000_uart1);
|
||||
}
|
||||
uart_16x50_init(drv, pci_addr, QUARK_X1000_UART_DL_115200);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue