首页 > 其他分享 >UEFI基础

UEFI基础

时间:2024-09-06 14:47:39浏览次数:12  
标签:Status PROTOCOL DESCRIPTOR PPI 基础 EFI UEFI PEI

UEFI基础知识

启动过程

SEC->PEI->DXE->BDS-> TSL->RT->AL

UEFI组成

UEFI提供给操作系统的接口有启动服务(boot services, BS)和运行时服务(Runtime Servcie,RT),以及BS的protocol。
TSL阶段 --BS&RT--> OS Loader(Grub) ->ExitBootServices() -> Runtime 阶段

几个重要Phase

  1. EndOfPei:在HandOffToDxeCore时被安装
  2. EndOfDxe
  3. ReadyToBoot
  4. ExitBootServices:OS Loader调用

DXE 阶段提供的服务

BootService提供的服务:
事件服务;内存管理;Protocol管理和使用;驱动管理(connect,disconnect); Image 管理;ExitBootService;

BootService
 //
39  // DXE Core Module Variables
40  //
41  EFI_BOOT_SERVICES  mBootServices = {
42    {
43      EFI_BOOT_SERVICES_SIGNATURE,                                                          // Signature
44      EFI_BOOT_SERVICES_REVISION,                                                           // Revision
45      sizeof (EFI_BOOT_SERVICES),                                                           // HeaderSize
46      0,                                                                                    // CRC32
47      0                                                                                     // Reserved
48    },
49    (EFI_RAISE_TPL)CoreRaiseTpl,                                                            // RaiseTPL
50    (EFI_RESTORE_TPL)CoreRestoreTpl,                                                        // RestoreTPL
51    (EFI_ALLOCATE_PAGES)CoreAllocatePages,                                                  // AllocatePages
52    (EFI_FREE_PAGES)CoreFreePages,                                                          // FreePages
53    (EFI_GET_MEMORY_MAP)CoreGetMemoryMap,                                                   // GetMemoryMap
54    (EFI_ALLOCATE_POOL)CoreAllocatePool,                                                    // AllocatePool
55    (EFI_FREE_POOL)CoreFreePool,                                                            // FreePool
56    (EFI_CREATE_EVENT)CoreCreateEvent,                                                      // CreateEvent
57    (EFI_SET_TIMER)CoreSetTimer,                                                            // SetTimer
58    (EFI_WAIT_FOR_EVENT)CoreWaitForEvent,                                                   // WaitForEvent
59    (EFI_SIGNAL_EVENT)CoreSignalEvent,                                                      // SignalEvent
60    (EFI_CLOSE_EVENT)CoreCloseEvent,                                                        // CloseEvent
61    (EFI_CHECK_EVENT)CoreCheckEvent,                                                        // CheckEvent
62    (EFI_INSTALL_PROTOCOL_INTERFACE)CoreInstallProtocolInterface,                           // InstallProtocolInterface
63    (EFI_REINSTALL_PROTOCOL_INTERFACE)CoreReinstallProtocolInterface,                       // ReinstallProtocolInterface
64    (EFI_UNINSTALL_PROTOCOL_INTERFACE)CoreUninstallProtocolInterface,                       // UninstallProtocolInterface
65    (EFI_HANDLE_PROTOCOL)CoreHandleProtocol,                                                // HandleProtocol
66    (VOID *)NULL,                                                                           // Reserved
67    (EFI_REGISTER_PROTOCOL_NOTIFY)CoreRegisterProtocolNotify,                               // RegisterProtocolNotify
68    (EFI_LOCATE_HANDLE)CoreLocateHandle,                                                    // LocateHandle
69    (EFI_LOCATE_DEVICE_PATH)CoreLocateDevicePath,                                           // LocateDevicePath
70    (EFI_INSTALL_CONFIGURATION_TABLE)CoreInstallConfigurationTable,                         // InstallConfigurationTable
71    (EFI_IMAGE_LOAD)CoreLoadImage,                                                          // LoadImage
72    (EFI_IMAGE_START)CoreStartImage,                                                        // StartImage
73    (EFI_EXIT)CoreExit,                                                                     // Exit
74    (EFI_IMAGE_UNLOAD)CoreUnloadImage,                                                      // UnloadImage
75    (EFI_EXIT_BOOT_SERVICES)CoreExitBootServices,                                           // ExitBootServices
76    (EFI_GET_NEXT_MONOTONIC_COUNT)CoreEfiNotAvailableYetArg1,                               // GetNextMonotonicCount
77    (EFI_STALL)CoreStall,                                                                   // Stall
78    (EFI_SET_WATCHDOG_TIMER)CoreSetWatchdogTimer,                                           // SetWatchdogTimer
79    (EFI_CONNECT_CONTROLLER)CoreConnectController,                                          // ConnectController
80    (EFI_DISCONNECT_CONTROLLER)CoreDisconnectController,                                    // DisconnectController
81    (EFI_OPEN_PROTOCOL)CoreOpenProtocol,                                                    // OpenProtocol
82    (EFI_CLOSE_PROTOCOL)CoreCloseProtocol,                                                  // CloseProtocol
83    (EFI_OPEN_PROTOCOL_INFORMATION)CoreOpenProtocolInformation,                             // OpenProtocolInformation
84    (EFI_PROTOCOLS_PER_HANDLE)CoreProtocolsPerHandle,                                       // ProtocolsPerHandle
85    (EFI_LOCATE_HANDLE_BUFFER)CoreLocateHandleBuffer,                                       // LocateHandleBuffer
86    (EFI_LOCATE_PROTOCOL)CoreLocateProtocol,                                                // LocateProtocol
87    (EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)CoreInstallMultipleProtocolInterfaces,        // InstallMultipleProtocolInterfaces
88    (EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)CoreUninstallMultipleProtocolInterfaces,    // UninstallMultipleProtocolInterfaces
89    (EFI_CALCULATE_CRC32)CoreEfiNotAvailableYetArg3,                                        // CalculateCrc32
90    (EFI_COPY_MEM)CopyMem,                                                                  // CopyMem
91    (EFI_SET_MEM)SetMem,                                                                    // SetMem
92    (EFI_CREATE_EVENT_EX)CoreCreateEventEx                                                  // CreateEventEx
93  };

Runtime阶段提供的服务

Runtime Service:
时间,读写变量,虚拟内存,etc

Runtime Service
EFI_RUNTIME_SERVICES  mEfiRuntimeServicesTableTemplate = {
  {
    EFI_RUNTIME_SERVICES_SIGNATURE,                               // Signature
    EFI_RUNTIME_SERVICES_REVISION,                                // Revision
    sizeof (EFI_RUNTIME_SERVICES),                                // HeaderSize
    0,                                                            // CRC32
    0                                                             // Reserved
  },
  (EFI_GET_TIME)CoreEfiNotAvailableYetArg2,                       // GetTime
  (EFI_SET_TIME)CoreEfiNotAvailableYetArg1,                       // SetTime
  (EFI_GET_WAKEUP_TIME)CoreEfiNotAvailableYetArg3,                // GetWakeupTime
  (EFI_SET_WAKEUP_TIME)CoreEfiNotAvailableYetArg2,                // SetWakeupTime
  (EFI_SET_VIRTUAL_ADDRESS_MAP)CoreEfiNotAvailableYetArg4,        // SetVirtualAddressMap
  (EFI_CONVERT_POINTER)CoreEfiNotAvailableYetArg2,                // ConvertPointer
  (EFI_GET_VARIABLE)CoreEfiNotAvailableYetArg5,                   // GetVariable
  (EFI_GET_NEXT_VARIABLE_NAME)CoreEfiNotAvailableYetArg3,         // GetNextVariableName
  (EFI_SET_VARIABLE)CoreEfiNotAvailableYetArg5,                   // SetVariable
  (EFI_GET_NEXT_HIGH_MONO_COUNT)CoreEfiNotAvailableYetArg1,       // GetNextHighMonotonicCount
  (EFI_RESET_SYSTEM)CoreEfiNotAvailableYetArg4,                   // ResetSystem
  (EFI_UPDATE_CAPSULE)CoreEfiNotAvailableYetArg3,                 // UpdateCapsule
  (EFI_QUERY_CAPSULE_CAPABILITIES)CoreEfiNotAvailableYetArg4,     // QueryCapsuleCapabilities
  (EFI_QUERY_VARIABLE_INFO)CoreEfiNotAvailableYetArg4             // QueryVariableInfo
};

PEI阶段提供的服务

PPI, Pei 阶段读写变量是通过PPI来读写的。

Flags用于描述PPI的类型,常用的有下面几种:

  1. EFI_PEI_PPI_DESCRIPTOR_PPI,常用于Installppi,此时ppi是该Guid对应的一些函数,通过LocatePpi可以调用这些函数;
  2. EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,常用于注册Guid对应的callback,此时ppi就是callback函数,一般用于notify。当调用notifyppi时,如果Guid已经被安装了,则直接执行callback,如果对应的Guid没有安装时,在调用Installppi,会自动调用callback函数。
点击查看代码
typedef struct {
  ///
  /// This field is a set of flags describing the characteristics of this imported table entry.
  /// All flags are defined as EFI_PEI_PPI_DESCRIPTOR_***, which can also be combined into one.
  ///
  UINTN       Flags;
  ///
  /// The address of the EFI_GUID that names the interface.
  ///
  EFI_GUID    *Guid;
  ///
  /// A pointer to the PPI. It contains the information necessary to install a service.
  ///
  VOID        *Ppi;
} EFI_PEI_PPI_DESCRIPTOR;
///
/// The data structure in a given PEIM that tells the PEI
/// Foundation where to invoke the notification service.
///
struct _EFI_PEI_NOTIFY_DESCRIPTOR {
  ///
  /// Details if the type of notification are callback or dispatch.
  ///
  UINTN                          Flags;
  ///
  /// The address of the EFI_GUID that names the interface.
  ///
  EFI_GUID                       *Guid;
  ///
  /// Address of the notification callback function itself within the PEIM.
  ///
  EFI_PEIM_NOTIFY_ENTRY_POINT    Notify;
};

///
/// This data structure is the means by which callable services are installed and
/// notifications are registered in the PEI phase.
///
typedef union {
  ///
  /// The typedef structure of the notification descriptor.
  ///
  EFI_PEI_NOTIFY_DESCRIPTOR    Notify;
  ///
  /// The typedef structure of the PPI descriptor.
  ///
  EFI_PEI_PPI_DESCRIPTOR       Ppi;
} EFI_PEI_DESCRIPTOR;

PPI在PeiCore的全局变量PeiCore Instance中

PeiCore全局变量

PeiCore PrivateData
///
/// Pei Core private data structure instance
///
struct _PEI_CORE_INSTANCE {
  UINTN                             Signature;

  ///
  /// Point to ServiceTableShadow
  ///
  EFI_PEI_SERVICES                  *Ps;
  PEI_PPI_DATABASE                  PpiData;

  ///
  /// The count of FVs which contains FFS and could be dispatched by PeiCore.
  ///
  UINTN                             FvCount;

  ///
  /// The max count of FVs which contains FFS and could be dispatched by PeiCore.
  ///
  UINTN                             MaxFvCount;

  ///
  /// Pointer to the buffer with the MaxFvCount number of entries.
  /// Each entry is for one FV which contains FFS and could be dispatched by PeiCore.
  ///
  PEI_CORE_FV_HANDLE                *Fv;

  ///
  /// Pointer to the buffer with the MaxUnknownFvInfoCount number of entries.
  /// Each entry is for one FV which could not be dispatched by PeiCore.
  ///
  PEI_CORE_UNKNOW_FORMAT_FV_INFO    *UnknownFvInfo;
  UINTN                             MaxUnknownFvInfoCount;
  UINTN                             UnknownFvInfoCount;

  ///
  /// Pointer to the buffer FvFileHandlers in PEI_CORE_FV_HANDLE specified by CurrentPeimFvCount.
  ///
  EFI_PEI_FILE_HANDLE               *CurrentFvFileHandles;
  UINTN                             AprioriCount;
  UINTN                             CurrentPeimFvCount;
  UINTN                             CurrentPeimCount;
  EFI_PEI_FILE_HANDLE               CurrentFileHandle;
  BOOLEAN                           PeimNeedingDispatch;
  BOOLEAN                           PeimDispatchOnThisPass;
  BOOLEAN                           PeimDispatcherReenter;
  EFI_PEI_HOB_POINTERS              HobList;
  BOOLEAN                           SwitchStackSignal;
  BOOLEAN                           PeiMemoryInstalled;
  VOID                              *CpuIo;
  EFI_PEI_SECURITY2_PPI             *PrivateSecurityPpi;
  EFI_PEI_SERVICES                  ServiceTableShadow;
  EFI_PEI_PPI_DESCRIPTOR            *XipLoadFile;
  EFI_PHYSICAL_ADDRESS              PhysicalMemoryBegin;
  UINT64                            PhysicalMemoryLength;
  EFI_PHYSICAL_ADDRESS              FreePhysicalMemoryTop;
  UINTN                             HeapOffset;
  BOOLEAN                           HeapOffsetPositive;
  UINTN                             StackOffset;
  BOOLEAN                           StackOffsetPositive;
  //
  // Information for migrating memory pages allocated in pre-memory phase.
  //
  HOLE_MEMORY_DATA                  MemoryPages;
  PEICORE_FUNCTION_POINTER          ShadowedPeiCore;
  CACHE_SECTION_DATA                CacheSection;
  //
  // For Loading modules at fixed address feature to cache the top address below which the
  // Runtime code, boot time code and PEI memory will be placed. Please note that the offset between this field
  // and Ps should not be changed since maybe user could get this top address by using the offset to Ps.
  //
  EFI_PHYSICAL_ADDRESS              LoadModuleAtFixAddressTopAddress;
  //
  // The field is define for Loading modules at fixed address feature to tracker the PEI code
  // memory range usage. It is a bit mapped array in which every bit indicates the corresponding memory page
  // available or not.
  //
  UINT64                            *PeiCodeMemoryRangeUsageBitMap;
  //
  // This field points to the shadowed image read function
  //
  PE_COFF_LOADER_READ_FILE          ShadowedImageRead;

  UINTN                             TempPeimCount;

  //
  // Pointer to the temp buffer with the TempPeimCount number of entries.
  //
  EFI_PEI_FILE_HANDLE               *TempFileHandles;
  //
  // Pointer to the temp buffer with the TempPeimCount number of entries.
  //
  EFI_GUID                          *TempFileGuid;

  //
  // Temp Memory Range is not covered by PeiTempMem and Stack.
  // Those Memory Range will be migrated into physical memory.
  //
  HOLE_MEMORY_DATA                  HoleData[HOLE_MAX_NUMBER];
};

Pei Service

Pei Service
///
/// Pei service instance
///
EFI_PEI_SERVICES  gPs = {
  {
    PEI_SERVICES_SIGNATURE,
    PEI_SERVICES_REVISION,
    sizeof (EFI_PEI_SERVICES),
    0,
    0
  },
  PeiInstallPpi,
  PeiReInstallPpi,
  PeiLocatePpi,
  PeiNotifyPpi,

  PeiGetBootMode,
  PeiSetBootMode,

  PeiGetHobList,
  PeiCreateHob,

  PeiFfsFindNextVolume,
  PeiFfsFindNextFile,
  PeiFfsFindSectionData,

  PeiInstallPeiMemory,
  PeiAllocatePages,
  PeiAllocatePool,
  (EFI_PEI_COPY_MEM)CopyMem,
  (EFI_PEI_SET_MEM)SetMem,

  PeiReportStatusCode,
  PeiResetSystem,

  &gPeiDefaultCpuIoPpi,
  &gPeiDefaultPciCfg2Ppi,

  PeiFfsFindFileByName,
  PeiFfsGetFileInfo,
  PeiFfsGetVolumeInfo,
  PeiRegisterForShadow,
  PeiFfsFindSectionData3,
  PeiFfsGetFileInfo2,
  PeiResetSystem2,
  PeiFreePages,
};

UEFI —— Status Code用法

PEI 阶段用法

是PeiServices中的一个组成。
code: Edk2\MdeModulePkg\Universal\ReportStatusCodeRouter\Pei\ReportStatusCodeRouterPei.c
整体逻辑:

  1. 调用ReportStatusCode
  2. 挂在gEfiPeiRscHandlerPpiGuid上的handler都会跑一便
  3. 执行对应的callback

gEfiPeiRscHandlerPpiGuid 用于注册和卸载handler
gEfiPeiStatusCodePpiGuid 用于当有人调用ReportStatusCode的时候,搜寻并执行gEfiPeiRscHandlerPpiGuid 注册的所有handler

Ppi
EFI_PEI_RSC_HANDLER_PPI  mRscHandlerPpi = {
  Register,
  Unregister
};

EFI_PEI_PROGRESS_CODE_PPI  mStatusCodePpi = {
  ReportDispatcher
};

EFI_PEI_PPI_DESCRIPTOR  mRscHandlerPpiList[] = {
  {
    EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
    &gEfiPeiRscHandlerPpiGuid,
    &mRscHandlerPpi
  }
};

EFI_PEI_PPI_DESCRIPTOR  mStatusCodePpiList[] = {
  {
    EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
    &gEfiPeiStatusCodePpiGuid,
    &mStatusCodePpi
  }
};

Runtime,DXE阶段

Protocol

EFI_STATUS_CODE_PROTOCOL  mStatusCodeProtocol = {
  ReportDispatcher
};

EFI_RSC_HANDLER_PROTOCOL  mRscHandlerProtocol = {
  Register,
  Unregister
};

SMM 阶段

Protocol
EFI_MM_STATUS_CODE_PROTOCOL  mSmmStatusCodeProtocol = {
  ReportDispatcher
};

EFI_MM_RSC_HANDLER_PROTOCOL  mSmmRscHandlerProtocol = {
  Register,
  Unregister
};

Event 的使用方法

ref:Edk2\MdeModulePkg\Core\Dxe\Event\Event.c

  1. CreateEvent的用法
    a. 如果是EVT_NOTIFY_SIGNAL,就入队gEventSignalQueue

    点击查看代码
      if ((Type & EVT_NOTIFY_SIGNAL) != 0x00000000) {
        //
        // The Event's NotifyFunction must be queued whenever the event is signaled
        //
        InsertHeadList (&gEventSignalQueue, &IEvent->SignalLink);
      }
    
  2. SignalEvent&NotifyEvent的用法
    a. gEventSignalQueue,以组为单位筛选Event,然后再用gEventQueue筛选Event。
    b. gEventQueue,以Tpl为key记录的队列。

  3. 在CoreInstallProtocolInterface/Reintall中中,类似于PPI,也会notify对应Protocol Guid的event.

    代码如下
    VOID
    CoreNotifyProtocolEntry (
      IN PROTOCOL_ENTRY  *ProtEntry
      )
    {
      PROTOCOL_NOTIFY  *ProtNotify;
      LIST_ENTRY       *Link;
    
      ASSERT_LOCKED (&gProtocolDatabaseLock);
    
      for (Link = ProtEntry->Notify.ForwardLink; Link != &ProtEntry->Notify; Link = Link->ForwardLink) {
        ProtNotify = CR (Link, PROTOCOL_NOTIFY, Link, PROTOCOL_NOTIFY_SIGNATURE);
        CoreSignalEvent (ProtNotify->Event);
      }
    }
    
    

示例一

先创建一个event,然后把event挂在一个Protocol的GUID上,之后在install protocol时会调用notifyEvent,或者SignalEvent

  Status = gBS->CreateEvent (
                             EVT_NOTIFY_SIGNAL,
                             TPL_NOTIFY,
                             DxeNotifyCallback,
                             NULL,
                             &NotifyEvent
                             );

  if (!EFI_ERROR (Status)) {
    Status = gBS->RegisterProtocolNotify (
                                          ProtocolGuid,
                                          NotifyEvent,
                                          &Registration
                                          );

示例二

先CreateEvent,然后SignalEvent,最后CloseEvent
  Status = gBS->CreateEventEx (
                  EVT_NOTIFY_SIGNAL,
                  TPL_CALLBACK,
                  InternalBdsEmptyCallbackFuntion,
                  NULL,
                  &gEfiEndOfDxeEventGroupGuid,
                  &EndOfDxeEvent
                  );
  ASSERT_EFI_ERROR (Status);
  gBS->SignalEvent (EndOfDxeEvent);
  gBS->CloseEvent (EndOfDxeEvent);
  DEBUG((DEBUG_INFO,"All EndOfDxe callbacks have returned successfully\n"));

示例三

先CreateEvent,然后WaitForEvent
/**
  Function waits for a given event to fire, or for an optional timeout to expire.

  @param   Event              The event to wait for
  @param   Timeout            An optional timeout value in 100 ns units.

  @retval  EFI_SUCCESS      Event fired before Timeout expired.
  @retval  EFI_TIME_OUT     Timout expired before Event fired..

**/
EFI_STATUS
BdsWaitForSingleEvent (
  IN  EFI_EVENT  Event,
  IN  UINT64     Timeout       OPTIONAL
  )
{
  UINTN       Index;
  EFI_STATUS  Status;
  EFI_EVENT   TimerEvent;
  EFI_EVENT   WaitList[2];

  if (Timeout != 0) {
    //
    // Create a timer event
    //
    Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);
    if (!EFI_ERROR (Status)) {
      //
      // Set the timer event
      //
      gBS->SetTimer (
             TimerEvent,
             TimerRelative,
             Timeout
             );

      //
      // Wait for the original event or the timer
      //
      WaitList[0] = Event;
      WaitList[1] = TimerEvent;
      Status      = gBS->WaitForEvent (2, WaitList, &Index);
      ASSERT_EFI_ERROR (Status);
      gBS->CloseEvent (TimerEvent);

      //
      // If the timer expired, change the return to timed out
      //
      if (Index == 1) {
        Status = EFI_TIMEOUT;
      }
    }
  } else {
    //
    // No timeout... just wait on the event
    //
    Status = gBS->WaitForEvent (1, &Event, &Index);
    ASSERT (!EFI_ERROR (Status));
    ASSERT (Index == 0);
  }

  return Status;
}

标签:Status,PROTOCOL,DESCRIPTOR,PPI,基础,EFI,UEFI,PEI
From: https://www.cnblogs.com/nipper/p/18376556

相关文章

  • 如何从0基础开始学习Linux?
    Linux作为一种开源的操作系统,越来越受到IT行业的青睐,而且在服务器市场上,Linux系统因其稳定安全、免费开源和高效便捷等优点在市场占有率高达80%,因此吸引了一大波人前来学习。那么0基础学Linux培训难不难?以下是具体内容介绍。0基础学Linux培训难不难?对于零基础的初学......
  • 基于人工智能实验平台的OpenCV图片基础操作实践
    opencv图片基础操作之图片读取/保存/显示1.1实验目的熟悉opencv读入图片,存储图片,视频的读取、存储。1.2实验设备安装了python和pychrm的电脑一台。1.3实验内容包含图片的导入、存储,摄像头视频的读取、存储等。1.4实验原理读/写图像文件OpenCV的imread()函数和im......
  • 测试基础、单元测试自动化
    基本概念自动化测试,也叫软件测试自动化。要学习软件测试自动化,首先就需要清楚什么是软件测试。软件测试因为当局者迷,旁观者清的道理,软件开发是个复杂而周期性的过程,期间很容易产生或遗留下错误,而对于开发人员自己所编写与开发的应用程序(软件),往往有很多问题是他们自己发现不了,所......
  • python语言基础(七)--多进程多线程
    多进程,多线程1、多任务概述多个任务同时执行目的节约资源,充分利用CPU资源,提高效率表现形式并发:针对于单核CPU来讲的,如果有多个任务同时请求执行,但是同一瞬间CPU只能执行1个(任务),于是就安排它们交替执行.因为时间间隔非常短(CPU执行速度太快......
  • Python全网最全基础课程笔记(五)——选择结构+Python新特性Match
    本专栏系列为Pythong基础系列,每篇内容非常全面,包含全网各个知识点,非常长,请耐心看完。每天都会更新新的内容,搜罗全网资源以及自己在学习和工作过程中的一些总结,可以说是非常详细和全面。以至于为什么要写的这么详细:自己也是学过Python的,很多新手只是简单的过一篇语法,其实对......
  • 软件架构基础
    前言:无效的公理公理是一种陈述或命题,被认为是基本的、无需证明的真理。在数学中,公理是构建理论体系的基石。然而,在软件架构领域,我们发现许多曾经被视为公理的观念,随着时间的推移和软件开发生态系统的不断演进,逐渐变得不再适用或需要重新审视。软件架构师一直努力在不断变化......
  • 350页前端校招面试题直击大厂:前端基础、前端核心、计算机基础、项目、Hr面
    **1.HTML2.CSS3.前端基础4.前端核心5.前端进阶6.移动端开发7.计算机基础8.算法与数据结构9.设计模式10.项目11.职业发展12.Hr面**正文HTML1.浏览器页面有哪三层构成,分别是什么,作用是什么?2.HTML5的优点与缺点?3.Doctype作用?严格模式与混杂模式如何区分?它......
  • IM开发者的零基础通信技术入门(十四):高铁上无线上网有多难?一文即懂!
    【来源申明】本文引用了微信公众号“鲜枣课堂”的《坐高铁手机没信号?原因远比你想的要复杂!》文章内容。为了更好的内容呈现,本文在引用和收录时内容有改动,转载时请注明原文来源信息,尊重原作者的劳动。1、系列文章引言1.1适合谁来阅读?本系列文章尽量使用最浅显易懂的文字、图片......
  • [Java基础]hashcode/equals
    hashcode()/equals()/====当==左右两边是基本类型的时候,比较的是数值是否相等;当==左右两边是对象(引用)类型的时候,比较的是p和p2这两个对象所指向的堆中的对象地址对于==来说,不管是比较基本数据类型,还是引用数据类型的变量,其本质比较的都是值,只是引用类型变量存的值是......
  • pwn基础(一)环境搭建
    "Pwn"是一个黑可语法的俚语词,源自动词"own",表示攻破或控制设备或系统。它常用于描述成功利用系统或应用程序的漏动,绕过安全措施并获取系统权限的行为。在网络安全领域,"pwn"通常与二进制漏动利用相关,涉及分析程序、发现漏动并构造特定的输入或代码来触发这些漏动,从而实现对目标系统......