cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

e820_memory_layout.h (893B)


      1/*
      2 * QEMU BIOS e820 routines
      3 *
      4 * Copyright (c) 2003-2004 Fabrice Bellard
      5 *
      6 * SPDX-License-Identifier: MIT
      7 */
      8
      9#ifndef HW_I386_E820_H
     10#define HW_I386_E820_H
     11
     12/* e820 types */
     13#define E820_RAM        1
     14#define E820_RESERVED   2
     15#define E820_ACPI       3
     16#define E820_NVS        4
     17#define E820_UNUSABLE   5
     18
     19#define E820_NR_ENTRIES 16
     20
     21struct e820_entry {
     22    uint64_t address;
     23    uint64_t length;
     24    uint32_t type;
     25} QEMU_PACKED __attribute((__aligned__(4)));
     26
     27struct e820_table {
     28    uint32_t count;
     29    struct e820_entry entry[E820_NR_ENTRIES];
     30} QEMU_PACKED __attribute((__aligned__(4)));
     31
     32extern struct e820_table e820_reserve;
     33extern struct e820_entry *e820_table;
     34
     35int e820_add_entry(uint64_t address, uint64_t length, uint32_t type);
     36int e820_get_num_entries(void);
     37bool e820_get_entry(int index, uint32_t type,
     38                    uint64_t *address, uint64_t *length);
     39
     40
     41
     42#endif