Hello, everyone.

I'm interested in memory encryption.
I am developing a function to encrypt the contents of memory.
I was able to develop a function that reads packet data in SE mode and 
encrypts/decrypts it.
We are using getConstPtr() to get the value by incrementing from the address, 
and then encrypting and decrypting.
However, we could not develop the initialization part properly, and the 
simulation terminates with an unmapped address.
My current idea is to create a "new protected area" by mapping a new virtual 
address, encrypt all the existing memory data, copy it to the new area, and 
update the packet address every time.
I could not think of a way to implement this method with my skills.
Do you have any good ideas for implementation or a more concise method of 
initialization?

Configuration
gem5 version x21.0.1.0
Architecture x86
CPU OoO CPU
I would like to ask about the Enc/Dec Engine in the configuration below.
CPU -> Cache -> Enc/Dec Engine -> MeCtlr - > memory

Log just before exit when ALL is specified as debug flag

 173000: system.cache_bus.respLayer0.wrapped_function_event: 
EventFunctionWrapped 35 executed @ 173000
 173000: 
system.cache_bus.cpu_side_port[0]-RespPacketQueue.wrapped_function_event: 
EventFunctionWrapped 34 executed @ 173000
 173000: system.cpu.icache_port: Received fetch response 0x1008
 173000: Event_47: Timing CPU icache tick 47 scheduled @ 173000
 173000: Event_47: Timing CPU icache tick 47 executed @ 173000
 173000: system.cpu: Complete ICache Fetch for addr 0x1008
 173000: system.cpu.[tid:0]: Setting int reg 16 (16) to 0.
 173000: global: Getting more bytes.
 173000: global: Collecting 8 byte immediate, got 8 bytes.
 173000: global: Collected immediate 0x2cd00a1ab1add2e.
 173000: global: Calculating the instruction size: basePC: 0x401008 offset: 0x5 
origPC: 0x401004 size: 9
 173000: global: Decode: Decoded mov instruction:
{
        leg = 0,
        rex = 0,
        vex/xop = 0,
        op = {
                type = one byte,
                op = 0xa0,
                },
        modRM = 0,
        sib = 0,
        immediate = 0x2cd00a1ab1add2e,
        displacement = 0
        dispSize = 0}

 173000: system.cpu.[tid:0]: Setting int reg 17 (17) to 0x2cd00a1ab1add2e.
 173000: system.cpu: A0 T0 : 0x401004 @_start    : mov  al
 173000: system.cpu: A0 T0 : 0x401004 @_start. 0 :   MOV_R_MI : limm   t1, 
0x2cd00a1ab1add2e : IntAlu :  D=0x02cd00a1ab1add2e  
flags=(IsInteger|IsMicroop|IsDelayedCommit|IsFirstMicroop)
 173000: system.cpu: Fetch
 173000: system.cpu: Complete ICache Fetch for addr 0
 173000: system.cpu.[tid:0]: Setting int reg 16 (16) to 0.
 173000: system.cpu.[tid:0]: Reading int reg 16 (16) as 0.
 173000: system.cpu.[tid:0]: Reading int reg 17 (17) as 0x2cd00a1ab1add2e.
 173000: global: MOV_R_MI : ld: The address is 0x2cd00a1ab1add2e
 173000: system.cpu.mmu.dtb: Translating vaddr 0x2cd00a1ab1add2e.
 173000: system.cpu.mmu.dtb: In protected mode.
 173000: system.cpu.mmu.dtb: Paging enabled.
 173000: system.cpu.mmu.dtb: Handling a TLB miss for address 0x2cd00a1ab1add2e 
at pc 0x401004.
 173000: system.cpu: A0 T0 : 0x401004 @_start. 1 :   MOV_R_MI : ld   al, 
DS:[t1] : MemRead :  A=0x2cd00a1ab1add2e  
flags=(IsInteger|IsLoad|IsMicroop|IsLastMicroop)
 173000: system.cpu: Fault occured. Handling the fault
panic: Tried to read unmapped address 0x2cd00a1ab1add2e.
PC: 0x401004, Instr:   MOV_R_MI : ld   al, DS:[t1]
Memory Usage: 1154604 KBytes
Program aborted at tick 173000
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to