diff --git a/repos/gems/src/app/sculpt_manager/deploy.h b/repos/gems/src/app/sculpt_manager/deploy.h index 5ec2326dc7..b2aeed5432 100644 --- a/repos/gems/src/app/sculpt_manager/deploy.h +++ b/repos/gems/src/app/sculpt_manager/deploy.h @@ -65,6 +65,7 @@ struct Sculpt::Deploy _child_states, { .name = "depot_rom", .priority = Priority::STORAGE, .cpu_quota = 0, + .location = { }, .initial = { Ram_quota{24*1024*1024}, Cap_quota{200} }, .max = { Ram_quota{2*1024*1024*1024UL}, { } } } }; @@ -72,6 +73,7 @@ struct Sculpt::Deploy _child_states, { .name = "dynamic_depot_rom", .priority = Priority::STORAGE, .cpu_quota = 0, + .location = { }, .initial = { Ram_quota{8*1024*1024}, Cap_quota{200} }, .max = { Ram_quota{2*1024*1024*1024UL}, { } } } }; diff --git a/repos/gems/src/app/sculpt_manager/driver/fb.h b/repos/gems/src/app/sculpt_manager/driver/fb.h index 94c60fe394..9ba70766dd 100644 --- a/repos/gems/src/app/sculpt_manager/driver/fb.h +++ b/repos/gems/src/app/sculpt_manager/driver/fb.h @@ -169,6 +169,7 @@ struct Sculpt::Fb_driver : private Noncopyable .name = "fb", .priority = Priority::MULTIMEDIA, .cpu_quota = 20, + .location = { }, .initial = { Ram_quota { 16*1024*1024 }, Cap_quota { 250 } }, .max = { } } ); diff --git a/repos/gems/src/app/sculpt_manager/driver/touch.h b/repos/gems/src/app/sculpt_manager/driver/touch.h index 0fde42c103..1496adf103 100644 --- a/repos/gems/src/app/sculpt_manager/driver/touch.h +++ b/repos/gems/src/app/sculpt_manager/driver/touch.h @@ -51,6 +51,7 @@ struct Sculpt::Touch_driver : private Noncopyable .name = "touch", .priority = Priority::MULTIMEDIA, .cpu_quota = 10, + .location = { }, .initial = { Ram_quota { 10*1024*1024 }, Cap_quota { 250 } }, .max = { } } ); diff --git a/repos/gems/src/app/sculpt_manager/model/child_state.h b/repos/gems/src/app/sculpt_manager/model/child_state.h index b4a613c1d2..d9985981c6 100644 --- a/repos/gems/src/app/sculpt_manager/model/child_state.h +++ b/repos/gems/src/app/sculpt_manager/model/child_state.h @@ -36,6 +36,8 @@ struct Sculpt::Child_state : Noncopyable Priority priority; unsigned cpu_quota; + Affinity::Location location; + struct Initial { Ram_quota ram; Cap_quota caps; } initial; struct Max { Ram_quota ram; Cap_quota caps; } max; @@ -64,6 +66,11 @@ struct Sculpt::Child_state : Noncopyable Version _version { 0 }; + static bool _location_valid(Attr const attr) + { + return attr.location.width() != 0 && attr.location.height() != 0; + } + public: Child_state(Registry ®istry, Attr const attr) @@ -75,6 +82,7 @@ struct Sculpt::Child_state : Noncopyable Child_state(registry, { .name = name, .priority = priority, .cpu_quota = 0, + .location = { }, .initial = { initial_ram, initial_caps }, .max = { } }) { } @@ -108,6 +116,14 @@ struct Sculpt::Child_state : Noncopyable if (_attr.cpu_quota) gen_named_node(xml, "resource", "CPU", [&] { xml.attribute("quantum", _attr.cpu_quota); }); + + if (_location_valid(_attr)) + xml.node("affinity", [&] { + xml.attribute("xpos", _attr.location.xpos()); + xml.attribute("ypos", _attr.location.ypos()); + xml.attribute("width", _attr.location.width()); + xml.attribute("height", _attr.location.height()); + }); } /** diff --git a/repos/gems/src/app/sculpt_manager/model/ram_fs_state.h b/repos/gems/src/app/sculpt_manager/model/ram_fs_state.h index 97312fbf2b..0046868239 100644 --- a/repos/gems/src/app/sculpt_manager/model/ram_fs_state.h +++ b/repos/gems/src/app/sculpt_manager/model/ram_fs_state.h @@ -37,6 +37,7 @@ struct Sculpt::Ram_fs_state : Child_state, File_system Child_state(registry, { .name = name, .priority = Priority::LEITZENTRALE, .cpu_quota = 0, + .location = { }, .initial = { Ram_quota{1024*1024}, Cap_quota{300} }, .max = { Ram_quota{2*1024*1024*1024UL}, { } } }), File_system(File_system::UNKNOWN)