Merge "kata-logger: use a larger ipc buffer"

GitOrigin-RevId: 2801cc0bbdf62bd9e468e0e14d04f8bf740e72ee
This commit is contained in:
Sam Leffler
2021-09-03 18:01:00 +00:00
parent 3b609285ad
commit a3bd1a6026
3 changed files with 12 additions and 6 deletions

View File

@@ -16,6 +16,7 @@ project(system)
CAmkESAddImportPath(interfaces)
includeGlobalComponents()
include(${CMAKE_CURRENT_LIST_DIR}/rust.cmake)
RustAddLibrary(

View File

@@ -3,7 +3,9 @@
use cstr_core::CStr;
use log::{Metadata, Record};
const MAX_MSG_LEN: usize = 256;
// TODO(sleffler): until we can copy directly into shared memory limit
// stack allocation (can be up to 4096).
const MAX_MSG_LEN: usize = 2048;
pub struct KataLogger;
@@ -128,7 +130,7 @@ mod tests {
// NB: to run these sequentially use --test-threads=1; otherwise
// cargo will use multiple threads and you will get failures from
// multiple users of MSGS and the global logger; e.g.
// cargo +nightly test -- --test-threads=1
// cargo test -- --test-threads=1
#[test]
fn test_each_log_level_works() {

View File

@@ -11,6 +11,7 @@
*/
import <std_connector.camkes>;
import <global-connectors.camkes>;
import "interfaces/dataport_io.idl4";
import "interfaces/VectorCoreInterface.camkes";
@@ -81,10 +82,12 @@ assembly {
from debug_console.uart_rx, to uart_driver.rx);
// Connect the LoggerInterface to each component that needs to log
// to the console.
connection seL4RPCCall LoggerInterface(from process_manager.logger,
from ml_coordinator.logger,
to debug_console.logger);
// to the console. Note this allocates a 4KB shared memory region to
// each component and copies data between components.
connection seL4RPCOverMultiSharedData LoggerInterface(
from process_manager.logger,
from ml_coordinator.logger,
to debug_console.logger);
// Connect the SeL4Debug interface of each component that needs access.
connection seL4RPCCall SeL4DebugInterface(from debug_console.sel4debug,