File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,7 @@ impl CapDLSpecContainer {
322322 prio : 0 ,
323323 max_prio : 0 ,
324324 resume : false ,
325+ fpu : true ,
325326 ip : entry_point. into ( ) ,
326327 sp : 0 . into ( ) ,
327328 gprs : Vec :: new ( ) ,
@@ -468,7 +469,7 @@ pub fn build_capdl_spec(
468469 )
469470 . unwrap ( ) ;
470471
471- // At this point, all of the required objects for the monitor have been created and it caps inserted into
472+ // At this point, all of the required objects for the monitor have been created and its caps inserted into
472473 // the correct slot in the CSpace. We need to bind those objects into the TCB for the monitor to use them.
473474 // In addition, `add_elf_to_spec()` doesn't fill most the details in the TCB.
474475 // Now fill them in: stack ptr, priority, ipc buf vaddr, etc.
@@ -911,6 +912,7 @@ pub fn build_capdl_spec(
911912 affinity : Word ( vcpu. cpu . 0 . into ( ) ) ,
912913 prio : virtual_machine. priority ,
913914 max_prio : virtual_machine. priority ,
915+ fpu : true ,
914916 resume : false ,
915917 // VMs do not have program images associated with them so these are always zero.
916918 ip : Word ( 0 ) ,
Original file line number Diff line number Diff line change @@ -257,6 +257,8 @@ pub struct ProtectionDomain {
257257 pub smc : bool ,
258258 pub cpu : CpuCore ,
259259 pub program_image : PathBuf ,
260+ /// Enable FPU for this PD.
261+ pub fpu : bool ,
260262 pub maps : Vec < SysMap > ,
261263 pub irqs : Vec < SysIrq > ,
262264 pub ioports : Vec < IOPort > ,
@@ -456,6 +458,7 @@ impl ProtectionDomain {
456458 // but we do the error-checking further down.
457459 "smc" ,
458460 "cpu" ,
461+ "fpu" ,
459462 ] ;
460463 if is_child {
461464 attrs. push ( "id" ) ;
@@ -607,6 +610,13 @@ impl ProtectionDomain {
607610 ) ) ;
608611 }
609612
613+ // FPU is enabled by default
614+ let fpu = if let Some ( xml_fpu) = node. attribute ( "fpu" ) {
615+ !( xml_fpu == "false" )
616+ } else {
617+ true
618+ } ;
619+
610620 for child in node. children ( ) {
611621 if !child. is_element ( ) {
612622 continue ;
@@ -1074,6 +1084,7 @@ impl ProtectionDomain {
10741084 smc,
10751085 cpu,
10761086 program_image : program_image. unwrap ( ) ,
1087+ fpu,
10771088 maps,
10781089 irqs,
10791090 ioports,
You can’t perform that action at this time.
0 commit comments